Class PDPListener
Defined in File PDPListener.h
Inheritance Relationships
Base Type
public eprosima::fastrtps::rtps::ReaderListener
(Class ReaderListener)
Class Documentation
-
class PDPListener : public eprosima::fastrtps::rtps::ReaderListener
Class PDPListener, specification used by the PDP to perform the History check when a new message is received. This class is implemented in order to use the same structure than with any other RTPSReader.
Public Functions
-
virtual ~PDPListener() override = default
-
virtual void onNewCacheChangeAdded(RTPSReader *reader, const CacheChange_t *const change) override
New added cache
- Parameters:
reader –
change –
Protected Functions
-
virtual void process_alive_data(ParticipantProxyData *old_data, ParticipantProxyData &new_data, GUID_t &writer_guid, RTPSReader *reader, std::unique_lock<std::recursive_mutex> &lock)
Process an incoming DATA(p). This method is called from PDPListener::onNewCacheChangeAdded() when an alive DATA(p) is received. Both the reader lock and the PDP lock are held when this method is called.
- Parameters:
old_data – Pointer to the ParticipantProxyData currently stored in the database. May be nullptr, for a recently discovered participant.
new_data – ParticipantProxyData from the DATA(p) message.
writer_guid – GUID of the writer that sent the DATA(p) message.
reader – RTPSReader that received the DATA(p) message.
lock – Lock on the PDP database. Passed so it can be released before invoking callbacks.
-
bool get_key(CacheChange_t *change)
Get the key of a CacheChange_t
- Parameters:
change – Pointer to the CacheChange_t
- Returns:
True on success
Protected Attributes
-
ParticipantProxyData temp_participant_data_
Temporary data to avoid reallocations.
Remark
This should be always accessed with the pdp_reader lock taken
-
virtual ~PDPListener() override = default