이 페이지에서

QMqttLastWillProperties Class

QMqttLastWillProperties 클래스는 서버에 연결할 때 ‘마지막 의지(last will)’를 지정할 때, QMqttLastWillProperties 인스턴스( QMqttClient )가 서버에 전달할 수 있는 구성 옵션을 나타냅니다. 더 보기...

헤더: #include <QMqttLastWillProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

공개 함수

QString contentType() const
QByteArray correlationData() const
quint32 messageExpiryInterval() const
QMqtt::PayloadFormatIndicator payloadFormatIndicator() const
QString responseTopic() const
void setContentType(const QString &content)
void setCorrelationData(const QByteArray &correlation)
void setMessageExpiryInterval(quint32 expiry)
void setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)
void setResponseTopic(const QString &response)
void setUserProperties(const QMqttUserProperties &properties)
void setWillDelayInterval(quint32 delay)
QMqttUserProperties userProperties() const
quint32 willDelayInterval() const

상세 설명

참고: Last Will 속성은 MQTT 5.0 사양의 일부이며, 더 낮은 프로토콜 레벨로 연결할 때는 사용할 수 없습니다. 자세한 내용은 QMqttClient::ProtocolVersion 을 참조하십시오.

멤버 함수 문서

QString QMqttLastWillProperties::contentType() const

마지막 유언 메시지의 콘텐츠 유형을 반환합니다.

setContentType()도 참조하십시오 .

QByteArray QMqttLastWillProperties::correlationData() const

요청을 식별하기 위한 상관 데이터를 반환합니다.

setCorrelationData()도 참조하십시오 .

quint32 QMqttLastWillProperties::messageExpiryInterval() const

‘will’ 지연 간격부터 시작하여 마지막 ‘will’ 메시지의 유효 기간을 초 단위로 반환합니다.

setMessageExpiryInterval()도 참조하십시오 .

QMqtt::PayloadFormatIndicator QMqttLastWillProperties::payloadFormatIndicator() const

페이로드 형식 표시기를 반환합니다.

setPayloadFormatIndicator()도 참조하십시오 .

QString QMqttLastWillProperties::responseTopic() const

last will 메시지의 구독자가 응답해야 할 토픽을 반환합니다.

setResponseTopic()도 참조하십시오 .

void QMqttLastWillProperties::setContentType(const QString &content)

콘텐츠 유형을 content 로 설정합니다.

contentType()도 참조하십시오 .

void QMqttLastWillProperties::setCorrelationData(const QByteArray &correlation)

상관 관계 데이터를 correlation 로 설정합니다.

correlationData()도 참조하십시오 .

void QMqttLastWillProperties::setMessageExpiryInterval(quint32 expiry)

메시지 만료 간격을 expiry 로 설정합니다.

messageExpiryInterval()도 참조하십시오 .

void QMqttLastWillProperties::setPayloadFormatIndicator(QMqtt::PayloadFormatIndicator p)

페이로드 형식 표시기를 ‘ p ’로 설정합니다.

payloadFormatIndicator()도 참조하십시오 .

void QMqttLastWillProperties::setResponseTopic(const QString &response)

응답 토픽을 response 로 설정합니다.

responseTopic()도 참조하십시오 .

void QMqttLastWillProperties::setUserProperties(const QMqttUserProperties &properties)

사용자 속성을 properties 로 설정합니다.

userProperties()도 참조하십시오 .

void QMqttLastWillProperties::setWillDelayInterval(quint32 delay)

지연 간격을 delay 로 설정합니다.

willDelayInterval()도 참조하십시오 .

QMqttUserProperties QMqttLastWillProperties::userProperties() const

사용자 속성을 반환합니다.

setUserProperties()도 참조하십시오 .

quint32 QMqttLastWillProperties::willDelayInterval() const

서버와의 연결이 끊어진 후 유언 메시지가 전송되기까지 걸리는 지연 시간을 초 단위로 반환합니다.

setWillDelayInterval()도 참조하십시오 .

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