diff --git a/README.md b/README.md index d41e5f7..c8be6eb 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ as manual pages after installation. The documentation is based on [AsciiDoc](http://www.methods.co.nz/asciidoc/). Only man pages are built -by default with `make` command, you can run `make htmldoc` in *docs* directory +by default with `make` command, you can run `make htmldoc` in *doc* directory to generate HTML files. Testing @@ -87,4 +87,4 @@ It's also possible to run the unit tests with `make check`. To report a bug or to contribute -------------------------------- -See [CONTRIBUTING](CONTRIBUTING.md) document. \ No newline at end of file +See [CONTRIBUTING](CONTRIBUTING.md) document. diff --git a/doc/libmodbus.txt b/doc/libmodbus.txt index d7af689..5c84448 100644 --- a/doc/libmodbus.txt +++ b/doc/libmodbus.txt @@ -223,20 +223,25 @@ Reply an exception:: Server ~~~~~~ The server is waiting for request from clients and must answer when it is -concerned by the request. The libmodbus offers the following functions to -handle requests: +concerned by the request. -Data mapping: - linkmb:modbus_mapping_new[3] - linkmb:modbus_mapping_free[3] +In TCP mode, you must not use the usual linkmb:modbus_connect[3] to establish the connection but a pair of accept/listen calls:: + linkmb:modbus_tcp_listen[3] + linkmb:modbus_tcp_accept[3] + linkmb:modbus_tcp_pi_listen[3] + linkmb:modbus_tcp_pi_accept[3] -Receive:: +then the data can be received with:: linkmb:modbus_receive[3] -Reply:: +and a response can be send with:: linkmb:modbus_reply[3] linkmb:modbus_reply_exception[3] +To handle the mapping of your Modbus data, you must use: + linkmb:modbus_mapping_new[3] + linkmb:modbus_mapping_free[3] + ERROR HANDLING -------------- diff --git a/doc/modbus_tcp_listen.txt b/doc/modbus_tcp_listen.txt index a88443b..640bbbb 100644 --- a/doc/modbus_tcp_listen.txt +++ b/doc/modbus_tcp_listen.txt @@ -17,7 +17,7 @@ DESCRIPTION The *modbus_tcp_listen()* function shall create a socket and listen to maximum _nb_connection_ incoming connections on the specified IP address. The context _ctx _must be allocated and initialized with linkmb:modbus_new_tcp[3] before to -set the IP address to listen, if IP address is set to NULL, any addresses will be +set the IP address to listen, if IP address is set to NULL or '0.0.0.0', any addresses will be listen. diff --git a/doc/modbus_tcp_pi_listen.txt b/doc/modbus_tcp_pi_listen.txt index a4df960..2a501ee 100644 --- a/doc/modbus_tcp_pi_listen.txt +++ b/doc/modbus_tcp_pi_listen.txt @@ -17,7 +17,7 @@ DESCRIPTION The *modbus_tcp_pi_listen()* function shall create a socket and listen to maximum _nb_connection_ incoming connections on the specified nodes. The context *ctx* must be allocated and initialized with linkmb:modbus_new_tcp_pi[3] -before to set the node to listen, if node is set to NULL, any addresses will be +before to set the node to listen, if node is set to NULL or '0.0.0.0', any addresses will be listen.