public class BluetoothServicesUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ej.bluetooth.BluetoothUuid |
CCC_UUID
Client characteristic configuration.
|
static ej.bluetooth.BluetoothUuid |
CUD_UUID
User description.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkCccNIndication(byte[] value)
Checks if a CCC value has indication enabled.
|
static boolean |
checkCccNotifications(byte[] value)
Checks if a CCC value has notification enabled.
|
static ej.bluetooth.BluetoothDescriptor |
createCCC()
Creates a new Client characteristic configuration descriptor.
|
static ej.bluetooth.BluetoothDescriptor |
createCUD()
Creates a new CUD descriptor.
|
static byte[] |
makeCccValue(boolean notifications,
boolean indications)
Makes a CCC value.
|
public static final ej.bluetooth.BluetoothUuid CUD_UUID
public static final ej.bluetooth.BluetoothUuid CCC_UUID
public static ej.bluetooth.BluetoothDescriptor createCUD()
public static ej.bluetooth.BluetoothDescriptor createCCC()
public static boolean checkCccNotifications(byte[] value)
value
- the CCC value to check.true
if the notification is enabled.public static boolean checkCccNIndication(byte[] value)
value
- the CCC value to check.true
if the indication is enabled.public static byte[] makeCccValue(boolean notifications, boolean indications)
notifications
- true
if the notification is enabled.indications
- true
if the indications is enabled.