|
Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Provides access to Bluetooth GATT characteristic. More...
Public Member Functions | |
| BTGattChar | find (String UUID, long timeoutMS) |
| Find a BTGattChar. More... | |
| BTGattChar | find (String UUID) |
| Find a BTGattChar. More... | |
| String | getUUID () |
| Get the UUID of this service. 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... | |
| List< BTGattChar > | getChars () |
| Returns a list of BTGattChar this service exposes. More... | |
Public Member Functions inherited from org.direct_bt.BTObject | |
| BTType | getBluetoothType () |
| Returns the BluetoothType of this object. More... | |
| boolean | equals (Object obj) |
| int | hashCode () |
| void | close () |
| Release the native memory associated with this object The object should not be used following a call to close. More... | |
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 boolean | removeCharListenerFromAll (final BTDevice device, final List< BTGattService > services, final BTGattCharListener listener) |
| Removes the given BTGattCharListener from the BTDevice. More... | |
| static int | removeAllCharListener (final BTDevice device, final List< BTGattService > services) |
| Removes all BTGattCharListener from the BTDevice. More... | |
Provides access to Bluetooth GATT characteristic.
Definition at line 40 of file BTGattService.java.
|
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 101 of file BTGattService.java.
| BTGattChar org.direct_bt.BTGattService.find | ( | String | UUID | ) |
Find a BTGattChar.
If parameter UUID is not null, the returned object will have to match it. It will first check for existing objects. It will not turn on discovery or connect to devices. @parameter UUID optionally specify the UUID of the BluetoothGattDescriptor you are waiting for
Implemented in jau.direct_bt.DBTGattService.
| BTGattChar org.direct_bt.BTGattService.find | ( | String | UUID, |
| long | timeoutMS | ||
| ) |
Find a BTGattChar.
If parameter UUID is not null, the returned object will have to match it. It will first check for existing objects. It will not turn on discovery or connect to devices. @parameter UUID optionally specify the UUID of the BTGattChar you are waiting for @parameter timeoutMS the function will return after timeout time in milliseconds, a value of zero means wait forever. If object is not found during this time null will be returned.
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.
| 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.
| String org.direct_bt.BTGattService.getUUID | ( | ) |
Get the UUID of this service.
Implemented in jau.direct_bt.DBTGattService.
|
static |
Removes all BTGattCharListener from the BTDevice.
Definition at line 147 of file BTGattService.java.
|
static |
Removes the given BTGattCharListener from the BTDevice.
| listener | BTGattCharListener to remove from the BTDevice. |
Definition at line 128 of file BTGattService.java.
1.8.18