Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <[email protected]>
  • Loading branch information
Tempate committed Oct 13, 2023
1 parent c8035cc commit ae61ca4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
14 changes: 7 additions & 7 deletions ddspipe_core/include/ddspipe_core/core/DdsPipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ class DdsPipe
*/
void deactivate_all_topics_nts_() noexcept;

//////////////////////////
// CONFIGURATION VARIABLES
//////////////////////////

//! Configuration of the DDS Pipe
DdsPipeConfiguration configuration_;

/////////////////////////
// SHARED DATA STORAGE
/////////////////////////
Expand Down Expand Up @@ -403,13 +410,6 @@ class DdsPipe
* @brief Internal mutex for concurrent calls
*/
mutable std::mutex mutex_;

//////////////////////////
// CONFIGURATION VARIABLES
//////////////////////////

//! Configuration of the DDS Pipe
DdsPipeConfiguration configuration_;
};

} /* namespace core */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ class BaseReader : public core::IReader
//! Participant parent ID
const core::types::ParticipantId participant_id_;

// Max reception rate
float max_rx_rate_;

//! Downsampling value
unsigned int downsampling_;

//! Lambda to call the callback whenever a new data arrives
std::function<void()> on_data_available_lambda_;

Expand All @@ -227,12 +233,6 @@ class BaseReader : public core::IReader
//! Mutex that guards every access to the Reader
mutable std::recursive_mutex mutex_;

// Max reception rate
float max_rx_rate_;

//! Downsampling value
unsigned int downsampling_;

//! Counter used to keep only 1 sample of every N received, with N being the topic's downsampling factor.
unsigned int downsampling_idx_ = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ class BaseWriter : public core::IWriter
//! Participant parent ID
const core::types::ParticipantId participant_id_;

// Max transmission rate
float max_tx_rate_;

//! Whether the Writer is currently enabled
std::atomic<bool> enabled_;

//! Mutex that guards every access to the Writer
mutable std::recursive_mutex mutex_;

// Max transmission rate
float max_tx_rate_;

//! Timestamp of the last sent message.
utils::Timestamp last_sent_ts_ = utils::the_beginning_of_time();

Expand Down
3 changes: 0 additions & 3 deletions ddspipe_participants/src/cpp/reader/rtps/CommonReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ void CommonReader::enable_nts_() noexcept
bool CommonReader::should_accept_change_(
const fastrtps::rtps::CacheChange_t* change) noexcept
{
// Get reception timestamp
auto now = utils::now();

// Reject samples sent by a Writer from the same Participant this Reader belongs to
if (come_from_this_participant_(change))
{
Expand Down

0 comments on commit ae61ca4

Please sign in to comment.