QLowEnergyDescriptor Class

QLowEnergyDescriptor 클래스는 Bluetooth 저에너지 설명자에 대한 정보를 저장합니다. 더 보기...

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

공용 함수

QLowEnergyDescriptor()
QLowEnergyDescriptor(const QLowEnergyDescriptor &other)
~QLowEnergyDescriptor()
bool isValid() const
QString name() const
QBluetoothUuid::DescriptorType type() const
QBluetoothUuid uuid() const
QByteArray value() const
QLowEnergyDescriptor &operator=(const QLowEnergyDescriptor &other)
bool operator!=(const QLowEnergyDescriptor &a, const QLowEnergyDescriptor &b)
bool operator==(const QLowEnergyDescriptor &a, const QLowEnergyDescriptor &b)

상세 설명

QLowEnergyDescriptor는 Bluetooth 저에너지 설명자의 name(), uuid() 및 value()에 대한 정보를 제공합니다. 설명자는 Bluetooth 저에너지 특성으로 캡슐화되며 특성에 대한 추가 컨텍스트 정보(데이터 형식, 알림 활성화 등)를 제공합니다.

설명자 값은 이 설명자가 속한 서비스를 관리하는 QLowEnergyService 인스턴스를 통해 작성할 수 있습니다. QLowEnergyService::writeDescriptor () 함수는 새 값을 씁니다. 성공하면 QLowEnergyService::descriptorWritten() 신호가 전송됩니다. 이 객체의 캐시된 value()가 그에 따라 업데이트됩니다.

QLowEnergyServiceQLowEnergyCharacteristic참조하세요 .

멤버 함수 문서

QLowEnergyDescriptor::QLowEnergyDescriptor()

새로운 QLowEnergyDescriptor를 생성합니다. 이 클래스의 기본 생성 인스턴스는 항상 유효하지 않습니다.

QLowEnergyDescriptor::QLowEnergyDescriptor(const QLowEnergyDescriptor &other)

other 의 복사본인 새로운 QLowEnergyDescriptor를 생성합니다.

두 복사본은 쓰기 시 분리되지 않는 동일한 기본 데이터를 계속 공유합니다.

[noexcept] QLowEnergyDescriptor::~QLowEnergyDescriptor()

QLowEnergyDescriptor 객체를 삭제합니다.

bool QLowEnergyDescriptor::isValid() const

QLowEnergyDescriptor 객체가 유효하면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.

잘못된 설명자 인스턴스는 어떤 서비스와도 연결되지 않았거나(기본 구성됨), 기본 Bluetooth 저에너지 디바이스와의 연결이 끊어지는 등의 이유로 연결된 서비스가 더 이상 유효하지 않은 경우입니다. 개체가 유효하지 않게 되면 더 이상 유효하게 될 수 없습니다.

참고: 기본 장치와의 연결이 끊어져 QLowEnergyDescriptor 인스턴스가 유효하지 않게 되면 현재 인스턴스에 의해 캡슐화된 정보는 연결이 끊어진 시점에 그대로 유지됩니다. 따라서 연결 해제 이벤트 후에 검색할 수 있습니다.

QString QLowEnergyDescriptor::name() const

사람이 읽을 수 있는 설명자의 이름을 반환합니다.

이름은 설명자의 type()를 기반으로 합니다. 설명자 유형의 전체 목록은 Bluetooth.org 설명자에서 확인할 수 있습니다.

type()를 알 수 없는 경우 반환되는 문자열은 비어 있습니다.

type() 및 QBluetoothUuid::descriptorToString()도 참조하세요 .

QBluetoothUuid::DescriptorType QLowEnergyDescriptor::type() const

설명자의 유형을 반환합니다.

name()도 참조하세요 .

QBluetoothUuid QLowEnergyDescriptor::uuid() const

isValid()가 true 을 반환하면 이 디스크립터의 UUID를 반환하고, 그렇지 않으면 null UUID를 반환합니다.

QByteArray QLowEnergyDescriptor::value() const

디스크립터의 캐시된 값을 반환합니다.

캐시된 설명자 값은 QLowEnergyService::writeDescriptor() 또는 QLowEnergyService::readDescriptor()를 사용하여 업데이트할 수 있습니다.

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

other 복사본을 만들어 이 QLowEnergyDescriptor 개체에 할당합니다. 두 복사본은 계속해서 동일한 서비스 및 컨트롤러 세부 정보를 공유합니다.

관련 비회원

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

ab 과 같지 않은 경우 true 을 반환하고, 그렇지 않은 경우 false 을 반환합니다.

두 개의 QLowEnergyDescriptor 인스턴스가 동일한 원격 Bluetooth 저에너지 장치에서 동일한 설명자를 참조하거나 두 인스턴스가 모두 기본으로 구성된 경우 동일한 것으로 간주됩니다.

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

ab 과 같으면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

두 개의 QLowEnergyDescriptor 인스턴스가 동일한 원격 Bluetooth 저에너지 장치에서 동일한 설명자를 참조하거나 두 인스턴스가 모두 기본으로 구성된 경우 동일한 것으로 간주됩니다.

© 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.