Skip to content

Commit

Permalink
Refs #21082. Snake case on public methods.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Jul 3, 2024
1 parent 5fcdf19 commit b26d48d
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 34 deletions.
6 changes: 3 additions & 3 deletions include/fastdds/rtps/writer/RTPSWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ class RTPSWriter : public Endpoint
* Update the Attributes of the Writer.
* @param att New attributes
*/
FASTDDS_EXPORTED_API virtual void updateAttributes(
FASTDDS_EXPORTED_API virtual void update_attributes(
const WriterAttributes& att) = 0;

/**
* Get listener
* @return Listener
*/
FASTDDS_EXPORTED_API virtual WriterListener* getListener() const = 0;
FASTDDS_EXPORTED_API virtual WriterListener* get_listener() const = 0;

/**
* Set the listener.
Expand All @@ -170,7 +170,7 @@ class RTPSWriter : public Endpoint
* Get the publication mode
* @return publication mode
*/
FASTDDS_EXPORTED_API virtual bool isAsync() const = 0;
FASTDDS_EXPORTED_API virtual bool is_async() const = 0;

/**
* @brief Returns if disable positive ACKs QoS is enabled.
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ ReturnCode_t DataWriterImpl::set_qos(
w_att.times = qos_.reliable_writer_qos().times;
w_att.disable_positive_acks = qos_.reliable_writer_qos().disable_positive_acks.enabled;
w_att.keep_duration = qos_.reliable_writer_qos().disable_positive_acks.duration;
writer_->updateAttributes(w_att);
writer_->update_attributes(w_att);
}

//Notify the participant that a Writer has changed its QOS
Expand Down
38 changes: 19 additions & 19 deletions src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ bool EDP::unpairReaderProxy(
#endif // if HAVE_SECURITY
//MATCHED AND ADDED CORRECTLY:
WriterListener* listener = nullptr;
if (nullptr != (listener = w.getListener()))
if (nullptr != (listener = w.get_listener()))
{
MatchingInfo info;
info.status = REMOVED_MATCHING;
Expand Down Expand Up @@ -877,21 +877,21 @@ bool EDP::pairingWriter(
"RP:" << rdatait->guid() << " match W:" << W->getGuid() << ". WLoc:" <<
rdatait->remote_locators());
//MATCHED AND ADDED CORRECTLY:
if (W->getListener() != nullptr)
if (W->get_listener() != nullptr)
{
MatchingInfo info;
info.status = MATCHED_MATCHING;
info.remoteEndpointGuid = reader_guid;
W->getListener()->on_writer_matched(W, info);
W->get_listener()->on_writer_matched(W, info);
}
}
#endif // if HAVE_SECURITY
}
else
{
if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && W->getListener() != nullptr)
if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && W->get_listener() != nullptr)
{
W->getListener()->on_offered_incompatible_qos(W, incompatible_qos);
W->get_listener()->on_offered_incompatible_qos(W, incompatible_qos);
}

//EPROSIMA_LOG_INFO(RTPS_EDP,RTPS_CYAN<<"Valid Matching to writerProxy: "<<wdatait->m_guid<<RTPS_DEF<<endl);
Expand All @@ -901,12 +901,12 @@ bool EDP::pairingWriter(
mp_RTPSParticipant->security_manager().remove_reader(W->getGuid(), participant_guid, reader_guid);
#endif // if HAVE_SECURITY
//MATCHED AND ADDED CORRECTLY:
if (W->getListener() != nullptr)
if (W->get_listener() != nullptr)
{
MatchingInfo info;
info.status = REMOVED_MATCHING;
info.remoteEndpointGuid = reader_guid;
W->getListener()->on_writer_matched(W, info);
W->get_listener()->on_writer_matched(W, info);
}
}
}
Expand Down Expand Up @@ -952,21 +952,21 @@ bool EDP::pairing_reader_proxy_with_any_local_writer(
"RP:" << rdata->guid() << " match W:" << w.getGuid() << ". RLoc:" <<
rdata->remote_locators());
//MATCHED AND ADDED CORRECTLY:
if (w.getListener() != nullptr)
if (w.get_listener() != nullptr)
{
MatchingInfo info;
info.status = MATCHED_MATCHING;
info.remoteEndpointGuid = reader_guid;
w.getListener()->on_writer_matched(&w, info);
w.get_listener()->on_writer_matched(&w, info);
}
}
#endif // if HAVE_SECURITY
}
else
{
if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && w.getListener() != nullptr)
if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && w.get_listener() != nullptr)
{
w.getListener()->on_offered_incompatible_qos(&w, incompatible_qos);
w.get_listener()->on_offered_incompatible_qos(&w, incompatible_qos);
}

if (w.matched_reader_is_matched(reader_guid)
Expand All @@ -977,12 +977,12 @@ bool EDP::pairing_reader_proxy_with_any_local_writer(
w.getGuid(), participant_guid, reader_guid);
#endif // if HAVE_SECURITY
//MATCHED AND ADDED CORRECTLY:
if (w.getListener() != nullptr)
if (w.get_listener() != nullptr)
{
MatchingInfo info;
info.status = REMOVED_MATCHING;
info.remoteEndpointGuid = reader_guid;
w.getListener()->on_writer_matched(&w, info);
w.get_listener()->on_writer_matched(&w, info);
}
}
}
Expand Down Expand Up @@ -1032,9 +1032,9 @@ bool EDP::pairing_reader_proxy_with_local_writer(
else
{
if (no_match_reason.test(MatchingFailureMask::incompatible_qos) &&
w.getListener() != nullptr)
w.get_listener() != nullptr)
{
w.getListener()->on_offered_incompatible_qos(&w, incompatible_qos);
w.get_listener()->on_offered_incompatible_qos(&w, incompatible_qos);
}

if (w.matched_reader_is_matched(reader_guid)
Expand All @@ -1043,12 +1043,12 @@ bool EDP::pairing_reader_proxy_with_local_writer(
mp_RTPSParticipant->security_manager().remove_reader(w.getGuid(),
remote_participant_guid, reader_guid);
//MATCHED AND ADDED CORRECTLY:
if (w.getListener() != nullptr)
if (w.get_listener() != nullptr)
{
MatchingInfo info;
info.status = REMOVED_MATCHING;
info.remoteEndpointGuid = reader_guid;
w.getListener()->on_writer_matched(&w, info);
w.get_listener()->on_writer_matched(&w, info);
}
}
}
Expand Down Expand Up @@ -1085,12 +1085,12 @@ bool EDP::pairing_remote_reader_with_local_writer_after_security(
matched = true;

//MATCHED AND ADDED CORRECTLY:
if (w.getListener() != nullptr)
if (w.get_listener() != nullptr)
{
MatchingInfo info;
info.status = MATCHED_MATCHING;
info.remoteEndpointGuid = reader_guid;
w.getListener()->on_writer_matched(&w, info);
w.get_listener()->on_writer_matched(&w, info);
}
}
// don't look anymore
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/writer/BaseWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class BaseWriter
return true;
}

FASTDDS_EXPORTED_API WriterListener* getListener() const override
FASTDDS_EXPORTED_API WriterListener* get_listener() const override
{
return listener_;
}
Expand All @@ -100,7 +100,7 @@ class BaseWriter
return true;
}

FASTDDS_EXPORTED_API bool isAsync() const override
FASTDDS_EXPORTED_API bool is_async() const override
{
return is_async_;
}
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/StatefulWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,7 @@ bool StatefulWriter::wait_for_acknowledgement(
/*
* PARAMETER_RELATED METHODS
*/
void StatefulWriter::updateAttributes(
void StatefulWriter::update_attributes(
const WriterAttributes& att)
{
this->updateTimes(att.times);
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/StatefulWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ class StatefulWriter : public fastdds::rtps::BaseWriter
* Update the Attributes of the Writer.
* @param att New attributes
*/
void updateAttributes(
void update_attributes(
const WriterAttributes& att) override;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/StatelessWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class StatelessWriter : public fastdds::rtps::BaseWriter
* Update the Attributes of the Writer.
* @param att New attributes
*/
void updateAttributes(
void update_attributes(
const WriterAttributes& att) override
{
(void)att;
Expand Down
4 changes: 2 additions & 2 deletions test/blackbox/common/RTPSAsSocketWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,10 @@ class RTPSAsSocketWriter : public eprosima::fastdds::rtps::WriterListener
}

/*** Access RTPSWriter functions ***/
void updateAttributes(
void update_attributes(
const eprosima::fastdds::rtps::WriterAttributes& att)
{
writer_->updateAttributes(att);
writer_->update_attributes(att);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions test/blackbox/common/RTPSBlackboxTestsPositiveAck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST(RTPSAck, EnableUpdatabilityOfPositiveAcksPeriodRTPSLayer)
w_att.disable_positive_acks = true;
w_att.keep_duration = eprosima::fastdds::Duration_t(2, 0);

writer.updateAttributes(w_att);
writer.update_attributes(w_att);

data = default_helloworld_data_generator();

Expand All @@ -97,7 +97,7 @@ TEST(RTPSAck, EnableUpdatabilityOfPositiveAcksPeriodRTPSLayer)
// Update attributes at RTPS layer
w_att.disable_positive_acks = false;

writer.updateAttributes(w_att);
writer.update_attributes(w_att);

// Check that positive_acks feature is not changed at runtime
EXPECT_TRUE(writer.get_disable_positive_acks());
Expand Down
4 changes: 2 additions & 2 deletions test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class RTPSWriter : public Endpoint
return false;
}

WriterListener* getListener() const
WriterListener* get_listener() const
{
return listener_;
}
Expand Down Expand Up @@ -129,7 +129,7 @@ class RTPSWriter : public Endpoint
return m_att.endpoint;
}

virtual void updateAttributes(
virtual void update_attributes(
const WriterAttributes&)
{
}
Expand Down

0 comments on commit b26d48d

Please sign in to comment.