Skip to content

Commit df51da2

Browse files
Merge branch 'master' of https://github.com/eclipse-ecal/ecal into hotfix/blocking_services
2 parents 5283eda + 2c03264 commit df51da2

File tree

6 files changed

+21
-14
lines changed

6 files changed

+21
-14
lines changed

cpack/innosetup/ecal_setup.iss.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,12 @@ Source: "{#ComponentStagingDir}\_configuration\etc\ecal.yaml"; DestDir: "{app
8686
Source: "{#ComponentStagingDir}\_configuration\etc\ecal.yaml"; DestDir: "{app}\etc\"; Tasks: replaceconf; Flags: ignoreversion skipifsourcedoesntexist; Components: runtime
8787
Source: "{#ComponentStagingDir}\_configuration\etc\ecaltime.yaml"; DestDir: "{app}\etc\"; Flags: ignoreversion skipifsourcedoesntexist; Components: runtime
8888

89+
8990
Source: "{#CSharpStagingDir}\runtime\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: runtime
9091

9192
; applications
9293
Source: "{#ComponentStagingDir}\app\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: applications
94+
Source: "{#ComponentStagingDir}\configuration\bin\*"; DestDir: "{app}\bin\"; Flags: ignoreversion recursesubdirs; Components: applications
9395

9496
; samples
9597
Source: "{#ComponentStagingDir}\samples\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: samples

ecal/core/cfg/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,8 @@ if(ECAL_DEFAULT_CONFIG_LOCATION AND NOT CMAKE_CROSSCOMPILING)
9898
endif()
9999
endif()
100100

101-
ecal_install_app(${PROJECT_NAME})
101+
install(TARGETS ${PROJECT_NAME}
102+
RUNTIME
103+
DESTINATION "${eCAL_install_app_dir}" # Install to the App-dir...
104+
COMPONENT configuration # ... but as component "configuration"
105+
)

ecal/core/src/io/shm/ecal_memfile_sync.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace eCAL
4848
Destroy();
4949
}
5050

51-
bool CSyncMemoryFile::Connect(const std::string& process_id_)
51+
bool CSyncMemoryFile::Connect(const int32_t process_id_)
5252
{
5353
if (!m_created) return false;
5454

@@ -57,8 +57,9 @@ namespace eCAL
5757
// we have ONE memory file per publisher and 1 or 2 events per memory file
5858

5959
// the event names
60-
const std::string event_snd_name = m_memfile_name + "_" + process_id_;
61-
const std::string event_ack_name = m_memfile_name + "_" + process_id_ + "_ack";
60+
const std::string process_id_string = std::to_string(process_id_);
61+
const std::string event_snd_name = m_memfile_name + "_" + process_id_string;
62+
const std::string event_ack_name = m_memfile_name + "_" + process_id_string + "_ack";
6263

6364
// check for existing process
6465
const std::lock_guard<std::mutex> lock(m_event_handle_map_sync);
@@ -70,7 +71,7 @@ namespace eCAL
7071
SEventHandlePair event_pair;
7172
gOpenNamedEvent(&event_pair.event_snd, event_snd_name, true);
7273
gOpenNamedEvent(&event_pair.event_ack, event_ack_name, true);
73-
m_event_handle_map.insert(std::pair<std::string, SEventHandlePair>(process_id_, event_pair));
74+
m_event_handle_map.insert(std::pair<int32_t, SEventHandlePair>(process_id_, event_pair));
7475
return true;
7576
}
7677
else
@@ -103,7 +104,7 @@ namespace eCAL
103104
* Also, the disconnect does not prevent the `event_snd` not to be set when the publisher writes data.
104105
* We should theoretically distinguish between not acknowledging, and not signaling send data.
105106
*/
106-
bool CSyncMemoryFile::Disconnect(const std::string& process_id_)
107+
bool CSyncMemoryFile::Disconnect(const int32_t process_id_)
107108
{
108109
if (!m_created) return false;
109110

@@ -315,7 +316,7 @@ namespace eCAL
315316
bool CSyncMemoryFile::Recreate(size_t size_)
316317
{
317318
// collect id's of the currently connected processes
318-
std::vector<std::string> process_id_list;
319+
std::vector<int32_t> process_id_list;
319320
{
320321
const std::lock_guard<std::mutex> lock(m_event_handle_map_sync);
321322
for (const auto& event_handle : m_event_handle_map)

ecal/core/src/io/shm/ecal_memfile_sync.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ namespace eCAL
5151
CSyncMemoryFile(const std::string& base_name_, size_t size_, SSyncMemoryFileAttr attr_);
5252
~CSyncMemoryFile();
5353

54-
bool Connect(const std::string& process_id_);
55-
bool Disconnect(const std::string& process_id_);
54+
bool Connect(int32_t process_id_);
55+
bool Disconnect(int32_t process_id_);
5656

5757
bool CheckSize(size_t size_);
5858
bool Write(CPayloadWriter& payload_, const SWriterAttr& data_, bool force_full_write_ = false);
@@ -81,7 +81,7 @@ namespace eCAL
8181
EventHandleT event_ack;
8282
bool event_ack_is_invalid = false; //!< The ack event has timeouted. Thus, we don't wait for it anymore, until the subscriber notifies us via registration layer that it is still alive.
8383
};
84-
using EventHandleMapT = std::unordered_map<std::string, SEventHandlePair>;
84+
using EventHandleMapT = std::unordered_map<int32_t, SEventHandlePair>;
8585
std::mutex m_event_handle_map_sync;
8686
EventHandleMapT m_event_handle_map;
8787
};

ecal/core/src/readwrite/shm/ecal_writer_shm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace eCAL
9797

9898
for (auto& memory_file : m_memory_file_vec)
9999
{
100-
memory_file->Connect(std::to_string(process_id_));
100+
memory_file->Connect(process_id_);
101101
#ifndef NDEBUG
102102
Logging::Log(Logging::log_level_debug1, std::string("CDataWriterSHM::ApplySubscription - Memory FileName: ") + memory_file->GetName() + " to ProcessId " + std::to_string(process_id_));
103103
#endif
@@ -142,7 +142,7 @@ namespace eCAL
142142
// If the removed subscription was the last one, we need to temporarily disconnect the process
143143
for (auto& memory_file : m_memory_file_vec)
144144
{
145-
memory_file->Disconnect(std::to_string(process_id_));
145+
memory_file->Disconnect(process_id_);
146146
#ifndef NDEBUG
147147
Logging::Log(Logging::log_level_debug1, std::string("CDataWriterSHM::RemoveSubscription - Memory FileName: ") + memory_file->GetName() + " to ProcessId " + std::to_string(process_id_));
148148
#endif

ecal/tests/cpp/clientserver_test/src/clientserver_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ TEST(core_cpp_clientserver, ClientServerBaseCallbackTimeout)
516516
// Test time-behavior of CallWithResponse with multiple servers when one server is slow
517517
TEST(core_cpp_clientserver, ClientServerCallWithResponseTimeBehavior)
518518
{
519-
const std::chrono::milliseconds server_2_calculation_time(200);
519+
const std::chrono::milliseconds server_2_calculation_time(1000);
520520

521521
// initialize eCAL API
522522
eCAL::Initialize("clientserver base callback timeout time behavior test");
@@ -669,7 +669,7 @@ TEST(core_cpp_clientserver, ClientServerCallWithResponseTimeBehavior)
669669
// Also tests that the function only returns AFTER the user-callback has been called for all responses, even if that goes beyond the timeout.
670670
TEST(core_cpp_clientserver, ClientServerCallWithCallbackTimeBehavior)
671671
{
672-
const std::chrono::milliseconds server_2_calculation_time(200);
672+
const std::chrono::milliseconds server_2_calculation_time(1000);
673673

674674
// initialize eCAL API
675675
eCAL::Initialize("clientserver call with callback time behavior test");

0 commit comments

Comments
 (0)