public class DescriptorHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static ej.bluetooth.BluetoothUuid |
CCC_UUID
UUID of the Client Characteristic Configuration descriptor.
|
static ej.bluetooth.BluetoothUuid |
CUD_UUID
UUID of the Characteristic User Description descriptor.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkIndicationsEnabled(byte[] value)
Returns whether indications are enabled in the given CCC descriptor value.
|
static boolean |
checkNotificationsEnabled(byte[] value)
Returns whether notifications are enabled in the given CCC descriptor value.
|
static byte[] |
createCccValue(boolean notificationsEnabled,
boolean indicationsEnabled)
Creates a CCC descriptor value specifying whether or not notifications and indications should be enabled.
|
public static final ej.bluetooth.BluetoothUuid CUD_UUID
public static final ej.bluetooth.BluetoothUuid CCC_UUID
public static byte[] createCccValue(boolean notificationsEnabled,
boolean indicationsEnabled)
notificationsEnabled - whether notifications should be enabled.indicationsEnabled - whether indications should be enabled.public static boolean checkNotificationsEnabled(byte[] value)
value - the value of the CCC descriptor.public static boolean checkIndicationsEnabled(byte[] value)
value - the value of the CCC descriptor.