Documentation ¶
Index ¶
- type Connector
- func (this *Connector) CommandHandler(deviceId string, serviceId string, command mgw.Command)
- func (this *Connector) DeviceInfoListener(nodes []model.DeviceInfo, huskIds []int64, withValues bool, ...)
- func (this *Connector) NotifyRefresh()
- func (this *Connector) SetDeviceState(nodeId int64, online bool) error
- func (this *Connector) ValueEventListener(nodeValue model.Value)
- type DeviceRepo
- type ValueWithTimestamp
- type Z2mClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func (*Connector) CommandHandler ¶
expects ids from mgw (with prefixes and suffixes)
func (*Connector) DeviceInfoListener ¶
func (*Connector) NotifyRefresh ¶
func (this *Connector) NotifyRefresh()
func (*Connector) SetDeviceState ¶
func (*Connector) ValueEventListener ¶
type DeviceRepo ¶
type DeviceRepo interface { FindDeviceTypeId(device model.DeviceInfo) (dtId string, usedFallback bool, err error) CreateDeviceTypeWithDistinctAttributes(key string, dt models.DeviceType, attributeKeys []string) (result models.DeviceType, code int, err error) }
type ValueWithTimestamp ¶
type ValueWithTimestamp struct { Value interface{} `json:"value"` LastUpdate int64 `json:"lastUpdate"` }
type Z2mClient ¶
type Z2mClient interface { SetErrorForwardingFunc(clientError func(message string)) SetValueEventListener(listener func(nodeValue model.Value)) SetDeviceInfoListener(listener func(nodes []model.DeviceInfo, huskIds []int64, withValues bool, allKnownDevices bool)) RequestDeviceInfoUpdate() error SetValueByValueId(id string, value interface{}) error SetDeviceStatusListener(state func(nodeId int64, online bool) error) }
Click to show internal directories.
Click to hide internal directories.