ModbusSlave is a modbus slave libary.
Build by standard C11 and can be used in Windows/Linux/embedded.
Had been tested in Windows (msys gcc 9.3) and Linux (Ubuntu 18.04 gcc 7.5).
Support ascii and rtu mode. Can be used in serial or tcp.
- 0x01
- 0x03
- 0x05
- 0x06
- 0x0F
- 0x10
Use Cmake to build.
$ cmake .
$ make
The unit testing suits is Unity.
The libary main function is frame_entry()
in src/frame.c
.
Test the libary:
$ ModbusSlave
Unit test the libary:
$ ModbusSlave test
MIT