123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- #ifndef _FASTDDS_RTPS_READERLOCATOR_H_
- #define _FASTDDS_RTPS_READERLOCATOR_H_
- #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
- #include <vector>
- #include <fastdds/rtps/common/Locator.h>
- #include <fastdds/rtps/common/Guid.h>
- #include <fastdds/rtps/common/SequenceNumber.h>
- #include <fastdds/rtps/messages/RTPSMessageGroup.h>
- #include <fastdds/rtps/common/LocatorSelectorEntry.hpp>
- namespace eprosima {
- namespace fastrtps {
- namespace rtps {
- class RTPSParticipantImpl;
- class RTPSWriter;
- class RTPSReader;
- class ReaderLocator : public RTPSMessageSenderInterface
- {
- public:
- virtual ~ReaderLocator() = default;
-
- ReaderLocator(
- RTPSWriter* owner,
- size_t max_unicast_locators,
- size_t max_multicast_locators);
- bool expects_inline_qos() const
- {
- return expects_inline_qos_;
- }
- bool is_local_reader() const
- {
- return is_local_reader_;
- }
- RTPSReader* local_reader();
- void local_reader(
- RTPSReader* local_reader)
- {
- local_reader_ = local_reader;
- }
- const GUID_t& remote_guid() const
- {
- return locator_info_.remote_guid;
- }
- LocatorSelectorEntry* locator_selector_entry()
- {
- return &locator_info_;
- }
-
- bool start(
- const GUID_t& remote_guid,
- const ResourceLimitedVector<Locator_t>& unicast_locators,
- const ResourceLimitedVector<Locator_t>& multicast_locators,
- bool expects_inline_qos);
-
- bool update(
- const ResourceLimitedVector<Locator_t>& unicast_locators,
- const ResourceLimitedVector<Locator_t>& multicast_locators,
- bool expects_inline_qos);
-
- bool stop(
- const GUID_t& remote_guid);
-
- bool destinations_have_changed() const override
- {
- return false;
- }
-
- GuidPrefix_t destination_guid_prefix() const override
- {
- return locator_info_.remote_guid.guidPrefix;
- }
-
- const std::vector<GuidPrefix_t>& remote_participants() const override
- {
- return guid_prefix_as_vector_;
- }
-
- const std::vector<GUID_t>& remote_guids() const override
- {
- return guid_as_vector_;
- }
-
- bool send(
- CDRMessage_t* message,
- std::chrono::steady_clock::time_point& max_blocking_time_point) const override;
- private:
- RTPSWriter* owner_;
- RTPSParticipantImpl* participant_owner_;
- LocatorSelectorEntry locator_info_;
- bool expects_inline_qos_;
- bool is_local_reader_;
- RTPSReader* local_reader_;
- std::vector<GuidPrefix_t> guid_prefix_as_vector_;
- std::vector<GUID_t> guid_as_vector_;
- };
- }
- }
- }
- #endif
- #endif
|