CoreDX DDS Modern C++ API
|
Typeless base class for the typed DataReader. More...
Public Member Functions | |
const dds::sub::Subscriber & | subscriber () const |
Get the Subscriber that owns this DataReader. More... | |
const dds::topic::TopicDescription & | topic_description () const |
Get the TopicDescription associated with this DataReader. More... | |
void | wait_for_historical_data (const dds::core::Duration &timeout) |
This operation will block the application thread until all “historical” data is received. More... | |
dds::sub::qos::DataReaderQos | qos () const |
Gets the DataReaderQos setting for this instance. More... | |
void | qos (const dds::sub::qos::DataReaderQos &qos) |
This operation replaces the existing set of QosPolicy settings for a DataReader. More... | |
AnyDataReader & | operator<< (const dds::sub::qos::DataReaderQos &qos) |
This operation replaces the existing set of QosPolicy settings for a DataReader. More... | |
const AnyDataReader & | operator>> (dds::sub::qos::DataReaderQos &qos) const |
Gets the DataReaderQos setting for this instance. More... | |
dds::core::status::LivelinessChangedStatus | liveliness_changed_status () |
This operation obtains the LivelinessChangedStatus object of the DataReader. More... | |
dds::core::status::SampleRejectedStatus | sample_rejected_status () |
This operation obtains the SampleRejectedStatus object of the DataReader. More... | |
dds::core::status::SampleLostStatus | sample_lost_status () |
This operation obtains the SampleLostStatus object of the DataReader. More... | |
dds::core::status::RequestedDeadlineMissedStatus | requested_deadline_missed_status () |
This operation obtains the RequestedDeadlineMissedStatus object of the DataReader. More... | |
dds::core::status::RequestedIncompatibleQosStatus | requested_incompatible_qos_status () |
This operation obtains the RequestedIncompatibleQosStatus object of the DataReader. More... | |
dds::core::status::SubscriptionMatchedStatus | subscription_matched_status () |
This operation obtains the SubscriptionMatchedStatus object of the DataReader. More... | |
Public Member Functions inherited from dds::core::Entity | |
void | enable () |
This operation enables the Entity. More... | |
const dds::core::status::StatusMask | status_changes () |
This operation retrieves the list of communication statuses in the Entity that are triggered.That is, the list of statuses whose value has changed since the last time the application read the status. More... | |
const dds::core::InstanceHandle | instance_handle () const |
This operation returns the InstanceHandle_t that represents the Entity. | |
void | close () |
This method closes the entity and releases all resources associated with DDS, such as threads, sockets, buffers, etc. More... | |
void | retain () |
Indicates that references to this object may go out of scope but that the application expects to look it up again later. More... | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
Typeless base class for the typed DataReader.
DataReaders are created type specific (fi DataReader<Foo::Bar> reader). However, there are many places in the API (and possibly application) where the type can not be known while still some DataReader has to be passed around, stored or even typeless functionality called.
Main examples in the API that need typeless DataReader are: Subscriber, SubscriberListener and DomainParticipantListener.
dds::core::status::LivelinessChangedStatus dds::sub::AnyDataReader::liveliness_changed_status | ( | ) |
This operation obtains the LivelinessChangedStatus object of the DataReader.
This object contains the information whether the liveliness of one or more DataWriter objects that were writing instances read by the DataReader has changed. In other words, some DataWriter have become "alive" or "not alive".
The LivelinessChangedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.
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. |
AnyDataReader& dds::sub::AnyDataReader::operator<< | ( | const dds::sub::qos::DataReaderQos & | qos | ) |
This operation replaces the existing set of QosPolicy settings for a DataReader.
The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.
When the application tries to change a QosPolicy setting for an enabled DataReader, which can only be set before the DataReader is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.
When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.
qos | the qos |
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. |
dds::core::ImmutablePolicyError | The parameter qos contains an immutable QosPolicy setting with a different value than set during enabling of the DataReader. |
dds::core::InconsistentPolicyError | The parameter qos contains conflicting QosPolicy settings, |
const AnyDataReader& dds::sub::AnyDataReader::operator>> | ( | dds::sub::qos::DataReaderQos & | qos | ) | const |
Gets the DataReaderQos setting for this instance.
Populates the target DataReaderQos.
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. |
dds::sub::qos::DataReaderQos dds::sub::AnyDataReader::qos | ( | ) | const |
Gets the DataReaderQos setting for this instance.
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. |
void dds::sub::AnyDataReader::qos | ( | const dds::sub::qos::DataReaderQos & | qos | ) |
This operation replaces the existing set of QosPolicy settings for a DataReader.
The parameter qos contains the object with the QosPolicy settings which is checked for self-consistency and mutability.
When the application tries to change a QosPolicy setting for an enabled DataReader, which can only be set before the DataReader is enabled, the operation will fail and a ImmutablePolicyError is thrown. In other words, the application must provide the presently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed.
When the qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicyError is thrown.
qos | the qos |
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. |
dds::core::ImmutablePolicyError | The parameter qos contains an immutable QosPolicy setting with a different value than set during enabling of the DataReader. |
dds::core::InconsistentPolicyError | The parameter qos contains conflicting QosPolicy settings, |
dds::core::status::RequestedDeadlineMissedStatus dds::sub::AnyDataReader::requested_deadline_missed_status | ( | ) |
This operation obtains the RequestedDeadlineMissedStatus object of the DataReader.
This object contains the information whether the deadline that the DataReader was expecting through its dds::core::policy::Deadline QosPolicy was not respected for a specific instance.
The RequestedDeadlineMissedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.
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. |
dds::core::status::RequestedIncompatibleQosStatus dds::sub::AnyDataReader::requested_incompatible_qos_status | ( | ) |
This operation obtains the RequestedIncompatibleQosStatus object of the DataReader.
This object contains the information whether a QosPolicy setting was incompatible with the offered QosPolicy setting.
The Request/Offering mechanism is applicable between the DataWriter and the DataReader. If the QosPolicy settings between DataWriter and DataReader are inconsistent, no communication between them is established. In addition the DataWriter will be informed via a REQUESTED_INCOMPATIBLE_QOS status change and the DataReader will be informed via an OFFERED_INCOMPATIBLE_QOS status change.
The RequestedIncompatibleQosStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.
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. |
dds::core::status::SampleLostStatus dds::sub::AnyDataReader::sample_lost_status | ( | ) |
This operation obtains the SampleLostStatus object of the DataReader.
This object contains information whether samples have been lost.
The SampleLostStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.
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. |
dds::core::status::SampleRejectedStatus dds::sub::AnyDataReader::sample_rejected_status | ( | ) |
This operation obtains the SampleRejectedStatus object of the DataReader.
This object contains the information whether a received sample has been rejected. Samples may be rejected by the DataReader when it exceeds the resource_limits to store incoming samples. Usually this means that old samples need to be 'consumed' (for example by 'taking' them instead of 'reading' them) to make room for newly incoming samples.
The SampleRejectedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.
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. |
const dds::sub::Subscriber& dds::sub::AnyDataReader::subscriber | ( | ) | const |
Get the Subscriber that owns this DataReader.
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::status::SubscriptionMatchedStatus dds::sub::AnyDataReader::subscription_matched_status | ( | ) |
This operation obtains the SubscriptionMatchedStatus object of the DataReader.
This object contains the information whether a new match has been discovered for the current subscription, or whether an existing match has ceased to exist.
This means that the status represents that either a DataWriter object has been discovered by the DataReader with the same Topic and a compatible Qos, or that a previously discovered DataWriter has ceased to be matched to the current DataReader. A DataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current DataReader or when either the DataReader or the DataWriter has chosen to put its matching counterpart on its ignore-list using the dds::sub::ignore or dds::pub::ignore operations on the DomainParticipant.
The SubscriptionMatchedStatus can also be monitored using a DataReaderListener or by using the associated StatusCondition.
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. |
const dds::topic::TopicDescription& dds::sub::AnyDataReader::topic_description | ( | ) | const |
Get the TopicDescription associated with this DataReader.
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. |
void dds::sub::AnyDataReader::wait_for_historical_data | ( | const dds::core::Duration & | timeout | ) |
This operation will block the application thread until all “historical” data is received.
timeout | the time to wait for historical data (can be dds::core::Duration::infinite()) |
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::NotEnabledError | The entity has not yet been enabled. |
dds::core::TimeoutError | Not all data is received before timeout elapsed. |
dds::core::OutOfResourcesError | The Data Distribution Service ran out of resources to complete this operation. |