123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- #ifndef _FASTDDS_RTPS_STATELESSWRITER_H_
- #define _FASTDDS_RTPS_STATELESSWRITER_H_
- #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
- #include <fastdds/rtps/writer/RTPSWriter.h>
- #include <fastdds/rtps/writer/ReaderLocator.h>
- #include <fastdds/rtps/common/Time_t.h>
- #include <fastrtps/utils/collections/ResourceLimitedVector.hpp>
- #include <list>
- namespace eprosima {
- namespace fastrtps {
- namespace rtps {
- class StatelessWriter : public RTPSWriter
- {
- friend class RTPSParticipantImpl;
- protected:
- StatelessWriter(
- RTPSParticipantImpl* participant,
- GUID_t& guid,
- WriterAttributes& attributes,
- WriterHistory* history,
- WriterListener* listener = nullptr);
- public:
- virtual ~StatelessWriter();
-
- void unsent_change_added_to_history(
- CacheChange_t* change,
- const std::chrono::time_point<std::chrono::steady_clock>& max_blocking_time) override;
-
- bool change_removed_by_history(
- CacheChange_t* change) override;
-
- bool matched_reader_add(
- const ReaderProxyData& data) override;
-
- bool matched_reader_remove(
- const GUID_t& reader_guid) override;
-
- bool matched_reader_is_matched(
- const GUID_t& reader_guid) override;
-
- void send_any_unsent_changes() override;
-
- void updateAttributes(
- const WriterAttributes& att) override
- {
- (void)att;
-
- }
- bool set_fixed_locators(
- const LocatorList_t& locator_list);
- void update_unsent_changes(
- const SequenceNumber_t& seq_num,
- const FragmentNumber_t& frag_num);
-
- void unsent_changes_reset();
- bool is_acked_by_all(
- const CacheChange_t* change) const override;
- bool try_remove_change(
- const std::chrono::steady_clock::time_point&,
- std::unique_lock<RecursiveTimedMutex>&) override;
- void add_flow_controller(
- std::unique_ptr<FlowController> controller) override;
-
- bool send(
- CDRMessage_t* message,
- std::chrono::steady_clock::time_point& max_blocking_time_point) const override;
- private:
- void get_builtin_guid();
- bool has_builtin_guid();
- void update_reader_info(
- bool create_sender_resources);
- bool intraprocess_delivery(
- CacheChange_t* change,
- ReaderLocator& reader_locator);
- void send_all_unsent_changes();
- void send_unsent_changes_with_flow_control();
- bool is_inline_qos_expected_ = false;
- LocatorList_t fixed_locators_;
- ResourceLimitedVector<ReaderLocator> matched_readers_;
- ResourceLimitedVector<GUID_t> late_joiner_guids_;
- SequenceNumber_t first_seq_for_all_readers_;
- bool ignore_fixed_locators_ = false;
- ResourceLimitedVector<ChangeForReader_t, std::true_type> unsent_changes_;
- std::vector<std::unique_ptr<FlowController> > flow_controllers_;
- uint64_t last_intraprocess_sequence_number_;
- bool there_are_remote_readers_ = false;
- };
- }
- }
- }
- #endif
- #endif
|