QLowEnergyServiceData Class
QLowEnergyServiceData 클래스는 GATT 서비스 데이터를 설정하는 데 사용됩니다. 더 보기...
Header: | #include <QLowEnergyServiceData> |
qmake: | QT += bluetooth |
- 상속된 멤버를 포함한 모든 멤버 목록
- QLowEnergyServiceData는 암시적으로 공유되는 클래스의 일부입니다.
공용 유형
enum | ServiceType { ServiceTypePrimary, ServiceTypeSecondary } |
공용 함수
QLowEnergyServiceData() | |
QLowEnergyServiceData(const QLowEnergyServiceData &other) | |
~QLowEnergyServiceData() | |
void | addCharacteristic(const QLowEnergyCharacteristicData &characteristic) |
void | addIncludedService(QLowEnergyService *service) |
QList<QLowEnergyCharacteristicData> | characteristics() const |
QList<QLowEnergyService *> | includedServices() const |
bool | isValid() const |
void | setCharacteristics(const QList<QLowEnergyCharacteristicData> &characteristics) |
void | setIncludedServices(const QList<QLowEnergyService *> &services) |
void | setType(QLowEnergyServiceData::ServiceType type) |
void | setUuid(const QBluetoothUuid &uuid) |
void | swap(QLowEnergyServiceData &other) |
QLowEnergyServiceData::ServiceType | type() const |
QBluetoothUuid | uuid() const |
QLowEnergyServiceData & | operator=(const QLowEnergyServiceData &other) |
관련 비회원
bool | operator!=(const QLowEnergyServiceData &a, const QLowEnergyServiceData &b) |
bool | operator==(const QLowEnergyServiceData &a, const QLowEnergyServiceData &b) |
상세 설명
이 클래스의 객체는 QLowEnergyController::addService()를 통해 GATT 서버에 추가할 서비스를 제공합니다.
멤버 유형 문서
enum QLowEnergyServiceData::ServiceType
GATT 서비스 유형입니다.
Constant | 값 | 설명 |
---|---|---|
QLowEnergyServiceData::ServiceTypePrimary | 0x2800 | 서비스가 기본 서비스입니다. |
QLowEnergyServiceData::ServiceTypeSecondary | 0x2801 | 서비스는 보조 서비스입니다. 보조 서비스는 상위 수준의 기능을 구현하기 위해 다른 서비스에 의해 포함됩니다. |
멤버 함수 문서
QLowEnergyServiceData::QLowEnergyServiceData()
이 클래스의 유효하지 않은 객체를 새로 생성합니다.
QLowEnergyServiceData::QLowEnergyServiceData(const QLowEnergyServiceData &other)
other 의 복사본인 이 클래스의 새 객체를 생성합니다.
[noexcept]
QLowEnergyServiceData::~QLowEnergyServiceData()
이 개체를 파괴합니다.
void QLowEnergyServiceData::addCharacteristic(const QLowEnergyCharacteristicData &characteristic)
characteristic 이 유효한 경우 특성 목록에 추가합니다.
setCharacteristics()도 참조하세요 .
void QLowEnergyServiceData::addIncludedService(QLowEnergyService *service)
포함된 서비스 목록에 service 을 추가합니다. service 객체는 QLowEnergyController::addService 으로의 호출에서 반환되어야 합니다. 이 요구 사항은 순환 포함(Bluetooth 사양에서 금지하는)을 방지하고 동일한 유형의 서비스를 두 개 이상 포함하는 사용 사례를 지원하는 데 도움이 됩니다.
setIncludedServices()도 참조하세요 .
QList<QLowEnergyCharacteristicData> QLowEnergyServiceData::characteristics() const
특성 목록을 반환합니다.
setCharacteristics()도 참조하세요 .
QList<QLowEnergyService *> QLowEnergyServiceData::includedServices() const
포함된 서비스 목록을 반환합니다.
setIncludedServices()도 참조하세요 .
bool QLowEnergyServiceData::isValid() const
이 서비스에 널이 아닌 UUID가 있는 경우 true
을 반환합니다.
void QLowEnergyServiceData::setCharacteristics(const QList<QLowEnergyCharacteristicData> &characteristics)
특성 목록을 characteristics 로 설정합니다. 유효한 특성만 고려됩니다.
characteristics() 및 addCharacteristic()도 참조하세요 .
void QLowEnergyServiceData::setIncludedServices(const QList<QLowEnergyService *> &services)
포함된 서비스 목록을 services 로 설정합니다. 이 목록의 모든 객체는 QLowEnergyController::addService 로의 호출에서 반환된 것이어야 합니다.
includedServices() 및 addIncludedService()도 참조하세요 .
void QLowEnergyServiceData::setType(QLowEnergyServiceData::ServiceType type)
이 서비스의 유형을 type 로 설정합니다.
type()도 참조하세요 .
void QLowEnergyServiceData::setUuid(const QBluetoothUuid &uuid)
이 서비스의 UUID를 uuid 로 설정합니다.
uuid()도 참조하세요 .
[noexcept]
void QLowEnergyServiceData::swap(QLowEnergyServiceData &other)
이 개체를 other 로 바꿉니다.
QLowEnergyServiceData::ServiceType QLowEnergyServiceData::type() const
이 서비스의 유형을 반환합니다.
setType()도 참조하세요 .
QBluetoothUuid QLowEnergyServiceData::uuid() const
이 서비스의 UUID를 반환합니다.
setUuid()도 참조하세요 .
QLowEnergyServiceData &QLowEnergyServiceData::operator=(const QLowEnergyServiceData &other)
이 객체를 other 의 복사본으로 만들고 이 객체의 새 값을 반환합니다.
관련 비회원
bool operator!=(const QLowEnergyServiceData &a, const QLowEnergyServiceData &b)
a 과 b 이 공개 상태가 같지 않으면 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
bool operator==(const QLowEnergyServiceData &a, const QLowEnergyServiceData &b)
a 과 b 이 공개 상태와 동일하면 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
© 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.