lockserver/zwavejs/messages-outgoing.go

28 lines
630 B
Go
Raw Normal View History

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