I am using the modbus-tk to build a modbustcp server. The data needed to be sent is larger than the limit of modbus, so i need to split it up and send it several times. And i want to write a loop at the master to ask the server several times to get complete data.
Here is the problem. When the server in modbus_tk receive the message form master, it will send the data to master directly, but I dont know when it happens.
Is there a function that flags when the TCPServer receives a message or sends a part of the data? So i can use the flag to update the data to which needed to be sent every times after server sent data.
Actually, I have solved this problem. I found the developer had set up some hooks for users, which can easily implement the functions I mentioned above.
I am using the modbus-tk to build a modbustcp server. The data needed to be sent is larger than the limit of modbus, so i need to split it up and send it several times. And i want to write a loop at the master to ask the server several times to get complete data. Here is the problem. When the server in modbus_tk receive the message form master, it will send the data to master directly, but I dont know when it happens. Is there a function that flags when the TCPServer receives a message or sends a part of the data? So i can use the flag to update the data to which needed to be sent every times after server sent data.