Documentation ¶
Index ¶
- type Device
- type Element
- type Group
- func (g *Group) AddDevice(addr uint16, device Device)
- func (g *Group) AddScene(name string, number uint16)
- func (g *Group) GetDevice(addr uint16) (*Device, error)
- func (g *Group) GetScene(number uint16) (*Scene, error)
- func (g *Group) RemoveDevice(addr uint16)
- func (g *Group) RemoveScene(number uint16)
- type Scene
- type Store
- func (s *Store) AddGroup(addr uint16, group Group)
- func (s *Store) AddWebKey(webKey []byte)
- func (s *Store) CheckWebKey(webKey []byte) bool
- func (s *Store) GetConfigured() bool
- func (s *Store) GetGroup(groupAddr uint16) (*Group, error)
- func (s *Store) GetNextGroupAddr() uint16
- func (s *Store) GetNextSceneNumber() uint16
- func (s *Store) IncrementNextGroupAddr()
- func (s *Store) IncrementNextSceneNumber()
- func (s *Store) MarkConfigured()
- func (s *Store) RemoveGroup(addr uint16)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
Device holds the name addr and type of device
func MakeDevice ¶
MakeDevice makes a new device with the given addr
type Group ¶
type Group struct { Name string KeyIndex uint16 Devices map[uint16]*Device Scenes map[uint16]*Scene }
Group holds a collection of devices and its app key
func (*Group) RemoveDevice ¶
RemoveDevice removes the device from the group
func (*Group) RemoveScene ¶
RemoveScene removes a scene from the group
type Store ¶
type Store struct { Groups map[uint16]*Group NextGroupAddr uint16 NextSceneNumber uint16 WebKeys [][]byte Configured bool }
Store is a capture of all data in use by the home hub
func (*Store) CheckWebKey ¶
CheckWebKey checks the validity of the given webKey
func (*Store) GetConfigured ¶
GetConfigured returns a bool indicating if the network is configured
func (*Store) GetNextGroupAddr ¶
GetNextGroupAddr returns the next group address
func (*Store) GetNextSceneNumber ¶
GetNextSceneNumber returns the next scene number
func (*Store) IncrementNextGroupAddr ¶
func (s *Store) IncrementNextGroupAddr()
IncrementNextGroupAddr increments the next group address
func (*Store) IncrementNextSceneNumber ¶
func (s *Store) IncrementNextSceneNumber()
IncrementNextSceneNumber increments the next app key index
func (*Store) MarkConfigured ¶
func (s *Store) MarkConfigured()
MarkConfigured marks the network as configured
func (*Store) RemoveGroup ¶
RemoveGroup removes the group from the store