reading multiple values with an array
You can read multiple nodes by specifying an array of nodeId in the msg.nodeId
or msg.topic
attribute.
The node will return an array of values in msg.payload
.
For instance, you can inject the following message in the Read
node:
msg = {
"topics": [
"ns=1;s=Temperature",
"ns=0;s=Pressure"
],
"attributeId": "Value",
"output": "Value"
and the node will return the following message:
msg = {
payload: [
23.4,
1.2
],
dataType: [
"Double",
"Double"
],
...
}
Reading multiple values with an array is only supported by injecting a message in the
Read
node.Because the Read node only allow a single nodeId to be specified, you can only read values with an array of nodeId by injecting a message in the Read
node.