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

The method reads the value of the specified characteristic.

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

Parameters

Characteristic
Type: TwclGattCharacteristic

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

Flag
Type: TwclGattOperationFlag

Operation behavior flag.

Protection
Type: TwclGattProtectionLevel

Describes the required protection level.

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.

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.