System.Bluetooth.Components.TBluetoothLE.ExecuteReliableWrite
Delphi
function ExecuteReliableWrite(const ADevice: TBluetoothLEDevice): Boolean;
C++
bool __fastcall ExecuteReliableWrite(System::Bluetooth::TBluetoothLEDevice* const ADevice);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.Bluetooth.Components.pas System.Bluetooth.Components.hpp |
System.Bluetooth.Components | TBluetoothLE |
説明
前に開始したトランザクションを実行して一連のキャラクタリスティックをアトミック トランザクションとして書き込む要求を指定されたリモート デバイスに送信します。要求が正常に送信された場合は True
を返し、何らかの原因で要求が送信されなかった場合は False
を返します。
一連のキャラクタリスティックをリモート デバイスにアトミック トランザクションとして書き込むには:
- BeginReliableWrite を呼び出して、トランザクションを開始します。
- WriteCharacteristic を必要な回数だけ呼び出します。 リモート デバイスではキャラクタリスティックを書き込みません。送信された値が正しいことを確認し、アトミックに実行できるように変更をキューに追加するだけです。 ただし、リモート デバイスでは OnCharacteristicWrite が発生します。このイベントを処理して、リモート デバイスがこちらから受け取った新しい値が正しいことを確認します。
- WriteCharacteristic の呼び出しがすべて終わったら、以下のいずれかを行います。
- ExecuteReliableWrite を呼び出して、アトミック トランザクションを実行します。 書き込み操作が終了すると、リモート デバイスでは OnReliableWriteCompleted イベントが発生します。
- AbortReliableWrite を呼び出して、トランザクションを中止します(たとえば、予期しないデータを OnCharacteristicWrite のハンドラで受け取った場合など)。
プラットフォーム サポート
プラットフォーム | サポート対象 |
---|---|
Windows |
|
OS X |
|
iOS |
|
Android |
|
関連項目
- 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