Receives and parses Modbus packets and accesses the register and callback function according to the command.
When the function code is Read command, it will call the callback function first and then read the register back; when the function code is Write command, it will write the register first and then call the callback function; when the function code is ReadWrite command, it will write the register first and then call the Write callback function, then call the Read callback function and finally read the register back.
node1/node2: ModbusSlaveNode object.
buf: User-defined registry space.
size: The size of the self-defined space.
Int: The length of the received Modbus packets.
Please refer to the Modbus Slave example.
Libraries Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.