libmodbus base on v3.1.10

Stéphane Raimbault 3da2d01916 Bump version to 3.1.7 há 3 anos atrás
.github d22f72cbc0 Add FUNDING.yml há 3 anos atrás
doc ebc4f47886 Fix position of CC flags in documentation (closes #599) há 3 anos atrás
m4 c83fd17927 Fix m4 warnings from autotools há 12 anos atrás
src b4ef4c17d6 modbus_reply: fix copy & paste error in sanity check (fixes #614) há 3 anos atrás
tests 4dbef35516 Remove duplicate ';' (closes #602) há 3 anos atrás
.appveyor.yml c409cf9a44 Add appveyor.com config há 5 anos atrás
.clabot bcfd111486 Add .clabot há 3 anos atrás
.editorconfig 56d1d95d4f Replace .dir-locals.el (Emacs) by .editorconfig há 3 anos atrás
.gitignore 44b0083069 Add .vscode/ to .gitignore há 7 anos atrás
.travis.yml e2e22503bf Add travis hint file há 10 anos atrás
AUTHORS 55d8e2c024 Add Jakob to AUTHORS with Contributor License Agreement há 9 anos atrás
CODE_OF_CONDUCT.md 076992fb86 Create CODE_OF_CONDUCT.md há 6 anos atrás
CONTRIBUTING.md 7612ce2029 Github's contributing and issue template files há 8 anos atrás
COPYING.LESSER 12753875b5 Revert libmodbus licence from LGPLv3 to LGPLv2.1 há 13 anos atrás
ISSUE_TEMPLATE.md d25150ac61 Fix many typos há 3 anos atrás
MIGRATION d25150ac61 Fix many typos há 3 anos atrás
Makefile.am 26c851636f Install the NEWS and AUTHORS files há 3 anos atrás
NEWS 3da2d01916 Bump version to 3.1.7 há 3 anos atrás
README.md ae66153244 Update README.md há 3 anos atrás
SECURITY.md bd1c85f2d3 Add SECURITY.md (closes #613) há 3 anos atrás
acinclude.m4 333db8e12a Rewrite documentation macro and Makefile há 10 anos atrás
autogen.sh 1a4fb4eb8e Check return value of autoreconf. Thanks to Lauri Nurmi. há 11 anos atrás
configure.ac 3da2d01916 Bump version to 3.1.7 há 3 anos atrás
libmodbus.pc.in 63871ff304 Add modbus directory to include path of pkg-config file há 14 anos atrás

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 documentation is available as manual pages (man libmodbus to read general description and list of available functions) or Web pages www.libmodbus.org/documentation/. The documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 (Unported) (http://creativecommons.org/licenses/by-sa/3.0/).

The official website is www.libmodbus.org.

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 need to install https://github.com/chemeris/msinttypes to fill the absence of stdint.h.

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.

Documentation

The documentation is available online or as manual pages after installation.

The documentation is based on AsciiDoc. Only man pages are built by default with make command, you can run make htmldoc in doc directory to generate HTML files.

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.