Module modbus_mapping::simulator
source · Expand description
Traits and utilities to create device simulator (based on tokio-modbus servers examples)
Structs§
- Modbus data store to be used in IO operations for the simulation purposes.
- A raw Modbus input and holding registers representation
- Wrapper around Device needed because of tokio_modbus::server::Service.
Traits§
- Modbus device simulator trait. The type should use DataStore structure and keep it in sync with its holding and input register fields.
- Trait with complementary functionality to
crate::core::HoldingRegisterMapto linkRegistersto the type instance for the simulation purposes. - Trait with complementary functionality to
crate::core::InputRegisterMapto updateRegistersfrom the type instance for the simulation purposes.
Functions§
- Utility function to spawn and run simulator RTU simulator forever.
- Utility function to spawn and run simulator TCP simulator forever.