TwclGattClientConnection.WriteClientConfiguration(TwclGattCharacteristic,Boolean,TwclGattOperationFlag,TwclGattProtectionLevel) Method
Writes the client configuration descriptor to the device.
public function WriteClientConfiguration( const Characteristic: TwclGattCharacteristic; const Subscribe: Boolean; const Flag: TwclGattOperationFlag; const Protection: TwclGattProtectionLevel): Integer;
Parameters
- Characteristic
- Type: TwclGattCharacteristic
A characteristic object in that changes an application is interested.
- Subscribe
- Type: Boolean
The value indicates should we subscribe or unsubscribe from the characteristic value changes.
- Flag
- Type: TwclGattOperationFlag
Operation behavior flag.
- 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.
In order to receive notifications about characteristic value changes the client must set the Client Configuration Descriptor. An application can use this method to do it in easy way.