Class: Toybox.BluetoothLowEnergy.Descriptor
- Inherits:
-
Toybox.Lang.Object
Overview
Encapsulates a Descriptor from on a Characteristic
Instance Method Summary collapse
-
getCharacteristic() as BluetoothLowEnergy.Characteristic
Retrieves the Descriptors Characteristic Retrieve the Characteristic that this descriptor belongs to.
-
getUuid() as BluetoothLowEnergy.Uuid
Returns the UUID of the Descriptor.
-
requestRead() as Void
Requests a read operation on the descriptor Once the operation is completed, onDescriptorRead() will be called on the registered BleDelegate with the status of the operation.
-
requestWrite(value as Lang.ByteArray) as Void
Requests a write operation Writes the locally stored value to the remote descriptor.
Instance Method Details
getCharacteristic() as BluetoothLowEnergy.Characteristic
Retrieves the Descriptors Characteristic
Retrieve the Characteristic that this descriptor belongs to
getUuid() as BluetoothLowEnergy.Uuid
Returns the UUID of the Descriptor
requestRead() as Void
Requests a read operation on the descriptor
Once the operation is completed, onDescriptorRead() will be called on the registered BleDelegate with the status of the operation
requestWrite(value as Lang.ByteArray) as Void
Requests a write operation
Writes the locally stored value to the remote descriptor.
Once the operation is completed, onDescriptorWrite() will be called on the registered BleDelegate with the status of the operation
Support for long writes is not implemented. Requesting a write on a characteristic longer than 20 bytes will cause an InvalidRequestException