Instance Attributes (Instance #1)
#  | Name  | Access  | Data Type  | Description  | ||||
|---|---|---|---|---|---|---|---|---|
1  | MQTT mode  | Get  | UINT8  | Defines the MQTT mode 
  | ||||
2  | Last will message configuration  | Get  | Struct  | Struct that configures the MQTT last will message. For a detailed description see table below. Default: No last will message.  | 
Attribute #2, Last Will Message Configuration
If a struct member of attribute #2 contains invalid data, e.g. out of range values or invalid string lengths, the last will message configuration is discarded.
Struct Element  | Data Type  | Description  | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
1  | UINT8  | Specifies the QoS level of the last will message when it is published 
  | ||||||||
2  | BOOL  | Specifies if the last will message is to be retained when it is published 
  | ||||||||
3  | UINT16  | Length of the last will message topic string Valid range: 0 - 128  | ||||||||
4  | Array of CHAR  | Topic string for the last will message The length of the array must match the topic length given by struct element 3 Max length: 128 characters  | ||||||||
5  | UINT16  | Length of the last will message data Valid range: 0 - 256  | ||||||||
6  | Array of OCTET  | Message data of the last will message The length of the array must match the message length given by struct element 5 Max length: 256 octets.  | 
Command Details: Get_Publish_Configuration
Category
Extended
Details
Command Code:  | 10h  | 
Valid for:  | Object  | 
Description
This command is issued at least once for every dataset, following the Get_Data_Notification response, if the following conditions are fulfilled:
The MQTT bit is set in the network channels field of the dataset in the Get_Data_Notification response
The dataset is supported by MQTT
MQTT is enabled in instance #1, attribute #1
The Anybus CompactCom is connected to an MQTT broker on the network
For details on how MQTT is used, see MQTT.
Command Details
Field
Contents
Comments
CmdExt[0]
Dataset type (UINT8)
See the description of the Get_Data_Notificaton command of the Application Object (FFh) in the Software Design Guide.
CmdExt[1]
(reserved)
MsgData[0...1]
Dataset identifier (UINT16)
Response Details
Field
Contents
Comments
CmdExt[0]
0
Reserved, set to 0
CmdExt[1]
0
Reserved, set to 0
MsgData[0]
Value:
Meaning:
TRUE:
Publish the dataset with the retain bit set
FALSE:
Publish the dataset with the retain bit cleared (Default)
If the retain bit is set, the topic will be kept in the broker for additional recipients.
MsgData[1... n]
Array of char, Max length: 128 char
MQTT topic, published by the dataset on the network. Omit this field to not customize the topic.