Class GattDescriptor
java.lang.Object
com.codename1.bluetooth.gatt.GattDescriptor
A descriptor of a remote GattCharacteristic. Note that the Client
Characteristic Configuration descriptor (BluetoothUuid.CCCD) is
managed automatically by
GattCharacteristic.subscribe(GattNotificationListener) -- there is no
need to write it manually.
Instances are constructed by the port during service discovery; application code never creates them.
-
Constructor Summary
ConstructorsConstructorDescriptionGattDescriptor(GattCharacteristic characteristic, BluetoothUuid uuid) Constructed by ports during service discovery; not application API. -
Method Summary
Modifier and TypeMethodDescriptionThe characteristic this descriptor belongs to.getUuid()The UUID identifying this descriptor.AsyncResource<byte[]> read()Reads the descriptor value.toString()Returns a string representation of the object.write(byte[] value) Writes the descriptor value.
-
Constructor Details
-
GattDescriptor
Constructed by ports during service discovery; not application API.
-
-
Method Details
-
getUuid
The UUID identifying this descriptor. -
getCharacteristic
The characteristic this descriptor belongs to. -
read
Reads the descriptor value. Resolves with the raw bytes on the EDT or fails with aBluetoothException. -
write
Writes the descriptor value. Resolvestrueon the EDT once the remote acknowledged the write. -
toString
Description copied from class:ObjectReturns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
-