Class EDP
Defined in File EDP.h
Nested Relationships
Nested Types
Inheritance Relationships
Derived Types
public eprosima::fastrtps::rtps::EDPSimple
(Class EDPSimple)public eprosima::fastrtps::rtps::EDPStatic
(Class EDPStatic)
Class Documentation
-
class EDP
Class EDP, base class for Endpoint Discovery Protocols. It contains generic methods used by the two EDP implemented (EDPSimple and EDPStatic), as well as abstract methods definitions required by the specific implementations.
Subclassed by eprosima::fastrtps::rtps::EDPSimple, eprosima::fastrtps::rtps::EDPStatic
Public Functions
-
EDP(PDP *p, RTPSParticipantImpl *part)
Constructor.
- Parameters
p – Pointer to the PDPSimple
part – Pointer to the RTPSParticipantImpl
-
virtual ~EDP()
-
virtual bool initEDP(BuiltinAttributes &attributes) = 0
Abstract method to initialize the EDP.
- Parameters
attributes – DiscoveryAttributes structure.
- Returns
True if correct.
-
virtual void assignRemoteEndpoints(const ParticipantProxyData &pdata) = 0
Abstract method that assigns remote endpoints when a new RTPSParticipantProxyData is discovered.
- Parameters
pdata – Discovered ParticipantProxyData
-
inline virtual void removeRemoteEndpoints(ParticipantProxyData *pdata)
Remove remote endpoints from the endpoint discovery protocol
- Parameters
pdata – Pointer to the ParticipantProxyData to remove
-
inline virtual bool areRemoteEndpointsMatched(const ParticipantProxyData*)
Verify whether the given participant EDP endpoints are matched with us.
-
virtual bool removeLocalReader(RTPSReader *R) = 0
Abstract method that removes a local Reader from the discovery method
- Parameters
R – Pointer to the Reader to remove.
- Returns
True if correctly removed.
-
virtual bool removeLocalWriter(RTPSWriter *W) = 0
Abstract method that removes a local Writer from the discovery method
- Parameters
W – Pointer to the Writer to remove.
- Returns
True if correctly removed.
-
virtual bool processLocalReaderProxyData(RTPSReader *reader, ReaderProxyData *rdata) = 0
After a new local ReaderProxyData has been created some processing is needed (depends on the implementation).
- Parameters
reader – Pointer to the Reader object.
rdata – Pointer to the ReaderProxyData object.
- Returns
True if correct.
-
virtual bool processLocalWriterProxyData(RTPSWriter *writer, WriterProxyData *wdata) = 0
After a new local WriterProxyData has been created some processing is needed (depends on the implementation).
- Parameters
writer – Pointer to the Writer object.
wdata – Pointer to the Writer ProxyData object.
- Returns
True if correct.
-
bool newLocalReaderProxyData(RTPSReader *R, const TopicAttributes &att, const ReaderQos &qos, const fastdds::rtps::ContentFilterProperty *content_filter = nullptr)
Create a new ReaderPD for a local Reader.
- Parameters
R – Pointer to the RTPSReader.
att – Attributes of the associated topic
qos – QoS policies dictated by the subscriber
content_filter – Optional content filtering information.
- Returns
True if correct.
-
bool newLocalWriterProxyData(RTPSWriter *W, const TopicAttributes &att, const WriterQos &qos)
Create a new ReaderPD for a local Writer.
- Parameters
W – Pointer to the RTPSWriter.
att – Attributes of the associated topic
qos – QoS policies dictated by the publisher
- Returns
True if correct.
-
bool updatedLocalReader(RTPSReader *R, const TopicAttributes &att, const ReaderQos &qos, const fastdds::rtps::ContentFilterProperty *content_filter = nullptr)
A previously created Reader has been updated
- Parameters
R – Pointer to the reader
att – Attributes of the associated topic
qos – QoS policies dictated by the subscriber
content_filter – Optional content filtering information.
- Returns
True if correctly updated
-
bool updatedLocalWriter(RTPSWriter *W, const TopicAttributes &att, const WriterQos &qos)
A previously created Writer has been updated
- Parameters
W – Pointer to the Writer
att – Attributes of the associated topic
qos – QoS policies dictated by the publisher
- Returns
True if correctly updated
-
bool validMatching(const WriterProxyData *wdata, const ReaderProxyData *rdata)
Check the validity of a matching between a local RTPSWriter and a ReaderProxyData object.
- Parameters
wdata – Pointer to the WriterProxyData object of the local RTPSWriter.
rdata – Pointer to the ReaderProxyData object.
- Returns
True if the two can be matched.
-
bool validMatching(const ReaderProxyData *rdata, const WriterProxyData *wdata)
Check the validity of a matching between a local RTPSReader and a WriterProxyData object.
- Parameters
rdata – Pointer to the ReaderProxyData object of the local RTPSReader.
wdata – Pointer to the WriterProxyData object.
- Returns
True if the two can be matched.
-
bool valid_matching(const WriterProxyData *wdata, const ReaderProxyData *rdata, MatchingFailureMask &reason, fastdds::dds::PolicyMask &incompatible_qos)
Check the validity of a matching between a local RTPSWriter and a ReaderProxyData object.
- Parameters
wdata – Pointer to the WriterProxyData object of the local RTPSWriter.
rdata – Pointer to the ReaderProxyData object.
reason – [out] On return will specify the reason of failed matching (if any).
incompatible_qos – [out] On return will specify all the QoS values that were incompatible (if any).
- Returns
True if the two can be matched.
-
bool valid_matching(const ReaderProxyData *rdata, const WriterProxyData *wdata, MatchingFailureMask &reason, fastdds::dds::PolicyMask &incompatible_qos)
Check the validity of a matching between a local RTPSReader and a WriterProxyData object.
- Parameters
rdata – Pointer to the ReaderProxyData object of the local RTPSReader.
wdata – Pointer to the WriterProxyData object.
reason – [out] On return will specify the reason of failed matching (if any).
incompatible_qos – [out] On return will specify all the QoS values that were incompatible (if any).
- Returns
True if the two can be matched.
-
bool unpairWriterProxy(const GUID_t &participant_guid, const GUID_t &writer_guid, bool removed_by_lease)
Unpair a WriterProxyData object from all local readers.
- Parameters
participant_guid – GUID of the participant.
writer_guid – GUID of the writer.
removed_by_lease – Whether the writer is being unpaired due to a participant drop.
- Returns
True if correct.
-
bool unpairReaderProxy(const GUID_t &participant_guid, const GUID_t &reader_guid)
Unpair a ReaderProxyData object from all local writers.
- Parameters
participant_guid – GUID of the participant.
reader_guid – GUID of the reader.
- Returns
True if correct.
-
bool pairing_reader_proxy_with_any_local_writer(const GUID_t &participant_guid, ReaderProxyData *rdata)
Try to pair/unpair ReaderProxyData.
- Parameters
participant_guid – Identifier of the participant.
rdata – Pointer to the ReaderProxyData object.
- Returns
True.
-
bool pairing_writer_proxy_with_any_local_reader(const GUID_t &participant_guid, WriterProxyData *wdata)
Try to pair/unpair WriterProxyData.
- Parameters
participant_guid – Identifier of the participant.
wdata – Pointer to the WriterProxyData.
- Returns
True.
-
const fastdds::dds::SubscriptionMatchedStatus &update_subscription_matched_status(const GUID_t &reader_guid, const GUID_t &writer_guid, int change)
-
const fastdds::dds::PublicationMatchedStatus &update_publication_matched_status(const GUID_t &reader_guid, const GUID_t &writer_guid, int change)
-
ProxyPool<ReaderProxyData> &get_temporary_reader_proxies_pool()
Access the temporary proxy pool for reader proxies
- Returns
pool reference
-
ProxyPool<WriterProxyData> &get_temporary_writer_proxies_pool()
Access the temporary proxy pool for writer proxies
- Returns
pool reference
Public Members
-
RTPSParticipantImpl *mp_RTPSParticipant
Pointer to the RTPSParticipant.
-
class MatchingFailureMask : public std::bitset<MATCH_FAILURE_REASON_COUNT>
Mask to hold the reasons why two endpoints do not match.
Public Static Attributes
-
static const uint32_t different_topic = (0x00000001 << 0u)
Bit index for matching failing due to different topic.
-
static const uint32_t inconsistent_topic = (0x00000001 << 1u)
Bit index for matching failing due to inconsistent topic (same topic name but different characteristics)
-
static const uint32_t different_topic = (0x00000001 << 0u)
-
EDP(PDP *p, RTPSParticipantImpl *part)