Class DataReader

Inheritance Relationships

Base Type

Class Documentation

class DataReader : public dds::core::TEntity<detail::DataReader>

A DataReader allows the application to declare the data it wishes to receive.

See also

Datareader

Public Types

typedef DataReaderListener Listener

Local convenience typedef for dds::pub::DataReaderListener.

Public Functions

OMG_DDS_API const qos::DataReaderQos & qos () const

Gets the DataReaderQos setting for this instance.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

the qos

OMG_DDS_API void qos (const qos::DataReaderQos &qos)

Sets the DataReaderQos setting for this instance.

Parameters

qos – the qos

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

OMG_DDS_API DataReader & operator<< (const qos::DataReaderQos &qos)
OMG_DDS_API DataReader & operator>> (qos::DataReaderQos &qos)
OMG_DDS_API void listener (Listener *plistener, const dds::core::status::StatusMask &mask)

Register a listener with the DataReader.

The notifications received by the listener depend on the status mask with which it was registered.

Listener un-registration is performed by setting the listener to NULL.

See also listener information.

Parameters
  • plistener – the listener

  • mask – the mask defining the events for which the listener will be notified.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

  • dds::core::UnsupportedError – A status was selected that cannot be supported because the infrastructure does not maintain the required connectivity information.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

OMG_DDS_API Listener * listener () const

Get the listener of this DataReader.

See also listener information.

Throws

dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

Returns

the listener

OMG_DDS_API const dds::sub::Subscriber & subscriber () const

Return the Subscriber that owns this DataReader.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::NullReferenceError – The entity was not properly created and references to dds::core::null.

  • dds::core::AlreadyClosedError – The entity has already been closed.

Returns

the Subscriber

Public Members

dds::sub::Subscriber *subscriber_