MQTTPublishProperties (STRUCT)ΒΆ
TYPE MQTTPublishProperties : STRUCT
Publish properties (MQTT V5) The structure is used for sending and receiving properties. Notice: Some fields are only relevant for the publisher or the subscriber.
- InOut:
Name
Type
Comment
bPayloadFormatIndicator
BYTE
Payload Format: 0: Binary Data, 1: UTF-8 (relevant for publisher and subscriber)
udiMessageExpiryInterval
UDINT
Expiry interval of the message in seconds (relevant for publisher and subscriber)
wsContentType
WSTRING
MIME style content type of the payload (relevant for publisher and subscriber)
wsResponseTopic
WSTRING(1024)
Some applications or standards might wish to run a Request/Response interaction over MQTT. The Resopnse Topic can be used for this purpose. (relevant for publisher and subscriber)
udiCorrelationDataSize
UDINT
Size of the correlation data buffer |paCorrelationData| (relevant for publisher and subscriber)
paCorrelationData
POINTER TO BYTE
Pointer to correlation data buffer. The Correlation Data is used by the sender of the Request Message to identify which request the Response Message is for when it is received. (relevant for publisher and subscriber)
udiSubscriptionIdentifier
UDINT
The subscription identifier of the last received message (see output of the subscriber function block). The subscription identifier can be set via MQTTSubscribeProperties.udiSubscriptionIdentifier. The identifier has no effect for the publisher function block. (relevant for the subscriber)
uiTopicAlias
UINT
A Topic Alias is an integer value that is used to identify the Topic instead of using the Topic Name. If a Topic Alias mapping has been set at the receiver (the broker), a sender can send a PUBLISH packet that contains that Topic Alias and a zero length Topic Name. The receiver (the broker) then treats the incoming PUBLISH as if it had contained the Topic Name of the Topic Alias. The Topic Alias has no effect for the subscriber function block and is not transferd from the broker to the subscriber. (relevant for the publisher)
userProperties
ARRAY [0..(MQTTParam.g_udiMaxUserProperties - 1)] OF MQTTStringPair
User defined properties (relevant for publisher and subscriber)