thermometer

package
v0.0.0-...-ac156b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

BlueZ D-Bus Thermometer API description [thermometer-api.txt]

Santiago Carot-Nemesio <sancane@gmail.com>

Index

Constants

This section is empty.

Variables

View Source
var Thermometer1Interface = "org.bluez.Thermometer1"
View Source
var ThermometerManager1Interface = "org.bluez.ThermometerManager1"
View Source
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) Close

func (a *Thermometer1) Close()

Close the connection

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) 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) SetInterval

func (a *Thermometer1) SetInterval(v uint16) error

SetInterval set Interval value

func (*Thermometer1) SetProperty

func (a *Thermometer1) SetProperty(name string, value interface{}) error

SetProperty set a property

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) Close

func (a *ThermometerManager1) Close()

Close the connection

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.

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

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) Interface

func (a *ThermometerManager1) Interface() string

Interface return ThermometerManager1 interface

func (*ThermometerManager1) Path

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.

func (*ThermometerManager1) SetProperty

func (a *ThermometerManager1) SetProperty(name string, value interface{}) error

SetProperty set a property

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

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

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

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) Close

func (a *ThermometerWatcher1) Close()

Close the connection

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

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) 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.

func (*ThermometerWatcher1) Path

Path return ThermometerWatcher1 object path

func (*ThermometerWatcher1) SetProperty

func (a *ThermometerWatcher1) SetProperty(name string, value interface{}) error

SetProperty set a property

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL