123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- #ifndef PUBLISHERHISTORY_H_
- #define PUBLISHERHISTORY_H_
- #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
- #include <fastdds/rtps/resources/ResourceManagement.h>
- #include <fastdds/rtps/history/WriterHistory.h>
- #include <fastrtps/qos/QosPolicies.h>
- #include <fastrtps/common/KeyedChanges.h>
- #include <fastrtps/attributes/TopicAttributes.h>
- namespace eprosima {
- namespace fastrtps {
- class PublisherHistory : public rtps::WriterHistory
- {
- public:
-
- PublisherHistory(
- const TopicAttributes& topic_att,
- uint32_t payloadMax,
- rtps::MemoryManagementPolicy_t mempolicy);
- virtual ~PublisherHistory();
-
- bool register_instance(
- const rtps::InstanceHandle_t& instance_handle,
- std::unique_lock<RecursiveTimedMutex>& lock,
- const std::chrono::time_point<std::chrono::steady_clock>& max_blocking_time);
-
- bool add_pub_change(
- rtps::CacheChange_t* change,
- rtps::WriteParams& wparams,
- std::unique_lock<RecursiveTimedMutex>& lock,
- const std::chrono::time_point<std::chrono::steady_clock>& max_blocking_time);
-
- bool removeAllChange(
- size_t* removed);
-
- bool removeMinChange();
-
- bool remove_change_pub(
- rtps::CacheChange_t* change);
- virtual bool remove_change_g(
- rtps::CacheChange_t* a_change);
- bool remove_instance_changes(
- const rtps::InstanceHandle_t& handle,
- const rtps::SequenceNumber_t& seq_up_to);
-
- bool set_next_deadline(
- const rtps::InstanceHandle_t& handle,
- const std::chrono::steady_clock::time_point& next_deadline_us);
-
- bool get_next_deadline(
- rtps::InstanceHandle_t& handle,
- std::chrono::steady_clock::time_point& next_deadline_us);
-
- bool is_key_registered(
- const rtps::InstanceHandle_t& handle);
- private:
- typedef std::map<rtps::InstanceHandle_t, KeyedChanges> t_m_Inst_Caches;
-
- t_m_Inst_Caches keyed_changes_;
-
- std::chrono::steady_clock::time_point next_deadline_us_;
-
- HistoryQosPolicy history_qos_;
-
- ResourceLimitsQosPolicy resource_limited_qos_;
-
- TopicAttributes topic_att_;
-
- bool find_or_add_key(
- const rtps::InstanceHandle_t& instance_handle,
- t_m_Inst_Caches::iterator* map_it);
- };
- }
- }
- #endif
- #endif
|