Documentation ¶
Overview ¶
BlueZ D-Bus Health API description [health-api.txt]
Index ¶
- Variables
- type HealthChannel1
- func (a *HealthChannel1) Acquire() (dbus.UnixFD, error)
- func (a *HealthChannel1) Client() *bluez.Client
- func (a *HealthChannel1) Close()
- func (a *HealthChannel1) GetApplication() (dbus.ObjectPath, error)
- func (a *HealthChannel1) GetDevice() (dbus.ObjectPath, error)
- func (a *HealthChannel1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *HealthChannel1) GetProperties() (*HealthChannel1Properties, error)
- func (a *HealthChannel1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *HealthChannel1) GetProperty(name string) (dbus.Variant, error)
- func (a *HealthChannel1) GetType() (string, error)
- func (a *HealthChannel1) GetWatchPropertiesChannel() chan *dbus.Signal
- func (a *HealthChannel1) Interface() string
- func (a *HealthChannel1) Path() dbus.ObjectPath
- func (a *HealthChannel1) Release() error
- func (a *HealthChannel1) SetApplication(v dbus.ObjectPath) error
- func (a *HealthChannel1) SetDevice(v dbus.ObjectPath) error
- func (a *HealthChannel1) SetProperty(name string, value interface{}) error
- func (a *HealthChannel1) SetType(v string) error
- func (a *HealthChannel1) SetWatchPropertiesChannel(c chan *dbus.Signal)
- func (a *HealthChannel1) ToProps() bluez.Properties
- func (a *HealthChannel1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *HealthChannel1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type HealthChannel1Properties
- func (a *HealthChannel1Properties) FromDBusMap(props map[string]dbus.Variant) (*HealthChannel1Properties, error)
- func (a *HealthChannel1Properties) FromMap(props map[string]interface{}) (*HealthChannel1Properties, error)
- func (p *HealthChannel1Properties) Lock()
- func (a *HealthChannel1Properties) ToMap() (map[string]interface{}, error)
- func (p *HealthChannel1Properties) Unlock()
- type HealthDevice1
- func (a *HealthDevice1) Client() *bluez.Client
- func (a *HealthDevice1) Close()
- func (a *HealthDevice1) CreateChannel(application dbus.ObjectPath, configuration string) (dbus.ObjectPath, error)
- func (a *HealthDevice1) DestroyChannel(channel dbus.ObjectPath) error
- func (a *HealthDevice1) Echo() (bool, error)
- func (a *HealthDevice1) GetMainChannel() (dbus.ObjectPath, error)
- func (a *HealthDevice1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *HealthDevice1) GetProperties() (*HealthDevice1Properties, error)
- func (a *HealthDevice1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *HealthDevice1) GetProperty(name string) (dbus.Variant, error)
- func (a *HealthDevice1) GetWatchPropertiesChannel() chan *dbus.Signal
- func (a *HealthDevice1) Interface() string
- func (a *HealthDevice1) Path() dbus.ObjectPath
- func (a *HealthDevice1) SetMainChannel(v dbus.ObjectPath) error
- func (a *HealthDevice1) SetProperty(name string, value interface{}) error
- func (a *HealthDevice1) SetWatchPropertiesChannel(c chan *dbus.Signal)
- func (a *HealthDevice1) ToProps() bluez.Properties
- func (a *HealthDevice1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *HealthDevice1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type HealthDevice1Properties
- func (a *HealthDevice1Properties) FromDBusMap(props map[string]dbus.Variant) (*HealthDevice1Properties, error)
- func (a *HealthDevice1Properties) FromMap(props map[string]interface{}) (*HealthDevice1Properties, error)
- func (p *HealthDevice1Properties) Lock()
- func (a *HealthDevice1Properties) ToMap() (map[string]interface{}, error)
- func (p *HealthDevice1Properties) Unlock()
- type HealthManager1
- func (a *HealthManager1) Client() *bluez.Client
- func (a *HealthManager1) Close()
- func (a *HealthManager1) CreateApplication(config map[string]interface{}) (dbus.ObjectPath, error)
- func (a *HealthManager1) DestroyApplication(application dbus.ObjectPath) error
- func (a *HealthManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *HealthManager1) GetProperties() (*HealthManager1Properties, error)
- func (a *HealthManager1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *HealthManager1) GetProperty(name string) (dbus.Variant, error)
- func (a *HealthManager1) GetWatchPropertiesChannel() chan *dbus.Signal
- func (a *HealthManager1) Interface() string
- func (a *HealthManager1) Path() dbus.ObjectPath
- func (a *HealthManager1) SetProperty(name string, value interface{}) error
- func (a *HealthManager1) SetWatchPropertiesChannel(c chan *dbus.Signal)
- func (a *HealthManager1) ToProps() bluez.Properties
- func (a *HealthManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *HealthManager1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type HealthManager1Properties
- func (a *HealthManager1Properties) FromDBusMap(props map[string]dbus.Variant) (*HealthManager1Properties, error)
- func (a *HealthManager1Properties) FromMap(props map[string]interface{}) (*HealthManager1Properties, error)
- func (p *HealthManager1Properties) Lock()
- func (a *HealthManager1Properties) ToMap() (map[string]interface{}, error)
- func (p *HealthManager1Properties) Unlock()
Constants ¶
This section is empty.
Variables ¶
var HealthChannel1Interface = "org.bluez.HealthChannel1"
var HealthDevice1Interface = "org.bluez.HealthDevice1"
var HealthManager1Interface = "org.bluez.HealthManager1"
Functions ¶
This section is empty.
Types ¶
type HealthChannel1 ¶
type HealthChannel1 struct { Properties *HealthChannel1Properties // contains filtered or unexported fields }
HealthChannel1 HealthChannel hierarchy
func NewHealthChannel1 ¶
func NewHealthChannel1(objectPath dbus.ObjectPath) (*HealthChannel1, error)
NewHealthChannel1 create a new instance of HealthChannel1
Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/chanZZZ
func (*HealthChannel1) Acquire ¶
func (a *HealthChannel1) Acquire() (dbus.UnixFD, error)
Acquire Returns the file descriptor for this data channel. If
the data channel is not connected it will also reconnect. Possible Errors: org.bluez.Error.NotConnected org.bluez.Error.NotAllowed
func (*HealthChannel1) Client ¶
func (a *HealthChannel1) Client() *bluez.Client
Client return HealthChannel1 dbus client
func (*HealthChannel1) GetApplication ¶
func (a *HealthChannel1) GetApplication() (dbus.ObjectPath, error)
GetApplication get Application value
func (*HealthChannel1) GetDevice ¶
func (a *HealthChannel1) GetDevice() (dbus.ObjectPath, error)
GetDevice get Device value
func (*HealthChannel1) GetObjectManagerSignal ¶
func (a *HealthChannel1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*HealthChannel1) GetProperties ¶
func (a *HealthChannel1) GetProperties() (*HealthChannel1Properties, error)
GetProperties load all available properties
func (*HealthChannel1) GetPropertiesSignal ¶
func (a *HealthChannel1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*HealthChannel1) GetProperty ¶
func (a *HealthChannel1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*HealthChannel1) GetType ¶
func (a *HealthChannel1) GetType() (string, error)
GetType get Type value
func (*HealthChannel1) GetWatchPropertiesChannel ¶
func (a *HealthChannel1) GetWatchPropertiesChannel() chan *dbus.Signal
GetWatchPropertiesChannel return the dbus channel to receive properties interface
func (*HealthChannel1) Interface ¶
func (a *HealthChannel1) Interface() string
Interface return HealthChannel1 interface
func (*HealthChannel1) Path ¶
func (a *HealthChannel1) Path() dbus.ObjectPath
Path return HealthChannel1 object path
func (*HealthChannel1) Release ¶
func (a *HealthChannel1) Release() error
Release Releases the fd. Application should also need to
close() it. Possible Errors: org.bluez.Error.NotAcquired org.bluez.Error.NotAllowed
func (*HealthChannel1) SetApplication ¶
func (a *HealthChannel1) SetApplication(v dbus.ObjectPath) error
SetApplication set Application value
func (*HealthChannel1) SetDevice ¶
func (a *HealthChannel1) SetDevice(v dbus.ObjectPath) error
SetDevice set Device value
func (*HealthChannel1) SetProperty ¶
func (a *HealthChannel1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*HealthChannel1) SetType ¶
func (a *HealthChannel1) SetType(v string) error
SetType set Type value
func (*HealthChannel1) SetWatchPropertiesChannel ¶
func (a *HealthChannel1) SetWatchPropertiesChannel(c chan *dbus.Signal)
SetWatchPropertiesChannel set the dbus channel to receive properties interface
func (*HealthChannel1) ToProps ¶
func (a *HealthChannel1) ToProps() bluez.Properties
ToProps return the properties interface
func (*HealthChannel1) UnwatchProperties ¶
func (a *HealthChannel1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*HealthChannel1) WatchProperties ¶
func (a *HealthChannel1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type HealthChannel1Properties ¶
type HealthChannel1Properties struct { /* Application Identifies the HealthApplication to which this channel is related to (which indirectly defines its role and data type). */ Application dbus.ObjectPath /* Device Identifies the Remote Device that is connected with. Maps with a HealthDevice object. */ Device dbus.ObjectPath /* Type The quality of service of the data channel. ("reliable" or "streaming") */ Type string // contains filtered or unexported fields }
HealthChannel1Properties contains the exposed properties of an interface
func (*HealthChannel1Properties) FromDBusMap ¶
func (a *HealthChannel1Properties) FromDBusMap(props map[string]dbus.Variant) (*HealthChannel1Properties, error)
FromDBusMap convert a map to an HealthChannel1Properties
func (*HealthChannel1Properties) FromMap ¶
func (a *HealthChannel1Properties) FromMap(props map[string]interface{}) (*HealthChannel1Properties, error)
FromMap convert a map to an HealthChannel1Properties
func (*HealthChannel1Properties) Lock ¶
func (p *HealthChannel1Properties) Lock()
Lock access to properties
func (*HealthChannel1Properties) ToMap ¶
func (a *HealthChannel1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a HealthChannel1Properties to map
func (*HealthChannel1Properties) Unlock ¶
func (p *HealthChannel1Properties) Unlock()
Unlock access to properties
type HealthDevice1 ¶
type HealthDevice1 struct { Properties *HealthDevice1Properties // contains filtered or unexported fields }
HealthDevice1 HealthDevice hierarchy
func NewHealthDevice1 ¶
func NewHealthDevice1(objectPath dbus.ObjectPath) (*HealthDevice1, error)
NewHealthDevice1 create a new instance of HealthDevice1
Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
func (*HealthDevice1) Client ¶
func (a *HealthDevice1) Client() *bluez.Client
Client return HealthDevice1 dbus client
func (*HealthDevice1) CreateChannel ¶
func (a *HealthDevice1) CreateChannel(application dbus.ObjectPath, configuration string) (dbus.ObjectPath, error)
CreateChannel Creates a new data channel. The configuration should
indicate the channel quality of service using one of this values "reliable", "streaming", "any". Returns the object path that identifies the data channel that is already connected. Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.HealthError
func (*HealthDevice1) DestroyChannel ¶
func (a *HealthDevice1) DestroyChannel(channel dbus.ObjectPath) error
DestroyChannel Destroys the data channel object. Only the creator of
the channel or the creator of the HealthApplication that received the data channel will be able to destroy it. Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.NotFound org.bluez.Error.NotAllowed
func (*HealthDevice1) Echo ¶
func (a *HealthDevice1) Echo() (bool, error)
Echo Sends an echo petition to the remote service. Returns
True if response matches with the buffer sent. If some error is detected False value is returned. Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.OutOfRange
func (*HealthDevice1) GetMainChannel ¶
func (a *HealthDevice1) GetMainChannel() (dbus.ObjectPath, error)
GetMainChannel get MainChannel value
func (*HealthDevice1) GetObjectManagerSignal ¶
func (a *HealthDevice1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*HealthDevice1) GetProperties ¶
func (a *HealthDevice1) GetProperties() (*HealthDevice1Properties, error)
GetProperties load all available properties
func (*HealthDevice1) GetPropertiesSignal ¶
func (a *HealthDevice1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*HealthDevice1) GetProperty ¶
func (a *HealthDevice1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*HealthDevice1) GetWatchPropertiesChannel ¶
func (a *HealthDevice1) GetWatchPropertiesChannel() chan *dbus.Signal
GetWatchPropertiesChannel return the dbus channel to receive properties interface
func (*HealthDevice1) Interface ¶
func (a *HealthDevice1) Interface() string
Interface return HealthDevice1 interface
func (*HealthDevice1) Path ¶
func (a *HealthDevice1) Path() dbus.ObjectPath
Path return HealthDevice1 object path
func (*HealthDevice1) SetMainChannel ¶
func (a *HealthDevice1) SetMainChannel(v dbus.ObjectPath) error
SetMainChannel set MainChannel value
func (*HealthDevice1) SetProperty ¶
func (a *HealthDevice1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*HealthDevice1) SetWatchPropertiesChannel ¶
func (a *HealthDevice1) SetWatchPropertiesChannel(c chan *dbus.Signal)
SetWatchPropertiesChannel set the dbus channel to receive properties interface
func (*HealthDevice1) ToProps ¶
func (a *HealthDevice1) ToProps() bluez.Properties
ToProps return the properties interface
func (*HealthDevice1) UnwatchProperties ¶
func (a *HealthDevice1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*HealthDevice1) WatchProperties ¶
func (a *HealthDevice1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type HealthDevice1Properties ¶
type HealthDevice1Properties struct { /* MainChannel The first reliable channel opened. It is needed by upper applications in order to send specific protocol data units. The first reliable can change after a reconnection. */ MainChannel dbus.ObjectPath // contains filtered or unexported fields }
HealthDevice1Properties contains the exposed properties of an interface
func (*HealthDevice1Properties) FromDBusMap ¶
func (a *HealthDevice1Properties) FromDBusMap(props map[string]dbus.Variant) (*HealthDevice1Properties, error)
FromDBusMap convert a map to an HealthDevice1Properties
func (*HealthDevice1Properties) FromMap ¶
func (a *HealthDevice1Properties) FromMap(props map[string]interface{}) (*HealthDevice1Properties, error)
FromMap convert a map to an HealthDevice1Properties
func (*HealthDevice1Properties) Lock ¶
func (p *HealthDevice1Properties) Lock()
Lock access to properties
func (*HealthDevice1Properties) ToMap ¶
func (a *HealthDevice1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a HealthDevice1Properties to map
func (*HealthDevice1Properties) Unlock ¶
func (p *HealthDevice1Properties) Unlock()
Unlock access to properties
type HealthManager1 ¶
type HealthManager1 struct { Properties *HealthManager1Properties // contains filtered or unexported fields }
HealthManager1 HealthManager hierarchy
func NewHealthManager1 ¶
func NewHealthManager1() (*HealthManager1, error)
func (*HealthManager1) Client ¶
func (a *HealthManager1) Client() *bluez.Client
Client return HealthManager1 dbus client
func (*HealthManager1) CreateApplication ¶
func (a *HealthManager1) CreateApplication(config map[string]interface{}) (dbus.ObjectPath, error)
CreateApplication Returns the path of the new registered application.
Application will be closed by the call or implicitly when the programs leaves the bus. config: uint16 DataType: Mandatory string Role: Mandatory. Possible values: "source", "sink" string Description: Optional ChannelType: Optional, just for sources. Possible values: "reliable", "streaming" Possible Errors: org.bluez.Error.InvalidArguments
func (*HealthManager1) DestroyApplication ¶
func (a *HealthManager1) DestroyApplication(application dbus.ObjectPath) error
DestroyApplication Closes the HDP application identified by the object
path. Also application will be closed if the process that started it leaves the bus. Only the creator of the application will be able to destroy it. Possible errors: org.bluez.Error.InvalidArguments org.bluez.Error.NotFound org.bluez.Error.NotAllowed
func (*HealthManager1) GetObjectManagerSignal ¶
func (a *HealthManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*HealthManager1) GetProperties ¶
func (a *HealthManager1) GetProperties() (*HealthManager1Properties, error)
GetProperties load all available properties
func (*HealthManager1) GetPropertiesSignal ¶
func (a *HealthManager1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*HealthManager1) GetProperty ¶
func (a *HealthManager1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*HealthManager1) GetWatchPropertiesChannel ¶
func (a *HealthManager1) GetWatchPropertiesChannel() chan *dbus.Signal
GetWatchPropertiesChannel return the dbus channel to receive properties interface
func (*HealthManager1) Interface ¶
func (a *HealthManager1) Interface() string
Interface return HealthManager1 interface
func (*HealthManager1) Path ¶
func (a *HealthManager1) Path() dbus.ObjectPath
Path return HealthManager1 object path
func (*HealthManager1) SetProperty ¶
func (a *HealthManager1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*HealthManager1) SetWatchPropertiesChannel ¶
func (a *HealthManager1) SetWatchPropertiesChannel(c chan *dbus.Signal)
SetWatchPropertiesChannel set the dbus channel to receive properties interface
func (*HealthManager1) ToProps ¶
func (a *HealthManager1) ToProps() bluez.Properties
ToProps return the properties interface
func (*HealthManager1) UnwatchProperties ¶
func (a *HealthManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*HealthManager1) WatchProperties ¶
func (a *HealthManager1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type HealthManager1Properties ¶
type HealthManager1Properties struct {
// contains filtered or unexported fields
}
HealthManager1Properties contains the exposed properties of an interface
func (*HealthManager1Properties) FromDBusMap ¶
func (a *HealthManager1Properties) FromDBusMap(props map[string]dbus.Variant) (*HealthManager1Properties, error)
FromDBusMap convert a map to an HealthManager1Properties
func (*HealthManager1Properties) FromMap ¶
func (a *HealthManager1Properties) FromMap(props map[string]interface{}) (*HealthManager1Properties, error)
FromMap convert a map to an HealthManager1Properties
func (*HealthManager1Properties) Lock ¶
func (p *HealthManager1Properties) Lock()
Lock access to properties
func (*HealthManager1Properties) ToMap ¶
func (a *HealthManager1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a HealthManager1Properties to map
func (*HealthManager1Properties) Unlock ¶
func (p *HealthManager1Properties) Unlock()
Unlock access to properties