class QMqttLastWillProperties

The QMqttLastWillProperties class represents configuration options a QMqttClient can pass to the server when specifying the last will during connecting to a server. More

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

Note

Last Will properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See ProtocolVersion for more information.

__init__()
__init__(arg__1)
Parameters:

arg__1QMqttLastWillProperties

contentType()
Return type:

str

Returns the content type of the last will message.

See also

setContentType()

correlationData()
Return type:

QByteArray

Returns the correlation data to identify the request.

messageExpiryInterval()
Return type:

int

Returns the lifetime of the last will message in seconds, starting from the will delay interval.

payloadFormatIndicator()
Return type:

PayloadFormatIndicator

Returns the payload format indicator.

responseTopic()
Return type:

str

Returns the topic that subscribers to the last will message should respond to.

setContentType(content)
Parameters:

content – str

Sets the content type to content.

See also

contentType()

setCorrelationData(correlation)
Parameters:

correlationQByteArray

Sets the correlation data to correlation.

setMessageExpiryInterval(expiry)
Parameters:

expiry – int

Sets the message expiry interval to expiry.

setPayloadFormatIndicator(p)
Parameters:

pPayloadFormatIndicator

Sets the payload format indicator to p.

setResponseTopic(response)
Parameters:

response – str

Sets the response topic to response.

See also

responseTopic()

setUserProperties(properties)
Parameters:

propertiesQMqttUserProperties

Sets the user properties to properties.

See also

userProperties()

setWillDelayInterval(delay)
Parameters:

delay – int

Sets the will delay interval to delay.

userProperties()
Return type:

QMqttUserProperties

Returns the user properties.

willDelayInterval()
Return type:

int

Returns the delay in seconds a last will message will be sent after disconnecting from the server.