1

I am involved in project where I am implementing a gateway functionality in C by using libmodbus library. On the server side I am trying to read a device using modbus_read_input_registers() function. Now I want to send the received message from the actual device to the master/client over tcp. I can already send the request from the master/client and receive it on the gateway device. I check the function code and the address and read the device respectively. Once I get the response from the device succesfully I want to send the response back to the client. I am having the following queries:

  1. Can I use the modbus_mapping_new() or mapping data variable for sending the response to the master/client?
  2. Is there any other way of sending the response to the client?
dr.jones
  • 11
  • 3

0 Answers0