Server
to implement a server
#include "modbus/server.h"
class Registers : public ModbusRegisters
{
//implement the registers supporting the ModbusRegisters interface
//probably with a mutex as the server runs on a different thread
};
Registers regs; //create a instance of the registers class
ModbusServer s(ModbusDefaultPort,regs); //instanciate the server,
//passing the port and the registers to use
Client
to implement a client
Messages are implemented in protocol.h.
//A client interface is not implemented yet.