QBluetoothDeviceInfo Class

QBluetoothDeviceInfo 클래스는 블루투스 장치에 대한 정보를 저장합니다. 더 보기...

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는 블루투스 장치의 이름, 주소 및 장치 클래스에 대한 정보를 제공합니다.

멤버 유형 문서

열거형 QBluetoothDeviceInfo::CoreConfiguration
플래그 QBluetoothDeviceInfo::CoreConfigurations

이 열거형은 장치의 구성을 설명합니다.

상수설명
QBluetoothDeviceInfo::UnknownCoreConfiguration0x0블루투스 장치의 유형을 확인할 수 없습니다.
QBluetoothDeviceInfo::BaseRateCoreConfiguration0x02장치가 표준 Bluetooth 장치입니다.
QBluetoothDeviceInfo::BaseRateAndLowEnergyCoreConfiguration0x03장치가 표준 및 저에너지 장치를 지원하는 Bluetooth 스마트 장치입니다.
QBluetoothDeviceInfo::LowEnergyCoreConfiguration0x01장치가 Bluetooth 저에너지 장치입니다.

CoreConfigurations 유형은 QFlags<CoreConfiguration>에 대한 typedef입니다. CoreConfiguration 값의 OR 조합을 저장합니다.

열거형 클래스 QBluetoothDeviceInfo::필드
플래그 QBluetoothDeviceInfo::필드

이 열거형은 QBluetoothDeviceDiscoveryAgent::deviceUpdated() 신호와 함께 사용되며 변경된 필드를 나타냅니다.

상수설명
QBluetoothDeviceInfo::Field::None0x0000변경된 값이 없습니다.
QBluetoothDeviceInfo::Field::RSSI0x0001장치의 rssi() 값이 변경되었습니다.
QBluetoothDeviceInfo::Field::ManufacturerData0x0002manufacturerData() 필드가 변경되었습니다.
QBluetoothDeviceInfo::Field::ServiceData0x0004serviceData() 필드가 변경되었습니다.
QBluetoothDeviceInfo::Field::All0x7fff가능한 모든 필드와 일치합니다.

필드 유형은 QFlags<Field>에 대한 타입 정의입니다. 필드 값의 OR 조합을 저장합니다.

enum QBluetoothDeviceInfo::MajorDeviceClass

이 열거형은 Bluetooth 장치의 주요 장치 클래스를 설명합니다.

Constant설명
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

이 열거형은 오디오/비디오 장치의 부 장치 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedAudioVideoDevice0분류되지 않은 오디오/비디오 장치입니다.
QBluetoothDeviceInfo::WearableHeadsetDevice1웨어러블 헤드셋 장치.
QBluetoothDeviceInfo::HandsFreeDevice2핸즈프리 장치.
QBluetoothDeviceInfo::Microphone4마이크.
QBluetoothDeviceInfo::Loudspeaker5라우드 스피커.
QBluetoothDeviceInfo::Headphones6헤드폰.
QBluetoothDeviceInfo::PortableAudioDevice7휴대용 오디오 장치.
QBluetoothDeviceInfo::CarAudio8카 오디오 장치.
QBluetoothDeviceInfo::SetTopBox9셋톱박스.
QBluetoothDeviceInfo::HiFiAudioDevice10하이파이 오디오 장치.
QBluetoothDeviceInfo::Vcr11비디오 카세트 레코더.
QBluetoothDeviceInfo::VideoCamera12비디오 카메라.
QBluetoothDeviceInfo::Camcorder13비디오 카메라.
QBluetoothDeviceInfo::VideoMonitor14비디오 모니터.
QBluetoothDeviceInfo::VideoDisplayAndLoudspeaker15스피커가 내장된 비디오 디스플레이.
QBluetoothDeviceInfo::VideoConferencing16화상 회의 장치.
QBluetoothDeviceInfo::GamingDevice18게임 장치.

enum QBluetoothDeviceInfo::MinorComputerClass

이 열거형은 컴퓨터 장치의 부 장치 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedComputer0분류되지 않은 컴퓨터 장치입니다.
QBluetoothDeviceInfo::DesktopComputer1데스크톱 컴퓨터.
QBluetoothDeviceInfo::ServerComputer2서버 컴퓨터입니다.
QBluetoothDeviceInfo::LaptopComputer3노트북 컴퓨터.
QBluetoothDeviceInfo::HandheldClamShellComputer4클램셸 핸드헬드 컴퓨터 또는 PDA.
QBluetoothDeviceInfo::HandheldComputer5핸드헬드 컴퓨터 또는 PDA.
QBluetoothDeviceInfo::WearableComputer6웨어러블 컴퓨터.

enum QBluetoothDeviceInfo::MinorHealthClass

이 열거형은 헬스 디바이스의 부 디바이스 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedHealthDevice0분류되지 않은 건강 기기입니다.
QBluetoothDeviceInfo::HealthBloodPressureMonitor0x1혈압계.
QBluetoothDeviceInfo::HealthThermometer0x2온도계.
QBluetoothDeviceInfo::HealthWeightScale0x3체중계.
QBluetoothDeviceInfo::HealthGlucoseMeter0x4혈당 측정기.
QBluetoothDeviceInfo::HealthPulseOximeter0x5혈중 산소 포화도 측정기.
QBluetoothDeviceInfo::HealthDataDisplay0x7데이터 디스플레이.
QBluetoothDeviceInfo::HealthStepCounter0x8만보계.

enum QBluetoothDeviceInfo::MinorImagingClass

이 열거형은 이미징 장치의 부 장치 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedImagingDevice0분류되지 않은 이미징 장치입니다.
QBluetoothDeviceInfo::ImageDisplay0x04이미지를 표시할 수 있는 장치입니다.
QBluetoothDeviceInfo::ImageCamera0x08카메라.
QBluetoothDeviceInfo::ImageScanner0x10이미지 스캐너.
QBluetoothDeviceInfo::ImagePrinter0x20프린터.

enum QBluetoothDeviceInfo::MinorMiscellaneousClass

이 열거형은 기타 블루투스 장치의 부 장치 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedMiscellaneous0분류되지 않은 기타 장치입니다.

enum QBluetoothDeviceInfo::MinorNetworkClass

이 열거형은 로컬 영역 네트워크 액세스 장치의 부 장치 클래스에 대해 설명합니다. 로컬 영역 네트워크 액세스 장치는 부 장치 클래스를 사용하여 현재 네트워크 사용률을 지정합니다.

Constant설명
QBluetoothDeviceInfo::NetworkFullService0x00총 대역폭의 100%를 사용할 수 있습니다.
QBluetoothDeviceInfo::NetworkLoadFactorOne0x080 - 전체 대역폭의 17%가 현재 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorTwo0x10현재 총 대역폭의 17~33%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorThree0x1833 - 전체 대역폭의 50%가 현재 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorFour0x20현재 총 대역폭의 50~67%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorFive0x28현재 총 대역폭의 67 - 83%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorSix0x30현재 총 대역폭의 83 - 99%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkNoService0x38네트워크 서비스를 사용할 수 없습니다.

enum QBluetoothDeviceInfo::MinorPeripheralClass

이 열거형은 주변 장치에 대한 부 장치 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedPeripheral0분류되지 않은 주변 장치입니다.
QBluetoothDeviceInfo::KeyboardPeripheral0x10키보드.
QBluetoothDeviceInfo::PointingDevicePeripheral0x20포인팅 장치(예: 마우스)입니다.
QBluetoothDeviceInfo::KeyboardWithPointingDevicePeripheral0x30포인팅 장치가 내장된 키보드.
QBluetoothDeviceInfo::JoystickPeripheral0x01조이스틱.
QBluetoothDeviceInfo::GamepadPeripheral0x02게임 패드.
QBluetoothDeviceInfo::RemoteControlPeripheral0x03리모컨.
QBluetoothDeviceInfo::SensingDevicePeripheral0x04감지 장치.
QBluetoothDeviceInfo::DigitizerTabletPeripheral0x05디지타이저 태블릿 주변기기.
QBluetoothDeviceInfo::CardReaderPeripheral0x06카드 리더기 주변 장치.

enum QBluetoothDeviceInfo::MinorPhoneClass

이 열거형은 휴대폰 디바이스의 부 디바이스 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedPhone0분류되지 않은 전화 장치입니다.
QBluetoothDeviceInfo::CellularPhone1휴대폰입니다.
QBluetoothDeviceInfo::CordlessPhone2무선 전화기입니다.
QBluetoothDeviceInfo::SmartPhone3스마트 폰.
QBluetoothDeviceInfo::WiredModemOrVoiceGatewayPhone4유선 모뎀 또는 음성 게이트웨이.
QBluetoothDeviceInfo::CommonIsdnAccessPhone5ISDN 접속을 제공하는 장치.

enum QBluetoothDeviceInfo::MinorToyClass

이 열거형은 장난감 디바이스의 부 디바이스 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedToy0분류되지 않은 장난감입니다.
QBluetoothDeviceInfo::ToyRobot1장난감 로봇입니다.
QBluetoothDeviceInfo::ToyVehicle2장난감 차량.
QBluetoothDeviceInfo::ToyDoll3장난감 인형 또는 액션 피규어.
QBluetoothDeviceInfo::ToyController4컨트롤러.
QBluetoothDeviceInfo::ToyGame5게임.

enum QBluetoothDeviceInfo::MinorWearableClass

이 열거형은 웨어러블 디바이스의 부 디바이스 클래스를 설명합니다.

Constant설명
QBluetoothDeviceInfo::UncategorizedWearableDevice0분류되지 않은 웨어러블 디바이스입니다.
QBluetoothDeviceInfo::WearableWristWatch1손목시계.
QBluetoothDeviceInfo::WearablePager2호출기.
QBluetoothDeviceInfo::WearableJacket3재킷.
QBluetoothDeviceInfo::WearableHelmet4헬멧.
QBluetoothDeviceInfo::WearableGlasses5안경.

열거형 QBluetoothDeviceInfo::ServiceClass
플래그 QBluetoothDeviceInfo::ServiceClasses

이 열거형은 블루투스 장치의 서비스 클래스를 설명합니다. 서비스 클래스는 서비스 검색의 기초적인 형태로 사용됩니다. 장치가 제공할 수 있는 서비스 유형 목록을 제공하기 위한 것입니다.

Constant설명
QBluetoothDeviceInfo::NoService0x0000장치가 서비스를 제공하지 않습니다.
QBluetoothDeviceInfo::PositioningService0x0001장치가 포지셔닝 서비스를 제공합니다.
QBluetoothDeviceInfo::NetworkingService0x0002장치가 네트워킹 서비스를 제공합니다.
QBluetoothDeviceInfo::RenderingService0x0004장치가 렌더링 서비스를 제공합니다.
QBluetoothDeviceInfo::CapturingService0x0008장치가 캡처 서비스를 제공합니다.
QBluetoothDeviceInfo::ObjectTransferService0x0010장치가 개체 전송 서비스를 제공합니다.
QBluetoothDeviceInfo::AudioService0x0020장치가 오디오 서비스를 제공합니다.
QBluetoothDeviceInfo::TelephonyService0x0040장치가 전화 통신 서비스를 제공합니다.
QBluetoothDeviceInfo::InformationService0x0080장치가 정보 서비스를 제공합니다.
QBluetoothDeviceInfo::AllServices0x07ff장치는 모든 유형의 서비스를 제공합니다.

서비스 클래스 유형은 QFlags<서비스 클래스>에 대한 유형 정의입니다. 이 유형은 ServiceClass 값의 OR 조합을 저장합니다.

멤버 함수 문서

QBluetoothDeviceInfo::QBluetoothDeviceInfo()

유효하지 않은 QBluetoothDeviceInfo 객체를 생성합니다.

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

블루투스 주소 address, 장치 이름 name 및 인코딩된 장치 클래스 classOfDevice 로 QBluetoothDeviceInfo 객체를 생성합니다.

classOfDevice 매개변수는 다음 형식으로 인코딩됩니다.

Bits크기설명
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의 저에너지 장치에 필요합니다. 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()를 사용해야 합니다. 이 두 플랫폼은 검색된 블루투스 장치에 대한 블루투스 주소를 노출하지 않으며 고유한 장치 식별자를 사용합니다.

deviceUuid()도 참조하세요 .

QBluetoothDeviceInfo::CoreConfigurations QBluetoothDeviceInfo::coreConfigurations() const

디바이스의 구성을 반환합니다. 장치 구성이 설정되어 있지 않으면 기본 요금 장치 구성이 반환됩니다.

setCoreConfigurations()도 참조하세요 .

QBluetoothUuid QBluetoothDeviceInfo::deviceUuid() const

주소가 없는 블루투스 디바이스의 고유 식별자를 반환합니다.

일반적으로 이 uuid는 macOS와 iOS를 제외한 모든 플랫폼에서 유효하지 않습니다. 이 두 플랫폼은 발견된 블루투스 저에너지 디바이스에 대한 블루투스 주소를 제공하지 않기 때문에 해결 방법으로 사용됩니다. 다른 모든 플랫폼에서는 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 저에너지 디바이스를 들 수 있습니다. 따라서 반환된 해시 테이블에는 제조업체 ID 또는 해시 키당 여러 개의 항목이 있을 수 있습니다.

setManufacturerData참조하세요 .

QByteArray QBluetoothDeviceInfo::manufacturerData(quint16 manufacturerId) const

주어진 manufacturerId 과 관련된 데이터를 반환합니다.

제조업체 데이터는 블루투스 핵심 사양 부록에 정의되어 있으며 두 개의 세그먼트로 구성됩니다:

  • 할당된 번호 회사 식별자 문서의 제조업체별 식별자 코드
  • 임의의 데이터 옥텟 시퀀스

데이터 옥텟의 해석은 회사 식별자로 지정된 제조업체에 의해 정의됩니다.

참고: 원격 디바이스는 제조사 ID당 여러 개의 데이터 항목을 제공할 수 있습니다. 이 함수는 첫 번째 항목만 반환합니다. 모든 항목이 필요한 경우 다중 해시를 반환하는 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

광고 패킷에서 모든 서비스 데이터의 전체 세트를 반환합니다.

일부 디바이스는 서비스 데이터 ID당 여러 개의 서비스 데이터 항목을 제공할 수 있습니다. 예를 들어, 광고 패킷과 스캔 응답 패킷을 통해 각각 다른 서비스 데이터를 전송하는 저전력 블루투스 디바이스를 들 수 있습니다. 따라서 반환된 해시 테이블에는 서비스 데이터 ID 또는 해시 키당 여러 개의 항목이 있을 수 있습니다.

이 기능은 Qt 6.3에 도입되었습니다.

setServiceData참조하세요 .

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

주어진 serviceId 과 관련된 데이터를 반환합니다.

서비스 데이터는 블루투스 핵심 사양의 부록에 정의되어 있으며 두 개의 세그먼트로 구성됩니다:

  • 서비스 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 으로 설정합니다. 이렇게 하면 일반 장치와 저에너지 장치를 구분하는 데 도움이 됩니다.

coreConfigurations()도 참조하세요 .

void QBluetoothDeviceInfo::setDeviceUuid(const QBluetoothUuid &uuid)

주소가 없는 블루투스 디바이스에 대해 고유 식별자 uuid 를 설정합니다. 이는 CoreBluetooth API가 주소를 숨기지만 장치/주변기기를 식별하기 위해 UUID를 제공하는 macOS 및 iOS에서 발생합니다.

이 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)

두 개의 QBluetoothDeviceInfo 객체 ab 가 같지 않으면 true 를 반환합니다.

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

두 개의 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.