package events import ( "fmt" "git.aiterp.net/lucifer3/server/device" ) type HardwareState struct { ID string `json:"internalId"` InternalName string `json:"internalName"` SupportFlags device.SupportFlags `json:"deviceFlags"` ColorFlags device.ColorFlag `json:"colorFlags"` Buttons []string `json:"buttons"` State device.State `json:"state"` } func (d HardwareState) EventDescription() string { return fmt.Sprintf("HardwareState(id:%s, iname:%#+v, sflags:%s, cflags:%s, buttons:%v, state:%s)", d.ID, d.InternalName, d.SupportFlags, d.ColorFlags, d.Buttons, d.State, ) } type Unreachable struct { DeviceID string `json:"deviceId"` } func (d Unreachable) EventDescription() string { return fmt.Sprintf("Unreachable(id:%s)", d.DeviceID) }