libmodbus base on v3.1.10

Stéphane Raimbault 5c14f13944 Add polar.sh to FUNDING преди 1 година
.github 5c14f13944 Add polar.sh to FUNDING преди 1 година
docs 3f9f17e228 Minor to docs преди 1 година
m4 c83fd17927 Fix m4 warnings from autotools преди 12 години
src 196ae76052 Free addrinfo struct on getaddrinfo() errors преди 1 година
tests 2cbafa3113 Bump version to 3.1.10 преди 2 години
.appveyor.yml c409cf9a44 Add appveyor.com config преди 5 години
.clabot b25629bfb5 Update CLA преди 2 години
.clang-format dd45f19a6e Add .clang-format and format code (closes #394) преди 2 години
.editorconfig 56d1d95d4f Replace .dir-locals.el (Emacs) by .editorconfig преди 3 години
.gitignore da87669697 Rewrite documentation with Material for mkdocs преди 2 години
AUTHORS 55d8e2c024 Add Jakob to AUTHORS with Contributor License Agreement преди 9 години
CODE_OF_CONDUCT.md 076992fb86 Create CODE_OF_CONDUCT.md преди 6 години
CONTRIBUTING.md b9488b2c45 Minor adjustments to MD files преди 2 години
COPYING.LESSER 12753875b5 Revert libmodbus licence from LGPLv3 to LGPLv2.1 преди 13 години
ISSUE_TEMPLATE.md b9488b2c45 Minor adjustments to MD files преди 2 години
Makefile.am 987d5af149 Move migration content to libmodbus.org преди 2 години
NEWS 2cbafa3113 Bump version to 3.1.10 преди 2 години
README.md 9a7ea12928 Instructions to build libmodbus in a VS project преди 2 години
SECURITY.md bd1c85f2d3 Add SECURITY.md (closes #613) преди 3 години
autogen.sh 6ab18dddb3 Have autogen.sh fail if autoreconf fails преди 2 години
configure.ac 2cbafa3113 Bump version to 3.1.10 преди 2 години
libmodbus.pc.in 63871ff304 Add modbus directory to include path of pkg-config file преди 14 години
mkdocs.yml da87669697 Rewrite documentation with Material for mkdocs преди 2 години

README.md

A groovy modbus library

Build Status

Overview

libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol. This library can use a serial port or an Ethernet connection.

The functions included in the library have been derived from the Modicon Modbus Protocol Reference Guide which can be obtained from www.modbus.org.

The license of libmodbus is LGPL v2.1 or later.

The official website is www.libmodbus.org. The website contains the latest version of the documentation.

The library is written in C and designed to run on Linux, Mac OS X, FreeBSD, Embox, QNX and Windows.

You can use the library on MCUs with Embox RTOS.

Installation

You will only need to install automake, autoconf, libtool and a C compiler (gcc or clang) to compile the library and asciidoc and xmlto to generate the documentation (optional).

To install, just run the usual dance, ./configure && make install. Run ./autogen.sh first to generate the configure script if required.

You can change installation directory with prefix option, eg. ./configure --prefix=/usr/local/. You have to check that the installation library path is properly set up on your system (/etc/ld.so.conf.d) and library cache is up to date (run ldconfig as root if required).

The library provides a libmodbus.pc file to use with pkg-config to ease your program compilation and linking.

If you want to compile with Microsoft Visual Studio, you should follow the instructions in ./src/win32/README.md.

To compile under Windows, install MinGW and MSYS then select the common packages (gcc, automake, libtool, etc). The directory ./src/win32/ contains a Visual C project.

To compile under OS X with homebrew, you will need to install the following dependencies first: brew install autoconf automake libtool.

To build under Embox, you have to use its build system.

Testing

Some tests are provided in tests directory, you can freely edit the source code to fit your needs (it's Free Software :).

See tests/README for a description of each program.

For a quick test of libmodbus, you can run the following programs in two shells:

  1. ./unit-test-server
  2. ./unit-test-client

By default, all TCP unit tests will be executed (see --help for options).

It's also possible to run the unit tests with make check.

To report a bug or to contribute

See CONTRIBUTING document.

Documentation

You can serve the local documentation with:

pip install mkdocs-material
mkdocs serve