lockserver/zwavejs/messages-outgoing.go

27 lines
630 B
Go

package zwavejs
type OutgoingMessageIface interface {
SetMessageID(string)
}
type OutgoingMessage struct {
MessageID string `json:"messageId"`
Command Command `json:"command"`
}
func (o *OutgoingMessage) SetMessageID(id string) {
o.MessageID = id
}
type InitializeMessage struct {
OutgoingMessage
SchemaVersion int `json:"schemaVersion"`
AdditionalUserAgentComponents map[string]string `json:"additionalUserAgentComponents"`
}
type NodeSetValueMessage struct {
OutgoingMessage
NodeID int `json:"nodeId"`
ValueID NodeValue `json:"valueId"`
Value AnyType `json:"value"`
}