eriknyquist/modbus
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Dependencies
------------
libmodbus
uuidgen
Installing dependencies
-----------------------
apt-get install libmodbus5
apt-get install libmodbus-dev
apt-get install uuid-runtime
Compiling
---------
run 'make' to build mbd daemon.
$ make
If you want to build a version of the daemon that performs no modbus
communication, use 'nomodbus' target:
$ make nomodbus
run either of these targets followed by the 'install' target to install the
program.
$ make install
The install target performs the following actions:
* Copy the compiled executable file into /usr/bin
* Copy the sample configuration file to /etc/mbd.conf
* Generate a UUID, using 'genuuid', and place it into a file /uuid
* Create the default sensor log directory /home/sensordata
None of the above files or directories will be overwritten if they already
exist, EXCEPT for the compiled executable file in /usr/bin, which will always be
overwritten.
Running tests
-------------
The tests included are very basic- some simple regression tests to help ensure
that configuration file parsing and other initialisation routines don't break
during development, and some unit tests to ensure the most important (and error
prone) pieces are working correctly. It's a good idea to run them before and
after making any changes (none of the tests use any of the libmodbus functions,
so build using the 'nomodbus' target before running tests).
$ make nomodbus
$ make test
The default values in the sample configuration file placed in '/etc/mbd.conf'
almost certainly won't do what you want them to, so please inspect the file and
set all parameters to appropriate values.