Documentation ¶
Index ¶
- Constants
- Variables
- func GetReadBind(actor *Actor) func(char string) Response
- func GetWriteBind(actor *Actor) func(char string, payload []byte, withResponse bool) Response
- func New() plugins.Pluggable
- func NewActions() map[string]plugins.ActorAction
- func NewSettings() map[string]*m.Attribute
- func NewTriggerParams() m.TriggerParams
- type Actor
- type Ble
- func (b *Ble) Connect() error
- func (b *Ble) Disconnect() error
- func (b *Ble) GetCharacteristics(chars []bluetooth.UUID) ([]bluetooth.DeviceCharacteristic, error)
- func (b *Ble) GetServices() ([]bluetooth.DeviceService, error)
- func (b *Ble) IsConnected() bool
- func (b *Ble) Read(c string) ([]byte, error)
- func (b *Ble) Scan(param *string)
- func (b *Ble) Subscribe(c string, handler func([]byte)) error
- func (b *Ble) Write(c string, request []byte, withResponse bool) ([]byte, error)
- type Bluetooth
- type Response
- type Trigger
- func (t *Trigger) AsyncAttach(wg *sync.WaitGroup)
- func (t *Trigger) Connect(params *TriggerParams, firstTime bool) error
- func (t *Trigger) FunctionName() string
- func (t *Trigger) Name() string
- func (t *Trigger) Shutdown()
- func (t *Trigger) Subscribe(options triggers.Subscriber) error
- func (t *Trigger) Unsubscribe(options triggers.Subscriber) error
- type TriggerParams
Constants ¶
View Source
const ( // Name ... Name = "ble" // FuncEntityAction ... FuncEntityAction = "entityAction" AttrAddress = "address" AttrCharacteristic = "characteristic" AttrService = "service" AttrTimeoutSec = "timeout_sec" AttrConnectionTimeoutSec = "connection_timeout_sec" AttrDebug = "debug" ActionScan = "SCAN" AttrSystemInfo = "SystemInfo" FunctionName = "automationTriggerBle" DefaultTimeout int64 = 5 DefaultConnectionTimeout int64 = 5 )
Variables ¶
View Source
var F embed.FS
Functions ¶
func GetReadBind ¶
func GetWriteBind ¶
func NewActions ¶
func NewActions() map[string]plugins.ActorAction
func NewTriggerParams ¶
func NewTriggerParams() m.TriggerParams
Types ¶
type Actor ¶
type Actor struct { *supervisor.BaseActor // contains filtered or unexported fields }
Actor ...
type Ble ¶
type Ble struct {
// contains filtered or unexported fields
}
func (*Ble) Disconnect ¶
func (*Ble) GetCharacteristics ¶
func (*Ble) GetServices ¶
func (b *Ble) GetServices() ([]bluetooth.DeviceService, error)
func (*Ble) IsConnected ¶
type Trigger ¶
func NewTrigger ¶
func (*Trigger) AsyncAttach ¶
func (*Trigger) Subscribe ¶
func (t *Trigger) Subscribe(options triggers.Subscriber) error
Subscribe ...
func (*Trigger) Unsubscribe ¶
func (t *Trigger) Unsubscribe(options triggers.Subscriber) error
Unsubscribe ...
type TriggerParams ¶
type TriggerParams struct { Bluetooth // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.