Trait modbus_mapping::simulator::Device
source · pub trait Device {
type InputRegisters: Default + InputRegisterModel;
type HoldingRegisters: Default + HoldingRegisterModel;
type Input;
// Required methods
fn service_call(
&mut self,
req: Request<'_>
) -> Ready<Result<Response, Error>>;
fn update_state(&mut self, input: Self::Input);
}Expand description
Modbus device simulator trait. The type should use DataStore structure and keep it in sync with its holding and input register fields.