public final class BluetoothDeviceCharacteristic
extends BluetoothGattCharacteristic
BluetoothGattCharacteristic
). Please note that
CharacteristicWrapper can wrap only characteristics identifid by UUID ids
described in kontakt.io iBeacon and Eddystone specification.Constructor and Description |
---|
BluetoothDeviceCharacteristic(BluetoothGattCharacteristic characteristic)
Instantiates a new CharacteristicWrapper.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addDescriptor(BluetoothGattDescriptor descriptor) |
BluetoothGattDescriptor |
getDescriptor(java.util.UUID uuid) |
java.util.List<BluetoothGattDescriptor> |
getDescriptors() |
java.lang.Float |
getFloatValue(int formatType,
int offset) |
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.
|
java.lang.Integer |
getIntValue(int formatType,
int offset) |
KontaktDeviceCharacteristic |
getKontaktDeviceCharacteristic() |
long |
getLongValue()
Gets characteristic's valueas Lon.
|
java.lang.String |
getName()
Gets characteristic name.
|
int |
getPermissions()
Gets characteristic permissions.
|
int |
getProperties()
Gets characteristic properties.
|
BluetoothGattService |
getService() |
java.lang.String |
getStringValue()
Gets characteristic's value as String.
|
java.lang.String |
getStringValue(int offset) |
java.util.UUID |
getUuid() |
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.
|
boolean |
setValue(byte[] value) |
void |
setValue(int value)
Sets Integer as characteristic's value.
|
boolean |
setValue(int value,
int formatType,
int offset) |
boolean |
setValue(int mantissa,
int exponent,
int formatType,
int offset) |
boolean |
setValue(long value)
Sets Long as characteristic's value.
|
boolean |
setValue(java.lang.String value) |
void |
setWriteType(int writeType) |
public BluetoothDeviceCharacteristic(BluetoothGattCharacteristic characteristic)
characteristic
- the characteristicpublic java.util.UUID getUuid()
public boolean addDescriptor(BluetoothGattDescriptor descriptor)
public BluetoothGattService getService()
public void setWriteType(int writeType)
public java.util.List<BluetoothGattDescriptor> getDescriptors()
public BluetoothGattDescriptor getDescriptor(java.util.UUID uuid)
public java.lang.Integer getIntValue(int formatType, int offset)
public java.lang.Float getFloatValue(int formatType, int offset)
public java.lang.String getStringValue(int offset)
public boolean setValue(int value, int formatType, int offset)
public boolean setValue(int mantissa, int exponent, int formatType, int offset)
public java.util.UUID getId()
public java.lang.String getName()
public boolean isWritable()
public boolean isReadable()
public boolean isNotifiable()
public void setValue(int value)
value
- the int valuepublic boolean setValue(java.lang.String value)
public boolean setValue(long value)
value
- the long valuepublic boolean setValue(byte[] value)
public 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()
public KontaktDeviceCharacteristic getKontaktDeviceCharacteristic()