Skip to content

Commit

Permalink
Remove expiration map from reader / writer.
Browse files Browse the repository at this point in the history
  • Loading branch information
KerstinKeller committed Jul 26, 2024
1 parent 9dcca25 commit 7e3b0fd
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
5 changes: 0 additions & 5 deletions ecal/core/src/readwrite/ecal_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ namespace eCAL
counter << std::chrono::steady_clock::now().time_since_epoch().count();
m_topic_id = counter.str();

// set registration expiration
const std::chrono::milliseconds registration_timeout(Config::GetRegistrationTimeoutMs());
m_pub_map.set_expiration(registration_timeout);

// start transport layers
StartTransportLayer();

Expand Down Expand Up @@ -560,7 +556,6 @@ namespace eCAL
void CDataReader::CheckConnections()
{
const std::lock_guard<std::mutex> lock(m_pub_map_mtx);
m_pub_map.erase_expired();

if (m_pub_map.empty())
{
Expand Down
3 changes: 1 addition & 2 deletions ecal/core/src/readwrite/ecal_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "serialization/ecal_serialize_sample_payload.h"
#include "serialization/ecal_serialize_sample_registration.h"
#include "util/ecal_expmap.h"
#include "util/frequency_calculator.h"

#include <atomic>
Expand Down Expand Up @@ -155,7 +154,7 @@ namespace eCAL
Subscriber::Configuration m_config;

std::atomic<bool> m_connected;
using PublicationMapT = Util::CExpirationMap<SPublicationInfo, std::tuple<SDataTypeInformation, SLayerStates>>;
using PublicationMapT = std::map<SPublicationInfo, std::tuple<SDataTypeInformation, SLayerStates>>;
mutable std::mutex m_pub_map_mtx;
PublicationMapT m_pub_map;

Expand Down
5 changes: 0 additions & 5 deletions ecal/core/src/readwrite/ecal_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ namespace eCAL
counter << std::chrono::steady_clock::now().time_since_epoch().count();
m_topic_id = counter.str();

// set registration expiration
const std::chrono::milliseconds registration_timeout(Config::GetRegistrationTimeoutMs());
m_sub_map.set_expiration(registration_timeout);

// mark as created
m_created = true;

Expand Down Expand Up @@ -613,7 +609,6 @@ namespace eCAL
void CDataWriter::CheckConnections()
{
const std::lock_guard<std::mutex> lock(m_sub_map_mtx);
m_sub_map.erase_expired();

if (m_sub_map.empty())
{
Expand Down
3 changes: 1 addition & 2 deletions ecal/core/src/readwrite/ecal_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <ecal/config/publisher.h>

#include "serialization/ecal_serialize_sample_registration.h"
#include "util/ecal_expmap.h"
#include "util/frequency_calculator.h"

#if ECAL_CORE_TRANSPORT_UDP
Expand Down Expand Up @@ -167,7 +166,7 @@ namespace eCAL

std::atomic<bool> m_connected;

using SSubscriptionMapT = Util::CExpirationMap<SSubscriptionInfo, std::tuple<SDataTypeInformation, SLayerStates>>;
using SSubscriptionMapT = std::map<SSubscriptionInfo, std::tuple<SDataTypeInformation, SLayerStates>>;
mutable std::mutex m_sub_map_mtx;
SSubscriptionMapT m_sub_map;

Expand Down

0 comments on commit 7e3b0fd

Please sign in to comment.