QBluetoothDeviceInfo Class
QBluetoothDeviceInfo クラスは、Bluetooth デバイスに関する情報を格納します。詳細...
| ヘッダー: | #include <QBluetoothDeviceInfo> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Bluetooth) target_link_libraries(mytarget PRIVATE Qt6::Bluetooth) |
| 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) |
メンバ型のドキュメント
enum QBluetoothDeviceInfo::CoreConfiguration
flags QBluetoothDeviceInfo::CoreConfigurations
この列挙型は、デバイスの設定を表します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UnknownCoreConfiguration | 0x0 | Bluetooth デバイスのタイプを特定できません。 |
QBluetoothDeviceInfo::BaseRateCoreConfiguration | 0x02 | Bluetooth デバイスの種類を判別できません。このデバイスは、標準の Bluetooth デバイスです。 |
QBluetoothDeviceInfo::BaseRateAndLowEnergyCoreConfiguration | 0x03 | デバイスは、標準および Low Energy デバイスをサポートする Bluetooth Smart デバイスです。 |
QBluetoothDeviceInfo::LowEnergyCoreConfiguration | 0x01 | このデバイスは Bluetooth Low Energy デバイスです。 |
CoreConfigurations 型は、QFlags<CoreConfiguration> の typedef です。CoreConfiguration 値の OR 組み合わせを格納します。
enum class QBluetoothDeviceInfo::Field
flags QBluetoothDeviceInfo::Fields
この列挙型は、QBluetoothDeviceDiscoveryAgent::deviceUpdated() シグナルと組み合わせて使用され、変更されたフィールドを示します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::Field::None | 0x0000 | どの値も変更されませんでした。 |
QBluetoothDeviceInfo::Field::RSSI | 0x0001 | デバイスのrssi() の値が変更されました。 |
QBluetoothDeviceInfo::Field::ManufacturerData | 0x0002 | manufacturerData() フィールドが変更されました |
QBluetoothDeviceInfo::Field::ServiceData | 0x0004 | serviceData() フィールドが変更されました |
QBluetoothDeviceInfo::Field::All | 0x7fff | すべての可能なフィールドに一致します。 |
Fields 型は、QFlags<Field> の typedef です。Field 値の OR 組み合わせを格納します。
enum QBluetoothDeviceInfo::MajorDeviceClass
この列挙型は、Bluetoothデバイスのメジャーデバイスクラスを表します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::MiscellaneousDevice | 0 | その他のデバイス。 |
QBluetoothDeviceInfo::ComputerDevice | 1 | コンピュータデバイスまたは PDA。 |
QBluetoothDeviceInfo::PhoneDevice | 2 | 電話端末。 |
QBluetoothDeviceInfo::NetworkDevice | 3 | ローカルエリアネットワークへのアクセスを提供するデバイス(Qt 5.13以降)。 |
QBluetoothDeviceInfo::AudioVideoDevice | 4 | オーディオおよび/またはビデオの再生またはキャプチャが可能なデバイス。 |
QBluetoothDeviceInfo::PeripheralDevice | 5 | キーボード、マウスなどの周辺機器。 |
QBluetoothDeviceInfo::ImagingDevice | 6 | ディスプレイ、プリンタ、スキャナ、カメラなどの画像出力デバイス。 |
QBluetoothDeviceInfo::WearableDevice | 7 | 時計やポケットベルなどのウェアラブルデバイス。 |
QBluetoothDeviceInfo::ToyDevice | 8 | おもちゃ。 |
QBluetoothDeviceInfo::HealthDevice | 9 | 心拍数や体温のモニターなどの健康関連デバイス。 |
QBluetoothDeviceInfo::UncategorizedDevice | 31 | 他のどのデバイス分類にも該当しないデバイス。 |
enum QBluetoothDeviceInfo::MinorAudioVideoClass
この列挙型は、オーディオ/ビデオデバイスのマイナーデバイスクラスを定義します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedAudioVideoDevice | 0 | 分類されていないオーディオ/ビデオデバイス。 |
QBluetoothDeviceInfo::WearableHeadsetDevice | 1 | ウェアラブルヘッドセットデバイス。 |
QBluetoothDeviceInfo::HandsFreeDevice | 2 | ハンズフリーデバイス。 |
QBluetoothDeviceInfo::Microphone | 4 | マイク。 |
QBluetoothDeviceInfo::Loudspeaker | 5 | スピーカー。 |
QBluetoothDeviceInfo::Headphones | 6 | ヘッドホン。 |
QBluetoothDeviceInfo::PortableAudioDevice | 7 | ポータブルオーディオ機器。 |
QBluetoothDeviceInfo::CarAudio | 8 | カーオーディオ機器。 |
QBluetoothDeviceInfo::SetTopBox | 9 | セットトップボックス。 |
QBluetoothDeviceInfo::HiFiAudioDevice | 10 | Hi-Fiオーディオ機器。 |
QBluetoothDeviceInfo::Vcr | 11 | ビデオカセットレコーダー。 |
QBluetoothDeviceInfo::VideoCamera | 12 | ビデオカメラ。 |
QBluetoothDeviceInfo::Camcorder | 13 | ビデオカメラ。 |
QBluetoothDeviceInfo::VideoMonitor | 14 | ビデオモニター。 |
QBluetoothDeviceInfo::VideoDisplayAndLoudspeaker | 15 | スピーカー内蔵のビデオディスプレイ。 |
QBluetoothDeviceInfo::VideoConferencing | 16 | テレビ会議装置。 |
QBluetoothDeviceInfo::GamingDevice | 18 | ゲーム機。 |
enum QBluetoothDeviceInfo::MinorComputerClass
この列挙型は、コンピュータデバイスのマイナーデバイスクラスを定義します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedComputer | 0 | 分類されていないコンピュータデバイス。 |
QBluetoothDeviceInfo::DesktopComputer | 1 | デスクトップコンピュータ。 |
QBluetoothDeviceInfo::ServerComputer | 2 | サーバーコンピュータ。 |
QBluetoothDeviceInfo::LaptopComputer | 3 | ノートパソコン。 |
QBluetoothDeviceInfo::HandheldClamShellComputer | 4 | クラムシェル型のハンドヘルドコンピュータ、またはPDA。 |
QBluetoothDeviceInfo::HandheldComputer | 5 | ハンドヘルドコンピュータまたはPDA。 |
QBluetoothDeviceInfo::WearableComputer | 6 | ウェアラブルコンピュータ。 |
enum QBluetoothDeviceInfo::MinorHealthClass
この列挙型は、健康関連デバイスのマイナーデバイスクラスを定義するものです。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedHealthDevice | 0 | 分類されていないヘルスケアデバイス。 |
QBluetoothDeviceInfo::HealthBloodPressureMonitor | 0x1 | 血圧計。 |
QBluetoothDeviceInfo::HealthThermometer | 0x2 | 体温計。 |
QBluetoothDeviceInfo::HealthWeightScale | 0x3 | 体重計。 |
QBluetoothDeviceInfo::HealthGlucoseMeter | 0x4 | 血糖値測定器。 |
QBluetoothDeviceInfo::HealthPulseOximeter | 0x5 | 血中酸素飽和度計。 |
QBluetoothDeviceInfo::HealthDataDisplay | 0x7 | データ表示器。 |
QBluetoothDeviceInfo::HealthStepCounter | 0x8 | 歩数計。 |
enum QBluetoothDeviceInfo::MinorImagingClass
この列挙型は、画像処理デバイスのマイナーデバイスクラスを定義するものです。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedImagingDevice | 0 | 分類されていないイメージングデバイス。 |
QBluetoothDeviceInfo::ImageDisplay | 0x04 | 画像を表示できるデバイス。 |
QBluetoothDeviceInfo::ImageCamera | 0x08 | カメラ。 |
QBluetoothDeviceInfo::ImageScanner | 0x10 | イメージスキャナー。 |
QBluetoothDeviceInfo::ImagePrinter | 0x20 | プリンター。 |
enum QBluetoothDeviceInfo::MinorMiscellaneousClass
この列挙型は、その他のBluetoothデバイスに対するマイナーデバイスクラスを定義するものです。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedMiscellaneous | 0 | 分類されていないその他のデバイス。 |
enum QBluetoothDeviceInfo::MinorNetworkClass
この列挙型は、ローカルエリアネットワークアクセスデバイスのマイナーデバイスクラスを定義します。ローカルエリアネットワークアクセスデバイスは、このマイナーデバイスクラスを使用して、現在のネットワーク使用状況を指定します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::NetworkFullService | 0x00 | 総帯域幅の 100% が利用可能です。 |
QBluetoothDeviceInfo::NetworkLoadFactorOne | 0x08 | 現在、総帯域幅の 0 ~ 17% が使用されています。 |
QBluetoothDeviceInfo::NetworkLoadFactorTwo | 0x10 | 現在、総帯域幅の 17~33% が使用されています。 |
QBluetoothDeviceInfo::NetworkLoadFactorThree | 0x18 | 現在、総帯域幅の 33 ~ 50% が使用されています。 |
QBluetoothDeviceInfo::NetworkLoadFactorFour | 0x20 | 現在、総帯域幅の 50~67% が使用されています。 |
QBluetoothDeviceInfo::NetworkLoadFactorFive | 0x28 | 現在、総帯域幅の 67~83% が使用されています。 |
QBluetoothDeviceInfo::NetworkLoadFactorSix | 0x30 | 現在、総帯域幅の 83~99% が使用されています。 |
QBluetoothDeviceInfo::NetworkNoService | 0x38 | ネットワークサービスが利用できません。 |
enum QBluetoothDeviceInfo::MinorPeripheralClass
この列挙型は、周辺機器のマイナーデバイスクラスを定義するものです。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedPeripheral | 0 | 分類されていない周辺機器。 |
QBluetoothDeviceInfo::KeyboardPeripheral | 0x10 | キーボード。 |
QBluetoothDeviceInfo::PointingDevicePeripheral | 0x20 | ポインティングデバイス。例えばマウスなど。 |
QBluetoothDeviceInfo::KeyboardWithPointingDevicePeripheral | 0x30 | ポインティングデバイスが内蔵されたキーボード。 |
QBluetoothDeviceInfo::JoystickPeripheral | 0x01 | ジョイスティック。 |
QBluetoothDeviceInfo::GamepadPeripheral | 0x02 | ゲームパッド。 |
QBluetoothDeviceInfo::RemoteControlPeripheral | 0x03 | リモコン。 |
QBluetoothDeviceInfo::SensingDevicePeripheral | 0x04 | センシングデバイス。 |
QBluetoothDeviceInfo::DigitizerTabletPeripheral | 0x05 | デジタイザタブレットの周辺機器。 |
QBluetoothDeviceInfo::CardReaderPeripheral | 0x06 | カードリーダー周辺機器。 |
enum QBluetoothDeviceInfo::MinorPhoneClass
この列挙型は、電話端末のマイナーデバイスクラスを定義するものです。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedPhone | 0 | 分類されていない電話デバイス。 |
QBluetoothDeviceInfo::CellularPhone | 1 | 携帯電話。 |
QBluetoothDeviceInfo::CordlessPhone | 2 | コードレス電話。 |
QBluetoothDeviceInfo::SmartPhone | 3 | スマートフォン。 |
QBluetoothDeviceInfo::WiredModemOrVoiceGatewayPhone | 4 | 有線モデムまたは音声ゲートウェイ。 |
QBluetoothDeviceInfo::CommonIsdnAccessPhone | 5 | ISDNアクセスを提供するデバイス。 |
enum QBluetoothDeviceInfo::MinorToyClass
この列挙型は、おもちゃ用デバイスのマイナー・デバイス・クラスを定義するものです。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedToy | 0 | 分類されていないおもちゃ。 |
QBluetoothDeviceInfo::ToyRobot | 1 | おもちゃのロボット。 |
QBluetoothDeviceInfo::ToyVehicle | 2 | おもちゃの乗り物。 |
QBluetoothDeviceInfo::ToyDoll | 3 | おもちゃの人形またはアクションフィギュア。 |
QBluetoothDeviceInfo::ToyController | 4 | コントローラー。 |
QBluetoothDeviceInfo::ToyGame | 5 | ゲーム。 |
enum QBluetoothDeviceInfo::MinorWearableClass
この列挙型は、ウェアラブルデバイスのマイナーデバイスクラスを定義します。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::UncategorizedWearableDevice | 0 | 分類されていないウェアラブルデバイス。 |
QBluetoothDeviceInfo::WearableWristWatch | 1 | 腕時計。 |
QBluetoothDeviceInfo::WearablePager | 2 | ポケットベル。 |
QBluetoothDeviceInfo::WearableJacket | 3 | ジャケット。 |
QBluetoothDeviceInfo::WearableHelmet | 4 | ヘルメット。 |
QBluetoothDeviceInfo::WearableGlasses | 5 | メガネ。 |
enum QBluetoothDeviceInfo::ServiceClass
flags QBluetoothDeviceInfo::ServiceClasses
この列挙型は、Bluetooth デバイスのサービスクラスを表します。サービスクラスは、サービス検出の基礎的な形式として使用されます。これは、デバイスが提供しうるサービスの種類の一覧を示すことを目的としています。
| 定数 | 値 | 説明 |
|---|---|---|
QBluetoothDeviceInfo::NoService | 0x0000 | デバイスはサービスを提供しません。 |
QBluetoothDeviceInfo::PositioningService | 0x0001 | デバイスは位置情報サービスを提供します。 |
QBluetoothDeviceInfo::NetworkingService | 0x0002 | このデバイスは、ネットワークサービスを提供します。 |
QBluetoothDeviceInfo::RenderingService | 0x0004 | このデバイスは、レンダリングサービスを提供します。 |
QBluetoothDeviceInfo::CapturingService | 0x0008 | このデバイスは、キャプチャサービスを提供します。 |
QBluetoothDeviceInfo::ObjectTransferService | 0x0010 | このデバイスは、オブジェクト転送サービスを提供します。 |
QBluetoothDeviceInfo::AudioService | 0x0020 | このデバイスは、オーディオサービスを提供します。 |
QBluetoothDeviceInfo::TelephonyService | 0x0040 | このデバイスは、電話サービスを提供します。 |
QBluetoothDeviceInfo::InformationService | 0x0080 | このデバイスは、情報サービスを提供します。 |
QBluetoothDeviceInfo::AllServices | 0x07ff | このデバイスは、すべての種類のサービスを提供します。 |
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 - 1 | 2 | 未使用。0に設定。 |
| 2 ~ 7 | 6 | マイナーデバイスクラス。 |
| 8 - 12 | 5 | 主要デバイスクラス。 |
| 13~23 | 11 | サービスクラス。 |
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 オブジェクトが有効な場合はtrueを返し、そうでない場合はfalseを返します。
QBluetoothDeviceInfo::MajorDeviceClass QBluetoothDeviceInfo::majorDeviceClass() const
そのデバイスの主要なデバイスクラスを返します。
QMultiHash<quint16, QByteArray> QBluetoothDeviceInfo::manufacturerData() const
アドバタイズメントパケットから、すべてのメーカーデータの完全なセットを返します。
デバイスによっては、1つのメーカーIDに対して複数のメーカーデータエントリを提供する場合があります。例として、アドバタイズメントパケットとスキャン応答パケットでそれぞれ異なるメーカーデータを送信するBluetooth Low Energyデバイスなどが挙げられます。そのため、返されるハッシュテーブルには、1つのメーカーIDまたはハッシュキーにつき複数のエントリが含まれる場合があります。
setManufacturerDataも参照してください 。
QByteArray QBluetoothDeviceInfo::manufacturerData(quint16 manufacturerId) const
指定されたmanufacturerId に関連付けられたデータを返します。
メーカーデータは、「Bluetoothコア仕様の補足」で定義されており、次の2つのセグメントで構成されます。
- 「Assigned NumbersCompany Identifiers」文書に記載されたメーカー固有識別子コード
- 任意のデータオクテットのシーケンス
データオクテットの解釈は、会社識別子によって指定されたメーカーによって定義されます。
注:リモートデバイスは 、1つの manufacturerId に対して複数のデータエントリを提供する場合があります。この関数は最初のエントリのみを返します。すべてのエントリが必要な場合は、マルチハッシュを返すmanufacturerData() を使用してください。
manufacturerIds() およびsetManufacturerData()も参照してください 。
QList<quint16> QBluetoothDeviceInfo::manufacturerIds() const
このデバイス情報に添付されたアドバタイズメントパケットから、すべてのメーカーIDを取得します。
manufacturerData() およびsetManufacturerData()も参照してください 。
quint8 QBluetoothDeviceInfo::minorDeviceClass() const
デバイスのマイナーデバイスクラスを返します。実際の情報は、majorDeviceClass() の値によって異なります。
関連項目: MinorAudioVideoClass 、MinorComputerClass 、MinorHealthClass 、MinorImagingClass 、MinorMiscellaneousClass 、MinorNetworkClass 、MinorPeripheralClass 、MinorPhoneClass 、MinorToyClass 、およびMinorWearableClass 。
QString QBluetoothDeviceInfo::name() const
デバイスに割り当てられた名前を返します。
setName()も参照してください 。
qint16 QBluetoothDeviceInfo::rssi() const
デバイスが最後にスキャンされた時点の信号強度を返します
setRssi()も参照してください 。
QBluetoothDeviceInfo::ServiceClasses QBluetoothDeviceInfo::serviceClasses() const
デバイスのサービスクラスを返します。
[since 6.3] QMultiHash<QBluetoothUuid, QByteArray> QBluetoothDeviceInfo::serviceData() const
アドバタイズメントパケットから取得したすべてのサービスデータの完全なセットを返します。
デバイスによっては、1つのサービスデータIDに対して複数のサービスデータエントリを提供する場合があります。例として、アドバタイズメントパケットとスキャン応答パケットでそれぞれ異なるサービスデータを送信するBluetooth Low Energyデバイスが挙げられます。そのため、返されるハッシュテーブルには、1つのサービスデータIDまたはハッシュキーにつき複数のエントリが含まれる場合があります。
この関数は Qt 6.3 で導入されました。
setServiceDataも参照してください 。
[since 6.3] QByteArray QBluetoothDeviceInfo::serviceData(const QBluetoothUuid &serviceId) const
指定されたserviceId に関連付けられたデータを返します。
サービスデータは、「Bluetoothコア仕様補足」で定義されており、次の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)
デバイスのCoreConfigurations をcoreConfigs に設定します。これにより、通常のデバイスとLow Energyデバイスを区別しやすくなります。
coreConfigurations()も参照してください 。
void QBluetoothDeviceInfo::setDeviceUuid(const QBluetoothUuid &uuid)
アドレスを持たないBluetoothデバイスに対して、一意の識別子uuid を設定します。これは、CoreBluetooth APIがアドレスを非表示にし、代わりにデバイスや周辺機器を識別するためのUUIDを提供するmacOSおよびiOSで発生します。
この UUID は、他のプラットフォームでは無効です。
deviceUuid()も参照してください 。
bool QBluetoothDeviceInfo::setManufacturerData(quint16 manufacturerId, const QByteArray &data)
指定されたmanufacturerId に対して、広告されるメーカーのdata を設定します。 が挿入された場合はtrue を、すでに認識されていた場合はfalse を返します。
Qt 5.11以降、同じmanufacturerId に対してdata の値が異なる場合、それらは互いに置き換えられることはなく、デバイススキャンが実行されている間、累積されるようになりました。
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 オブジェクトa とb が等しくない場合、true を返します。
bool operator==(const QBluetoothDeviceInfo &a, const QBluetoothDeviceInfo &b)
2つのQBluetoothDeviceInfo オブジェクトa とb が等しい場合、true を返します。
© 2026 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.