public final class BluetoothDeviceCharacteristic
extends java.lang.Object
BluetoothGattCharacteristic
). Please note that
CharacteristicWrapper can wrap only characteristics identifid by UUID ids
described in kontakt.io Beacon specification - version 2.Modifier and Type | Class and Description |
---|---|
static interface |
BluetoothDeviceCharacteristic.BeaconCharacteristic
The interface Beacon characteristic.
|
Constructor and Description |
---|
BluetoothDeviceCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic,
DeviceProfile profile)
Instantiates a new CharacteristicWrapper.
|
Modifier and Type | Method and Description |
---|---|
android.bluetooth.BluetoothGattCharacteristic |
getCharacteristic()
Gets wrapped characteristic.
|
java.lang.String |
getHexStringValue()
Gets hex string value.
|
java.util.UUID |
getId()
Gets id of the characteristic.
|
int |
getInstanceId()
Gets characteristic instance id.
|
int |
getIntValue()
Gets characteristic's value as Integer.
|
long |
getLongValue()
Gets characteristic's valueas Lon.
|
java.lang.String |
getName()
Gets characteristic name.
|
int |
getPermissions()
Gets characteristic permissions.
|
int |
getProperties()
Gets characteristic properties.
|
java.lang.String |
getStringValue()
Gets characteristic's value as String.
|
java.util.UUID |
getUUIDValue()
Gets characteristic's value as UUID.
|
byte[] |
getValue()
Gets characteristic's value as byte array.
|
int |
getWriteType()
Gets characteristic write type.
|
boolean |
isNotifiable()
Checks whether wrapped characteristic is notifiable.
|
boolean |
isReadable()
Checks whether wrapped characteristic is readable.
|
boolean |
isWritable()
Checks whether wrapped characteristic is writable.
|
void |
setValue(byte[] value)
Sets characteristic's value as byte array.
|
void |
setValue(int value)
Sets Integer as characteristic's value.
|
void |
setValue(long value)
Sets Long as characteristic's value.
|
void |
setValue(java.lang.String value)
Sets String as characteristic's value.
|
public BluetoothDeviceCharacteristic(android.bluetooth.BluetoothGattCharacteristic characteristic, DeviceProfile profile)
characteristic
- the characteristicprofile
- the profilepublic java.util.UUID getId()
public java.lang.String getName()
public android.bluetooth.BluetoothGattCharacteristic getCharacteristic()
public boolean isWritable()
public boolean isReadable()
public boolean isNotifiable()
public void setValue(int value)
value
- the int valuepublic void setValue(java.lang.String value)
value
- the String valuepublic void setValue(long value)
value
- the long valuepublic void setValue(byte[] value)
value
- the valuepublic byte[] getValue()
public java.lang.String getStringValue()
public java.lang.String getHexStringValue()
public java.util.UUID getUUIDValue()
public int getIntValue()
public long getLongValue()
public int getPermissions()
public int getWriteType()
public int getProperties()
public int getInstanceId()