Commit Graph

206 Commits

Author SHA1 Message Date
maxlemo
6368841c2b fix test 2023-08-02 12:22:29 -04:00
maxlemo
efefe26a0a uncomment other tests 2023-08-02 11:52:06 -04:00
maxlemo
71818afd59 add minimal test 2023-08-02 11:51:03 -04:00
maxlemo
e3b13ccdd1 adds fc23 server code 2023-08-02 11:11:14 -04:00
maxlemo
5991219763 add fc23 2023-08-02 10:57:17 -04:00
Valerio De Benedetto
9f6b24e03f
Merge pull request #35 from arhiv6/file_record
Add registers count checking for file_read and file_write operations
2023-07-19 16:54:09 +02:00
Vyacheslav Verkhovin
8dafc721fa Add registers count checking for file_read and file_write operations
MODBUS Application Protocol Specification does not require it explicitly
but without this checking PDU of a request or response may exceed 253 bytes.
2023-07-14 00:54:49 +07:00
Valerio De Benedetto
bd302660b6 Merge remote-tracking branch 'arhiv6/file_record' 2023-07-13 09:04:27 +02:00
Valerio De Benedetto
e3456986b5 Using VLA where possible 2023-07-11 14:07:55 +02:00
Arne Hoch
b884081eff FIX incorrect calculation of payload bytes 2023-07-11 13:52:42 +02:00
Vyacheslav Verkhovin
d391300654 Fixed function handle_read_file_record() logic according to specification
According to MODBUS specification we must finish checking all checks
before starting processing subrequests.
2023-07-06 19:43:20 +07:00
Valerio De Benedetto
ae6a93c963 Changes for SDCC 3.9.0 compatibility, part 2 2023-07-06 08:14:25 +02:00
Valerio De Benedetto
a08d59c5f0 Changes for SDCC 3.9.0 compatibility 2023-07-03 16:47:26 +02:00
Valerio De Benedetto
92b95be241 Updated arduino examples 2023-07-02 16:43:44 +02:00
Valerio De Benedetto
2e36f024bc Various fixes 2023-06-30 10:49:05 +02: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
cbd4fa69fb Updated gitignore 2023-06-29 11:14:40 +02: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
44f3191735 Minor fixes 2023-06-01 18:29:23 +02:00
Valerio De Benedetto
0d6a5274f3 Various fixes 2023-05-25 12:16:17 +02:00
Valerio De Benedetto
f8f8fd00b1 Handling foreign RTU messages 2023-05-16 16:38:04 +02:00
Valerio De Benedetto
2d1ea540ca
Merge pull request #25 from JanX2/master
Fix Clang static analyser nit: zero out nmbs_bitfield structs.
2023-04-21 10:53:08 +02:00
Jan Weiß
f7dfbd94ab Fix Clang static analyser nit: zero out nmbs_bitfield structs. 2023-04-17 18:44:59 +02:00
Valerio De Benedetto
920d25858d Rename of DEBUG() macro to NMBS_DEBUG_PRINT() 2023-03-15 15:12:33 +01:00
Valerio De Benedetto
8493fc5267 Refactoring of NMBS_*_DISABLED defines 2023-03-15 15:08:18 +01:00
Valerio De Benedetto
f70fbd5260 Endianness-independent code 2023-03-13 12:30:32 +01:00
Valerio De Benedetto
2feb8b639e Fix to server-tcp linux example 2023-03-13 12:19:47 +01:00
Valerio De Benedetto
55fedaa3cc
Repository traffic workflow test 3 2023-02-11 10:29:15 +01:00
Valerio De Benedetto
81870dc1f2
Repository traffic workflow test 2 2023-02-11 10:23:38 +01:00
Valerio De Benedetto
129bac58e1
Repository traffic workflow test 2023-02-11 10:19:11 +01:00
Valerio De Benedetto
23ddf89409
Update README.md 2023-01-23 20:18:27 +01:00
Valerio De Benedetto
c96d6e63a0 Added clang-format check workflow 2023-01-23 18:43:11 +01:00
Valerio De Benedetto
9964a63d49
Merge pull request #19 from BenjaminPritchard/win32_examples
initial commit; add win32 example
2023-01-23 18:24:58 +01:00
benjamin pritchard
b2b91cc35f fixed x64 project settings to target console subsystem 2023-01-23 11:52:55 -05:00
benjamin pritchard
8c0fafaf70 initial commit; add win32 example 2023-01-17 19:40:16 -05:00
Valerio De Benedetto
98814d2a66 Formatting 2022-12-28 15:05:56 +01:00
Valerio De Benedetto
c654babb52 clang-tidy 2022-12-28 15:02:51 +01:00
Valerio De Benedetto
f2b6ddda71 Fix to data pointer type of raw_pdu functions 2022-12-28 14:10:06 +01:00
Antonio Aguilera
fa02201710 Fix Wswitch-enum and Wcast-qual compiler warnings
The function nmbs_strerror does not handle the error code
NMBS_ERROR_INVALID_UNIT_ID inside the switch statement, which triggers
the GCC/Clang Wswitch-enum warning. Adding a new case inside the switch
statement solves this warning.

There is a cast from a const void pointer to an uint8_t pointer inside
the function nmbs_send_raw_pdu, which triggers the GCC/Clang Wcast-qual
warning. Adding the missing const qualifier solves this warning.
2022-12-27 20:42:36 +01:00
Valerio De Benedetto
b4172c8fef
Merge pull request #17 from jonathangjertsen/macros-to-funcs
Convert `get_` and `put_` to functions
2022-07-29 12:36:16 +02:00
jonath.re@gmail.com
70c75cb2db Convert get_ and put_ to functions
This shaves off about 1 kB of flash usage from my client application.
It is also more type safe, which is nice.
2022-07-29 12:19:42 +02:00
Valerio De Benedetto
22fae7da9c
Enabled CI on pull requests 2022-07-29 10:58:54 +02:00
Valerio De Benedetto
074cdf3d86 Merge branch 'ci-arduino' 2022-07-25 15:34:37 +02:00
Valerio De Benedetto
d3381b2950 Proper setting of defines in tests 2022-07-25 15:20:09 +02: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
Valerio De Benedetto
5b685c9d97 Minor fixes 2022-07-25 12:47:11 +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
949cad80cf Compile Arduino examples in CI 2022-07-22 18:46:37 +02:00