health

package
v0.0.0-...-fc103a5 Latest Latest
Warning

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

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

Documentation

Overview

BlueZ D-Bus Health API description [health-api.txt]

Index

Constants

This section is empty.

Variables

View Source
var HealthChannel1Interface = "org.bluez.HealthChannel1"
View Source
var HealthDevice1Interface = "org.bluez.HealthDevice1"
View Source
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) Close

func (a *HealthChannel1) Close()

Close the connection

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

func (*HealthChannel1) SetProperty

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

SetProperty set a property

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 {

	/*
		Device Identifies the Remote Device that is connected with.
				Maps with a HealthDevice object.
	*/
	Device dbus.ObjectPath

	/*
		Application Identifies the HealthApplication to which this channel
				is related to (which indirectly defines its role and
				data type).
	*/
	Application 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

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

func (a *HealthDevice1) Close()

Close the connection

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

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

SetProperty set a property

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

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

func (a *HealthManager1) Close()

Close the connection

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

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

Jump to

Keyboard shortcuts

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