14.1.4.2. DataReaderListener

class eprosima::fastdds::dds::DataReaderListener

Class DataReaderListener, it should be used by the end user to implement specific callbacks to certain actions.

Subclassed by eprosima::fastdds::dds::SubscriberListener

Public Functions

DataReaderListener()

Constructor.

~DataReaderListener()

Destructor.

void on_data_available(DataReader *reader)

Virtual function to be implemented by the user containing the actions to be performed when a new Data Message is received.

Parameters

void on_subscription_matched(DataReader *reader, const fastdds::dds::SubscriptionMatchedStatus &info)

Virtual method to be called when the subscriber is matched with a new Writer (or unmatched); i.e., when a writer publishing in the same topic is discovered.

Parameters
  • reader: DataReader

  • info: The subscription matched status

void on_requested_deadline_missed(DataReader *reader, const fastrtps::RequestedDeadlineMissedStatus &status)

Virtual method to be called when a topic misses the deadline period

Parameters
  • reader: DataReader

  • status: The requested deadline missed status

void on_liveliness_changed(DataReader *reader, const fastrtps::LivelinessChangedStatus &status)

Method called when the liveliness status associated to a subscriber changes.

Parameters
  • reader: The DataReader

  • status: The liveliness changed status

void on_sample_rejected(DataReader *reader, const fastrtps::SampleRejectedStatus &status)

Method called when a sample was rejected.

Parameters
  • reader: The DataReader

  • status: The rejected status

void on_requested_incompatible_qos(DataReader *reader, const RequestedIncompatibleQosStatus &status)

Method called an incompatible QoS was requested.

Parameters
  • reader: The DataReader

  • status: The requested incompatible QoS status

void on_sample_lost(DataReader *reader, const SampleLostStatus &status)

Method called when a sample was lost.

Parameters
  • reader: The DataReader

  • status: The sample lost status