Message Action Properties
The message action supports the following arguments, submitted with the args parameter (described in the Properties table for Device Do Action):
Message Action Arguments:
Property | Type | Description |
---|---|---|
code | Number or string | (Required) code is the message code. A string or a number, typically an integer. |
data | String or | (Optional) data is a series of bytes, supplied as a list of integers, or a UTF-8 string. For example: “The quick brown fox” or [ 84, 104, 101, …, 120 ] |
service | String | (Required) service can be “unacknowledged”, “acknowledged”, or “request”. Both "acknowledged" and "request" messages support the timeout parameter and a maximum retry count. The "unacknowledged" message supports a repeat count. |
addressing | String | (Optional) addressing can be “physical”, “logical”, “multicast”, “broadcast”. Defaults to “logical”. |
secure | Boolean | (Optional) secure can be either True or False. Defaults to the protocol default. |
priority | Boolean | (Optional) priority can be either True or False. Defaults to False. |
count | Number | (Optional) count is either:
Defaults to 3. |
timeout | Number | (Optional) timeout is either:
Defaults to the shortest possible timeout for the protocol. |
options | Object | (Optional) options provides protocol-specific options. The following example shows the path selection between the “primary” and “secondary” path supported by the LON driver. Example: { |
respond | String | (Optional) respond indicates a topic to which the processor publishes the application message completion object. See "Response Topic" below for a description of the response fields. |
Response Topic:
The response topic must be a topic local to the edge server shared between the requestor and the processor, or it must be an IAP event channel topic. See Handle Allocation for strategies on allocation of suitable topics.
The application message completion object is published on the respond topic indicated with the application message object:
Field Name | Type | Description |
---|---|---|
success | Boolean | Always present. A boolean success (true) or failure (false) indicator. All other response object fields are void if success: false. |
code | String or number | Response code, if applicable. |
data | String or | For responses to requests, can be null or "undefined" if the response included no data. Example: “ABC” or [ 65, 66, 67 ] |
options | Object | Optional protocol-specific meta data. The following example illustrates how the LON driver reports the response source address. Example: { |