System.Bluetooth.TBluetoothGattCharacteristic.SetValueAsSingle
Delphi
procedure SetValueAsSingle(AValue: Single; Offset: Integer = 0;
AFormatType: TBluetoothGattFormatType = TBluetoothGattFormatType.IEEE754_32bit_floating_point);
C++
void __fastcall SetValueAsSingle(float AValue, int Offset = 0x0, TBluetoothGattFormatType AFormatType = (TBluetoothGattFormatType)(0x14));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Bluetooth.pas System.Bluetooth.hpp |
System.Bluetooth | TBluetoothGattCharacteristic |
Description
Sets the Characteristic Value to the Single AValue
supplied as an argument.
SetValueAsSingle expects three arguments:
AValue
: A Single value.Offset
: The index value for the array of bytes. The default value forOffset
is0
, the first position of the array.AFormatType
: The format type.
AFormatType
|
Setter |
---|---|
Unsigned8bitInteger | Calls SetValueAs with the data type, Single .
|
If AFormatType
is not IEEE754_32bit_floating_point
, a format exception raises.