Documentation ¶
Overview ¶
BlueZ D-Bus Thermometer API description [thermometer-api.txt]
Santiago Carot-Nemesio <sancane@gmail.com>
Index ¶
- Variables
- type Thermometer1
- func (a *Thermometer1) Client() *bluez.Client
- func (a *Thermometer1) Close()
- func (a *Thermometer1) GetIntermediate() (bool, error)
- func (a *Thermometer1) GetInterval() (uint16, error)
- func (a *Thermometer1) GetMaximum() (uint16, error)
- func (a *Thermometer1) GetMinimum() (uint16, error)
- func (a *Thermometer1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *Thermometer1) GetProperties() (*Thermometer1Properties, error)
- func (a *Thermometer1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *Thermometer1) GetProperty(name string) (dbus.Variant, error)
- func (a *Thermometer1) GetWatchPropertiesChannel() chan *dbus.Signal
- func (a *Thermometer1) Interface() string
- func (a *Thermometer1) Path() dbus.ObjectPath
- func (a *Thermometer1) SetIntermediate(v bool) error
- func (a *Thermometer1) SetInterval(v uint16) error
- func (a *Thermometer1) SetMaximum(v uint16) error
- func (a *Thermometer1) SetMinimum(v uint16) error
- func (a *Thermometer1) SetProperty(name string, value interface{}) error
- func (a *Thermometer1) SetWatchPropertiesChannel(c chan *dbus.Signal)
- func (a *Thermometer1) ToProps() bluez.Properties
- func (a *Thermometer1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *Thermometer1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type Thermometer1Properties
- func (a *Thermometer1Properties) FromDBusMap(props map[string]dbus.Variant) (*Thermometer1Properties, error)
- func (a *Thermometer1Properties) FromMap(props map[string]interface{}) (*Thermometer1Properties, error)
- func (p *Thermometer1Properties) Lock()
- func (a *Thermometer1Properties) ToMap() (map[string]interface{}, error)
- func (p *Thermometer1Properties) Unlock()
- type ThermometerManager1
- func (a *ThermometerManager1) Client() *bluez.Client
- func (a *ThermometerManager1) Close()
- func (a *ThermometerManager1) DisableIntermediateMeasurement(agent dbus.ObjectPath) error
- func (a *ThermometerManager1) EnableIntermediateMeasurement(agent dbus.ObjectPath) error
- func (a *ThermometerManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *ThermometerManager1) GetProperties() (*ThermometerManager1Properties, error)
- func (a *ThermometerManager1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *ThermometerManager1) GetProperty(name string) (dbus.Variant, error)
- func (a *ThermometerManager1) GetWatchPropertiesChannel() chan *dbus.Signal
- func (a *ThermometerManager1) Interface() string
- func (a *ThermometerManager1) Path() dbus.ObjectPath
- func (a *ThermometerManager1) RegisterWatcher(agent dbus.ObjectPath) error
- func (a *ThermometerManager1) SetProperty(name string, value interface{}) error
- func (a *ThermometerManager1) SetWatchPropertiesChannel(c chan *dbus.Signal)
- func (a *ThermometerManager1) ToProps() bluez.Properties
- func (a *ThermometerManager1) UnregisterWatcher(agent dbus.ObjectPath) error
- func (a *ThermometerManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *ThermometerManager1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type ThermometerManager1Properties
- func (a *ThermometerManager1Properties) FromDBusMap(props map[string]dbus.Variant) (*ThermometerManager1Properties, error)
- func (a *ThermometerManager1Properties) FromMap(props map[string]interface{}) (*ThermometerManager1Properties, error)
- func (p *ThermometerManager1Properties) Lock()
- func (a *ThermometerManager1Properties) ToMap() (map[string]interface{}, error)
- func (p *ThermometerManager1Properties) Unlock()
- type ThermometerWatcher1
- func (a *ThermometerWatcher1) Client() *bluez.Client
- func (a *ThermometerWatcher1) Close()
- func (a *ThermometerWatcher1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
- func (a *ThermometerWatcher1) GetProperties() (*ThermometerWatcher1Properties, error)
- func (a *ThermometerWatcher1) GetPropertiesSignal() (chan *dbus.Signal, error)
- func (a *ThermometerWatcher1) GetProperty(name string) (dbus.Variant, error)
- func (a *ThermometerWatcher1) GetWatchPropertiesChannel() chan *dbus.Signal
- func (a *ThermometerWatcher1) Interface() string
- func (a *ThermometerWatcher1) MeasurementReceived(measurement map[string]interface{}) error
- func (a *ThermometerWatcher1) Path() dbus.ObjectPath
- func (a *ThermometerWatcher1) SetProperty(name string, value interface{}) error
- func (a *ThermometerWatcher1) SetWatchPropertiesChannel(c chan *dbus.Signal)
- func (a *ThermometerWatcher1) ToProps() bluez.Properties
- func (a *ThermometerWatcher1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
- func (a *ThermometerWatcher1) WatchProperties() (chan *bluez.PropertyChanged, error)
- type ThermometerWatcher1Properties
- func (a *ThermometerWatcher1Properties) FromDBusMap(props map[string]dbus.Variant) (*ThermometerWatcher1Properties, error)
- func (a *ThermometerWatcher1Properties) FromMap(props map[string]interface{}) (*ThermometerWatcher1Properties, error)
- func (p *ThermometerWatcher1Properties) Lock()
- func (a *ThermometerWatcher1Properties) ToMap() (map[string]interface{}, error)
- func (p *ThermometerWatcher1Properties) Unlock()
Constants ¶
This section is empty.
Variables ¶
var Thermometer1Interface = "org.bluez.Thermometer1"
var ThermometerManager1Interface = "org.bluez.ThermometerManager1"
var ThermometerWatcher1Interface = "org.bluez.ThermometerWatcher1"
Functions ¶
This section is empty.
Types ¶
type Thermometer1 ¶
type Thermometer1 struct { Properties *Thermometer1Properties // contains filtered or unexported fields }
Thermometer1 Health Thermometer Profile hierarchy
func NewThermometer1 ¶
func NewThermometer1(objectPath dbus.ObjectPath) (*Thermometer1, error)
NewThermometer1 create a new instance of Thermometer1
Args: - objectPath: [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
func (*Thermometer1) Client ¶
func (a *Thermometer1) Client() *bluez.Client
Client return Thermometer1 dbus client
func (*Thermometer1) GetIntermediate ¶
func (a *Thermometer1) GetIntermediate() (bool, error)
GetIntermediate get Intermediate value
func (*Thermometer1) GetInterval ¶
func (a *Thermometer1) GetInterval() (uint16, error)
GetInterval get Interval value
func (*Thermometer1) GetMaximum ¶
func (a *Thermometer1) GetMaximum() (uint16, error)
GetMaximum get Maximum value
func (*Thermometer1) GetMinimum ¶
func (a *Thermometer1) GetMinimum() (uint16, error)
GetMinimum get Minimum value
func (*Thermometer1) GetObjectManagerSignal ¶
func (a *Thermometer1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*Thermometer1) GetProperties ¶
func (a *Thermometer1) GetProperties() (*Thermometer1Properties, error)
GetProperties load all available properties
func (*Thermometer1) GetPropertiesSignal ¶
func (a *Thermometer1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*Thermometer1) GetProperty ¶
func (a *Thermometer1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*Thermometer1) GetWatchPropertiesChannel ¶
func (a *Thermometer1) GetWatchPropertiesChannel() chan *dbus.Signal
GetWatchPropertiesChannel return the dbus channel to receive properties interface
func (*Thermometer1) Interface ¶
func (a *Thermometer1) Interface() string
Interface return Thermometer1 interface
func (*Thermometer1) Path ¶
func (a *Thermometer1) Path() dbus.ObjectPath
Path return Thermometer1 object path
func (*Thermometer1) SetIntermediate ¶
func (a *Thermometer1) SetIntermediate(v bool) error
SetIntermediate set Intermediate value
func (*Thermometer1) SetInterval ¶
func (a *Thermometer1) SetInterval(v uint16) error
SetInterval set Interval value
func (*Thermometer1) SetMaximum ¶
func (a *Thermometer1) SetMaximum(v uint16) error
SetMaximum set Maximum value
func (*Thermometer1) SetMinimum ¶
func (a *Thermometer1) SetMinimum(v uint16) error
SetMinimum set Minimum value
func (*Thermometer1) SetProperty ¶
func (a *Thermometer1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*Thermometer1) SetWatchPropertiesChannel ¶
func (a *Thermometer1) SetWatchPropertiesChannel(c chan *dbus.Signal)
SetWatchPropertiesChannel set the dbus channel to receive properties interface
func (*Thermometer1) ToProps ¶
func (a *Thermometer1) ToProps() bluez.Properties
ToProps return the properties interface
func (*Thermometer1) UnwatchProperties ¶
func (a *Thermometer1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*Thermometer1) WatchProperties ¶
func (a *Thermometer1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type Thermometer1Properties ¶
type Thermometer1Properties struct { /* Intermediate True if the thermometer supports intermediate measurement notifications. */ Intermediate bool /* Interval (optional) The Measurement Interval defines the time (in seconds) between measurements. This interval is not related to the intermediate measurements and must be defined into a valid range. Setting it to zero means that no periodic measurements will be taken. */ Interval uint16 /* Maximum (optional) Defines the maximum value allowed for the interval between periodic measurements. */ Maximum uint16 /* Minimum (optional) Defines the minimum value allowed for the interval between periodic measurements. */ Minimum uint16 // contains filtered or unexported fields }
Thermometer1Properties contains the exposed properties of an interface
func (*Thermometer1Properties) FromDBusMap ¶
func (a *Thermometer1Properties) FromDBusMap(props map[string]dbus.Variant) (*Thermometer1Properties, error)
FromDBusMap convert a map to an Thermometer1Properties
func (*Thermometer1Properties) FromMap ¶
func (a *Thermometer1Properties) FromMap(props map[string]interface{}) (*Thermometer1Properties, error)
FromMap convert a map to an Thermometer1Properties
func (*Thermometer1Properties) Lock ¶
func (p *Thermometer1Properties) Lock()
Lock access to properties
func (*Thermometer1Properties) ToMap ¶
func (a *Thermometer1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a Thermometer1Properties to map
func (*Thermometer1Properties) Unlock ¶
func (p *Thermometer1Properties) Unlock()
Unlock access to properties
type ThermometerManager1 ¶
type ThermometerManager1 struct { Properties *ThermometerManager1Properties // contains filtered or unexported fields }
ThermometerManager1 Health Thermometer Manager hierarchy
func NewThermometerManager1 ¶
func NewThermometerManager1(objectPath dbus.ObjectPath) (*ThermometerManager1, error)
NewThermometerManager1 create a new instance of ThermometerManager1
Args: - objectPath: [variable prefix]/{hci0,hci1,...}
func (*ThermometerManager1) Client ¶
func (a *ThermometerManager1) Client() *bluez.Client
Client return ThermometerManager1 dbus client
func (*ThermometerManager1) DisableIntermediateMeasurement ¶
func (a *ThermometerManager1) DisableIntermediateMeasurement(agent dbus.ObjectPath) error
DisableIntermediateMeasurement Disables intermediate measurement notifications
for this agent. It will disable notifications in thermometers when the last agent removes the watcher for intermediate measurements. Possible Errors: org.bluez.Error.InvalidArguments org.bluez.Error.NotFound
func (*ThermometerManager1) EnableIntermediateMeasurement ¶
func (a *ThermometerManager1) EnableIntermediateMeasurement(agent dbus.ObjectPath) error
EnableIntermediateMeasurement Enables intermediate measurement notifications
for this agent. Intermediate measurements will be enabled only for thermometers which support it. Possible Errors: org.bluez.Error.InvalidArguments
func (*ThermometerManager1) GetObjectManagerSignal ¶
func (a *ThermometerManager1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*ThermometerManager1) GetProperties ¶
func (a *ThermometerManager1) GetProperties() (*ThermometerManager1Properties, error)
GetProperties load all available properties
func (*ThermometerManager1) GetPropertiesSignal ¶
func (a *ThermometerManager1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*ThermometerManager1) GetProperty ¶
func (a *ThermometerManager1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*ThermometerManager1) GetWatchPropertiesChannel ¶
func (a *ThermometerManager1) GetWatchPropertiesChannel() chan *dbus.Signal
GetWatchPropertiesChannel return the dbus channel to receive properties interface
func (*ThermometerManager1) Interface ¶
func (a *ThermometerManager1) Interface() string
Interface return ThermometerManager1 interface
func (*ThermometerManager1) Path ¶
func (a *ThermometerManager1) Path() dbus.ObjectPath
Path return ThermometerManager1 object path
func (*ThermometerManager1) RegisterWatcher ¶
func (a *ThermometerManager1) RegisterWatcher(agent dbus.ObjectPath) error
RegisterWatcher Registers a watcher to monitor scanned measurements.
This agent will be notified about final temperature measurements. Possible Errors: org.bluez.Error.InvalidArguments
func (*ThermometerManager1) SetProperty ¶
func (a *ThermometerManager1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*ThermometerManager1) SetWatchPropertiesChannel ¶
func (a *ThermometerManager1) SetWatchPropertiesChannel(c chan *dbus.Signal)
SetWatchPropertiesChannel set the dbus channel to receive properties interface
func (*ThermometerManager1) ToProps ¶
func (a *ThermometerManager1) ToProps() bluez.Properties
ToProps return the properties interface
func (*ThermometerManager1) UnregisterWatcher ¶
func (a *ThermometerManager1) UnregisterWatcher(agent dbus.ObjectPath) error
UnregisterWatcher Unregisters a watcher.
func (*ThermometerManager1) UnwatchProperties ¶
func (a *ThermometerManager1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*ThermometerManager1) WatchProperties ¶
func (a *ThermometerManager1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type ThermometerManager1Properties ¶
type ThermometerManager1Properties struct {
// contains filtered or unexported fields
}
ThermometerManager1Properties contains the exposed properties of an interface
func (*ThermometerManager1Properties) FromDBusMap ¶
func (a *ThermometerManager1Properties) FromDBusMap(props map[string]dbus.Variant) (*ThermometerManager1Properties, error)
FromDBusMap convert a map to an ThermometerManager1Properties
func (*ThermometerManager1Properties) FromMap ¶
func (a *ThermometerManager1Properties) FromMap(props map[string]interface{}) (*ThermometerManager1Properties, error)
FromMap convert a map to an ThermometerManager1Properties
func (*ThermometerManager1Properties) Lock ¶
func (p *ThermometerManager1Properties) Lock()
Lock access to properties
func (*ThermometerManager1Properties) ToMap ¶
func (a *ThermometerManager1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a ThermometerManager1Properties to map
func (*ThermometerManager1Properties) Unlock ¶
func (p *ThermometerManager1Properties) Unlock()
Unlock access to properties
type ThermometerWatcher1 ¶
type ThermometerWatcher1 struct { Properties *ThermometerWatcher1Properties // contains filtered or unexported fields }
ThermometerWatcher1 Health Thermometer Watcher hierarchy
func NewThermometerWatcher1 ¶
func NewThermometerWatcher1(servicePath string, objectPath dbus.ObjectPath) (*ThermometerWatcher1, error)
NewThermometerWatcher1 create a new instance of ThermometerWatcher1
Args: - servicePath: unique name - objectPath: freely definable
func (*ThermometerWatcher1) Client ¶
func (a *ThermometerWatcher1) Client() *bluez.Client
Client return ThermometerWatcher1 dbus client
func (*ThermometerWatcher1) GetObjectManagerSignal ¶
func (a *ThermometerWatcher1) GetObjectManagerSignal() (chan *dbus.Signal, func(), error)
GetObjectManagerSignal return a channel for receiving updates from the ObjectManager
func (*ThermometerWatcher1) GetProperties ¶
func (a *ThermometerWatcher1) GetProperties() (*ThermometerWatcher1Properties, error)
GetProperties load all available properties
func (*ThermometerWatcher1) GetPropertiesSignal ¶
func (a *ThermometerWatcher1) GetPropertiesSignal() (chan *dbus.Signal, error)
GetPropertiesSignal return a channel for receiving udpdates on property changes
func (*ThermometerWatcher1) GetProperty ¶
func (a *ThermometerWatcher1) GetProperty(name string) (dbus.Variant, error)
GetProperty get a property
func (*ThermometerWatcher1) GetWatchPropertiesChannel ¶
func (a *ThermometerWatcher1) GetWatchPropertiesChannel() chan *dbus.Signal
GetWatchPropertiesChannel return the dbus channel to receive properties interface
func (*ThermometerWatcher1) Interface ¶
func (a *ThermometerWatcher1) Interface() string
Interface return ThermometerWatcher1 interface
func (*ThermometerWatcher1) MeasurementReceived ¶
func (a *ThermometerWatcher1) MeasurementReceived(measurement map[string]interface{}) error
MeasurementReceived This callback gets called when a measurement has been
scanned in the thermometer. Measurement: int16 Exponent: int32 Mantissa: Exponent and Mantissa values as extracted from float value defined by IEEE-11073-20601. Measurement value is calculated as (Mantissa) * (10^Exponent) For special cases Exponent is set to 0 and Mantissa is set to one of following values: +(2^23 - 1) NaN (invalid or missing data) -(2^23) NRes +(2^23 - 2) +Infinity -(2^23 - 2) -Infinity string Unit: Possible values: "celsius" or "fahrenheit" uint64 Time (optional): Time of measurement, if supported by device. Expressed in seconds since epoch. string Type (optional): Only present if measurement type is known. Possible values: "armpit", "body", "ear", "finger", "intestines", "mouth", "rectum", "toe", "tympanum" string Measurement: Possible values: "final" or "intermediate"
func (*ThermometerWatcher1) Path ¶
func (a *ThermometerWatcher1) Path() dbus.ObjectPath
Path return ThermometerWatcher1 object path
func (*ThermometerWatcher1) SetProperty ¶
func (a *ThermometerWatcher1) SetProperty(name string, value interface{}) error
SetProperty set a property
func (*ThermometerWatcher1) SetWatchPropertiesChannel ¶
func (a *ThermometerWatcher1) SetWatchPropertiesChannel(c chan *dbus.Signal)
SetWatchPropertiesChannel set the dbus channel to receive properties interface
func (*ThermometerWatcher1) ToProps ¶
func (a *ThermometerWatcher1) ToProps() bluez.Properties
ToProps return the properties interface
func (*ThermometerWatcher1) UnwatchProperties ¶
func (a *ThermometerWatcher1) UnwatchProperties(ch chan *bluez.PropertyChanged) error
func (*ThermometerWatcher1) WatchProperties ¶
func (a *ThermometerWatcher1) WatchProperties() (chan *bluez.PropertyChanged, error)
WatchProperties updates on property changes
type ThermometerWatcher1Properties ¶
type ThermometerWatcher1Properties struct {
// contains filtered or unexported fields
}
ThermometerWatcher1Properties contains the exposed properties of an interface
func (*ThermometerWatcher1Properties) FromDBusMap ¶
func (a *ThermometerWatcher1Properties) FromDBusMap(props map[string]dbus.Variant) (*ThermometerWatcher1Properties, error)
FromDBusMap convert a map to an ThermometerWatcher1Properties
func (*ThermometerWatcher1Properties) FromMap ¶
func (a *ThermometerWatcher1Properties) FromMap(props map[string]interface{}) (*ThermometerWatcher1Properties, error)
FromMap convert a map to an ThermometerWatcher1Properties
func (*ThermometerWatcher1Properties) Lock ¶
func (p *ThermometerWatcher1Properties) Lock()
Lock access to properties
func (*ThermometerWatcher1Properties) ToMap ¶
func (a *ThermometerWatcher1Properties) ToMap() (map[string]interface{}, error)
ToMap convert a ThermometerWatcher1Properties to map
func (*ThermometerWatcher1Properties) Unlock ¶
func (p *ThermometerWatcher1Properties) Unlock()
Unlock access to properties