TwclGattClient.ReadCharacteristicValue(TwclGattCharacteristic,TwclGattOperationFlag,TwclGattCharacteristicValue,TwclGattProtectionLevel) Method

The method reads the value of the specified characteristic.

Namespace: wclBluetooth
public
 function ReadCharacteristicValue(
 const Characteristic: TwclGattCharacteristic;
 const Flag: TwclGattOperationFlag; out Value: TwclGattCharacteristicValue;
 const Protection: TwclGattProtectionLevel = plNone): Integer;

Parameters

Characteristic
Type: TwclGattCharacteristic

A TwclGattCharacteristic structure obtained by previous call to the ReadCaracteristics method.

Flag
Type: TwclGattOperationFlag

Operation behavior flag.

Value
Type: TwclGattCharacteristicValue

On output contains a characteristic's value as bytes array. An application is responsible to clean up a memory allocated for the dynamic array.

Protection
Type: TwclGattProtectionLevel

Describes the required protection level.

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.