Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
Action Status function is called with the processed MAC address and info whether the device was found or not
type ActionFunc ¶
ActionFunc is called with the processed MAC address and info whether the device was found or not
func (ActionFunc) Status ¶
func (a ActionFunc) Status(mac string, found bool)
Status is called with the status of the given MAC address
type BluetoothScanner ¶
BluetoothScanner provides required methods to scan for bluetooth devices
type HCITool ¶
type HCITool struct {
// contains filtered or unexported fields
}
HCITool is the default BluetoothScanner implementation
type Presence ¶
type Presence struct {
// contains filtered or unexported fields
}
Presence allows scanning for nearby bluetooth devices based on their MAC address
func (*Presence) RegisterAction ¶
RegisterAction registers one ore more actions for a certain MAC address.
Note: Given actions are added to already existing registered actions for given MAC address.
func (*Presence) Scan ¶
Scan executes a single presence check for all registered MAC addresses and calls action functions with the scan result.
func (*Presence) ScanPeriodically ¶
ScanPeriodically will call Scan periodically with a given interval after a run cycle has finished
func (*Presence) UnregisterActions ¶
UnregisterActions removes all registered actions for a given MAC address
If no actions are registered, this method is a no-op.