Documentation ¶
Overview ¶
Entities handling
Index ¶
- Constants
- func GetFirmwareFile(name string) *db.RegistryFile
- type Device
- func (d *Device) AckCommand(cmdId string) error
- func (d *Device) AckCommandWithResponse(cmdId, response string) error
- func (d *Device) AckSetting(name, ackedValue string) (err error)
- func (d *Device) AddCommand(cmd string) (string, error)
- func (d *Device) Commands() map[string]string
- func (d *Device) DelSetting(name string) (err error)
- func (d *Device) Delete() error
- func (dev *Device) Domain() *Domain
- func (d *Device) GetServerSettingsPublicNode() *db.RegistryNode
- func (d *Device) Id() string
- func (d *Device) Ident() string
- func (this *Device) LastData(dataType string) *db.TimedData
- func (d *Device) MarkListedSensor(id string) *db.RegistryNode
- func (d *Device) Name() string
- func (this *Device) Owner() *User
- func (d *Device) SaveTSTime(dataType string, time time.Time, data string) error
- func (d *Device) SaveTSTimeObj(dataType string, time time.Time, obj interface{}) error
- func (dev *Device) SetDomain(d *Domain) error
- func (d *Device) SetName(name string) error
- func (d *Device) SetSetting(name, value string) (err error)
- func (d *Device) SetStatus(name, value string) error
- func (d *Device) Setting(name string) string
- func (d *Device) Settings() map[string]string
- func (d *Device) SettingsToSend() map[string]string
- func (d *Device) Status(name string) string
- func (d *Device) TSID() string
- type DeviceChannelTrans
- type Domain
- type User
Constants ¶
View Source
const ( DEVICE_NODE_PATH = "/device/" DEVICE_BY_IDENT_NODE_PATH = DEVICE_NODE_PATH + "by-ident/" DEVICE_DEFAULT_NODE_PATH = "/device/default/" )
View Source
const CHANNEL_TRANSLATION_SUBNODE = "channel-translation"
View Source
const DOMAIN_BY_NAME_NODE_PATH = DOMAIN_NODE_PATH + "by-name/"
View Source
const DOMAIN_NODE_PATH = "/domain/"
View Source
const USER_BY_NAME_NODE_PATH = USER_NODE_PATH + "by-name/"
View Source
const USER_NODE_PATH = "/user/"
Variables ¶
This section is empty.
Functions ¶
func GetFirmwareFile ¶
func GetFirmwareFile(name string) *db.RegistryFile
Types ¶
type Device ¶
type Device struct { // Device's node Node *db.RegistryNode }
Device
func NewDeviceByIdentCreate ¶
Device by ident (created if it doesn't exist)
func NewDeviceDefault ¶
func NewDeviceDefault() *Device
func (*Device) AckCommand ¶
Acknowledge a command with its ID
func (*Device) AckCommandWithResponse ¶
func (*Device) AckSetting ¶
func (*Device) AddCommand ¶
Add a command to send to the device
func (*Device) GetServerSettingsPublicNode ¶
func (d *Device) GetServerSettingsPublicNode() *db.RegistryNode
func (*Device) MarkListedSensor ¶
func (d *Device) MarkListedSensor(id string) *db.RegistryNode
func (*Device) SaveTSTime ¶
func (*Device) SaveTSTimeObj ¶
func (*Device) SetSetting ¶
Define a setting
func (*Device) SettingsToSend ¶
type DeviceChannelTrans ¶
type DeviceChannelTrans struct { Device *Device // contains filtered or unexported fields }
func NewDeviceChannelTrans ¶
func NewDeviceChannelTrans(d *Device) *DeviceChannelTrans
func (*DeviceChannelTrans) GetTarget ¶
func (d *DeviceChannelTrans) GetTarget(channel string) *string
type Domain ¶
type Domain struct {
Node *db.RegistryNode
}
Domain
func NewDomainById ¶
Create a new domain instance with its it id
func NewDomainByNameCreate ¶
Create new a domain
func (*Domain) Distributor ¶
type User ¶
type User struct {
Node *db.RegistryNode
}
User
func NewUserById ¶
Create a new User instance with its it id
Click to show internal directories.
Click to hide internal directories.