Class PublisherHistory, implementing a WriterHistory with support for keyed topics and HistoryQOS.
More...
#include <PublisherHistory.h>
|
| PublisherHistory (const TopicAttributes &topic_att, uint32_t payloadMax, rtps::MemoryManagementPolicy_t mempolicy) |
| Constructor of the PublisherHistory.
|
|
virtual | ~PublisherHistory () |
|
void | rebuild_instances () |
| Rebuild instances loaded from DB.
|
|
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) |
| Tries to reserve resources for the new instance.
|
|
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) |
| Add a change comming from the Publisher.
|
|
bool | removeAllChange (size_t *removed) |
| Remove all change from the associated history.
|
|
bool | removeMinChange () |
| Remove the change with the minimum sequence Number.
|
|
bool | remove_change_pub (rtps::CacheChange_t *change) |
| Remove a change by the publisher History.
|
|
bool | remove_change_g (rtps::CacheChange_t *a_change) override |
|
bool | remove_change_g (rtps::CacheChange_t *a_change, const std::chrono::time_point< std::chrono::steady_clock > &max_blocking_time) override |
|
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) |
| Sets the next deadline for the given instance.
|
|
bool | get_next_deadline (rtps::InstanceHandle_t &handle, std::chrono::steady_clock::time_point &next_deadline_us) |
| Returns the deadline for the instance that is next going to 'expire'.
|
|
bool | is_key_registered (const rtps::InstanceHandle_t &handle) |
| Checks if the instance's key is registered.
|
|
bool | wait_for_acknowledgement_last_change (const rtps::InstanceHandle_t &handle, std::unique_lock< RecursiveTimedMutex > &lock, const std::chrono::time_point< std::chrono::steady_clock > &max_blocking_time) |
| Waits till the last change in the instance history has been acknowledged.
|
|
Class PublisherHistory, implementing a WriterHistory with support for keyed topics and HistoryQOS.
This class is created by the PublisherImpl and should not be used by the user directly.
◆ PublisherHistory()
Constructor of the PublisherHistory.
- Parameters
-
topic_att | TopicAttributed |
payloadMax | Maximum payload size. |
mempolicy | Set whether the payloads ccan dynamically resized or not. |
◆ ~PublisherHistory()
◆ add_pub_change()
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 |
|
) |
| |
Add a change comming from the Publisher.
- Parameters
-
change | Pointer to the change |
wparams | Extra write parameters. |
lock | |
max_blocking_time | |
- Returns
- True if added.
◆ get_next_deadline()
bool get_next_deadline |
( |
rtps::InstanceHandle_t & |
handle, |
|
|
std::chrono::steady_clock::time_point & |
next_deadline_us |
|
) |
| |
Returns the deadline for the instance that is next going to 'expire'.
- Parameters
-
handle | The handle for the instance that will next miss the deadline |
next_deadline_us | The time point when the deadline will occur |
- Returns
- True if deadline could be retrieved for the given instance
◆ is_key_registered()
bool is_key_registered |
( |
const rtps::InstanceHandle_t & |
handle | ) |
|
Checks if the instance's key is registered.
- Parameters
-
[in] | handle | Instance's key. return true if instance's key is registered in the history. |
◆ rebuild_instances()
void rebuild_instances |
( |
| ) |
|
Rebuild instances loaded from DB.
Does nothing if the topic doesn't have key.
◆ register_instance()
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 |
|
) |
| |
Tries to reserve resources for the new instance.
- Parameters
-
instance_handle | Instance's key. |
lock | Lock which should be unlock in case the operation has to wait. |
max_blocking_time | Maximum time the operation should be waiting. |
- Returns
- True if resources was reserved successfully.
◆ remove_change_g() [1/2]
bool remove_change_g |
( |
rtps::CacheChange_t * |
a_change | ) |
|
|
override |
◆ remove_change_g() [2/2]
bool remove_change_g |
( |
rtps::CacheChange_t * |
a_change, |
|
|
const std::chrono::time_point< std::chrono::steady_clock > & |
max_blocking_time |
|
) |
| |
|
override |
◆ remove_change_pub()
bool remove_change_pub |
( |
rtps::CacheChange_t * |
change | ) |
|
Remove a change by the publisher History.
- Parameters
-
change | Pointer to the CacheChange_t. |
- Returns
- True if removed.
◆ remove_instance_changes()
bool remove_instance_changes |
( |
const rtps::InstanceHandle_t & |
handle, |
|
|
const rtps::SequenceNumber_t & |
seq_up_to |
|
) |
| |
◆ removeAllChange()
bool removeAllChange |
( |
size_t * |
removed | ) |
|
Remove all change from the associated history.
- Parameters
-
removed | Number of elements removed. |
- Returns
- True if all elements were removed.
◆ removeMinChange()
Remove the change with the minimum sequence Number.
- Returns
- True if removed.
◆ set_next_deadline()
bool set_next_deadline |
( |
const rtps::InstanceHandle_t & |
handle, |
|
|
const std::chrono::steady_clock::time_point & |
next_deadline_us |
|
) |
| |
Sets the next deadline for the given instance.
- Parameters
-
handle | The instance handle |
next_deadline_us | The time point when the deadline will occur |
- Returns
- True if deadline was set successfully
◆ wait_for_acknowledgement_last_change()
bool wait_for_acknowledgement_last_change |
( |
const rtps::InstanceHandle_t & |
handle, |
|
|
std::unique_lock< RecursiveTimedMutex > & |
lock, |
|
|
const std::chrono::time_point< std::chrono::steady_clock > & |
max_blocking_time |
|
) |
| |
Waits till the last change in the instance history has been acknowledged.
- Parameters
-
handle | Instance's handle. |
lock | Lock which should be unlock in case the operation has to wait. |
max_blocking_time | Maximum time the operation should be waiting. |
- Returns
- true when the last change of the instance history is acknowleged, false when timeout is reached.
The documentation for this class was generated from the following file: