diff --git a/examples/cpp/rtps_entities/ReaderApp.cpp b/examples/cpp/rtps_entities/ReaderApp.cpp index e00e9a77a50..350351a2b8b 100644 --- a/examples/cpp/rtps_entities/ReaderApp.cpp +++ b/examples/cpp/rtps_entities/ReaderApp.cpp @@ -51,11 +51,11 @@ void eprosima::fastcdr::deserialize( switch (mid.id) { case 0: - dcdr >> data.index(); + dcdr >> data.index(); break; case 1: - dcdr >> data.message(); + dcdr >> data.message(); break; default: @@ -123,7 +123,7 @@ ReaderApp::ReaderApp( reader_qos.m_durability.kind = eprosima::fastdds::dds::TRANSIENT_LOCAL_DURABILITY_QOS; reader_qos.m_reliability.kind = eprosima::fastdds::dds::RELIABLE_RELIABILITY_QOS; - // Register entity + // Register entity if (!rtps_participant_->registerReader(rtps_reader_, topic_att, reader_qos)) { throw std::runtime_error("Entity registration failed"); @@ -168,7 +168,8 @@ void ReaderApp::on_new_cache_change_added( { if (deserialize_payload(change->serializedPayload, data_)) { - std::cout << "Message: " << data_->message() << " with index " << data_->index() << " RECEIVED" << std::endl; + std::cout << "Message: " << data_->message() << " with index " << data_->index() << " RECEIVED" << + std::endl; samples_received_++; } else diff --git a/examples/cpp/rtps_entities/ReaderApp.hpp b/examples/cpp/rtps_entities/ReaderApp.hpp index 1d4f09782c3..fba60c3ec0e 100644 --- a/examples/cpp/rtps_entities/ReaderApp.hpp +++ b/examples/cpp/rtps_entities/ReaderApp.hpp @@ -44,8 +44,8 @@ class ReaderApp : public Application, public ReaderListener public: ReaderApp( - const CLIParser::rtps_entities_config& config, - const std::string& topic_name); + const CLIParser::rtps_entities_config& config, + const std::string& topic_name); virtual ~ReaderApp(); diff --git a/examples/cpp/rtps_entities/WriterApp.cpp b/examples/cpp/rtps_entities/WriterApp.cpp index 045f936480a..65b838671ef 100644 --- a/examples/cpp/rtps_entities/WriterApp.cpp +++ b/examples/cpp/rtps_entities/WriterApp.cpp @@ -54,7 +54,6 @@ void eprosima::fastcdr::serialize( scdr.end_serialize_type(current_state); } - using namespace eprosima::fastdds; using namespace eprosima::fastdds::rtps; @@ -150,7 +149,7 @@ void WriterApp::run() { while (!is_stopped() && ((samples_ == 0) || (samples_sent_ < samples_))) { - if(add_change_to_history()) + if (add_change_to_history()) { std::cout << "Message " << data_->message() << " with index " << data_->index() << " SENT" << std::endl; } @@ -174,7 +173,8 @@ bool WriterApp::serialize_payload( eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast(payload.data), payload.max_size); // Object that serializes the data. - eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::CdrVersion::XCDRv1); + eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, + eprosima::fastcdr::CdrVersion::XCDRv1); payload.encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE; @@ -226,13 +226,13 @@ bool WriterApp::add_change_to_history() } data_->message("Hello World"); - data_->index(data_->index()+1); + data_->index(data_->index() + 1); if (serialize_payload(data_, ch->serializedPayload)) { ++samples_sent_; - if(writer_history_->add_change(ch)) + if (writer_history_->add_change(ch)) { ret = true; } diff --git a/examples/cpp/rtps_entities/WriterApp.hpp b/examples/cpp/rtps_entities/WriterApp.hpp index 41bb98d0f93..4dfb7aa71fe 100644 --- a/examples/cpp/rtps_entities/WriterApp.hpp +++ b/examples/cpp/rtps_entities/WriterApp.hpp @@ -43,8 +43,8 @@ class WriterApp : public Application, public WriterListener public: WriterApp( - const CLIParser::rtps_entities_config& config, - const std::string& topic_name); + const CLIParser::rtps_entities_config& config, + const std::string& topic_name); virtual ~WriterApp(); @@ -69,8 +69,8 @@ class WriterApp : public Application, public WriterListener //! Serialize payload bool serialize_payload( - const HelloWorld* data, - eprosima::fastdds::rtps::SerializedPayload_t& payload); + const HelloWorld* data, + eprosima::fastdds::rtps::SerializedPayload_t& payload); uint16_t samples_;