Version 1.6.8: Fixed FAKE_EC_HOMEDIR usage.

This commit is contained in:
Florian Pose 2025-10-06 17:15:04 +02:00
parent 6acfd09764
commit 2543cc55bd
4 changed files with 14 additions and 8 deletions

View File

@ -1,3 +1,7 @@
# Version 1.6.8
- Fixed usage of `FAKE_EC_HOMEDIR` variable in fake library.
# Version 1.6.7
- Completed API methods in fake library

View File

@ -28,7 +28,7 @@ AC_PREREQ([2.59])
# - Check for complete Doxygen comments
# - Update version number below
#
AC_INIT([ethercat], [1.6.7], [fp@igh.de])
AC_INIT([ethercat], [1.6.8], [fp@igh.de])
AC_CONFIG_AUX_DIR([autoconf])
AM_INIT_AUTOMAKE([-Wall -Wno-override -Werror dist-bzip2 subdir-objects foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

View File

@ -9,14 +9,16 @@ data level by running two applications back to back.
## Supported features
Currently, only a very limited subset of libethercat functionality is
supported:
Although the library implements the complete API (to avoid undefined
references), most function calls will just do nothing and return no error.
However, some methods have a bit of logic implemented to simulate a working
master. This is what is possible:
- Creating master and domain instances
- Activating master, `send`/`receive`.
- Activating master, `send()` and `receive()`.
- Processing and queuing domains
- Configuring PDOs
- Configuring SDOs using `ecrt_slave_config_sdo*`
- Configuring SDOs using `ecrt_slave_config_sdo*()`
The SDO config does not do anything, but when activating the master the SDO
config will be dumped into a JSON file.

View File

@ -573,11 +573,11 @@ static int mkpath(const std::string &file_path)
static std::string getRtIpcDir(int idx)
{
std::string ans;
std::string ans("/tmp/FakeEtherCAT");
if (const auto e = getenv("FAKE_EC_HOMEDIR")) {
ans = e + std::string("/") + std::to_string(idx);
ans = e;
}
ans = "/tmp/FakeEtherCAT/" + std::to_string(idx);
ans += std::string("/") + std::to_string(idx);
mkpath(ans);
return ans;
}