Documentation ¶
Index ¶
- type Client
- type Device
- func (d *Device) Auth(timeout time.Duration) error
- func (d *Device) Discover(timeout time.Duration) error
- func (d *Device) GetSensorData(timeout time.Duration) (*SensorData, error)
- func (d *Device) Learn(timeout time.Duration) ([]byte, error)
- func (d *Device) SendIR(data []byte, timeout time.Duration) error
- type PersistentClient
- type PersistentDevice
- func (d *PersistentDevice) Auth(timeout time.Duration) error
- func (d *PersistentDevice) Discover(timeout time.Duration) error
- func (d *PersistentDevice) GetSensorData(timeout time.Duration) (*SensorData, error)
- func (d *PersistentDevice) Learn(timeout time.Duration) ([]byte, error)
- func (d *PersistentDevice) SendIR(data []byte, timeout time.Duration) error
- type Request
- type RequestID
- type Response
- type SensorData
- type StatelessDevice
- func (d *StatelessDevice) Auth(timeout time.Duration) error
- func (d *StatelessDevice) Discover(timeout time.Duration) error
- func (d *StatelessDevice) GetSensorData(timeout time.Duration) (*SensorData, error)
- func (d *StatelessDevice) Learn(timeout time.Duration) ([]byte, error)
- func (d *StatelessDevice) SendIR(data []byte, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct { Name string Type uint16 MAC net.HardwareAddr Addr net.UDPAddr LastSeen time.Time ID int32 Key []byte // contains filtered or unexported fields }
func (*Device) GetSensorData ¶
func (d *Device) GetSensorData(timeout time.Duration) (*SensorData, error)
type PersistentClient ¶
type PersistentClient struct {
// contains filtered or unexported fields
}
func NewPersistentClient ¶
func NewPersistentClient() (*PersistentClient, error)
func (*PersistentClient) Close ¶
func (c *PersistentClient) Close()
func (*PersistentClient) GetDeviceForIP ¶
func (c *PersistentClient) GetDeviceForIP(ip string) (*PersistentDevice, error)
func (*PersistentClient) GetDeviceForMac ¶
func (c *PersistentClient) GetDeviceForMac(mac string) (*PersistentDevice, error)
func (*PersistentClient) GetDevices ¶
func (c *PersistentClient) GetDevices() []*PersistentDevice
type PersistentDevice ¶
type PersistentDevice struct { Name string Type uint16 MAC net.HardwareAddr Addr net.UDPAddr LastSeen time.Time ID int32 Key []byte // contains filtered or unexported fields }
func FromDeviceAndPersistentClient ¶
func FromDeviceAndPersistentClient(device *Device, persistentClient *PersistentClient) *PersistentDevice
func (*PersistentDevice) Discover ¶
func (d *PersistentDevice) Discover(timeout time.Duration) error
func (*PersistentDevice) GetSensorData ¶
func (d *PersistentDevice) GetSensorData(timeout time.Duration) (*SensorData, error)
type SensorData ¶
type StatelessDevice ¶
type StatelessDevice struct { Name string Type uint16 MAC net.HardwareAddr Addr net.UDPAddr LastSeen time.Time ID int32 Key []byte // contains filtered or unexported fields }
func FromDevice ¶
func FromDevice(device *Device) (*StatelessDevice, error)
func FromHost ¶
func FromHost(host string) (*StatelessDevice, error)
func (*StatelessDevice) GetSensorData ¶
func (d *StatelessDevice) GetSensorData(timeout time.Duration) (*SensorData, error)
Click to show internal directories.
Click to hide internal directories.