Valerio De Benedetto
979f66fac0
Changes to nmbs_bitfield after merge
2025-06-26 23:37:48 +02:00
Valerio De Benedetto
6605f9162e
Merge remote-tracking branch 'ntfreak/configure_coil_max_support'
2025-06-26 23:30:42 +02:00
arwa
99c59c2266
optmized nmbs_bitfield_write
2025-06-15 00:55:18 -04:00
arwa
2d8fee908c
optmized nmbs_bitfield_write
2025-06-15 00:44:46 -04:00
arwa
b5fde1c6b3
optmized the following macros: nmbs_bitfield_read, nmbs_bitfield_set, nmbs_bitfield_unset, nmbs_bitfield_write
2025-06-14 23:24:52 -04:00
Spencer Oliver
d3ac9c1696
coils: ability to configure number of supported coils
...
No change to current default behaviour of allocating 2000 coils.
However memory usage can be reduced by defining NMBS_MAX_COILS.
2025-05-10 16:54:09 +01:00
Valerio De Benedetto
a6f61b67b4
Better handling of received TCP messages, better flushing on error
2024-12-08 11:20:15 +01:00
Valerio De Benedetto
85dd33d6dc
Better docs for platform funcs' byte_timeout_ms
2024-11-25 13:30:51 +01:00
Valerio De Benedetto
7e4ef3e97e
Fixes to rp2040 example
2024-09-20 15:32:03 +02:00
Valerio De Benedetto
5729bafbbd
Formatting after merge
2024-09-20 14:12:36 +02:00
Stefan Becker
ed53826382
Improve dead code flagging
...
- nanomodbus.c: silence GCC -Wunused-function warnings
- nanomodbus.h: fix compilation errors when only READ_WRITE_REGISTER
function is included
2024-09-20 14:12:12 +02:00
Valerio De Benedetto
8fafaa3bfe
New *_create() APIs
2024-07-24 17:48:17 +02:00
Valerio De Benedetto
363e7f7480
Minor fixes for clangd warnings
2024-04-11 12:46:24 +02:00
Valerio De Benedetto
a25ee5781a
FC 43 / 14 Read Device Identification
2024-02-10 03:13:28 +01:00
Valerio De Benedetto
dccaa4f432
WIP FC 43 / 14 Read Device Identification
2024-02-10 02:47:31 +01:00
Valerio De Benedetto
dde2653cb8
WIP buffer overflow on received data
2024-02-08 10:00:50 +01:00
Valerio De Benedetto
8a0f4af727
Updated README for server callbacks args
2023-12-07 13:24:38 +01:00
Hossein.M
8aca15dfc9
Add argument for callbacks structure
2023-12-06 10:03:29 +03:30
Valerio De Benedetto
7550fe9587
Fixes after FC23 merge
2023-08-14 20:50:49 +02:00
maxlemo
5991219763
add fc23
2023-08-02 10:57:17 -04:00
Vyacheslav Verkhovin
e5b51cc4e7
Add File Records functions
...
Add both File Records functions (0x14 Read and 0x15 Write) for Client
and Server roles. Also, add a little tests and example.
Resolves: [#1 ] and [#24 ]
2023-06-30 10:11:32 +07:00
Valerio De Benedetto
9533e1e035
RTU unit_id documentation
2023-06-29 11:14:11 +02:00
Valerio De Benedetto
2da601fd80
RTU unit_id in server callbacks
2023-06-26 13:18:24 +02:00
Valerio De Benedetto
8493fc5267
Refactoring of NMBS_*_DISABLED defines
2023-03-15 15:08:18 +01:00
Valerio De Benedetto
98814d2a66
Formatting
2022-12-28 15:05:56 +01:00
Valerio De Benedetto
f2b6ddda71
Fix to data pointer type of raw_pdu functions
2022-12-28 14:10:06 +01:00
Valerio De Benedetto
fd101fe77f
Various fixes to NMBS_SERVER_* defines handling
2022-07-25 15:17:47 +02:00
Valerio De Benedetto
c12ba4b8a3
Merge branch 'callback-arg'
...
# Conflicts:
# nanomodbus.c
# nanomodbus.h
2022-07-25 12:59:40 +02:00
jonath.re@gmail.com
80fa8ef4ae
Send platform argument to nmbs_callbacks
...
This is useful for the same reasons as the arg is useful in the platform callbacks.
2022-07-22 19:19:04 +02:00
jonath.re@gmail.com
17aa0ca226
Support disabling individual server callbacks
...
This helps reduce code size for systems that do not implement the full
set of function codes supported by the library.
2022-07-22 17:14:32 +02:00
Valerio De Benedetto
037de71d9b
Returning NMBS_ERROR_INVALID_UNIT_ID in case of invalid unit ID in response
2022-06-26 11:08:16 +02:00
Valerio De Benedetto
30c7ce3854
Moved nmbs_crc_calc() declaration
2022-06-26 09:26:07 +02:00
Valerio De Benedetto
4b613aa03d
Merge pull request #13 from jonathangjertsen/expose-crc
...
Expose the function that calculates CRC
2022-06-26 09:17:27 +02:00
jonath.re@gmail.com
f22b06082e
Expose the function that calculates CRC
...
Having access to this function is useful in a variety of cases:
- hand-crafting PDUs for unit tests
- implementing extensions of the protocol
- reusing the code for other purposes (e.g. firmware integrity check)
2022-06-25 17:17:34 +02:00
Jonathan Reichelt Gjertsen
53a6a64f9b
Update wording in comment for nmbs_client_create and nmbs_server_create
2022-06-24 19:06:37 +02:00
Jonathan Reichelt Gjertsen
3a1170b925
Document that the platform configuration and callbacks can be discarded after initialization
...
`nmbs_client_create` accepts a `const nmbs_platform_conf* platform_conf` with configuration. Without reading the source code, it is not clear whether or not the object pointed to by `platform_conf` can be declared on the stack, or if it needs to be kept alive for the duration of the program (as would be the case if the implementation simply kept a pointer to the configuration instead of copying it by value). This PR adds an assurance that it is OK to discard the platform configuration after calling `nmbs_client_create`. Same idea for `nmbs_server_create`.
2022-06-07 19:29:04 +02:00
Valerio De Benedetto
a8bf7428cc
Updated docstrings
2022-06-02 11:59:45 +02:00
Valerio De Benedetto
83fb04392b
Fixes to integer types
2022-06-02 11:52:10 +02:00
Valerio De Benedetto
b6fee48160
Switch to multibyte transport read/write funcs, removed sleep
2022-06-02 10:53:32 +02:00
Valerio De Benedetto
afcdae0ec8
Formatting
2022-05-12 19:29:51 +02:00
Valerio De Benedetto
271f689771
Added NMBS_ERROR_CRC and NMBS_ERROR_INVALID_TCP_MBAP nmbs_error
2022-05-12 19:28:50 +02:00
Jonathan Reichelt Gjertsen
8433fa047f
Support C++
...
Wrapping the header file in an `extern "C"` block prevents C++ compilers from mangling the function names.
2022-05-10 15:52:56 +02:00
Valerio De Benedetto
ac66269cda
Better docs for platform functions
2022-04-30 13:52:13 +02:00
Valerio De Benedetto
9d2918b3bb
Switch to MIT license
2022-04-30 13:03:36 +02:00
Valerio De Benedetto
5358abde7b
Support to NMBS_CLIENT_DISABLED and NMBS_SERVER_DISABLED defines
2022-04-24 13:53:40 +02:00
Valerio De Benedetto
ee6dd565d4
Added license headers
2022-01-25 16:35:19 +01:00
Valerio De Benedetto
1d0321b285
Project rename
2022-01-25 00:37:54 +01:00