Skip to content

Commit dbffaee

Browse files
authored
Merge branch 'stephane:master' into master
2 parents a83083b + b25629b commit dbffaee

22 files changed

+36
-34
lines changed

.clabot

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
"sirsoweird",
2626
"taikiakita",
2727
"vvck",
28-
"woodsnake"
28+
"woodsnake",
29+
"vancepym",
30+
"mek-x"
2931
],
3032
"message": "We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient..."
3133
}

docs/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Modbus specification, instead all bytes are sent as fast as possible and a
7777
response or an indication is considered complete when all expected characters
7878
have been received. This implementation offers very fast communication but you
7979
must take care to set a response timeout of slaves less than response timeout of
80-
master (ortherwise other slaves may ignore master requests when one of the slave
80+
master (otherwise other slaves may ignore master requests when one of the slaves
8181
is not responding).
8282

8383
To create a Modbus RTU context, you should use [modbus_new_rtu](modbus_new_rtu.md).
@@ -107,7 +107,7 @@ communications over TCP IPv4 and IPv6 networks. It does not require a checksum
107107
calculation as lower layer takes care of the same.
108108

109109
Contrary to the TCP IPv4 only backend, the TCP PI backend offers hostname
110-
resolution but it consumes about 1Kb of additional memory.
110+
resolution but it consumes about 1 kB of additional memory.
111111

112112
Create a Modbus TCP PI context, you should use [modbus_new_tcp_pi](modbus_new_tcp_pi.md).
113113

docs/modbus_free.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void modbus_free(modbus_t *ctx);
1212
1313
## Description
1414
15-
The *modbus_free()* function shall free an allocated modbus_t structure.
15+
The *modbus_free()* function shall free an allocated *modbus_t* structure.
1616
1717
## Return value
1818

docs/modbus_get_byte_from_bits.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ uint8_t modbus_get_byte_from_bits(const uint8_t *src, int index, unsigned int nb
1414
1515
The *modbus_get_byte_from_bits()* function shall extract a value from many
1616
bits. All `nb_bits` bits from `src` at position `index` will be read as a
17-
single value. To obtain a full byte, set nb_bits to 8.
17+
single value. To obtain a full byte, set `nb_bits` to 8.
1818
1919
## Return value
2020

docs/modbus_get_header_length.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int modbus_get_header_length(modbus_t *ctx);
1414
1515
The *modbus_get_header_length()* function shall retrieve the current header
1616
length from the backend. This function is convenient to manipulate a message and
17-
so its limited to low-level operations.
17+
so it's limited to low-level operations.
1818
1919
## Return value
2020

docs/modbus_mapping_free.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ void modbus_mapping_free(modbus_mapping_t *mb_mapping);
1212
1313
## Description
1414
15-
The function shall free the four arrays of mb_mapping_t structure and finally
16-
the mb_mapping_t referenced by `mb_mapping`.
15+
The function shall free the four arrays of *modbus_mapping_t* structure and finally
16+
the *modbus_mapping_t* itself referenced by `mb_mapping`.
1717
1818
## Return value
1919

docs/modbus_mapping_new.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ modbus_mapping_t* modbus_mapping_new(int nb_bits, int nb_input_bits, int nb_regi
1414
1515
The *modbus_mapping_new()* function shall allocate four arrays to store bits,
1616
input bits, registers and inputs registers. The pointers are stored in
17-
modbus_mapping_t structure. All values of the arrays are initialized to zero.
17+
*modbus_mapping_t* structure. All values of the arrays are initialized to zero.
1818
1919
This function is equivalent to a call of the
2020
[modbus_mapping_new_start_address](modbus_mapping_new_start_address.md) function

docs/modbus_mapping_new_start_address.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ modbus_mapping_t* modbus_mapping_new_start_address(
1818
1919
The `modbus_mapping_new_start_address()` function shall allocate four arrays to
2020
store bits, input bits, registers and inputs registers. The pointers are stored
21-
in modbus_mapping_t structure. All values of the arrays are initialized to zero.
21+
in *modbus_mapping_t* structure. All values of the arrays are initialized to zero.
2222
2323
The different starting addresses make it possible to place the mapping at any
24-
address in each address space. This way, you can give access to the clients at
24+
address in each address space. This way, you can give access to clients to
2525
values stored at high addresses without allocating memory from the address zero,
26-
for eg. to make available registers from 340 to 349, you can use:
26+
for example to make available registers from 340 to 349, you can use:
2727
2828
```c
2929
mb_mapping = modbus_mapping_new_start_address(0, 0, 0, 0, 340, 10, 0, 0);

docs/modbus_new_tcp.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ modbus_t *modbus_new_tcp(const char *ip, int port);
1212
1313
## Description
1414
15-
The *modbus_new_tcp()* function shall allocate and initialize a modbus_t
15+
The *modbus_new_tcp()* function shall allocate and initialize a *modbus_t*
1616
structure to communicate with a Modbus TCP IPv4 server.
1717
1818
The `ip` argument specifies the IP address of the server to which the client
1919
wants to establish a connection. A NULL value can be used to listen any addresses in
2020
server mode.
2121
2222
The `port` argument is the TCP port to use. Set the port to
23-
`MODBUS_TCP_DEFAULT_PORT` to use the default one (502). Its convenient to use a
24-
port number greater than or equal to 1024 because its not necessary to have
23+
`MODBUS_TCP_DEFAULT_PORT` to use the default one (502). It's convenient to use a
24+
port number greater than or equal to 1024 because it's not necessary to have
2525
administrator privileges.
2626
2727
## Return value

docs/modbus_new_tcp_pi.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ modbus_new_tcp_pi - create a libmodbus context for TCP Protocol Independent
1212
1313
## Description
1414
15-
The *modbus_new_tcp_pi()* function shall allocate and initialize a modbus_t
15+
The *modbus_new_tcp_pi()* function shall allocate and initialize a *modbus_t*
1616
structure to communicate with a Modbus TCP IPv4 or IPv6 server.
1717
1818
The `node` argument specifies the host name or IP address of the host to connect
@@ -21,8 +21,8 @@ listen any addresses in server mode.
2121
2222
The `service` argument is the service name/port number to connect to. To use the
2323
default Modbus port, you can provide an NULL value or the string "502". On many
24-
Unix systems, its convenient to use a port number greater than or equal to 1024
25-
because its not necessary to have administrator privileges.
24+
Unix systems, it's convenient to use a port number greater than or equal to 1024
25+
because it's not necessary to have administrator privileges.
2626
2727
:octicons-tag-24: v3.1.8 handles NULL value for `service` (no *EINVAL* error).
2828

docs/modbus_read_input_bits.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int modbus_read_input_bits(modbus_t *ctx, int addr, int nb, uint8_t *dest);
1313
## Description
1414
1515
The *modbus_read_input_bits()* function shall read the content of the `nb` input
16-
bits to the address `addr` of the remote device. The result of reading is stored
16+
bits to the address `addr` of the remote device. The result of reading is stored
1717
in `dest` array as unsigned bytes (8 bits) set to `TRUE` or `FALSE`.
1818
1919
You must take care to allocate enough memory to store the results in `dest`

docs/modbus_receive.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int modbus_receive(modbus_t *'ctx', uint8_t *'req');
1313
## Description
1414
1515
The *modbus_receive()* function shall receive an indication request from the
16-
socket of the context `ctx`. This function is used by Modbus slave/server to
16+
socket of the context `ctx`. This function is used by a Modbus slave/server to
1717
receive and analyze indication request sent by the masters/clients.
1818
1919
If you need to use another socket or file descriptor than the one defined in the

docs/modbus_reply.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ modbus mapping `mb_mapping` according to the type of the manipulated data.
2121
2222
If an error occurs, an exception response will be sent.
2323
24-
This function is designed for Modbus server.
24+
This function is designed for Modbus servers.
2525
2626
## Return value
2727

docs/modbus_rtu_get_rts.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ This function can only be used with a context using a RTU backend.
2323
2424
## Return value
2525
26-
The function shall return the current RTS mode if successful. Otherwise it shall
27-
return -1 and set errno.
26+
The function shall return the current RTS mode if successful. Otherwise it
27+
shall return -1 and set errno to one of the values defined below.
2828
2929
## Errors
3030

docs/modbus_rtu_get_rts_delay.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ This function can only be used with a context using a RTU backend.
1919
2020
## Return value
2121
22-
The `modbus_rtu_get_rts_delay()` function shall return the current RTS delay in
23-
microseconds if successful. Otherwise it shall return -1 and set errno.
22+
The function shall return the current RTS delay in microseconds if successful.
23+
Otherwise it shall return -1 and set errno to one of the values defined below.
2424
2525
## Errors
2626

docs/modbus_rtu_get_serial_mode.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ int modbus_rtu_get_serial_mode(modbus_t *ctx);
1515
The *modbus_rtu_get_serial_mode()* function shall return the serial mode
1616
currently used by the libmodbus context:
1717
18-
- **MODBUS_RTU_RS232**, the serial line is set for RS232 communication. RS-232
18+
- **MODBUS_RTU_RS232**, the serial line is set for RS-232 communication. RS-232
1919
(Recommended Standard 232) is the traditional name for a series of standards
2020
for serial binary single-ended data and control signals connecting between a
2121
DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment).
2222
It is commonly used in computer serial ports
2323
24-
- **MODBUS_RTU_RS485**, the serial line is set for RS485 communication. EIA-485,
24+
- **MODBUS_RTU_RS485**, the serial line is set for RS-485 communication. EIA-485,
2525
also known as TIA/EIA-485 or RS-485, is a standard defining the electrical
2626
characteristics of drivers and receivers for use in balanced digital
2727
multipoint systems. This standard is widely used for communications in

docs/modbus_rtu_set_rts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int modbus_rtu_set_rts(modbus_t *ctx, int mode)
1313
## Description
1414
1515
The *modbus_rtu_set_rts()* function shall set the Request To Send mode to
16-
communicate on a RS485 serial bus. By default, the mode is set to
16+
communicate on a RS-485 serial bus. By default, the mode is set to
1717
`MODBUS_RTU_RTS_NONE` and no signal is issued before writing data on the wire.
1818
1919
To enable the RTS mode, the values `MODBUS_RTU_RTS_UP` or `MODBUS_RTU_RTS_DOWN`

docs/modbus_rtu_set_serial_mode.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode);
1515
The *modbus_rtu_set_serial_mode()* function shall set the selected serial
1616
mode:
1717
18-
- **MODBUS_RTU_RS232**, the serial line is set for RS232 communication. RS-232
18+
- **MODBUS_RTU_RS232**, the serial line is set for RS-232 communication. RS-232
1919
(Recommended Standard 232) is the traditional name for a series of standards
2020
for serial binary single-ended data and control signals connecting between a
2121
DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment).
2222
It is commonly used in computer serial ports.
2323
24-
- **MODBUS_RTU_RS485**, the serial line is set for RS485 communication.
24+
- **MODBUS_RTU_RS485**, the serial line is set for RS-485 communication.
2525
EIA-485, also known as TIA/EIA-485 or RS-485, is a standard defining the
2626
electrical characteristics of drivers and receivers for use in balanced
2727
digital multipoint systems. This standard is widely used for communications

docs/modbus_set_error_recovery.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ expected one. The response timeout delay will be used to sleep.
3838
3939
The modes are mask values and so they are complementary.
4040
41-
It's not recommended to enable error recovery for slave/server.
41+
It's not recommended to enable error recovery for a Modbus slave/server.
4242
4343
## Return value
4444

docs/modbus_strerror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const char *modbus_strerror(int errnum);
1313
## Description
1414
1515
The *modbus_strerror()* function shall return a pointer to an error message
16-
string corresponding to the error number specified by the `errnum` argument. As
16+
string corresponding to the error number specified by the `errnum` argument. As
1717
libmodbus defines additional error numbers over and above those defined by the
1818
operating system, applications should use *modbus_strerror()* in preference to
1919
the standard *strerror()* function.

docs/modbus_tcp_listen.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection);
1414
## Description
1515
1616
The *modbus_tcp_listen()* function shall create a socket and listen to maximum
17-
`nb_connection` incoming connections on the specified IP address. The context
17+
`nb_connection` incoming connections on the specified IP address. The context
1818
`ctx` must be allocated and initialized with [modbus_new_tcp](modbus_new_tcp.md) before to
1919
set the IP address to listen, if IP address is set to NULL or '0.0.0.0', any addresses will be
2020
listen.

docs/modbus_tcp_pi_listen.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ int modbus_tcp_pi_listen(modbus_t *ctx, int nb_connection);
1313
## Description
1414
1515
The *modbus_tcp_pi_listen()* function shall create a socket and listen to
16-
maximum `nb_connection` incoming connections on the specified nodes. The
16+
maximum `nb_connection` incoming connections on the specified nodes. The
1717
context *ctx* must be allocated and initialized with [modbus_new_tcp_pi](modbus_new_tcp_pi.md)
1818
before to set the node to listen, if node is set to NULL or '0.0.0.0', any addresses will be
1919
listen.

0 commit comments

Comments
 (0)