Documentation ¶
Index ¶
- Variables
- func NewGattCharacteristic1Properties(uuid string) *gatt.GattCharacteristic1Properties
- func NewGattDescriptor1Properties(uuid string) *gatt.GattDescriptor1Properties
- func NewGattService1Properties(uuid string) *gatt.GattService1Properties
- func RandomUUID() (string, error)
- type App
- func (app *App) Adapter() *adapter.Adapter1
- func (app *App) AdapterID() string
- func (app *App) AddService(s *Service) error
- func (app *App) Advertise(timeout uint32) (func(), error)
- func (app *App) Agent() agent.Agent1Client
- func (app *App) Close()
- func (app *App) DBusConn() *dbus.Conn
- func (app *App) DBusObjectManager() *api.DBusObjectManager
- func (app *App) ExposeAgent(caps string, setAsDefaultAgent bool) error
- func (app *App) GetAdvertisement() *advertising.LEAdvertisement1Properties
- func (app *App) GetServices() map[dbus.ObjectPath]*Service
- func (app *App) NewService() (*Service, error)
- func (app *App) Path() dbus.ObjectPath
- func (app *App) RemoveService(service *Service) error
- func (app *App) Run() (err error)
- func (app *App) SetName(name string)
- type Char
- func (s *Char) AddDescr(descr *Descr) error
- func (c *Char) App() *App
- func (s *Char) DBusConn() *dbus.Conn
- func (s *Char) DBusObjectManager() *api.DBusObjectManager
- func (s *Char) DBusProperties() *api.DBusProperties
- func (s *Char) Expose() error
- func (c *Char) GetDescr() map[dbus.ObjectPath]*Descr
- func (s *Char) GetProperties() bluez.Properties
- func (s *Char) Interface() string
- func (s *Char) NewDescr() (*Descr, error)
- func (s *Char) OnRead(fx CharReadCallback) *Char
- func (s *Char) OnWrite(fx CharWriteCallback) *Char
- func (s *Char) Path() dbus.ObjectPath
- func (s *Char) ReadValue(options map[string]interface{}) ([]byte, *dbus.Error)
- func (s *Char) Remove() error
- func (s *Char) RemoveDescr(descr *Descr) error
- func (c *Char) Service() *Service
- func (s *Char) StartNotify() *dbus.Error
- func (s *Char) StopNotify() *dbus.Error
- func (s *Char) WriteValue(value []byte, options map[string]interface{}) *dbus.Error
- type CharReadCallback
- type CharWriteCallback
- type Descr
- func (s *Descr) App() *App
- func (s *Descr) Char() *Char
- func (s *Descr) DBusConn() *dbus.Conn
- func (s *Descr) DBusObjectManager() *api.DBusObjectManager
- func (s *Descr) DBusProperties() *api.DBusProperties
- func (s *Descr) Expose() error
- func (s *Descr) GetProperties() bluez.Properties
- func (s *Descr) Interface() string
- func (s *Descr) Path() dbus.ObjectPath
- func (s *Descr) ReadValue(options map[string]interface{}) ([]byte, *dbus.Error)
- func (s *Descr) Remove() error
- func (s *Descr) WriteValue(value []byte, options map[string]interface{}) *dbus.Error
- type DescrReadCallback
- type DescrWriteCallback
- type Service
- func (s *Service) AddChar(char *Char) error
- func (s *Service) App() *App
- func (s *Service) DBusConn() *dbus.Conn
- func (s *Service) DBusObjectManager() *api.DBusObjectManager
- func (s *Service) DBusProperties() *api.DBusProperties
- func (s *Service) Expose() error
- func (s *Service) GetChars() map[dbus.ObjectPath]*Char
- func (s *Service) GetProperties() bluez.Properties
- func (s *Service) Interface() string
- func (s *Service) NewChar() (*Char, error)
- func (s *Service) Path() dbus.ObjectPath
- func (s *Service) Remove() error
- func (s *Service) RemoveChar(char *Char) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AppPath = "/org/bluez/%s/apps/app%d"
View Source
var UseRandomUUID = false
Functions ¶
func NewGattCharacteristic1Properties ¶
func NewGattCharacteristic1Properties(uuid string) *gatt.GattCharacteristic1Properties
Create a new GattCharacteristic1Properties
func NewGattDescriptor1Properties ¶
func NewGattDescriptor1Properties(uuid string) *gatt.GattDescriptor1Properties
Create a new GattDescriptor1Properties
func NewGattService1Properties ¶
func NewGattService1Properties(uuid string) *gatt.GattService1Properties
Create a new GattService1Properties
func RandomUUID ¶
Types ¶
type App ¶
type App struct { AgentCaps string AgentSetAsDefault bool // contains filtered or unexported fields }
Wrap a bluetooth application exposing services
func (*App) AddService ¶
func (*App) Agent ¶
func (app *App) Agent() agent.Agent1Client
func (*App) DBusObjectManager ¶
func (app *App) DBusObjectManager() *api.DBusObjectManager
func (*App) ExposeAgent ¶
Expose app agent on DBus
func (*App) GetAdvertisement ¶
func (app *App) GetAdvertisement() *advertising.LEAdvertisement1Properties
func (*App) GetServices ¶
func (app *App) GetServices() map[dbus.ObjectPath]*Service
func (*App) NewService ¶
func (*App) RemoveService ¶
RemoveService remove an exposed service
type Char ¶
type Char struct { ID int Properties *gatt.GattCharacteristic1Properties // contains filtered or unexported fields }
func (*Char) DBusObjectManager ¶
func (s *Char) DBusObjectManager() *api.DBusObjectManager
func (*Char) DBusProperties ¶
func (s *Char) DBusProperties() *api.DBusProperties
func (*Char) GetProperties ¶
func (s *Char) GetProperties() bluez.Properties
func (*Char) OnRead ¶
func (s *Char) OnRead(fx CharReadCallback) *Char
Set the Read callback, called when a client attempt to read
func (*Char) OnWrite ¶
func (s *Char) OnWrite(fx CharWriteCallback) *Char
Set the Write callback, called when a client attempt to write
func (*Char) Path ¶
func (s *Char) Path() dbus.ObjectPath
func (*Char) RemoveDescr ¶
type CharReadCallback ¶
type Descr ¶
type Descr struct { ID int Properties *gatt.GattDescriptor1Properties // contains filtered or unexported fields }
func (*Descr) DBusObjectManager ¶
func (s *Descr) DBusObjectManager() *api.DBusObjectManager
func (*Descr) DBusProperties ¶
func (s *Descr) DBusProperties() *api.DBusProperties
func (*Descr) GetProperties ¶
func (s *Descr) GetProperties() bluez.Properties
func (*Descr) Path ¶
func (s *Descr) Path() dbus.ObjectPath
type DescrReadCallback ¶
type Service ¶
type Service struct { ID int Properties *gatt.GattService1Properties // contains filtered or unexported fields }
func (*Service) DBusObjectManager ¶
func (s *Service) DBusObjectManager() *api.DBusObjectManager
func (*Service) DBusProperties ¶
func (s *Service) DBusProperties() *api.DBusProperties
func (*Service) GetProperties ¶
func (s *Service) GetProperties() bluez.Properties
func (*Service) Path ¶
func (s *Service) Path() dbus.ObjectPath
func (*Service) RemoveChar ¶
Click to show internal directories.
Click to hide internal directories.