QBluetoothDeviceInfo Class

QBluetoothDeviceInfo クラスは、Bluetooth デバイスに関する情報を格納します。詳細...

Header: #include <QBluetoothDeviceInfo>
qmake: QT += bluetooth

パブリックタイプ

enum CoreConfiguration { UnknownCoreConfiguration, BaseRateCoreConfiguration, BaseRateAndLowEnergyCoreConfiguration, LowEnergyCoreConfiguration }
flags CoreConfigurations
enum class Field { None, RSSI, ManufacturerData, ServiceData, All }
flags Fields
enum MajorDeviceClass { MiscellaneousDevice, ComputerDevice, PhoneDevice, NetworkDevice, AudioVideoDevice, …, UncategorizedDevice }
enum MinorAudioVideoClass { UncategorizedAudioVideoDevice, WearableHeadsetDevice, HandsFreeDevice, Microphone, Loudspeaker, …, GamingDevice }
enum MinorComputerClass { UncategorizedComputer, DesktopComputer, ServerComputer, LaptopComputer, HandheldClamShellComputer, …, WearableComputer }
enum MinorHealthClass { UncategorizedHealthDevice, HealthBloodPressureMonitor, HealthThermometer, HealthWeightScale, HealthGlucoseMeter, …, HealthStepCounter }
enum MinorImagingClass { UncategorizedImagingDevice, ImageDisplay, ImageCamera, ImageScanner, ImagePrinter }
enum MinorMiscellaneousClass { UncategorizedMiscellaneous }
enum MinorNetworkClass { NetworkFullService, NetworkLoadFactorOne, NetworkLoadFactorTwo, NetworkLoadFactorThree, NetworkLoadFactorFour, …, NetworkNoService }
enum MinorPeripheralClass { UncategorizedPeripheral, KeyboardPeripheral, PointingDevicePeripheral, KeyboardWithPointingDevicePeripheral, JoystickPeripheral, …, CardReaderPeripheral }
enum MinorPhoneClass { UncategorizedPhone, CellularPhone, CordlessPhone, SmartPhone, WiredModemOrVoiceGatewayPhone, CommonIsdnAccessPhone }
enum MinorToyClass { UncategorizedToy, ToyRobot, ToyVehicle, ToyDoll, ToyController, ToyGame }
enum MinorWearableClass { UncategorizedWearableDevice, WearableWristWatch, WearablePager, WearableJacket, WearableHelmet, WearableGlasses }
enum ServiceClass { NoService, PositioningService, NetworkingService, RenderingService, CapturingService, …, AllServices }
flags ServiceClasses

パブリック関数

QBluetoothDeviceInfo()
QBluetoothDeviceInfo(const QBluetoothAddress &address, const QString &name, quint32 classOfDevice)
QBluetoothDeviceInfo(const QBluetoothUuid &uuid, const QString &name, quint32 classOfDevice)
QBluetoothDeviceInfo(const QBluetoothDeviceInfo &other)
~QBluetoothDeviceInfo()
QBluetoothAddress address() const
QBluetoothDeviceInfo::CoreConfigurations coreConfigurations() const
QBluetoothUuid deviceUuid() const
bool isCached() const
bool isValid() const
QBluetoothDeviceInfo::MajorDeviceClass majorDeviceClass() const
QMultiHash<quint16, QByteArray> manufacturerData() const
QByteArray manufacturerData(quint16 manufacturerId) const
QList<quint16> manufacturerIds() const
quint8 minorDeviceClass() const
QString name() const
qint16 rssi() const
QBluetoothDeviceInfo::ServiceClasses serviceClasses() const
(since 6.3) QMultiHash<QBluetoothUuid, QByteArray> serviceData() const
(since 6.3) QByteArray serviceData(const QBluetoothUuid &serviceId) const
(since 6.3) QList<QBluetoothUuid> serviceIds() const
(since 6.0) QList<QBluetoothUuid> serviceUuids() const
void setCached(bool cached)
void setCoreConfigurations(QBluetoothDeviceInfo::CoreConfigurations coreConfigs)
void setDeviceUuid(const QBluetoothUuid &uuid)
bool setManufacturerData(quint16 manufacturerId, const QByteArray &data)
(since 6.2) void setName(const QString &name)
void setRssi(qint16 signal)
(since 6.3) bool setServiceData(const QBluetoothUuid &serviceId, const QByteArray &data)
void setServiceUuids(const QList<QBluetoothUuid> &uuids)
QBluetoothDeviceInfo &operator=(const QBluetoothDeviceInfo &other)
bool operator!=(const QBluetoothDeviceInfo &a, const QBluetoothDeviceInfo &b)
bool operator==(const QBluetoothDeviceInfo &a, const QBluetoothDeviceInfo &b)

詳細説明

QBluetoothDeviceInfo は、Bluetooth デバイスの名前、アドレス、およびデバイスのクラスに関する情報を提供します。

メンバ型ドキュメント

enum QBluetoothDeviceInfo::CoreConfiguration
flags QBluetoothDeviceInfo::CoreConfigurations

この enum はデバイスの構成を記述します。

定数説明
QBluetoothDeviceInfo::UnknownCoreConfiguration0x0Bluetooth デバイスのタイプを決定できません。
QBluetoothDeviceInfo::BaseRateCoreConfiguration0x02デバイスは標準 Bluetooth デバイスです。
QBluetoothDeviceInfo::BaseRateAndLowEnergyCoreConfiguration0x03デバイスは、標準および Low Energy デバイスをサポートする Bluetooth Smart デバイスです。
QBluetoothDeviceInfo::LowEnergyCoreConfiguration0x01デバイスは Bluetooth Low Energy デバイスです。

CoreConfigurations 型はQFlags<CoreConfiguration> の typedef です。CoreConfiguration 値の OR の組み合わせを格納します。

enum class QBluetoothDeviceInfo::Field
flags QBluetoothDeviceInfo::Fields

この enum はQBluetoothDeviceDiscoveryAgent::deviceUpdated() シグナルと組み合わせて使用され、変更されたフィールドを示します。

定数説明
QBluetoothDeviceInfo::Field::None0x0000どの値も変更されていません。
QBluetoothDeviceInfo::Field::RSSI0x0001デバイスのrssi() 値が変更された。
QBluetoothDeviceInfo::Field::ManufacturerData0x0002manufacturerData() フィールドが変更された。
QBluetoothDeviceInfo::Field::ServiceData0x0004serviceData() フィールドが変更された
QBluetoothDeviceInfo::Field::All0x7fff可能なすべてのフィールドにマッチします。

Fields 型はQFlags<Field> の typedef です。これは、Field 値の OR の組み合わせを格納します。

enum QBluetoothDeviceInfo::MajorDeviceClass

この列挙型は、Bluetooth デバイスの主要なデバイスクラスを記述します。

定数説明
QBluetoothDeviceInfo::MiscellaneousDevice0雑多なデバイス。
QBluetoothDeviceInfo::ComputerDevice1コンピュータデバイスまたは PDA
QBluetoothDeviceInfo::PhoneDevice2電話デバイス
QBluetoothDeviceInfo::NetworkDevice3ローカルエリアネットワークへのアクセスを提供するデバイス(Qt 5.13以降)。
QBluetoothDeviceInfo::AudioVideoDevice4オーディオやビデオの再生やキャプチャが可能なデバイス。
QBluetoothDeviceInfo::PeripheralDevice5キーボード、マウスなどの周辺機器。
QBluetoothDeviceInfo::ImagingDevice6ディスプレイ、プリンタ、スキャナ、カメラなどの画像デバイス。
QBluetoothDeviceInfo::WearableDevice7時計やポケットベルなどのウェアラブル・デバイス。
QBluetoothDeviceInfo::ToyDevice8玩具。
QBluetoothDeviceInfo::HealthDevice9心拍数モニターや体温モニターなどの健康関連機器。
QBluetoothDeviceInfo::UncategorizedDevice31他のどのデバイス・クラスにも当てはまらないデバイス。

enum QBluetoothDeviceInfo::MinorAudioVideoClass

この列挙型は、オーディオ/ビデオ・デバイスのマイナー・デバイス・クラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedAudioVideoDevice0未分類のオーディオ/ビデオデバイス。
QBluetoothDeviceInfo::WearableHeadsetDevice1ウェアラブルヘッドセットデバイス
QBluetoothDeviceInfo::HandsFreeDevice2ハンズフリーデバイス
QBluetoothDeviceInfo::Microphone4マイクロフォン
QBluetoothDeviceInfo::Loudspeaker5拡声器。
QBluetoothDeviceInfo::Headphones6ヘッドフォン。
QBluetoothDeviceInfo::PortableAudioDevice7ポータブルオーディオ機器。
QBluetoothDeviceInfo::CarAudio8カーオーディオ
QBluetoothDeviceInfo::SetTopBox9セットトップボックス
QBluetoothDeviceInfo::HiFiAudioDevice10HiFiオーディオ機器
QBluetoothDeviceInfo::Vcr11ビデオカセットレコーダー
QBluetoothDeviceInfo::VideoCamera12ビデオカメラ
QBluetoothDeviceInfo::Camcorder13ビデオカメラ
QBluetoothDeviceInfo::VideoMonitor14ビデオモニター
QBluetoothDeviceInfo::VideoDisplayAndLoudspeaker15スピーカ内蔵ビデオディスプレイ
QBluetoothDeviceInfo::VideoConferencing16ビデオ会議装置
QBluetoothDeviceInfo::GamingDevice18ゲーム機器

enum QBluetoothDeviceInfo::MinorComputerClass

この列挙型は、コンピュータ・デバイスのマイナー・デバイス・クラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedComputer0未分類のコンピュータデバイス。
QBluetoothDeviceInfo::DesktopComputer1デスクトップコンピュータ
QBluetoothDeviceInfo::ServerComputer2サーバコンピュータ
QBluetoothDeviceInfo::LaptopComputer3ラップトップコンピュータ。
QBluetoothDeviceInfo::HandheldClamShellComputer4クラムシェル型ハンドヘルドコンピュータまたはPDA。
QBluetoothDeviceInfo::HandheldComputer5ハンドヘルドコンピュータまたはPDA。
QBluetoothDeviceInfo::WearableComputer6ウェアラブルコンピュータ

enum QBluetoothDeviceInfo::MinorHealthClass

この列挙型は、健康機器用のマイナーな機器クラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedHealthDevice0未分類の健康機器。
QBluetoothDeviceInfo::HealthBloodPressureMonitor0x1血圧計。
QBluetoothDeviceInfo::HealthThermometer0x2体温計
QBluetoothDeviceInfo::HealthWeightScale0x3体重計。
QBluetoothDeviceInfo::HealthGlucoseMeter0x4グルコースメーター
QBluetoothDeviceInfo::HealthPulseOximeter0x5血中酸素飽和度計
QBluetoothDeviceInfo::HealthDataDisplay0x7データディスプレイ
QBluetoothDeviceInfo::HealthStepCounter0x8歩数計

enum QBluetoothDeviceInfo::MinorImagingClass

この列挙型は、画像処理デバイスのマイナーなデバイスクラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedImagingDevice0未分類の画像デバイス。
QBluetoothDeviceInfo::ImageDisplay0x04画像を表示できるデバイス。
QBluetoothDeviceInfo::ImageCamera0x08カメラ
QBluetoothDeviceInfo::ImageScanner0x10イメージスキャナー
QBluetoothDeviceInfo::ImagePrinter0x20プリンタ

enum QBluetoothDeviceInfo::MinorMiscellaneousClass

この列挙型は、雑多な Bluetooth デバイス用のマイナーデバイスクラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedMiscellaneous0分類されていない雑多なデバイス。

enum QBluetoothDeviceInfo::MinorNetworkClass

この列挙型は、ローカル・エリア・ネットワーク・アクセス・デバイスのマイナー・デバイス・クラスを記述する。ローカル・エリア・ネットワーク・アクセス・デバイスは、マイナー・デバイス・クラスを使用して、現在のネットワーク利用率を指定します。

定数説明
QBluetoothDeviceInfo::NetworkFullService0x00全帯域幅の100%が利用可能。
QBluetoothDeviceInfo::NetworkLoadFactorOne0x080 ~ 17% の帯域幅が使用中。
QBluetoothDeviceInfo::NetworkLoadFactorTwo0x1017~33%の帯域幅が使用中。
QBluetoothDeviceInfo::NetworkLoadFactorThree0x1833 - 総帯域幅の50%が使用中。
QBluetoothDeviceInfo::NetworkLoadFactorFour0x2050~67%の帯域幅が使用中。
QBluetoothDeviceInfo::NetworkLoadFactorFive0x2867 - 83% の帯域幅が使用されている。
QBluetoothDeviceInfo::NetworkLoadFactorSix0x3083 - 99% の帯域幅が使用されています。
QBluetoothDeviceInfo::NetworkNoService0x38利用可能なネットワークサービスはありません。

enum QBluetoothDeviceInfo::MinorPeripheralClass

この列挙型は、周辺デバイスのマイナーデバイスクラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedPeripheral0未分類の周辺デバイス。
QBluetoothDeviceInfo::KeyboardPeripheral0x10キーボード。
QBluetoothDeviceInfo::PointingDevicePeripheral0x20マウスなどのポインティングデバイス。
QBluetoothDeviceInfo::KeyboardWithPointingDevicePeripheral0x30ポインティングデバイス内蔵キーボード。
QBluetoothDeviceInfo::JoystickPeripheral0x01ジョイスティック
QBluetoothDeviceInfo::GamepadPeripheral0x02ゲームパッド。
QBluetoothDeviceInfo::RemoteControlPeripheral0x03リモコン。
QBluetoothDeviceInfo::SensingDevicePeripheral0x04センシングデバイス
QBluetoothDeviceInfo::DigitizerTabletPeripheral0x05デジタイザタブレット周辺機器
QBluetoothDeviceInfo::CardReaderPeripheral0x06カードリーダー周辺機器

enum QBluetoothDeviceInfo::MinorPhoneClass

この列挙型は、電話デバイスのマイナー・デバイス・クラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedPhone0分類されていない電話デバイス。
QBluetoothDeviceInfo::CellularPhone1携帯電話。
QBluetoothDeviceInfo::CordlessPhone2コードレス電話
QBluetoothDeviceInfo::SmartPhone3スマートフォン。
QBluetoothDeviceInfo::WiredModemOrVoiceGatewayPhone4有線モデムまたは音声ゲートウェイ。
QBluetoothDeviceInfo::CommonIsdnAccessPhone5ISDNアクセスを提供する装置。

enum QBluetoothDeviceInfo::MinorToyClass

この列挙型は、トイ・デバイスのマイナー・デバイス・クラスを記述する。

定数説明
QBluetoothDeviceInfo::UncategorizedToy0未分類のおもちゃ。
QBluetoothDeviceInfo::ToyRobot1おもちゃのロボット
QBluetoothDeviceInfo::ToyVehicle2おもちゃの乗り物。
QBluetoothDeviceInfo::ToyDoll3玩具人形またはアクションフィギュア。
QBluetoothDeviceInfo::ToyController4コントローラ。
QBluetoothDeviceInfo::ToyGame5ゲーム。

enum QBluetoothDeviceInfo::MinorWearableClass

この列挙型は、ウェアラブルデバイスのマイナーなデバイスクラスを記述します。

定数説明
QBluetoothDeviceInfo::UncategorizedWearableDevice0未分類ウェアラブルデバイス。
QBluetoothDeviceInfo::WearableWristWatch1腕時計。
QBluetoothDeviceInfo::WearablePager2ポケットベル。
QBluetoothDeviceInfo::WearableJacket3ジャケット。
QBluetoothDeviceInfo::WearableHelmet4ヘルメット。
QBluetoothDeviceInfo::WearableGlasses5メガネ。

enum QBluetoothDeviceInfo::ServiceClass
flags QBluetoothDeviceInfo::ServiceClasses

この enum は、Bluetooth デバイスのサービスクラスを記述します。サービスクラスは、サービス発見の初歩的な形式として使用されます。これは、デバイスが提供する可能性のあるサービスの種類のリストを提供することを意図しています。

定数説明
QBluetoothDeviceInfo::NoService0x0000デバイスはサービスを提供しません。
QBluetoothDeviceInfo::PositioningService0x0001デバイスは測位サービスを提供します。
QBluetoothDeviceInfo::NetworkingService0x0002デバイスはネットワークサービスを提供します。
QBluetoothDeviceInfo::RenderingService0x0004デバイスはレンダリングサービスを提供します。
QBluetoothDeviceInfo::CapturingService0x0008デバイスがキャプチャサービスを提供する。
QBluetoothDeviceInfo::ObjectTransferService0x0010デバイスがオブジェクト転送サービスを提供する。
QBluetoothDeviceInfo::AudioService0x0020音声サービスを提供する。
QBluetoothDeviceInfo::TelephonyService0x0040テレフォニーサービスを提供する。
QBluetoothDeviceInfo::InformationService0x0080デバイスが情報サービスを提供する。
QBluetoothDeviceInfo::AllServices0x07ffデバイスがすべてのタイプのサービスを提供する。

ServiceClasses 型は、QFlags<ServiceClass> の typedef です。これは、ServiceClass 値の OR の組み合わせを格納します。

メンバー関数ドキュメント

QBluetoothDeviceInfo::QBluetoothDeviceInfo()

無効な QBluetoothDeviceInfo オブジェクトを構築します。

QBluetoothDeviceInfo::QBluetoothDeviceInfo(const QBluetoothAddress &address, const QString &name, quint32 classOfDevice)

Bluetooth アドレスaddress 、デバイス名name 、およびデバイスのエンコードされたクラスclassOfDevice を持つ QBluetoothDeviceInfo オブジェクトを構築します。

classOfDevice パラメーターは以下のフォーマットでエンコードされます。

ビットサイズ説明
0 - 12未使用、0 に設定。
2 - 76マイナー・デバイス・クラス。
8 - 125メジャー・デバイス・クラス。
13 - 2311サービスクラス。

QBluetoothDeviceInfo::QBluetoothDeviceInfo(const QBluetoothUuid &uuid, const QString &name, quint32 classOfDevice)

一意のuuid 、デバイス名name 、およびデバイスのエンコードされたクラスclassOfDevice を持つ QBluetoothDeviceInfo オブジェクトを構築します。

このコンストラクタは、macOSとiOSのLow Energyデバイスに必要です。CoreBluetooth APIはアドレスを非表示にし、デバイスを識別するために一意のUUIDを提供します。このUUIDはサービスUUIDとは異なるもので、CoreBluetooth APIや検出されたデバイスと後で連携するために必要です。

QBluetoothDeviceInfo::QBluetoothDeviceInfo(const QBluetoothDeviceInfo &other)

other のコピーである QBluetoothDeviceInfo を構築する。

[noexcept] QBluetoothDeviceInfo::~QBluetoothDeviceInfo()

QBluetoothDeviceInfo を破壊する。

QBluetoothAddress QBluetoothDeviceInfo::address() const

デバイスのアドレスを返します。

注: iOSとmacOSでは、このアドレスは無効です。代わりにdeviceUuid() を使用する必要があります。これら2つのプラットフォームでは、検出されたBluetoothデバイスのBluetoothアドレスを公開しておらず、一意のデバイス識別子を利用しています。

deviceUuid()も参照してください

QBluetoothDeviceInfo::CoreConfigurations QBluetoothDeviceInfo::coreConfigurations() const

デバイスの設定を返します。デバイス構成が設定されていない場合、基本レートのデバイス構成が返されます。

setCoreConfigurations()も参照

QBluetoothUuid QBluetoothDeviceInfo::deviceUuid() const

アドレスを持たないBluetoothデバイスの一意な識別子を返します。

一般的に、この uuid は macOS と iOS 以外のプラットフォームでは無効です。これらの2つのプラットフォームでは、検出されたBluetooth Low EnergyデバイスのBluetoothアドレスを提供していないため、回避策として使用されます。その他のプラットフォームでは、代わりにaddress() を使用します。

setDeviceUuid()も参照して ください。

bool QBluetoothDeviceInfo::isCached() const

QBluetoothDeviceInfo オブジェクトがキャッシュされたデータから作成された場合、true を返します。

bool QBluetoothDeviceInfo::isValid() const

QBluetoothDeviceInfo オブジェクトが有効であれば真を、そうでなければ偽を返します。

QBluetoothDeviceInfo::MajorDeviceClass QBluetoothDeviceInfo::majorDeviceClass() const

デバイスのメジャー・デバイス・クラスを返します。

QMultiHash<quint16, QByteArray> QBluetoothDeviceInfo::manufacturerData() const

広告パケットからの全メーカーデータ一式を返す。

デバイスによっては、製造者IDごとに複数の製造者データエントリーを提供する場合があります。例えば、Bluetooth Low Energyデバイスでは、アドバタイズパケットとスキャン応答パケットでそれぞれ異なるメーカーデータを送信します。したがって、返されるハッシュテーブルは、製造者IDまたはハッシュキーごとに複数のエントリを持つ可能性がある。

setManufacturerDataも参照のこと

QByteArray QBluetoothDeviceInfo::manufacturerData(quint16 manufacturerId) const

指定されたmanufacturerId に関連するデータを返します。

製造者データは、Bluetooth Core Specification の補足で定義されており、以下の 2 つのセグメントで構成されています:

  • Assigned NumbersCompany Identifiers ドキュメントからのメーカー固有の識別子コード
  • 任意のデータオクテットのシーケンス

データオクテットの解釈は、会社識別子によって指定された製造業者によって定義される。

注: リモート・デバイスは、manufacturerId ごとに複数のデータ・エントリを提供することができる。この関数は最初のエントリのみを返す。すべてのエントリが必要な場合は、マルチハッシュを返すmanufacturerData() を使用する。

manufacturerIds() およびsetManufacturerData()も参照の こと。

QList<quint16> QBluetoothDeviceInfo::manufacturerIds() const

このデバイス情報に添付された広告パケットから、すべての製造者IDを返す。

manufacturerData() およびsetManufacturerData()も参照

quint8 QBluetoothDeviceInfo::minorDeviceClass() const

デバイスのマイナー・デバイス・クラスを返す。実際の情報はmajorDeviceClass() の値に依存する。

MinorAudioVideoClassMinorComputerClassMinorHealthClassMinorImagingClassMinorMiscellaneousClassMinorNetworkClassMinorPeripheralClassMinorPhoneClassMinorToyClassMinorWearableClassも参照のこと

QString QBluetoothDeviceInfo::name() const

デバイスに割り当てられている名前を返す。

setName()も参照

qint16 QBluetoothDeviceInfo::rssi() const

デバイスが最後にスキャンされたときの信号強度を返す。

setRssi()も参照

QBluetoothDeviceInfo::ServiceClasses QBluetoothDeviceInfo::serviceClasses() const

デバイスのサービスクラスを返します。

[since 6.3] QMultiHash<QBluetoothUuid, QByteArray> QBluetoothDeviceInfo::serviceData() const

広告パケットからのすべてのサービスデータの完全なセットを返す。

デバイスによっては、サービス・データIDごとに複数のサービス・データ・エントリーを提供する場合があります。例えば、広告パケットとスキャン応答パケットでそれぞれ異なるサービスデータを送信するBluetooth Low Energyデバイスが考えられます。そのため、返されるハッシュテーブルは、サービスデータIDまたはハッシュキーごとに複数のエントリを持つ可能性があります。

この関数はQt 6.3で導入されました。

setServiceDataも参照して ください。

[since 6.3] QByteArray QBluetoothDeviceInfo::serviceData(const QBluetoothUuid &serviceId) const

指定されたserviceId に関連するデータを返します。

サービスデータはBluetooth Core SpecificationのSupplementで定義されており、以下の2つのセグメントで構成されています:

  • サービス UUID
  • 任意のデータ・オクテットのシーケンス

注: リモートデバイスは、serviceId ごとに複数のデータエントリを提供することができます。この関数は最初のエントリのみを返します。すべてのエントリーが必要な場合は、マルチハッシュを返すserviceData() を使用してください。

この関数は Qt 6.3 で導入されました。

serviceIds() およびsetServiceData()も参照してください

[since 6.3] QList<QBluetoothUuid> QBluetoothDeviceInfo::serviceIds() const

このデバイス情報に添付されている広告パケットから、すべてのサービスデータIDを返します。

この関数は Qt 6.3 で導入されました。

serviceData() およびsetServiceData()も参照してください

[since 6.0] QList<QBluetoothUuid> QBluetoothDeviceInfo::serviceUuids() const

デバイスがサポートするサービスUUIDのリストを返す。ほとんどの場合、このUUIDのリストはカスタムサービスUUIDまたはQBluetoothUuid::ServiceClassUuid で指定されたサービスUUID値を表します。

この関数はQt 6.0で導入されました。

setServiceUuids() および serviceUuids()も参照してください

void QBluetoothDeviceInfo::setCached(bool cached)

QBluetoothDeviceInfo がキャッシュデータから作成された場合、システムがcached フラグを設定するために使用する。キャッシュされた情報は、アクティブなデバイスから読み込まれたデータほど正確ではないかもしれない。

isCached()も参照のこと

void QBluetoothDeviceInfo::setCoreConfigurations(QBluetoothDeviceInfo::CoreConfigurations coreConfigs)

デバイスのCoreConfigurationscoreConfigs に設定する。 これにより、通常のデバイスとLow Energyデバイスを区別することができる。

coreConfigurations()も参照

void QBluetoothDeviceInfo::setDeviceUuid(const QBluetoothUuid &uuid)

アドレスを持たないBluetoothデバイスの一意識別子uuid を設定します。これは macOS と iOS で発生します。CoreBluetooth API はアドレスを隠しますが、デバイス/周辺機器を識別するために UUID を提供します。

このUUIDは他のプラットフォームでは無効です。

deviceUuid()も参照してください

bool QBluetoothDeviceInfo::setManufacturerData(quint16 manufacturerId, const QByteArray &data)

指定されたmanufacturerId の広告メーカーdata を設定する。挿入された場合はtrue を、既知の場合はfalse を返します。

Qt 5.14 以降、data と同じmanufacturerId の異なる値は、デバイススキャンの間、互いに置き換えられず、累積されます。

manufacturerDataも参照してください

[since 6.2] void QBluetoothDeviceInfo::setName(const QString &name)

デバイスのname を設定します。

この関数は Qt 6.2 で導入されました。

name()も参照してください

void QBluetoothDeviceInfo::setRssi(qint16 signal)

signal の強度を設定する。

rssi()も参照

[since 6.3] bool QBluetoothDeviceInfo::setServiceData(const QBluetoothUuid &serviceId, const QByteArray &data)

与えられたserviceId の広告サービスdata を設定する。挿入された場合はtrue を、既知の場合はfalse を返します。

この関数は Qt 6.3 で導入されました。

serviceDataも参照してください

void QBluetoothDeviceInfo::setServiceUuids(const QList<QBluetoothUuid> &uuids)

サービスUUIDのリストをuuids に設定する。

serviceUuids()も参照のこと

QBluetoothDeviceInfo &QBluetoothDeviceInfo::operator=(const QBluetoothDeviceInfo &other)

other のコピーを作成し、このQBluetoothDeviceInfo オブジェクトに割り当てます。

関連する非会員

bool operator!=(const QBluetoothDeviceInfo &a, const QBluetoothDeviceInfo &b)

2つのQBluetoothDeviceInfo オブジェクトab が等しくない場合、true を返す。

bool operator==(const QBluetoothDeviceInfo &a, const QBluetoothDeviceInfo &b)

2つのQBluetoothDeviceInfo オブジェクトab が等しい場合、true を返す。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.