Closed martijnthe closed 6 years ago
It shouldn't be that hard. Just create a modbus-rtu-server.js and handle everything like it is done in the modbus TCP server. You need an RTU request handler and also, like you said, a createPayload method in the RTUResponse.
If I remember correctly than there is no handshake in RTU so you don't need to remember new clients.
hi Stefan,
Looking at the code, RTU server is not supported today, correct?
Do you have some thoughts on how to restructure the code to add support for it?
I started reading through the code a bit. My notes so far:
fromRequest(request, server)
method inResponseFactory
(https://github.com/Cloud-Automation/node-modbus/blob/master/src/response/response-factory.js#L16)createPayload
method toModbusRTUResponse
.