TwclGattClientConnection.WriteCharacteristicValue(TwclGattCharacteristic,TwclGattProtectionLevel,TwclGattCharacteristicValue,TwclGattWriteKind) Method
The method writes the specified characteristic value to the Bluetooth device.
public function WriteCharacteristicValue(Characteristic: TwclGattCharacteristic; const Protection: TwclGattProtectionLevel; const Value: TwclGattCharacteristicValue; const WriteKind: TwclGattWriteKind): Integer;
Parameters
- Characteristic
- Type: TwclGattCharacteristic
A TwclGattCharacteristic structure obtained by previous call to the
ReadCaracteristics
method. - Protection
- Type: TwclGattProtectionLevel
Describes the required protection level.
- Value
- Type: TwclGattCharacteristicValue
Contains a characteristic's value as bytes array.
- WriteKind
- Type: TwclGattWriteKind
The write operation mode.
Return Value
Type: Integer
If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.