Documentation
¶
Index ¶
- func IsMock() bool
- func Mock(mocking bool)
- type Device
- func (d *Device) AddPub(p string)
- func (d *Device) GetPub() string
- func (d *Device) GetSubs() []string
- func (d *Device) JSON() []byte
- func (d Device) Name() string
- func (d *Device) Publish(data any)
- func (d *Device) String() string
- func (d *Device) Subscribe(topic string, f func(*messanger.Msg))
- func (d *Device) TimerLoop(period time.Duration, done chan any, readpub func() error)
- type DeviceManager
- type Name
- type OnOff
- type Opener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
type Device struct {
// Last Error encountered
Error error
Opener
// contains filtered or unexported fields
}
type DeviceManager ¶
type DeviceManager struct {
// contains filtered or unexported fields
}
func GetDeviceManager ¶
func GetDeviceManager() *DeviceManager
func (*DeviceManager) Add ¶
func (dm *DeviceManager) Add(d Name)
Click to show internal directories.
Click to hide internal directories.