Documentation ¶
Index ¶
- type Adapter1
- type Adapter1Properties
- type Device1
- func (d *Device1) CancelParing() error
- func (d *Device1) Close()
- func (d *Device1) Connect() error
- func (d *Device1) ConnectProfile(uuid string) error
- func (d *Device1) Disconnect() error
- func (d *Device1) DisconnectProfile(uuid string) error
- func (d *Device1) GetProperties() (*Device1Properties, error)
- func (d *Device1) GetProperty(name string) (dbus.Variant, error)
- func (d *Device1) Pair() error
- func (d *Device1) Register() (chan *dbus.Signal, error)
- func (d *Device1) Unregister() error
- type Device1Properties
- type GattCharacteristic1
- func (d *GattCharacteristic1) Close()
- func (d *GattCharacteristic1) GetProperties() (*GattCharacteristic1Properties, error)
- func (d *GattCharacteristic1) GetProperty(name string) (interface{}, error)
- func (d *GattCharacteristic1) ReadValue(options map[string]dbus.Variant) ([]byte, error)
- func (d *GattCharacteristic1) Register() (chan *dbus.Signal, error)
- func (d *GattCharacteristic1) StartNotify() error
- func (d *GattCharacteristic1) StopNotify() error
- func (d *GattCharacteristic1) Unregister() error
- func (d *GattCharacteristic1) WriteValue(b []byte, options map[string]dbus.Variant) error
- type GattCharacteristic1Properties
- type GattDescriptor1
- func (d *GattDescriptor1) Close()
- func (d *GattDescriptor1) GetProperties() (*GattDescriptor1Properties, error)
- func (d *GattDescriptor1) ReadValue(options map[string]dbus.Variant) ([]byte, error)
- func (d *GattDescriptor1) Register() (chan *dbus.Signal, error)
- func (d *GattDescriptor1) Unregister() error
- func (d *GattDescriptor1) WriteValue(b []byte, options map[string]dbus.Variant) error
- type GattDescriptor1Properties
- type GattService1
- type GattService1Properties
- type ObjectManager
- type ProfileManager1
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter1 ¶
type Adapter1 struct { Properties *Adapter1Properties // contains filtered or unexported fields }
Adapter1 client
func NewAdapter1 ¶
NewAdapter1 create a new Adapter1 client
func (*Adapter1) GetProperties ¶
func (a *Adapter1) GetProperties() (*Adapter1Properties, error)
GetProperties load all available properties
func (*Adapter1) RemoveDevice ¶
RemoveDevice from the list
func (*Adapter1) SetProperty ¶
SetProperty set a property
func (*Adapter1) StartDiscovery ¶
StartDiscovery on the adapter
func (*Adapter1) StopDiscovery ¶
StopDiscovery on the adapter
type Adapter1Properties ¶
type Adapter1Properties struct { UUIDs []string Discoverable bool Discovering bool Pairable bool Powered bool Address string Alias string Modalias string Name string Class uint32 DiscoverableTimeout uint32 PairableTimeout uint32 }
Adapter1Properties contains the exposed properties of an interface
type Device1 ¶
type Device1 struct { Properties *Device1Properties // contains filtered or unexported fields }
Device1 client
func (*Device1) CancelParing ¶
CancelParing stop the pairing process
func (*Device1) ConnectProfile ¶
ConnectProfile connect to the specific profile
func (*Device1) DisconnectProfile ¶
DisconnectProfile from the device
func (*Device1) GetProperties ¶
func (d *Device1) GetProperties() (*Device1Properties, error)
GetProperties load all available properties
func (*Device1) GetProperty ¶
GetProperty get a property
type Device1Properties ¶
type Device1Properties struct { UUIDs []string Blocked bool Connected bool LegacyPairing bool Paired bool ServicesResolved bool Trusted bool ServiceData map[string]dbus.Variant ManufacturerData map[uint16]dbus.Variant RSSI int16 TxPower int16 Adapter dbus.ObjectPath Address string Alias string Icon string Modalias string Name string Appearance uint16 Class uint32 }
Device1Properties exposed properties for Device1
type GattCharacteristic1 ¶
type GattCharacteristic1 struct { Properties *GattCharacteristic1Properties // contains filtered or unexported fields }
GattCharacteristic1 client
func NewGattCharacteristic1 ¶
func NewGattCharacteristic1(path string) *GattCharacteristic1
var log = logging.MustGetLogger("examples") NewGattCharacteristic1 create a new GattCharacteristic1 client
func (*GattCharacteristic1) GetProperties ¶
func (d *GattCharacteristic1) GetProperties() (*GattCharacteristic1Properties, error)
GetProperties load all available properties
func (*GattCharacteristic1) GetProperty ¶
func (d *GattCharacteristic1) GetProperty(name string) (interface{}, error)
GetProperty load a single property
func (*GattCharacteristic1) Register ¶
func (d *GattCharacteristic1) Register() (chan *dbus.Signal, error)
Register for changes signalling
func (*GattCharacteristic1) StartNotify ¶
func (d *GattCharacteristic1) StartNotify() error
StartNotify start notifications
func (*GattCharacteristic1) StopNotify ¶
func (d *GattCharacteristic1) StopNotify() error
StopNotify stop notifications
func (*GattCharacteristic1) Unregister ¶
func (d *GattCharacteristic1) Unregister() error
Unregister for changes signalling
func (*GattCharacteristic1) WriteValue ¶
WriteValue write a value to a characteristic
type GattCharacteristic1Properties ¶
type GattCharacteristic1Properties struct { Value []byte Flags []string Notifying bool Service dbus.ObjectPath UUID string }
GattCharacteristic1Properties exposed properties for GattCharacteristic1
type GattDescriptor1 ¶
type GattDescriptor1 struct { Properties *GattDescriptor1Properties // contains filtered or unexported fields }
GattDescriptor1 client
func NewGattDescriptor1 ¶
func NewGattDescriptor1(path string) *GattDescriptor1
NewGattDescriptor1 create a new GattDescriptor1 client
func (*GattDescriptor1) GetProperties ¶
func (d *GattDescriptor1) GetProperties() (*GattDescriptor1Properties, error)
GetProperties load all available properties
func (*GattDescriptor1) Register ¶
func (d *GattDescriptor1) Register() (chan *dbus.Signal, error)
Register for changes signalling
func (*GattDescriptor1) Unregister ¶
func (d *GattDescriptor1) Unregister() error
Unregister for changes signalling
func (*GattDescriptor1) WriteValue ¶
WriteValue write a value to a characteristic
type GattDescriptor1Properties ¶
type GattDescriptor1Properties struct { Value []byte Characteristic dbus.ObjectPath UUID string }
GattDescriptor1Properties exposed properties for GattDescriptor1
type GattService1 ¶
type GattService1 struct { Properties *GattService1Properties // contains filtered or unexported fields }
GattService1 client
func NewGattService1 ¶
func NewGattService1(path string) *GattService1
NewGattService1 create a new GattService1 client
func (*GattService1) GetProperties ¶
func (d *GattService1) GetProperties() (*GattService1Properties, error)
GetProperties load all available properties
func (*GattService1) Register ¶
func (d *GattService1) Register() (chan *dbus.Signal, error)
Register for changes signalling
func (*GattService1) Unregister ¶
func (d *GattService1) Unregister() error
Unregister for changes signalling
type GattService1Properties ¶
type GattService1Properties struct { Primary bool Device dbus.ObjectPath UUID string }
GattService1Properties exposed properties for GattService1
type ObjectManager ¶
type ObjectManager struct {
// contains filtered or unexported fields
}
ObjectManager manges the list of all available objects
func NewObjectManager ¶
func NewObjectManager() *ObjectManager
NewObjectManager create a new Device1 client
func (*ObjectManager) GetManagedObjects ¶
func (o *ObjectManager) GetManagedObjects() (map[dbus.ObjectPath]map[string]map[string]dbus.Variant, error)
GetManagedObjects return a list of all available objects registered
func (*ObjectManager) Register ¶
func (o *ObjectManager) Register() (chan *dbus.Signal, error)
Register watch for signal events
func (*ObjectManager) Unregister ¶
func (o *ObjectManager) Unregister() error
Unregister watch for signal events
type ProfileManager1 ¶
type ProfileManager1 struct {
// contains filtered or unexported fields
}
ProfileManager1 client
func NewProfileManager1 ¶
func NewProfileManager1(hostID string) *ProfileManager1
NewProfileManager1 create a new ProfileManager1 client
func (*ProfileManager1) RegisterProfile ¶
func (a *ProfileManager1) RegisterProfile(profile string, UUID string, options map[string]interface{}) error
RegisterProfile add a new Profile for an UUID
func (*ProfileManager1) UnregisterProfile ¶
func (a *ProfileManager1) UnregisterProfile(profile string) error
UnregisterProfile add a new Profile for an UUID