이 페이지에서

QBluetoothDeviceInfo Class

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

헤더: #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)

상세 설명

QBluetoothDeviceInfo는 Bluetooth 장치의 이름, 주소 및 장치 클래스에 대한 정보를 제공합니다.

멤버 유형 설명서

enum QBluetoothDeviceInfo::CoreConfiguration
flags QBluetoothDeviceInfo::CoreConfigurations

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

상수값설명
QBluetoothDeviceInfo::UnknownCoreConfiguration0x0블루투스 장치의 유형을 확인할 수 없습니다.
QBluetoothDeviceInfo::BaseRateCoreConfiguration0x02이 장치는 표준 블루투스 장치입니다.
QBluetoothDeviceInfo::BaseRateAndLowEnergyCoreConfiguration0x03이 장치는 표준 및 저전력(Low Energy) 장치를 지원하는 블루투스 스마트(Bluetooth Smart) 장치입니다.
QBluetoothDeviceInfo::LowEnergyCoreConfiguration0x01이 장치는 Bluetooth Low Energy 장치입니다.

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

enum class QBluetoothDeviceInfo::Field
flags QBluetoothDeviceInfo::Fields

이 열거형은 ` 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

이 열거형은 블루투스 장치의 주요 장치 클래스를 나타냅니다.

상수값설명
QBluetoothDeviceInfo::MiscellaneousDevice0기타 장치.
QBluetoothDeviceInfo::ComputerDevice1컴퓨터 장치 또는 PDA.
QBluetoothDeviceInfo::PhoneDevice2전화기.
QBluetoothDeviceInfo::NetworkDevice3로컬 영역 네트워크(LAN)에 대한 액세스를 제공하는 장치(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::HiFiAudioDevice10하이파이 오디오 기기.
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

이 열거형은 기타 블루투스 장치에 대한 하위 장치 클래스를 설명합니다.

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

enum QBluetoothDeviceInfo::MinorNetworkClass

이 열거형은 근거리 통신망(LAN) 접속 장치의 마이너 장치 클래스를 정의합니다. 근거리 통신망(LAN) 접속 장치는 마이너 장치 클래스를 사용하여 현재 네트워크 사용량을 지정합니다.

상수값설명
QBluetoothDeviceInfo::NetworkFullService0x00전체 대역폭의 100%를 사용할 수 있습니다.
QBluetoothDeviceInfo::NetworkLoadFactorOne0x08전체 대역폭의 0~17%가 현재 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorTwo0x10현재 전체 대역폭의 17~33%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorThree0x18현재 전체 대역폭의 33~50%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorFour0x20현재 전체 대역폭의 50~67%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorFive0x28현재 전체 대역폭의 67~83%가 사용 중입니다.
QBluetoothDeviceInfo::NetworkLoadFactorSix0x30현재 전체 대역폭의 83~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

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

상수값설명
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)

블루투스 주소 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()`를 사용해야 합니다. 이 두 플랫폼은 검색된 블루투스 기기의 블루투스 주소를 노출하지 않으며, 고유한 기기 식별자를 사용합니다.

deviceUuid()도 참조하십시오 .

QBluetoothDeviceInfo::CoreConfigurations QBluetoothDeviceInfo::coreConfigurations() const

장치의 구성을 반환합니다. 장치 구성이 설정되어 있지 않은 경우, 기본 속도의 장치 구성이 반환됩니다.

setCoreConfigurations()도 참조하십시오 .

QBluetoothUuid QBluetoothDeviceInfo::deviceUuid() const

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

일반적으로 이 UUID는 macOS와 iOS를 제외한 모든 플랫폼에서 유효하지 않습니다. 이 UUID는 발견된 블루투스 저에너지(BLE) 기기에 대한 블루투스 주소를 제공하지 않는 두 플랫폼을 위한 임시 해결책으로 사용됩니다. 그 외의 모든 플랫폼에서는 대신 ` 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

광고 패킷에서 모든 제조업체 데이터의 전체 집합을 반환합니다.

일부 장치는 제조업체 ID당 여러 개의 제조업체 데이터 항목을 제공할 수 있습니다. 예를 들어, 블루투스 저에너지(Bluetooth Low Energy) 장치는 광고 패킷과 스캔 응답 패킷을 통해 각각 다른 제조업체 데이터를 전송할 수 있습니다. 따라서 반환된 해시 테이블에는 제조업체 ID 또는 해시 키당 여러 개의 항목이 포함될 수 있습니다.

setManufacturerData도 참조하십시오 .

QByteArray QBluetoothDeviceInfo::manufacturerData(quint16 manufacturerId) const

지정된 manufacturerId 와 관련된 데이터를 반환합니다.

제조업체 데이터는 ‘블루투스 코어 사양 보충 문서’에 정의되어 있으며, 다음 두 세그먼트로 구성됩니다:

  • '할당 번호 회사 식별자( Assigned Numbers Company Identifiers)' 문서에 명시된 제조업체 고유 식별자 코드
  • 임의의 데이터 옥텟 시퀀스

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

참고: 원격장치는 manufacturerId당 여러 개의 데이터 항목을 제공할 수 있습니다. 이 함수는 첫 번째 항목만 반환합니다. 모든 항목이 필요한 경우, 다중 해시(multi hash)를 반환하는 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당 여러 개의 서비스 데이터 항목을 제공할 수 있습니다. 예를 들어, 블루투스 저에너지(Bluetooth Low Energy) 기기의 경우, 광고 패킷과 스캔 응답 패킷을 통해 각각 다른 서비스 데이터를 전송할 수 있습니다. 따라서 반환된 해시 테이블에는 서비스 데이터 ID 또는 해시 키당 여러 개의 항목이 포함될 수 있습니다.

이 함수는 Qt 6.3에서 도입되었습니다.

setServiceData도 참조하십시오 .

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

지정된 serviceId 와 관련된 데이터를 반환합니다.

서비스 데이터는 ‘블루투스 코어 사양 보충 문서’에 정의되어 있으며, 다음 두 세그먼트로 구성됩니다:

  • 서비스 UUID
  • 임의의 데이터 옥텟 시퀀스

참고: 원격장치는 각 serviceId 당 여러 개의 데이터 항목을 제공할 수 있습니다. 이 함수는 첫 번째 항목만 반환합니다. 모든 항목이 필요한 경우, 다중 해시(multi hash)를 반환하는 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)

주소가 없는 블루투스 기기에 대해 고유 식별자 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)

a 와 b 라는 두 개의 QBluetoothDeviceInfo 객체가 서로 다를 경우, true 를 반환합니다.

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

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