57 fastdds::dds::TopicDataType* type,
60 rtps::MemoryManagementPolicy_t mempolicy);
72 const_iterator removal,
73 bool release =
true)
override;
90 const rtps::GUID_t& writer_guid,
91 uint32_t total_payload_size,
92 size_t unknown_missing_changes_up_to,
93 bool& will_never_be_accepted)
const override;
103 rtps::CacheChange_t* change,
104 size_t unknown_missing_changes_up_to)
override;
113 rtps::CacheChange_t* change)
override;
126 std::chrono::steady_clock::time_point& max_blocking_time);
131 std::chrono::steady_clock::time_point& max_blocking_time);
148 rtps::CacheChange_t* change);
157 rtps::CacheChange_t* change,
167 const rtps::InstanceHandle_t& handle,
168 const std::chrono::steady_clock::time_point& next_deadline_us);
177 rtps::InstanceHandle_t& handle,
178 std::chrono::steady_clock::time_point& next_deadline_us);
182 using rtps::ReaderHistory::completed_change;
183 using rtps::ReaderHistory::received_change;
184 using rtps::ReaderHistory::remove_change_nts;
186 using t_m_Inst_Caches = std::map<rtps::InstanceHandle_t, KeyedChanges>;
189 t_m_Inst_Caches keyed_changes_;
191 std::chrono::steady_clock::time_point next_deadline_us_;
199 fastdds::dds::TopicDataType* type_;
204 void* get_key_object_;
207 std::function<bool(rtps::CacheChange_t*,
size_t)> receive_fn_;
210 std::function<bool(rtps::CacheChange_t*)> complete_fn_;
219 rtps::CacheChange_t* a_change,
220 t_m_Inst_Caches::iterator& map_it);
228 bool find_key_for_change(
229 rtps::CacheChange_t* a_change,
230 t_m_Inst_Caches::iterator& map_it);
240 bool received_change_keep_all_no_key(
241 rtps::CacheChange_t* change,
242 size_t unknown_missing_changes_up_to);
244 bool received_change_keep_last_no_key(
245 rtps::CacheChange_t* change,
246 size_t unknown_missing_changes_up_to);
248 bool received_change_keep_all_with_key(
249 rtps::CacheChange_t* change,
250 size_t unknown_missing_changes_up_to);
252 bool received_change_keep_last_with_key(
253 rtps::CacheChange_t* change,
254 size_t unknown_missing_changes_up_to);
256 bool completed_change_keep_all_with_key(
257 rtps::CacheChange_t* change);
259 bool completed_change_keep_last_with_key(
260 rtps::CacheChange_t* change);
263 bool add_received_change(
264 rtps::CacheChange_t* a_change);
266 bool add_received_change_with_key(
267 rtps::CacheChange_t* a_change,
268 std::vector<rtps::CacheChange_t*>& instance_changes);
270 bool deserialize_change(
271 rtps::CacheChange_t* change,
272 uint32_t ownership_strength,
Class SubscriberHistory, container of the different CacheChanges of a subscriber.
Definition SubscriberHistory.h:44
bool received_change(rtps::CacheChange_t *change, size_t unknown_missing_changes_up_to) override
Called when a change is received by the Subscriber.
bool remove_change_sub(rtps::CacheChange_t *change)
This method is called to remove a change from the SubscriberHistory.
bool get_first_untaken_info(SampleInfo_t *info)
Returns information about the first untaken sample.
bool remove_change_sub(rtps::CacheChange_t *change, iterator &it)
This method is called to remove a change from the SubscriberHistory.
bool readNextData(void *data, SampleInfo_t *info, std::chrono::steady_clock::time_point &max_blocking_time)
bool get_next_deadline(rtps::InstanceHandle_t &handle, std::chrono::steady_clock::time_point &next_deadline_us)
A method to get the next instance handle that will miss the deadline and the time when the deadline w...
bool can_change_be_added_nts(const rtps::GUID_t &writer_guid, uint32_t total_payload_size, size_t unknown_missing_changes_up_to, bool &will_never_be_accepted) const override
Check if a new change can be added to this history.
bool completed_change(rtps::CacheChange_t *change) override
Called when a fragmented change is received completely by the Subscriber.
SubscriberHistory(const TopicAttributes &topic_att, fastdds::dds::TopicDataType *type, const fastrtps::ReaderQos &qos, uint32_t payloadMax, rtps::MemoryManagementPolicy_t mempolicy)
Constructor.
bool takeNextData(void *data, SampleInfo_t *info, std::chrono::steady_clock::time_point &max_blocking_time)
bool set_next_deadline(const rtps::InstanceHandle_t &handle, const std::chrono::steady_clock::time_point &next_deadline_us)
A method to set the next deadline for the given instance.
iterator remove_change_nts(const_iterator removal, bool release=true) override
Remove a specific change from the history.