Эх сурвалжийг харах

[doc] Add entry points for accept/listen in libmodbus index

Stéphane Raimbault 8 жил өмнө
parent
commit
a002b3897d

+ 2 - 2
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.
+See [CONTRIBUTING](CONTRIBUTING.md) document.

+ 12 - 7
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
 --------------

+ 1 - 1
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.
 
 

+ 1 - 1
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.