pub trait ModbusServer {
// Required methods
fn receive(&self, request: &mut [u8]) -> Result<i32, Error>;
fn reply(
&self,
request: &[u8],
request_len: i32,
modbus_mapping: &ModbusMapping,
) -> Result<i32, Error>;
}
Expand description
The server is waiting for request from clients and must answer when it is concerned by the request. The libmodbus offers the following functions to handle requests:
- Receive
- Reply