Template String: Ethernet And Mqtt Payload - ADF Web HD67932-B2 Series User Manual

Serial / mqtt - converter
Table of Contents

Advertisement

User Manual Serial / MQTT
Document code: MN67932_ENG
Revision 1.000
Page 27 of 32
Industrial Electronic Devices

TEMPLATE STRING: ETHERNET AND MQTT PAYLOAD

In the section "MQTT Set Topic" of the SW67932, it is possible to define the expected format of the Ethernet message received/transmitted.
This feature allows to define a fixed part of the Ethernet message and some parts to map from/to MQTT side. The parts to link to MQTT side
is made using keywords, defined between '$' chars.
Example
From Serial side, the serial device sends a message with this ASCII format:
"ID=xxxx, Register=xxxx, Desc=xxxxx, Data=xxxxx"
Where 'xxx' parts are variable parts of the message.
On MQTT side, we want to receive just the variable parts, discharging the fixed parts that are not necessary. In this case, the "Input
Template" will be defined in this way:
"ID=$ID$, Register=$REG$, Desc=$DESC$, Data=$DATA$"
Supposing that the real string from the Serial message is:
"ID=0001, Register=0100, Desc=Temp1, Data=02345"
We wil have:
$ID$ = 0001
$REG$ = 0100
$DESC$ = Temp1
$DATA$ = 02345
ADFweb.com S.r.l.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HD67932-B2 Series and is the answer not in the manual?

This manual is also suitable for:

Hd67932-2-b2Hd67932-4-b2

Table of Contents