Skip to content

Framework to route MODBUS 485 signals between a central application and (a lot) of serial ports/devices.

Notifications You must be signed in to change notification settings

pythcoiner/modbus_router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modbus Router Library

The Modbus Router Library is a Rust framework designed to facilitate the routing of Modbus RTU (RS485) requests between a central application and multiple serial devices (VFD, Joystick, etc...) dispached on severals ports. This library is modular, allowing users to extend functionality easily by adding new device types and communication protocols.

Structure

structure

  • Router: The router is the single communication interface between the application and the devices states, it should implement Routing trait. A router implementation for stdin/stdout can be found here. A python implementation for a client connecting to the router via stdin/stdout can be found here.
  • External Request/Responses: Requests/Responses between application and Router should implement RequestFn & ResponseFn traits. Example implementation can be found here.
  • Device: Devices are representing devices states, multiple devices states can be managed for a single serial port. Device should implement the Device trait. Examples implementations can be found in devices folder.
  • Device Encoders: Encoders purpose is to convert Device Request/Responses into serial raw data. Encoder should implement the DeviceEncoder trait. Examples implementations are available in devices folder.
  • Pollers: There is one poller for each serial port, the role of the poller is to loop poll on every device state in order to dispach their request on the serial port and return back responses to device states. Pollers should implement the Polling trait, an example implementation to interract with serial-thread can be found here.

Example

A simple example can be found here

About

Framework to route MODBUS 485 signals between a central application and (a lot) of serial ports/devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published