Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[21137] RTPS writer APIs refactor #5028

Merged
merged 44 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9d9b333
Refs #21082. Remove `onWriterMatched` overload.
MiguelCompany Jun 7, 2024
a839c9b
Refs #21082. Rename to `on_writer_matched`.
MiguelCompany Jun 7, 2024
64a0486
Refs #21082. Rename to `on_writer_change_received_by_all`.
MiguelCompany Jun 7, 2024
229b862
Refs #21082. Refactor on WriterTimes.
MiguelCompany Jun 10, 2024
6f1f926
Refs #21082. Rename protected fields.
MiguelCompany Jun 11, 2024
cda96da
Refs #21082. Add empty `BaseReader` class.
MiguelCompany Jun 11, 2024
9c867c6
Refs #21082. Implementation classes now inherit from `BaseWriter`.
MiguelCompany Jun 11, 2024
b12a5aa
Refs #21082. Method `is_acked_by_all` receives sequence number.
MiguelCompany Jun 26, 2024
1e6bd1c
Refs #21082. Writer history keeps pointer to BaseReader.
MiguelCompany Jun 26, 2024
c193961
Refs #21082. Move `StatisticsWriterImpl` inheritance.
MiguelCompany Jun 26, 2024
6f6096e
Refs #21082. Remove dependency on `WriterPool`.
MiguelCompany Jul 1, 2024
17fbf9c
Refs #21082. Remove unused private member.
MiguelCompany Jul 2, 2024
eae7c48
Refs #21082. Refactor on `FlowController`.
MiguelCompany Jul 1, 2024
f54d989
Refs #21082. Refactor on `LocatorSelectorSender`.
MiguelCompany Jul 2, 2024
4359242
Refs #21082. Header `LocatorSelectorSender.hpp` made private.
MiguelCompany Jul 2, 2024
2744f65
Refs #21082. Header `DeliveryRetCode.hpp` made private.
MiguelCompany Jul 2, 2024
c06e223
Refs #21082. Participant keeps collection of BaseWriter.
MiguelCompany Jul 2, 2024
97e0718
Refs #21082. Method `find_local_writer` returns `BaseWriter`.
MiguelCompany Jul 2, 2024
98f734e
Refs #21082. Refactor `MessageReceiver`.
MiguelCompany Jul 2, 2024
8ce9b8b
Refs #21082. Add `downcast` methods.
MiguelCompany Jul 2, 2024
05e7782
Refs #21082. Remove friend `DataWriterImpl`.
MiguelCompany Jul 2, 2024
825192c
Refs #21082. Remove superfluous namespacing.
MiguelCompany Jul 2, 2024
0455797
Refs #21082. Move `init` method.
MiguelCompany Jul 2, 2024
393fc7d
Refs #21082. Remove other friends.
MiguelCompany Jul 2, 2024
11b08fd
Refs #21082. Move non-exported methods to `BaseWriter`.
MiguelCompany Jul 2, 2024
29e070b
Refs #21082. Move liveliness_lost update to `BaseWriter`.
MiguelCompany Jul 3, 2024
3e00cec
Refs #21082. Remove unused private method.
MiguelCompany Jul 3, 2024
50080d9
Refs #21082. Move inline methods.
MiguelCompany Jul 3, 2024
42039c7
Refs #21082. Move history query methods.
MiguelCompany Jul 3, 2024
c3884ae
Refs #21082. Move other members.
MiguelCompany Jul 3, 2024
08357c2
Refs #21082. Separate sending is now part of `WriterAttributes`.
MiguelCompany Jul 3, 2024
6ea4f7c
Refs #21082. Snake case on public methods.
MiguelCompany Jul 3, 2024
8901b32
Refs #21082. Method get_history in BaseWriter.
MiguelCompany Jul 4, 2024
8fc834c
Refs #21082. Fix warning without security.
MiguelCompany Jul 5, 2024
c50d6a5
Refs #21137. Apply suggestions on WLP.
MiguelCompany Jul 9, 2024
7d792b0
Refs #21137. Remove unused methods from `RTPSParticipantImpl`.
MiguelCompany Jul 9, 2024
386dd24
Refs #21137. Move implementations to cpp.
MiguelCompany Jul 9, 2024
9dd8caf
Refs #21137. Method names and doxygen.
MiguelCompany Jul 9, 2024
013b2b0
Refs #21137. Add space between `@param` and `[`
MiguelCompany Jul 9, 2024
1576b6f
Refs #21137. Namespace suggestion.
MiguelCompany Jul 9, 2024
55ca71a
Refs #21137. Uncrustify.
MiguelCompany Jul 9, 2024
d729d6e
Refs #21137. Rearrange methods.
MiguelCompany Jul 9, 2024
f421bf1
Refs #21137. Additional rearrange of methods.
MiguelCompany Jul 9, 2024
8d7dce3
Refs #21137. Update versions.md.
MiguelCompany Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ bool HelloWorldPublisher::init()
wqos.history().depth = 30;
wqos.resource_limits().max_samples = 50;
wqos.resource_limits().allocated_samples = 20;
wqos.reliable_writer_qos().times.heartbeatPeriod.seconds = 2;
wqos.reliable_writer_qos().times.heartbeatPeriod.nanosec = 200 * 1000 * 1000;
wqos.reliable_writer_qos().times.heartbeat_period.seconds = 2;
wqos.reliable_writer_qos().times.heartbeat_period.nanosec = 200 * 1000 * 1000;
wqos.reliability().kind = RELIABLE_RELIABILITY_QOS;
wqos.publish_mode().kind = ASYNCHRONOUS_PUBLISH_MODE;

Expand Down
4 changes: 2 additions & 2 deletions examples/cpp/dds/HelloWorldExampleTCP/HelloWorldPublisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ bool HelloWorldPublisher::init(
wqos.history().depth = 30;
wqos.resource_limits().max_samples = 50;
wqos.resource_limits().allocated_samples = 20;
wqos.reliable_writer_qos().times.heartbeatPeriod.seconds = 2;
wqos.reliable_writer_qos().times.heartbeatPeriod.nanosec = 200 * 1000 * 1000;
wqos.reliable_writer_qos().times.heartbeat_period.seconds = 2;
wqos.reliable_writer_qos().times.heartbeat_period.nanosec = 200 * 1000 * 1000;
wqos.reliability().kind = RELIABLE_RELIABILITY_QOS;

writer_ = publisher_->create_datawriter(topic_, wqos, &listener_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ bool HelloWorldPublisher::init()
wqos.history().depth = 20;
wqos.resource_limits().max_samples = 50;
wqos.resource_limits().max_samples_per_instance = 20;
wqos.reliable_writer_qos().times.heartbeatPeriod.seconds = 2;
wqos.reliable_writer_qos().times.heartbeatPeriod.nanosec = 200 * 1000 * 1000;
wqos.reliable_writer_qos().times.heartbeat_period.seconds = 2;
wqos.reliable_writer_qos().times.heartbeat_period.nanosec = 200 * 1000 * 1000;
writer_ = publisher_->create_datawriter(topic_, wqos, &listener_);

if (writer_ == nullptr)
Expand Down
7 changes: 2 additions & 5 deletions examples/cpp/rtps/Persistent/TestWriterPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class TestWriterPersistent
{
}

void onWriterMatched(
void on_writer_matched(
eprosima::fastdds::rtps::RTPSWriter*,
eprosima::fastdds::rtps::MatchingInfo& info) override
const eprosima::fastdds::rtps::MatchingInfo& info) override
{
if (info.status == eprosima::fastdds::rtps::MATCHED_MATCHING)
{
Expand All @@ -70,9 +70,6 @@ class TestWriterPersistent

int n_matched;

private:

using eprosima::fastdds::rtps::WriterListener::onWriterMatched;
}
m_listener;
};
Expand Down
7 changes: 2 additions & 5 deletions examples/cpp/rtps/Registered/TestWriterRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class TestWriterRegistered
{
}

void onWriterMatched(
void on_writer_matched(
eprosima::fastdds::rtps::RTPSWriter*,
eprosima::fastdds::rtps::MatchingInfo& info) override
const eprosima::fastdds::rtps::MatchingInfo& info) override
{
if (info.status == eprosima::fastdds::rtps::MATCHED_MATCHING)
{
Expand All @@ -69,9 +69,6 @@ class TestWriterRegistered

int n_matched;

private:

using eprosima::fastdds::rtps::WriterListener::onWriterMatched;
}
m_listener;
};
Expand Down
4 changes: 2 additions & 2 deletions include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ class ParameterSampleIdentity_t : public Parameter_t
/**
* Add the parameter to a CDRMessage_t message.
*
* @param[in,out] msg Pointer to the message where the parameter should be added.
* @param [in,out] msg Pointer to the message where the parameter should be added.
* @return True if the parameter was correctly added.
*/
bool addToCDRMessage(
Expand All @@ -1668,7 +1668,7 @@ class ParameterSampleIdentity_t : public Parameter_t
/**
* Read the parameter from a CDRMessage_t message.
*
* @param[in,out] msg Pointer to the message from where the parameter should be taken.
* @param [in,out] msg Pointer to the message from where the parameter should be taken.
* @param size Size of the parameter field to read
* @return True if the parameter was correctly taken.
*/
Expand Down
8 changes: 4 additions & 4 deletions include/fastdds/dds/domain/DomainParticipant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ class DomainParticipant : public Entity
/**
* Retrieves the list of DomainParticipants that have been discovered in the domain and are not "ignored".
*
* @param[out] participant_handles Reference to the vector where discovered participants will be returned
* @param [out] participant_handles Reference to the vector where discovered participants will be returned
* @return RETCODE_OK if everything correct, error code otherwise
*
* @warning Not supported yet. Currently returns RETCODE_UNSUPPORTED
Expand All @@ -691,7 +691,7 @@ class DomainParticipant : public Entity
/**
* Retrieves the DomainParticipant data of a discovered not ignored participant.
*
* @param[out] participant_data Reference to the ParticipantBuiltinTopicData object to return the data
* @param [out] participant_data Reference to the ParticipantBuiltinTopicData object to return the data
* @param participant_handle InstanceHandle of DomainParticipant to retrieve the data from
* @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if participant does not exist
*
Expand All @@ -704,7 +704,7 @@ class DomainParticipant : public Entity
/**
* Retrieves the list of topics that have been discovered in the domain and are not "ignored".
*
* @param[out] topic_handles Reference to the vector where discovered topics will be returned
* @param [out] topic_handles Reference to the vector where discovered topics will be returned
* @return RETCODE_OK if everything correct, error code otherwise
*
* @warning Not supported yet. Currently returns RETCODE_UNSUPPORTED
Expand All @@ -715,7 +715,7 @@ class DomainParticipant : public Entity
/**
* Retrieves the Topic data of a discovered not ignored topic.
*
* @param[out] topic_data Reference to the TopicBuiltinTopicData object to return the data
* @param [out] topic_data Reference to the TopicBuiltinTopicData object to return the data
* @param topic_handle InstanceHandle of Topic to retrieve the data from
* @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if topic does not exist
*
Expand Down
22 changes: 11 additions & 11 deletions include/fastdds/dds/domain/DomainParticipantListener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class DomainParticipantListener :
* This method is called when a new Participant is discovered, or a previously discovered participant changes
* its QOS or is removed.
*
* @param[out] participant Pointer to the Participant which discovered the remote participant.
* @param[out] info Remote participant information. User can take ownership of the object.
* @param[out] should_be_ignored Flag to indicate the library to automatically ignore the discovered Participant.
* @param [out] participant Pointer to the Participant which discovered the remote participant.
* @param [out] info Remote participant information. User can take ownership of the object.
* @param [out] should_be_ignored Flag to indicate the library to automatically ignore the discovered Participant.
*/
virtual void on_participant_discovery(
DomainParticipant* participant,
Expand All @@ -81,8 +81,8 @@ class DomainParticipantListener :
/*!
* This method is called when a new Participant is authenticated.
*
* @param[out] participant Pointer to the authenticated Participant.
* @param[out] info Remote participant authentication information. User can take ownership of the object.
* @param [out] participant Pointer to the authenticated Participant.
* @param [out] info Remote participant authentication information. User can take ownership of the object.
*/
virtual void onParticipantAuthentication(
DomainParticipant* participant,
Expand All @@ -98,9 +98,9 @@ class DomainParticipantListener :
* This method is called when a new DataReader is discovered, or a previously discovered DataReader changes
* its QOS or is removed.
*
* @param[out] participant Pointer to the Participant which discovered the remote DataReader.
* @param[out] info Remote DataReader information. User can take ownership of the object.
* @param[out] should_be_ignored Flag to indicate the library to automatically ignore the discovered DataReader.
* @param [out] participant Pointer to the Participant which discovered the remote DataReader.
* @param [out] info Remote DataReader information. User can take ownership of the object.
* @param [out] should_be_ignored Flag to indicate the library to automatically ignore the discovered DataReader.
*/
virtual void on_data_reader_discovery(
DomainParticipant* participant,
Expand All @@ -116,9 +116,9 @@ class DomainParticipantListener :
* This method is called when a new DataWriter is discovered, or a previously discovered DataWriter changes
* its QOS or is removed.
*
* @param[out] participant Pointer to the Participant which discovered the remote DataWriter.
* @param[out] info Remote DataWriter information. User can take ownership of the object.
* @param[out] should_be_ignored Flag to indicate the library to automatically ignore the discovered DataWriter.
* @param [out] participant Pointer to the Participant which discovered the remote DataWriter.
* @param [out] info Remote DataWriter information. User can take ownership of the object.
* @param [out] should_be_ignored Flag to indicate the library to automatically ignore the discovered DataWriter.
*/
virtual void on_data_writer_discovery(
DomainParticipant* participant,
Expand Down
26 changes: 13 additions & 13 deletions include/fastdds/dds/publisher/DataWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class DataWriter : public DomainEntity
* @brief Informs that the application will be modifying a particular instance.
* It gives an opportunity to the middleware to pre-configure itself to improve performance.
*
* @param[in] instance Sample used to get the instance's key.
* @param [in] instance Sample used to get the instance's key.
* @return Handle containing the instance's key.
* This handle could be used in successive `write` or `dispose` operations.
* In case of error, HANDLE_NIL will be returned.
Expand Down Expand Up @@ -220,8 +220,8 @@ class DataWriter : public DomainEntity
* Informs the middleware that the DataWriter is not intending to modify any more of that data instance.
* Also indicates that the middleware can locally remove all information regarding that instance.
*
* @param[in] instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL.
* @param[in] handle Instance's key to be unregistered.
* @param [in] instance Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL.
* @param [in] handle Instance's key to be unregistered.
* @return Returns the operation's result.
* If the operation finishes successfully, RETCODE_OK is returned.
*/
Expand Down Expand Up @@ -262,8 +262,8 @@ class DataWriter : public DomainEntity
* data-object known to the DataWriter. If the implementation is not able to check invalid handles then the result
* in this situation is unspecified.
*
* @param[in,out] key_holder Sample where the key fields will be returned.
* @param[in] handle Handle to the instance to retrieve the key values from.
* @param [in,out] key_holder Sample where the key fields will be returned.
* @param [in] handle Handle to the instance to retrieve the key values from.
*
* @return Any of the standard return codes.
*/
Expand All @@ -278,7 +278,7 @@ class DataWriter : public DomainEntity
* instance handle as an argument. The instance parameter is only used for the purpose of examining the fields that
* define the key.
*
* @param[in] instance Data pointer to the sample
* @param [in] instance Data pointer to the sample
*
* @return handle of the given instance
*/
Expand Down Expand Up @@ -318,7 +318,7 @@ class DataWriter : public DomainEntity
/**
* @brief Returns the offered deadline missed status
*
* @param[out] status Deadline missed status struct
* @param [out] status Deadline missed status struct
* @return RETCODE_OK
*/
FASTDDS_EXPORTED_API ReturnCode_t get_offered_deadline_missed_status(
Expand All @@ -327,7 +327,7 @@ class DataWriter : public DomainEntity
/**
* @brief Returns the offered incompatible qos status
*
* @param[out] status Offered incompatible qos status struct
* @param [out] status Offered incompatible qos status struct
* @return RETCODE_OK
*/
FASTDDS_EXPORTED_API ReturnCode_t get_offered_incompatible_qos_status(
Expand All @@ -336,7 +336,7 @@ class DataWriter : public DomainEntity
/**
* @brief Returns the publication matched status
*
* @param[out] status publication matched status struct
* @param [out] status publication matched status struct
* @return RETCODE_OK
*/
FASTDDS_EXPORTED_API ReturnCode_t get_publication_matched_status(
Expand Down Expand Up @@ -412,8 +412,8 @@ class DataWriter : public DomainEntity
* on the values of the handle parameter and the corresponding error behavior are the same specified for the
* unregister_instance operation.
*
* @param[in] data Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL.
* @param[in] handle InstanceHandle of the data
* @param [in] data Sample used to deduce instance's key in case of `handle` parameter is HANDLE_NIL.
* @param [in] handle InstanceHandle of the data
* @return RETCODE_PRECONDITION_NOT_MET if the handle introduced does not match with the one associated to the data,
* RETCODE_OK if the data is correctly sent and RETCODE_ERROR otherwise.
*/
Expand Down Expand Up @@ -478,7 +478,7 @@ class DataWriter : public DomainEntity
/**
* @brief Retrieves in a subscription associated with the DataWriter
*
* @param[out] subscription_data subscription data struct
* @param [out] subscription_data subscription data struct
* @param subscription_handle InstanceHandle_t of the subscription
* @return RETCODE_OK
*
Expand All @@ -491,7 +491,7 @@ class DataWriter : public DomainEntity
/**
* @brief Fills the given vector with the InstanceHandle_t of matched DataReaders
*
* @param[out] subscription_handles Vector where the InstanceHandle_t are returned
* @param [out] subscription_handles Vector where the InstanceHandle_t are returned
* @return RETCODE_OK
*
* @warning Not supported yet. Currently returns RETCODE_UNSUPPORTED
Expand Down
4 changes: 2 additions & 2 deletions include/fastdds/dds/publisher/Publisher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ class Publisher : public DomainEntity
/**
* @brief Copies TopicQos into the corresponding DataWriterQos
*
* @param[out] writer_qos
* @param[in] topic_qos
* @param [out] writer_qos
* @param [in] topic_qos
* @return RETCODE_OK if successful, an error code otherwise
*
* @warning Not supported yet. Currently returns RETCODE_UNSUPPORTED
Expand Down
Loading