Methods
createCharacteristic(service, uuid, value, properties, options) → {Characteristic}
Factory method to create a characteristic in the Bluetooth `Device's` GATT attribute table.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
service |
Service
|
The `Service` instance this characteristic is to be added to. |
uuid |
string
|
A 128-bit or 16-bit unique identifier for this characteristic. |
value |
array
|
The initial value of this characteristic. |
properties |
Object
|
This GATT characteristic's metadata.
Available characteristic properties:
|
options |
Object
|
This GATT characteristic's attribute's metadata.
Available characteristic options:
|
createDescriptor(characteristic, uuid, value, options) → {Descriptor}
Factory method to create a descriptor in the Bluetooth `Device's` GATT attribute table.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
characteristic |
Characteristic
|
The `Characteristic` instance this descriptor is to be added to. |
uuid |
string
|
A 128-bit or 16-bit unique identifier for this descriptor. |
value |
array
|
The initial value of this descriptor. |
options |
Object
|
This GATT descriptor's attribute's metadata.
Available descriptor options:
|
createService(uuid, serviceType) → {Service}
Factory method to create a service in the Bluetooth `Device's` 'local.server' GATT attribute table.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
uuid |
string
|
A 128-bit or 16-bit unique identifier for this service. |
serviceType |
string
|
The server service type. 'primary' (default) or `secondary`. |