Class: Toybox.BluetoothLowEnergy.Characteristic
- Inherits:
-
Toybox.Lang.Object
Overview
Encapsulates a characteristic on a service
Instance Method Summary collapse
-
getDescriptor(uuid as BluetoothLowEnergy.Uuid) as BluetoothLowEnergy.Descriptor or Null
Retrieves the Descriptor with a specified UUID.
-
getDescriptors() as BluetoothLowEnergy.Iterator
Retrieves an Iterator over the Descriptors discovered in the Characteristic This will only provide descriptors that have been registered using registerProfile().
-
getService() as BluetoothLowEnergy.Service
Retrieves the Characteristic's Service Retrieve the Service that this characteristic belongs to.
-
getUuid() as BluetoothLowEnergy.Uuid
Return the UUID of the Characteristic.
-
requestRead() as Void
Requests a read operation on the characteristic Once the operation is completed, onCharacteristicRead() will be called on the registered BleDelegate with the status of the operation Support for long reads is not implemented.
-
requestWrite(value as Lang.ByteArray, options as { :writeType as BluetoothLowEnergy.WriteType }) as Void
Requests a write operation Once the operation is completed, onCharacteristicWrite() will be called on the registered BleDelegate with the status of the operation Support for long writes is not implemented.
Instance Method Details
getDescriptor(uuid as BluetoothLowEnergy.Uuid) as BluetoothLowEnergy.Descriptor or Null
Retrieves the Descriptor with a specified UUID
getDescriptors() as BluetoothLowEnergy.Iterator
Retrieves an Iterator over the Descriptors discovered in the Characteristic
This will only provide descriptors that have been registered using registerProfile()
getService() as BluetoothLowEnergy.Service
Retrieves the Characteristic's Service
Retrieve the Service that this characteristic belongs to
getUuid() as BluetoothLowEnergy.Uuid
Return the UUID of the Characteristic
requestRead() as Void
Requests a read operation on the characteristic
Once the operation is completed, onCharacteristicRead() will be called on the registered BleDelegate with the status of the operation
Support for long reads is not implemented.
requestWrite(value as Lang.ByteArray, options as { :writeType as BluetoothLowEnergy.WriteType }) as Void
Requests a write operation
Once the operation is completed, onCharacteristicWrite() 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