diff --git a/NEWS.md b/NEWS.md index 7b4d24d2..aed903cb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/configure.ac b/configure.ac index 8f319b92..b7d63911 100644 --- a/configure.ac +++ b/configure.ac @@ -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])]) diff --git a/fake_lib/README.md b/fake_lib/README.md index 3ceb1a91..220e833e 100644 --- a/fake_lib/README.md +++ b/fake_lib/README.md @@ -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. diff --git a/fake_lib/fakeethercat.cpp b/fake_lib/fakeethercat.cpp index b1bd8b13..93df7a36 100644 --- a/fake_lib/fakeethercat.cpp +++ b/fake_lib/fakeethercat.cpp @@ -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; }