I have found a problem when using a buffer in messages, it seems that when retrieving the message some of the characteristics of the buffer change and when sending it to a PLC it does not recognize it.
I have seen that in the in and out
JSON.parse(JSON.stringify(msg))
is used and I do not understand this double transformation. Wouldn't it be better to use the message directly?
queue.push(msg);
node.send(msg);
I have found a problem when using a buffer in messages, it seems that when retrieving the message some of the characteristics of the buffer change and when sending it to a PLC it does not recognize it.
I have seen that in the in and out
JSON.parse(JSON.stringify(msg))is used and I do not understand this double transformation. Wouldn't it be better to use the message directly?
queue.push(msg);node.send(msg);