123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- #ifndef _FASTDDS_RTPS_EDP_H_
- #define _FASTDDS_RTPS_EDP_H_
- #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
- #include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
- #include <fastdds/rtps/builtin/data/ReaderProxyData.h>
- #include <fastdds/rtps/builtin/data/WriterProxyData.h>
- #include <fastdds/rtps/common/Guid.h>
- #include <fastdds/dds/core/status/PublicationMatchedStatus.hpp>
- #include <fastdds/dds/core/status/SubscriptionMatchedStatus.hpp>
- namespace eprosima {
- namespace fastrtps {
- namespace types {
- class TypeIdentifier;
- }
- class TopicAttributes;
- namespace rtps {
- class PDP;
- class ParticipantProxyData;
- class RTPSWriter;
- class RTPSReader;
- class WriterProxyData;
- class RTPSParticipantImpl;
- class EDP
- {
- public:
-
- EDP(
- PDP* p,
- RTPSParticipantImpl* part);
- virtual ~EDP();
-
- virtual bool initEDP(
- BuiltinAttributes& attributes) = 0;
-
- virtual void assignRemoteEndpoints(
- const ParticipantProxyData& pdata) = 0;
-
- virtual void removeRemoteEndpoints(
- ParticipantProxyData* pdata)
- {
- (void) pdata;
- }
-
- virtual bool areRemoteEndpointsMatched(
- const ParticipantProxyData* )
- {
- return false;
- }
-
- virtual bool removeLocalReader(
- RTPSReader* R) = 0;
-
- virtual bool removeLocalWriter(
- RTPSWriter* W) = 0;
-
- virtual bool processLocalReaderProxyData(
- RTPSReader* reader,
- ReaderProxyData* rdata) = 0;
-
- virtual bool processLocalWriterProxyData(
- RTPSWriter* writer,
- WriterProxyData* wdata) = 0;
-
- bool newLocalReaderProxyData(
- RTPSReader* R,
- const TopicAttributes& att,
- const ReaderQos& qos);
-
- bool newLocalWriterProxyData(
- RTPSWriter* W,
- const TopicAttributes& att,
- const WriterQos& qos);
-
- bool updatedLocalReader(
- RTPSReader* R,
- const TopicAttributes& att,
- const ReaderQos& qos);
-
- bool updatedLocalWriter(
- RTPSWriter* W,
- const TopicAttributes& att,
- const WriterQos& qos);
-
- bool validMatching(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata);
-
- bool validMatching(
- const ReaderProxyData* rdata,
- const WriterProxyData* wdata);
-
- bool unpairWriterProxy(
- const GUID_t& participant_guid,
- const GUID_t& writer_guid);
-
- bool unpairReaderProxy(
- const GUID_t& participant_guid,
- const GUID_t& reader_guid);
-
- bool pairing_reader_proxy_with_any_local_writer(
- const GUID_t& participant_guid,
- ReaderProxyData* rdata);
- #if HAVE_SECURITY
- bool pairing_reader_proxy_with_local_writer(
- const GUID_t& local_writer,
- const GUID_t& remote_participant_guid,
- ReaderProxyData& rdata);
- bool pairing_remote_reader_with_local_writer_after_security(
- const GUID_t& local_writer,
- const ReaderProxyData& remote_reader_data);
- #endif
-
- bool pairing_writer_proxy_with_any_local_reader(
- const GUID_t& participant_guid,
- WriterProxyData* wdata);
- #if HAVE_SECURITY
- bool pairing_writer_proxy_with_local_reader(
- const GUID_t& local_reader,
- const GUID_t& remote_participant_guid,
- WriterProxyData& wdata);
- bool pairing_remote_writer_with_local_reader_after_security(
- const GUID_t& local_reader,
- const WriterProxyData& remote_writer_data);
- virtual bool pairing_remote_writer_with_local_builtin_reader_after_security(
- const GUID_t& ,
- const WriterProxyData& )
- {
- return false;
- }
- virtual bool pairing_remote_reader_with_local_builtin_writer_after_security(
- const GUID_t& ,
- const ReaderProxyData& )
- {
- return false;
- }
- #endif
- 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);
-
- PDP* mp_PDP;
-
- RTPSParticipantImpl* mp_RTPSParticipant;
- private:
-
- bool pairingReader(
- RTPSReader* R,
- const GUID_t& participant_guid,
- const ReaderProxyData& rdata);
-
- bool pairingWriter(
- RTPSWriter* W,
- const GUID_t& participant_guid,
- const WriterProxyData& wdata);
- bool checkDataRepresentationQos(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata) const;
- bool checkTypeValidation(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata) const;
- bool checkTypeIdentifier(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata) const;
- bool hasTypeIdentifier(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata) const;
- bool checkTypeObject(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata) const;
- bool hasTypeObject(
- const WriterProxyData* wdata,
- const ReaderProxyData* rdata) const;
- ReaderProxyData temp_reader_proxy_data_;
- WriterProxyData temp_writer_proxy_data_;
- std::map<GUID_t, fastdds::dds::SubscriptionMatchedStatus> reader_status_;
- std::map<GUID_t, fastdds::dds::PublicationMatchedStatus> writer_status_;
- };
- }
- }
- }
- #endif
- #endif
|