RSTi-OM User Manual
Section 12
GFK-3212A
Jun 2021
MQTT Interface
123
12.5
ISDU Response Payload
The ISDU response payload is a JSON object with the fields described below:
Name
Type
Description
op
string
"op" value from request
index
integer
"index" value from request
subindex
integer
"subindex" value from request (if present and non-zero)
status
string
"OK" if the request was successful, otherwise an error message.
Fields specific to read response (one or more of raw, str, uint may be present:
raw
array
An array of integer byte values (decimal)
uint
integer
Unsigned integer value
str
string
UTF-8 string data
len
integer
Number of bytes read
If no format is specified in the read request, then the read response will contain data in all three formats when
len ≤ 4. If len
> 4, only raw and str formats will be returned. If the read operation fails, no len value or data
values will be returned.
In a read response, the str value will have any trailing NULL bytes removed. The len field will always indicate
the total number of bytes read (including any trailing NULL bytes for string values)
Below is an example of a write-string request/response followed by a read-string request/response and a
read-raw request/response where the topic base path is IOLM:
IOLM/port/1/isdu/request/66b127b7-f39d-40e7-b786- 1cffc8d344a0
{
"op": "write", "index": 24,
"str": "hi there"
}
IOLM/port/1/isdu/response/66b127b7-f39d-40e7-b786- 1cffc8d344a0
{
"op": "write", "index": 24,
"status": "OK"
}
IOLM/port/1/isdu/request/2ee5141e-335b-4e33-bf4e- dedf01a0ff7b
{
"op": "read", "index": 24,
"format": "str"
}
IOLM/port/1/isdu/response/2ee5141e-335b-4e33-bf4e- dedf01a0ff7b
{