System.Bluetooth.Components.TBluetoothLE.DiscoverDevices

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function DiscoverDevices(ATimeout: Integer): Boolean; overload;
function DiscoverDevices(ATimeout: Integer; const AList: TBluetoothUUIDsList): Boolean; overload;
function DiscoverDevices(ATimeout: Integer; AList: array of TBluetoothUUID): Boolean; overload;
function DiscoverDevices(ATimeout: Cardinal; const ABluetoothLEScanFilterList: TBluetoothLEScanFilterList): Boolean; overload;

C++

bool __fastcall DiscoverDevices(int ATimeout)/* overload */;
bool __fastcall DiscoverDevices(int ATimeout, System::Bluetooth::TBluetoothUUIDsList* const AList)/* overload */;
bool __fastcall DiscoverDevices(int ATimeout, GUID *AList, const int AList_High)/* overload */;
bool __fastcall DiscoverDevices(unsigned ATimeout, System::Bluetooth::TBluetoothLEScanFilterList* const ABluetoothLEScanFilterList)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.Bluetooth.Components.pas
System.Bluetooth.Components.hpp
System.Bluetooth.Components TBluetoothLE


説明

Bluetooth LE を使用するリモート デバイスを見つけるための検出操作を開始します。

DiscoverDevices には必ず Timeout 引数が必要です。これは、Bluetooth LE を使用するリモート デバイスの検出にかける時間を表します。

AList 引数も指定する場合があります。これは、リモート デバイス内で探すサービスUUID配列またはリストです。サービス UUID のリストを指定した場合、検出操作では、指定のリストに含まれている UUID を持つサービスを 1 つ以上提供しないリモート デバイスをすべて無視します。

検出操作が終了すると、OnEndDiscoverDevices イベントが発生します。OnEndDiscoverDevices からは、検出されたリモート デバイスのリストが提供されます。

DiscoverDevices は、検出が正常に開始された場合は True を、何らかの原因で検出が開始されなかった場合は False を返します。

注意: iOS 13.3.1 や 13.3.0 を使用している場合、Bluetooth LE デバイス検知メソッド TBluetoothManagerLE.StartDiscoveryTBluetoothLE.DiscoverDevices は、モバイル アプリケーションを通知なく閉じます。

プラットフォーム サポート

プラットフォーム 備考

Windows

OS X

  • OnEndDiscoverDevices は、常に指定された Timeout の後のいずれかのタイミングで発生し、前に発生することはありません。
  • 常に True を返します。

iOS

  • OnEndDiscoverDevices は、常に指定された Timeout の後のいずれかのタイミングで発生し、前に発生することはありません。
  • 常に True を返します。

Android

  • OnEndDiscoverDevices は、常に指定された Timeout の後に発生し、前に発生することはありません。

関連項目