Skip to content

Commit

Permalink
Rename dynamic tracks to remove unused entities
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <[email protected]>
  • Loading branch information
Tempate committed Sep 20, 2023
1 parent ff9f68f commit 5c8c214
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DdsBridge : public Bridge
const std::shared_ptr<PayloadPool>& payload_pool,
const std::shared_ptr<utils::SlotThreadPool>& thread_pool,
const RoutesConfiguration& routes_config,
const bool dynamic_tracks,
const bool remove_unused_entities,
const types::ParticipantId& discoverer_participant_id = "");

DDSPIPE_CORE_DllAPI
Expand Down
10 changes: 5 additions & 5 deletions ddspipe_core/include/ddspipe_core/core/DdsPipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class DdsPipe
bool start_enable = false,
const RoutesConfiguration& routes_config = {},
const TopicRoutesConfiguration& topic_routes_config = {},
const bool dynamic_tracks = false);
const bool remove_unused_entities = false);

/**
* @brief Destroy the DdsPipe object
Expand Down Expand Up @@ -384,12 +384,12 @@ class DdsPipe
//! Custom forwarding routes per topic
TopicRoutesConfiguration topic_routes_config_;

/////////////////
// DYNAMIC TRACKS
/////////////////
/////////////////////////
// REMOVE UNUSED ENTITIES
/////////////////////////

//! Whether readers that aren't connected to any writers should be deleted
bool dynamic_tracks_;
bool remove_unused_entities_;
};

} /* namespace core */
Expand Down
4 changes: 2 additions & 2 deletions ddspipe_core/src/cpp/communication/dds/DdsBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DdsBridge::DdsBridge(
const std::shared_ptr<PayloadPool>& payload_pool,
const std::shared_ptr<utils::SlotThreadPool>& thread_pool,
const RoutesConfiguration& routes_config,
const bool dynamic_tracks,
const bool remove_unused_entities,
const ParticipantId& discoverer_participant_id /* = "" */)
: Bridge(participants_database, payload_pool, thread_pool)
, topic_(topic)
Expand All @@ -38,7 +38,7 @@ DdsBridge::DdsBridge(

routes_ = routes_config();

if (dynamic_tracks && discoverer_participant_id != "")
if (remove_unused_entities && discoverer_participant_id != "")
{
// The builtin participants and some tests use an empty discoverer participant id
add_to_tracks(discoverer_participant_id);
Expand Down
8 changes: 4 additions & 4 deletions ddspipe_core/src/cpp/core/DdsPipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DdsPipe::DdsPipe(
bool start_enable, /* = false */
const RoutesConfiguration& routes_config, /* = {} */
const TopicRoutesConfiguration& topic_routes_config, /* = {} */
const bool dynamic_tracks /* = false */)
const bool remove_unused_entities /* = false */)
: allowed_topics_(allowed_topics)
, discovery_database_(discovery_database)
, payload_pool_(payload_pool)
Expand All @@ -47,7 +47,7 @@ DdsPipe::DdsPipe(
, enabled_(false)
, routes_config_(routes_config)
, topic_routes_config_(topic_routes_config)
, dynamic_tracks_(dynamic_tracks)
, remove_unused_entities_(remove_unused_entities)
{
logDebug(DDSPIPE, "Creating DDS Pipe.");

Expand Down Expand Up @@ -324,7 +324,7 @@ void DdsPipe::removed_endpoint_nts_(
// The bridge does not exist. We cannot remove the writer. Exit.
return;
}
else if (dynamic_tracks_)
else if (remove_unused_entities_)
{
it_bridge->second->remove_from_tracks(endpoint.discoverer_participant_id);
}
Expand Down Expand Up @@ -438,7 +438,7 @@ void DdsPipe::create_new_bridge_nts_(
payload_pool_,
thread_pool_,
routes_config__,
dynamic_tracks_,
remove_unused_entities_,
discoverer_participant_id);

if (enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ constexpr const char* MAX_HISTORY_DEPTH_TAG("max-depth"); //! Maximum size (numb
constexpr const char* DOWNSAMPLING_TAG("downsampling"); //! Keep 1 out of every *downsampling* samples received
constexpr const char* MAX_RECEPTION_RATE_TAG("max-reception-rate"); //! Process up to *max_reception_rate* samples in a 1 second bin
constexpr const char* WAIT_ALL_ACKED_TIMEOUT_TAG("wait-all-acked-timeout"); //! Wait for a maximum of *wait-all-acked-timeout* ms until all msgs sent by reliable writers are acknowledged by their matched readers
constexpr const char* DYNAMIC_TRACKS_TAG("dynamic-tracks"); //! Dynamically create and delete tracks.
constexpr const char* REMOVE_UNUSED_ENTITIES_TAG("remove-unused-entities"); //! Dynamically create and delete entities and tracks.

// XML configuration tags
constexpr const char* XML_TAG("xml"); //! Tag to read xml configuration
Expand Down

0 comments on commit 5c8c214

Please sign in to comment.