Skip to content

Commit

Permalink
[doc] Add entry points for accept/listen in libmodbus index
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed Mar 2, 2017
1 parent 269e943 commit a002b38
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
19 changes: 12 additions & 7 deletions doc/libmodbus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------
Expand Down
2 changes: 1 addition & 1 deletion doc/modbus_tcp_listen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down
2 changes: 1 addition & 1 deletion doc/modbus_tcp_pi_listen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand Down

0 comments on commit a002b38

Please sign in to comment.