System.Bluetooth.Components.TBluetoothLE.ExecuteReliableWrite
Delphi
function ExecuteReliableWrite(const ADevice: TBluetoothLEDevice): Boolean;
C++
bool __fastcall ExecuteReliableWrite(System::Bluetooth::TBluetoothLEDevice* const ADevice);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Bluetooth.Components.pas System.Bluetooth.Components.hpp |
System.Bluetooth.Components | TBluetoothLE |
Description
Sends to the specified remote device a request to execute a previously-started transaction to write a set of characteristics as an atomic transaction, and returns True
after successfully sending the request, or False
if something prevents the request from being sent.
To write a set of characteristics on a remote device as an atomic transaction:
- Call BeginReliableWrite to start the transaction.
- Call WriteCharacteristic as many times as you want. The remove device does not write the characteristic, it only verifies that the sent value is correct, and queues the change up for an atomic execution. The remote device does trigger however OnCharacteristicWrite; handle this event to verify that the new value the remote device received from you is correct.
- After you make all your calls to WriteCharacteristic, do either of the following:
- Call ExecuteReliableWrite to execute the atomic transaction. The remote device triggers the OnReliableWriteCompleted event when the write operation finishes.
- Call AbortReliableWrite to abort the transaction (for example, if you received unexpected data on your handler for OnCharacteristicWrite).
Platform Support
Platform | Supported |
---|---|
Windows |
|
OS X |
|
iOS |
|
Android |
|
See Also
- System.Bluetooth.Components.TBluetoothLE.BeginReliableWrite
- System.Bluetooth.Components.TBluetoothLE.WriteCharacteristic
- System.Bluetooth.Components.TBluetoothLE.OnCharacteristicWrite
- System.Bluetooth.Components.TBluetoothLE.OnReliableWriteCompleted
- System.Bluetooth.Components.TBluetoothLE.AbortReliableWrite