deviceinformation

package module
v0.0.0-...-46f83e5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 1 Imported by: 2

README

go-ble-device-information

Device Information service for go-ble.

License

See the LICENSE.md file (MIT license).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CharacteristicModelNumber      = ble.UUID16(0x2a24)
	CharacteristicSerialNumber     = ble.UUID16(0x2a25)
	CharacteristicFirmwareRevision = ble.UUID16(0x2a26)
	CharacteristicHardwareRevision = ble.UUID16(0x2a27)
	CharacteristicSoftwareRevision = ble.UUID16(0x2a28)
	CharacteristicManufacturer     = ble.UUID16(0x2a29)
)

UUIDs of the characteristics.

View Source
var ServiceDeviceInformation = ble.UUID16(0x180a)

ServiceDeviceInformation is de UUID of the Device Information service. https://www.bluetooth.com/specifications/gatt/services/.

Functions

This section is empty.

Types

type Service

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

Service is the interface for the device information BLE service. Only properties that are non-nil will be advertised by this service.

func New

func New() *Service

New initializes a new instance of Service. Only non-nil values are advertised.

func (*Service) Create

func (d *Service) Create() *ble.Service

Create will return an instance of ble.Service, that can be used to advertise the device information service.

func (*Service) SetFirmwareRevision

func (d *Service) SetFirmwareRevision(firmwareRevision string)

SetFirmwareRevision sets the firmware revision.

func (*Service) SetHardwareRevision

func (d *Service) SetHardwareRevision(hardwareRevision string)

SetHardwareRevision sets the hardware revision.

func (*Service) SetManufacturer

func (d *Service) SetManufacturer(manufacturer string)

SetManufacturer sets the manufacturer.

func (*Service) SetModelNumber

func (d *Service) SetModelNumber(modelNumber string)

SetModelNumber sets the model number.

func (*Service) SetSerialNumber

func (d *Service) SetSerialNumber(serialNumber string)

SetSerialNumber sets the serial number.

func (*Service) SetSoftwareRevision

func (d *Service) SetSoftwareRevision(softwareRevision string)

SetSoftwareRevision sets the software revision.

Directories

Path Synopsis
examples
basic module

Jump to

Keyboard shortcuts

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