Documentation
¶
Index ¶
- Variables
- type Service
- func (d *Service) Create() *ble.Service
- func (d *Service) SetFirmwareRevision(firmwareRevision string)
- func (d *Service) SetHardwareRevision(hardwareRevision string)
- func (d *Service) SetManufacturer(manufacturer string)
- func (d *Service) SetModelNumber(modelNumber string)
- func (d *Service) SetSerialNumber(serialNumber string)
- func (d *Service) SetSoftwareRevision(softwareRevision string)
Constants ¶
This section is empty.
Variables ¶
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.
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 ¶
Create will return an instance of ble.Service, that can be used to advertise the device information service.
func (*Service) SetFirmwareRevision ¶
SetFirmwareRevision sets the firmware revision.
func (*Service) SetHardwareRevision ¶
SetHardwareRevision sets the hardware revision.
func (*Service) SetManufacturer ¶
SetManufacturer sets the manufacturer.
func (*Service) SetModelNumber ¶
SetModelNumber sets the model number.
func (*Service) SetSerialNumber ¶
SetSerialNumber sets the serial number.
func (*Service) SetSoftwareRevision ¶
SetSoftwareRevision sets the software revision.