https://github.com/alerighi/tinymodbus
A tiny, header-only, portable and compliant Modbus implementation, suitable for embedded systems
https://github.com/alerighi/tinymodbus
c embedded header-only modbus tiny
Last synced: 6 months ago
JSON representation
A tiny, header-only, portable and compliant Modbus implementation, suitable for embedded systems
- Host: GitHub
- URL: https://github.com/alerighi/tinymodbus
- Owner: alerighi
- License: mit
- Created: 2024-07-26T22:20:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-29T22:14:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T23:25:45.760Z (over 1 year ago)
- Topics: c, embedded, header-only, modbus, tiny
- Language: C
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tiny Modbus
**WARNING**: this is still an early-stage work inprogress!
A tiny, header-only, portable and compliant Modbus implementation, suitable for embedded systems.
## Goals
These are the goals of this library:
- portability: this library shall be easily ported on any system. It relies only on a few C standard library headers, and doesn't do any internal memory allocation
- correctness: this library is developed by implementing the exact specification of the Modbus protocol
- completeness: all the features of the Modbus specification are implemented
## Transport
The transport is the interface that must be implemented to connect the library to a TCP/IP socket or serial port.
It requires implementing only two functions: `read()` and `write()`, that have the typically API for a function that reads/writes to a serial port or socket.
## Posix transport
To simplify library usage on systems that have a POSIX API (such as Linux and UNIX-like OS, including macOS) a compatibility layer is added.
This layer is enabled only on such systems, allowing to create a transport without manually opening and configuring sockets and serial ports.