Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
A copy of the native GATT value of DBGattChar or DBGattDesc. More...
Public Member Functions | |
DBGattValue (final byte[] value, final int capacity) | |
Constructor, using default variable_length = false. More... | |
DBGattValue (final byte[] value, final int capacity, final boolean variable_length) | |
Constructor. More... | |
void | bzero () |
Fill value with zero bytes. More... | |
int | capacity () |
Return the set capacity for this value. More... | |
byte[] | data () |
Returns the actual data of this value. More... | |
boolean | equals (final Object other) |
Only compares the actual value, not hasVariableLength() nor capacity() . More... | |
boolean | hasVariableLength () |
Returns true if this value has variable length. More... | |
void | setVariableLength (final boolean v) |
int | size () |
Return the size of this value, i.e. More... | |
String | toString () |
Static Public Member Functions | |
static DBGattValue | make (final byte[] p) |
Convenience DBGattValue ctor function. More... | |
static DBGattValue | make (final int capacity, final int size) |
Convenience DBGattValue ctor function. More... | |
static DBGattValue | make (final int capacity, final int size, final byte[] s) |
Convenience DBGattValue ctor function. More... | |
static DBGattValue | make (final short v) |
Convenience DBGattValue ctor function. More... | |
static DBGattValue | make (final String name) |
Convenience DBGattValue ctor function. More... | |
static DBGattValue | make (final String name, final int capacity) |
Convenience DBGattValue ctor function. More... | |
A copy of the native GATT value of DBGattChar or DBGattDesc.
Its capacity()
defines the maximum writable variable length and its size()
defines the maximum writable fixed length. See hasVariableLength()
.
Definition at line 42 of file DBGattValue.java.
org.direct_bt.DBGattValue.DBGattValue | ( | final byte[] | value, |
final int | capacity, | ||
final boolean | variable_length | ||
) |
Constructor.
value | the data, which length defines the maximum writable fixed length if variable length is false. If variable length is true, capacity limits the maximum writable length. |
capacity_ | defines the maximum writable variable length, if variable length is true |
variable_length_ | defaults to false. |
Definition at line 94 of file DBGattValue.java.
org.direct_bt.DBGattValue.DBGattValue | ( | final byte[] | value, |
final int | capacity | ||
) |
Constructor, using default variable_length = false.
value | the data, which length defines the maximum writable fixed length, if variable length is disabled. |
capacity_ | defines the maximum writable variable length, if variable length is true |
Definition at line 106 of file DBGattValue.java.
|
static |
Convenience DBGattValue
ctor function.
Definition at line 51 of file DBGattValue.java.
|
static |
Convenience DBGattValue
ctor function.
Definition at line 56 of file DBGattValue.java.
|
static |
Convenience DBGattValue
ctor function.
Definition at line 61 of file DBGattValue.java.
|
static |
Convenience DBGattValue
ctor function.
Definition at line 68 of file DBGattValue.java.
|
static |
Convenience DBGattValue
ctor function.
Definition at line 75 of file DBGattValue.java.
|
static |
Convenience DBGattValue
ctor function.
Definition at line 80 of file DBGattValue.java.
boolean org.direct_bt.DBGattValue.hasVariableLength | ( | ) |
Returns true if this value has variable length.
Variable length impacts GATT value write behavior.
Definition at line 119 of file DBGattValue.java.
void org.direct_bt.DBGattValue.setVariableLength | ( | final boolean | v | ) |
int org.direct_bt.DBGattValue.capacity | ( | ) |
Return the set capacity for this value.
Capacity defines the maximum writable variable length, if variable length is enabled.
Definition at line 131 of file DBGattValue.java.
int org.direct_bt.DBGattValue.size | ( | ) |
Return the size of this value, i.e.
byte[] length.
Size defines the maximum writable fixed length, if variable length is disabled.
Definition at line 141 of file DBGattValue.java.
byte[] org.direct_bt.DBGattValue.data | ( | ) |
Returns the actual data of this value.
Definition at line 146 of file DBGattValue.java.
void org.direct_bt.DBGattValue.bzero | ( | ) |
Fill value with zero bytes.
Definition at line 149 of file DBGattValue.java.
boolean org.direct_bt.DBGattValue.equals | ( | final Object | other | ) |
Only compares the actual value, not hasVariableLength()
nor capacity()
.
Parent description:
Definition at line 163 of file DBGattValue.java.
String org.direct_bt.DBGattValue.toString | ( | ) |
Definition at line 184 of file DBGattValue.java.