Documentation
¶
Index ¶
- func BLESetup() error
- type Device
- func (d *Device) AddControlNotification(c *notificationCallback)
- func (d *Device) AddDataNotification(c *notificationCallback)
- func (d *Device) Connect() error
- func (d *Device) Disconnect() error
- func (d *Device) DisconnectSync() error
- func (d *Device) Discover() error
- func (d *Device) EmitData(irData string) error
- func (d *Device) GetTemperature() (chan SensorData, error)
- func (d *Device) LearnAC() (chan LearnData, error)
- func (d *Device) LearnAV() (chan LearnData, error)
- type LearnData
- type ScanResult
- type SensorData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
type Device struct {
MAC string
Connected bool
Timeout time.Duration
// contains filtered or unexported fields
}
Device presenting device after scan
func (*Device) AddControlNotification ¶
func (d *Device) AddControlNotification(c *notificationCallback)
AddControlNotification function
func (*Device) AddDataNotification ¶
func (d *Device) AddDataNotification(c *notificationCallback)
AddDataNotification function
func (*Device) GetTemperature ¶
func (d *Device) GetTemperature() (chan SensorData, error)
GetTemperature function
type ScanResult ¶
ScanResult struct
func ScanDevice ¶
func ScanDevice(duration int) ([]ScanResult, error)
ScanDevice BLE scan for a duration in Millisecond
Click to show internal directories.
Click to hide internal directories.