Replace strncpy with memcpy to eliminate warnings about potential
truncation of the NULL terminator. This warning is likely a false
positive, as the NULL terminator is explicitly appended after the copy
operation.
Change-Id: I47bf9cc312506e20dbcb5ebe1ae1ac05d3b742d5
- Remove old mbxreceive
- Rename mbxreceive2 to mbxreceive
- Add EoE to mbxreceive
- Refactor EoE to use dynamic mailbox handling
- Add mailbox status mapping to config overlap
- correct length calculations in send_process_data
Change-Id: Ia51402a8c73e59dfb6ed23d98916156f81b17103
This commit includes extensive changes across multiple files to
refactor the mailbox handling system and improve performance and
reliability in EtherCAT communication.
Update from Arthur Ketels 20240911.
Change-Id: I1177aea8b71156671a465473b7393af76be19c1c
* Fix single device inputs/outputs overruning segment size
* Refactor to pack segments tightly.
* Allow segments 2-64 to be EC_MAXLRWDATA bytes.
* Move wkc calcs into relevant config map functions.
* Only split slave data between segments when it is larger than one segment
* Only update wkc when we include data for the current device
Handle slaves having large mailboxes in bootstrap. Calculate data size
based on max mailbox size minus FOE overhead.
Change-Id: Ie62afcb278e6a9f84f8be004e1a2173b19673810
Don't overwrite the original pointer returned by ec_find_adapters(),
otherwise the linked list is leaked. Instead, save original pointer to
the head of the list use and `adapters` as a temporary variable. Pass
the original pointer to ec_free_adapters().
For win32, ec_free_adapters() was missing entirely.
This adds the option to build the soem library also as shared object.
Note that the default is untouched, so by default, it will still build
a static library.
The [BUILD_SHARED_LIBS](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html)
is the standard way of doing it, many tools use this semantics to influence
the output to be the desired type (whichever you want).
Signed-off-by: Matthias Schoepfer <matthias.schoepfer@googlemail.com>
An excessively long filename could overflow the mailbox buffer. Fix by
limiting the filename size to EC_MAXFOEDATA.
Problem found and fix proposed by m1etz.
If FoE write of a file is done, no check
of incoming size is performed. If the
file is 0byte, a FoE Write Request is
sent but no ACK since dofinalzero
is initialized to FALSE.
fixes#766
Co-authored-by: Andreas Karlsson <andreas.karlsson@rt-labs.com>