profile

package
Version: v0.0.0-...-efdff95 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter1

type Adapter1 struct {
	Properties *Adapter1Properties
	// contains filtered or unexported fields
}

Adapter1 client

func NewAdapter1

func NewAdapter1(hostID string) *Adapter1

NewAdapter1 create a new Adapter1 client

func (*Adapter1) Close

func (a *Adapter1) Close()

Close the connection

func (*Adapter1) GetProperties

func (a *Adapter1) GetProperties() (*Adapter1Properties, error)

GetProperties load all available properties

func (*Adapter1) RemoveDevice

func (a *Adapter1) RemoveDevice(device string) error

RemoveDevice from the list

func (*Adapter1) SetProperty

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

SetProperty set a property

func (*Adapter1) StartDiscovery

func (a *Adapter1) StartDiscovery() error

StartDiscovery on the adapter

func (*Adapter1) StopDiscovery

func (a *Adapter1) StopDiscovery() error

StopDiscovery on the adapter

type Adapter1Properties

type Adapter1Properties struct {
	UUIDs               []string
	Discoverable        bool
	Discovering         bool
	Pairable            bool
	Powered             bool
	Address             string
	Alias               string
	Modalias            string
	Name                string
	Class               uint32
	DiscoverableTimeout uint32
	PairableTimeout     uint32
}

Adapter1Properties contains the exposed properties of an interface

type Device1

type Device1 struct {
	Properties *Device1Properties
	// contains filtered or unexported fields
}

Device1 client

func NewDevice1

func NewDevice1(path string) *Device1

NewDevice1 create a new Device1 client

func (*Device1) CancelParing

func (d *Device1) CancelParing() error

CancelParing stop the pairing process

func (*Device1) Close

func (d *Device1) Close()

Close the connection

func (*Device1) Connect

func (d *Device1) Connect() error

Connect to the device

func (*Device1) ConnectProfile

func (d *Device1) ConnectProfile(uuid string) error

ConnectProfile connect to the specific profile

func (*Device1) Disconnect

func (d *Device1) Disconnect() error

Disconnect from the device

func (*Device1) DisconnectProfile

func (d *Device1) DisconnectProfile(uuid string) error

DisconnectProfile from the device

func (*Device1) GetProperties

func (d *Device1) GetProperties() (*Device1Properties, error)

GetProperties load all available properties

func (*Device1) GetProperty

func (d *Device1) GetProperty(name string) (dbus.Variant, error)

GetProperty get a property

func (*Device1) Pair

func (d *Device1) Pair() error

Pair with the device

func (*Device1) Register

func (d *Device1) Register() (chan *dbus.Signal, error)

Register for changes signalling

func (*Device1) Unregister

func (d *Device1) Unregister() error

Unregister for changes signalling

type Device1Properties

type Device1Properties struct {
	UUIDs            []string
	Blocked          bool
	Connected        bool
	LegacyPairing    bool
	Paired           bool
	ServicesResolved bool
	Trusted          bool
	ServiceData      map[string]dbus.Variant
	ManufacturerData map[uint16]dbus.Variant
	RSSI             int16
	TxPower          int16
	Adapter          dbus.ObjectPath
	Address          string
	Alias            string
	Icon             string
	Modalias         string
	Name             string
	Appearance       uint16
	Class            uint32
}

Device1Properties exposed properties for Device1

type GattCharacteristic1

type GattCharacteristic1 struct {
	Properties *GattCharacteristic1Properties
	// contains filtered or unexported fields
}

GattCharacteristic1 client

func NewGattCharacteristic1

func NewGattCharacteristic1(path string) *GattCharacteristic1

var log = logging.MustGetLogger("examples") NewGattCharacteristic1 create a new GattCharacteristic1 client

func (*GattCharacteristic1) Close

func (d *GattCharacteristic1) Close()

Close the connection

func (*GattCharacteristic1) GetProperties

GetProperties load all available properties

func (*GattCharacteristic1) GetProperty

func (d *GattCharacteristic1) GetProperty(name string) (interface{}, error)

GetProperty load a single property

func (*GattCharacteristic1) ReadValue

func (d *GattCharacteristic1) ReadValue(options map[string]dbus.Variant) ([]byte, error)

ReadValue read a value from a characteristic

func (*GattCharacteristic1) Register

func (d *GattCharacteristic1) Register() (chan *dbus.Signal, error)

Register for changes signalling

func (*GattCharacteristic1) StartNotify

func (d *GattCharacteristic1) StartNotify() error

StartNotify start notifications

func (*GattCharacteristic1) StopNotify

func (d *GattCharacteristic1) StopNotify() error

StopNotify stop notifications

func (*GattCharacteristic1) Unregister

func (d *GattCharacteristic1) Unregister() error

Unregister for changes signalling

func (*GattCharacteristic1) WriteValue

func (d *GattCharacteristic1) WriteValue(b []byte, options map[string]dbus.Variant) error

WriteValue write a value to a characteristic

type GattCharacteristic1Properties

type GattCharacteristic1Properties struct {
	Value     []byte
	Flags     []string
	Notifying bool
	Service   dbus.ObjectPath
	UUID      string
}

GattCharacteristic1Properties exposed properties for GattCharacteristic1

type GattDescriptor1

type GattDescriptor1 struct {
	Properties *GattDescriptor1Properties
	// contains filtered or unexported fields
}

GattDescriptor1 client

func NewGattDescriptor1

func NewGattDescriptor1(path string) *GattDescriptor1

NewGattDescriptor1 create a new GattDescriptor1 client

func (*GattDescriptor1) Close

func (d *GattDescriptor1) Close()

Close the connection

func (*GattDescriptor1) GetProperties

func (d *GattDescriptor1) GetProperties() (*GattDescriptor1Properties, error)

GetProperties load all available properties

func (*GattDescriptor1) ReadValue

func (d *GattDescriptor1) ReadValue(options map[string]dbus.Variant) ([]byte, error)

ReadValue read a value from a descriptor

func (*GattDescriptor1) Register

func (d *GattDescriptor1) Register() (chan *dbus.Signal, error)

Register for changes signalling

func (*GattDescriptor1) Unregister

func (d *GattDescriptor1) Unregister() error

Unregister for changes signalling

func (*GattDescriptor1) WriteValue

func (d *GattDescriptor1) WriteValue(b []byte, options map[string]dbus.Variant) error

WriteValue write a value to a characteristic

type GattDescriptor1Properties

type GattDescriptor1Properties struct {
	Value          []byte
	Characteristic dbus.ObjectPath
	UUID           string
}

GattDescriptor1Properties exposed properties for GattDescriptor1

type GattService1

type GattService1 struct {
	Properties *GattService1Properties
	// contains filtered or unexported fields
}

GattService1 client

func NewGattService1

func NewGattService1(path string) *GattService1

NewGattService1 create a new GattService1 client

func (*GattService1) Close

func (d *GattService1) Close()

Close the connection

func (*GattService1) GetProperties

func (d *GattService1) GetProperties() (*GattService1Properties, error)

GetProperties load all available properties

func (*GattService1) Register

func (d *GattService1) Register() (chan *dbus.Signal, error)

Register for changes signalling

func (*GattService1) Unregister

func (d *GattService1) Unregister() error

Unregister for changes signalling

type GattService1Properties

type GattService1Properties struct {
	Primary bool
	Device  dbus.ObjectPath
	UUID    string
}

GattService1Properties exposed properties for GattService1

type ObjectManager

type ObjectManager struct {
	// contains filtered or unexported fields
}

ObjectManager manges the list of all available objects

func NewObjectManager

func NewObjectManager() *ObjectManager

NewObjectManager create a new Device1 client

func (*ObjectManager) Close

func (o *ObjectManager) Close()

Close the connection

func (*ObjectManager) GetManagedObjects

func (o *ObjectManager) GetManagedObjects() (map[dbus.ObjectPath]map[string]map[string]dbus.Variant, error)

GetManagedObjects return a list of all available objects registered

func (*ObjectManager) Register

func (o *ObjectManager) Register() (chan *dbus.Signal, error)

Register watch for signal events

func (*ObjectManager) Unregister

func (o *ObjectManager) Unregister() error

Unregister watch for signal events

type ProfileManager1

type ProfileManager1 struct {
	// contains filtered or unexported fields
}

ProfileManager1 client

func NewProfileManager1

func NewProfileManager1(hostID string) *ProfileManager1

NewProfileManager1 create a new ProfileManager1 client

func (*ProfileManager1) Close

func (a *ProfileManager1) Close()

Close the connection

func (*ProfileManager1) RegisterProfile

func (a *ProfileManager1) RegisterProfile(profile string, UUID string, options map[string]interface{}) error

RegisterProfile add a new Profile for an UUID

func (*ProfileManager1) UnregisterProfile

func (a *ProfileManager1) UnregisterProfile(profile string) error

UnregisterProfile add a new Profile for an UUID

Jump to

Keyboard shortcuts

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