Documentation
¶
Index ¶
- type Bluetooth
- func (bt *Bluetooth) GetDefaultConfig() interface{}
- func (bt *Bluetooth) GetHook() interface{}
- func (bt *Bluetooth) GetPresentDevices(ctx *base.Context, input *base.OperatorIO, gpd GetPresentDevicesParams) *base.OperatorIO
- func (bt *Bluetooth) InitCopyOfOperator(ctx *base.Context, config interface{}, name string) (base.FreepsOperatorWithConfig, error)
- func (bt *Bluetooth) RestartDiscovery(ctx *base.Context) *base.OperatorIO
- func (bt *Bluetooth) Shutdown(ctx *base.Context)
- func (bt *Bluetooth) StartListening(ctx *base.Context)
- type BluetoothConfig
- type DiscoveryData
- type FreepsBluetooth
- type GetPresentDevicesParams
- type HookBluetooth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bluetooth ¶
type Bluetooth struct { GE *freepsgraph.GraphEngine // contains filtered or unexported fields }
Bluetooth is the operator that provides bluetooth functionality and implements the FreepsGenericOperator interface
func (*Bluetooth) GetDefaultConfig ¶
func (bt *Bluetooth) GetDefaultConfig() interface{}
GetDefaultConfig returns a copy of the default config
func (*Bluetooth) GetHook ¶
func (bt *Bluetooth) GetHook() interface{}
GetHook returns the hook for this operator
func (*Bluetooth) GetPresentDevices ¶
func (bt *Bluetooth) GetPresentDevices(ctx *base.Context, input *base.OperatorIO, gpd GetPresentDevicesParams) *base.OperatorIO
GetPresentDevices is the function that returns the present devices
func (*Bluetooth) InitCopyOfOperator ¶
func (bt *Bluetooth) InitCopyOfOperator(ctx *base.Context, config interface{}, name string) (base.FreepsOperatorWithConfig, error)
InitCopyOfOperator creates a copy of the operator and initializes it with the given config
func (*Bluetooth) RestartDiscovery ¶
func (bt *Bluetooth) RestartDiscovery(ctx *base.Context) *base.OperatorIO
RestartDiscovery triggers the Discovery process immediately
func (*Bluetooth) StartListening ¶
StartListening starts the operator
type BluetoothConfig ¶
type DiscoveryData ¶
type DiscoveryData struct { Alias string Address string Name string RSSI int16 ServiceData map[string]interface{} ManufacturerData map[uint16]interface{} }
DiscoveryData is the reduced set of information of Device properties send as input to graphs
func (*DiscoveryData) AddManufacturerData ¶ added in v1.4.0
func (d *DiscoveryData) AddManufacturerData(companyId uint16, dbv dbus.Variant) error
AddManufacturerData converts the value for a given service to the proper type and adds it to the map under the identifier for the company
func (*DiscoveryData) AddServiceData ¶
func (d *DiscoveryData) AddServiceData(service string, v interface{}) (string, error)
AddServiceData converts the value for a given service to the proper type and adds it to the map under the human readable name if available
type FreepsBluetooth ¶
type FreepsBluetooth struct {
// contains filtered or unexported fields
}
FreepsBluetooth provides options to scan for bt devices and execute operations based on that
func (*FreepsBluetooth) Shutdown ¶
func (fbt *FreepsBluetooth) Shutdown()
Shutdown stops discovery and does not schedule it again
func (*FreepsBluetooth) StartDiscovery ¶
func (fbt *FreepsBluetooth) StartDiscovery() error
StartDiscovery starts the process of discovery new bluetooth devices
func (*FreepsBluetooth) StopDiscovery ¶
func (fbt *FreepsBluetooth) StopDiscovery(restartImmediately bool)
StopDiscovery stops bluetooth discovery and schedules the next discovery process
type GetPresentDevicesParams ¶
GetPresentDevicesParams are the parameters for the GetPresentDevices Function
type HookBluetooth ¶
type HookBluetooth struct {
// contains filtered or unexported fields
}
func (*HookBluetooth) OnGraphChanged ¶
func (h *HookBluetooth) OnGraphChanged(ctx *base.Context, addedGraphName []string, removedGraphName []string) error
OnGraphChanged checks if subscriptions need to be changed