|
Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Representing a Gatt Service object from the GATT client perspective. More...
Public Member Functions | |
| BTGattChar | findGattChar (String char_uuid) |
Find a BTGattChar by its char_uuid. More... | |
| List< BTGattChar > | getChars () |
| Returns a list of BTGattChar this service exposes. More... | |
| BTDevice | getDevice () |
| Returns the device to which this service belongs to. More... | |
| boolean | getPrimary () |
| Returns true if this service is a primary service, false if secondary. More... | |
| String | getUUID () |
| Get the UUID of this service. More... | |
| String | toString () |
Public Member Functions inherited from org.direct_bt.BTObject | |
| void | close () |
| Release the native memory associated with this object The object should not be used following a call to close. More... | |
| boolean | equals (Object obj) |
| int | hashCode () |
Static Public Member Functions | |
| static boolean | addCharListenerToAll (final BTDevice device, final List< BTGattService > services, final BTGattCharListener listener) |
Adds the given BTGattCharListener to the BTDevice and BTGattChar#enableNotificationOrIndication(boolean[]) for all BTGattChar instances. More... | |
| static int | removeAllCharListener (final BTDevice device, final List< BTGattService > services) |
Removes all BTGattCharListener from the BTDevice. More... | |
| static boolean | removeCharListenerFromAll (final BTDevice device, final List< BTGattService > services, final BTGattCharListener listener) |
Removes the given BTGattCharListener from the BTDevice. More... | |
Representing a Gatt Service object from the GATT client perspective.
A list of shared BTGattService instances can be retrieved from BTDevice after successful connection and optional pairing via BTDevice::getGattServices().
See Direct-BT Overview.
BT Core Spec v5.2: Vol 3, Part G GATT: 3.1 Service Definition
Includes a complete [Primary] Service Declaration including its list of Characteristic Declarations, which also may include its client config if available.
See DBGattService.UUID16 for selected standard GATT service numbers in UUID16 format and BTUtils#toUUID128(String) for their conversion to UUID128.
Definition at line 48 of file BTGattService.java.
| BTGattChar org.direct_bt.BTGattService.findGattChar | ( | String | char_uuid | ) |
Find a BTGattChar by its char_uuid.
@parameter char_uuid the UUID of the desired BTGattChar
Implemented in jau.direct_bt.DBTGattService.
| String org.direct_bt.BTGattService.getUUID | ( | ) |
Get the UUID of this service.
Implemented in jau.direct_bt.DBTGattService.
| BTDevice org.direct_bt.BTGattService.getDevice | ( | ) |
Returns the device to which this service belongs to.
Implemented in jau.direct_bt.DBTGattService.
| boolean org.direct_bt.BTGattService.getPrimary | ( | ) |
Returns true if this service is a primary service, false if secondary.
Implemented in jau.direct_bt.DBTGattService.
| List< BTGattChar > org.direct_bt.BTGattService.getChars | ( | ) |
Returns a list of BTGattChar this service exposes.
Implemented in jau.direct_bt.DBTGattService.
|
static |
Adds the given BTGattCharListener to the BTDevice and BTGattChar#enableNotificationOrIndication(boolean[]) for all BTGattChar instances.
| listener | BTGattCharListener to add to the BTDevice. It is important to have hte listener's associated characteristic == null, otherwise the listener can't be used for all characteristics. |
| IllegalArgumentException | if listener's associated characteristic is not null. |
Definition at line 91 of file BTGattService.java.
|
static |
Removes the given BTGattCharListener from the BTDevice.
| listener | BTGattCharListener to remove from the BTDevice. |
Definition at line 115 of file BTGattService.java.
|
static |
Removes all BTGattCharListener from the BTDevice.
BTGattCharListener Definition at line 134 of file BTGattService.java.
| String org.direct_bt.BTGattService.toString | ( | ) |
Implemented in jau.direct_bt.DBTGattService.