Fast RTPS  Version 2.4.1
Fast RTPS

Class PublisherHistory, implementing a WriterHistory with support for keyed topics and HistoryQOS. More...

#include <PublisherHistory.h>

Inheritance diagram for PublisherHistory:

Public Member Functions

 PublisherHistory (const TopicAttributes &topic_att, uint32_t payloadMax, rtps::MemoryManagementPolicy_t mempolicy)
 Constructor of the PublisherHistory. More...
 
virtual ~PublisherHistory ()
 
void rebuild_instances ()
 Rebuild instances loaded from DB. More...
 
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. More...
 
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. More...
 
bool removeAllChange (size_t *removed)
 Remove all change from the associated history. More...
 
bool removeMinChange ()
 Remove the change with the minimum sequence Number. More...
 
bool remove_change_pub (rtps::CacheChange_t *change)
 Remove a change by the publisher History. More...
 
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)
 Sets the next deadline for the given instance. More...
 
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'. More...
 
bool is_key_registered (const rtps::InstanceHandle_t &handle)
 Checks if the instance's key is registered. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PublisherHistory()

PublisherHistory ( const TopicAttributes topic_att,
uint32_t  payloadMax,
rtps::MemoryManagementPolicy_t  mempolicy 
)

Constructor of the PublisherHistory.

Parameters
topic_attTopicAttributed
payloadMaxMaximum payload size.
mempolicySet whether the payloads ccan dynamically resized or not.

◆ ~PublisherHistory()

virtual ~PublisherHistory ( )
virtual

Member Function Documentation

◆ 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
changePointer to the change
wparamsExtra 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
handleThe handle for the instance that will next miss the deadline
next_deadline_usThe 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]handleInstance'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_handleInstance's key.
lockLock which should be unlock in case the operation has to wait.
max_blocking_timeMaximum time the operation should be waiting.
Returns
True if resources was reserved successfully.

◆ remove_change_g()

virtual bool remove_change_g ( rtps::CacheChange_t *  a_change)
virtual

◆ remove_change_pub()

bool remove_change_pub ( rtps::CacheChange_t *  change)

Remove a change by the publisher History.

Parameters
changePointer 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
removedNumber of elements removed.
Returns
True if all elements were removed.

◆ removeMinChange()

bool 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
handleThe instance handle
next_deadline_usThe time point when the deadline will occur
Returns
True if deadline was set successfully

The documentation for this class was generated from the following file: