![]() |
OpenSplice C# API
v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
|
Since a IDataReader is an Entity, it has the ability to have a IListener associated with it. In this case, the associated IListener should be of type IDataReaderListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the IDataReaderListener class. More...
Public Member Functions | |
void | OnDataAvailable (IDataReader entityInterface) |
This operation is called by the Data Distribution Service when new data is available for this IDataReader. More... | |
void | OnLivelinessChanged (IDataReader entityInterface, LivelinessChangedStatus status) |
This operation is called by the Data Distribution Service when the liveliness of one or more IDataWriter objects that were writing instances read through this IDataReader has changed. More... | |
void | OnRequestedDeadlineMissed (IDataReader entityInterface, RequestedDeadlineMissedStatus status) |
This operation called by the Data Distribution Service when the deadline that the IDataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance. More... | |
void | OnRequestedIncompatibleQos (IDataReader entityInterface, RequestedIncompatibleQosStatus status) |
This operation is called by the Data Distribution Service when the DDS.StatusKind.RequestedIncompatibleQos changes. More... | |
void | OnSampleLost (IDataReader entityInterface, SampleLostStatus status) |
NOTE: This operation is not yet implemented. It is scheduled for a future release. More... | |
void | OnSampleRejected (IDataReader entityInterface, SampleRejectedStatus status) |
This operation called by the Data Distribution Service when a (received) sample has been rejected. More... | |
void | OnSubscriptionMatched (IDataReader entityInterface, SubscriptionMatchedStatus status) |
This operation is called by the Data Distribution Service when a new match has been discovered for the current subscription, or when an existing match has ceased to exist. More... | |
Since a IDataReader is an Entity, it has the ability to have a IListener associated with it. In this case, the associated IListener should be of type IDataReaderListener. This interface must be implemented by the application. A user-defined class must be provided by the application which must extend from the IDataReaderListener class.
All operations for this interface must be implemented in the user-defined class, it is up to the application whether an operation is empty or contains some functionality. The IDataReaderListener provides a generic mechanism (actually a callback function) for the Data Distribution Service to notify the application of relevant asynchronous status change events, such as a missed deadline, violation of a QosPolicy setting, etc. The IDataReaderListener is related to changes in communication status IStatusConditions.
Definition at line 6151 of file DdsDcpsInterfaces.cs.
void DDS.IDataReaderListener.OnDataAvailable | ( | IDataReader | entityInterface | ) |
This operation is called by the Data Distribution Service when new data is available for this IDataReader.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant IDataReaderListener is installed and enabled for the DDS.StatusKind.DataAvailable. The Data Distribution Service will provide a reference to the IDataReader in the parameter entityInterface for use by the application. The statuses DDS.StatusKind.DataOnReaders and DDS.StatusKind.DataAvailable will occur together. In case these status changes occur, the Data Distribution Service will look for an attached and activated ISubscriberListener or IDomainParticipantListener (in that order) for the enabled DDS.StatusKind.DataOnReaders. In case the DDS.StatusKind.DataOnReaders can not be handled, the Data Distribution Service will look for an attached and activated IDataReaderListener, ISubscriberListener or IDomainParticipantListener for the enabled DDS.StatusKind.DataAvailable (in that order). Note that if DataOnReaders is called, then the Data Distribution Service will not try to call DataAvailable, however, the application can force a call to the IDataReader objects that have data by means of the ISubscriber.NotifyDataReaders operation.
entityInterface | contain a pointer to the IDataReader for which data is available (this is an input to the application provided by the Data Distribution Service). |
void DDS.IDataReaderListener.OnLivelinessChanged | ( | IDataReader | entityInterface, |
LivelinessChangedStatus | status | ||
) |
This operation is called by the Data Distribution Service when the liveliness of one or more IDataWriter objects that were writing instances read through this IDataReader has changed.
In other words, some IDataWriter have become “alive” or “not alive”. The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant IDataReaderListener is installed and enabled for the DDS.StatusKind.LivelinessChanged.
entityInterface | contain a pointer to the IDataReader for which the liveliness of one or more IDataWriter objects has changed (this is an input to the application provided by the Data Distribution Service). |
status | contain the LivelinessChangedStatus object (this is an input to the application provided by the Data Distribution Service). |
void DDS.IDataReaderListener.OnRequestedDeadlineMissed | ( | IDataReader | entityInterface, |
RequestedDeadlineMissedStatus | status | ||
) |
This operation called by the Data Distribution Service when the deadline that the IDataReader was expecting through its DeadlineQosPolicy was not respected for a specific instance.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant IDataReaderListener is installed and enabled for the DDS.StatusKind.RequestedDeadlineMissed
entityInterface | contain a pointer to the IDataReader for which the deadline was missed (this is an input to the application provided by the Data Distribution Service). |
status | contain the RequestedDeadlineMissedStatus object (this is an input to the application provided by the Data Distribution Service). |
void DDS.IDataReaderListener.OnRequestedIncompatibleQos | ( | IDataReader | entityInterface, |
RequestedIncompatibleQosStatus | status | ||
) |
This operation is called by the Data Distribution Service when the DDS.StatusKind.RequestedIncompatibleQos changes.
The implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant IDataReaderListener is installed and enabled for the DDS.StatusKind.RequestedIncompatibleQos. The Data Distribution Service will provide a reference to the IDataReader in the parameter entityInterface and the RequestedIncompatibleQosStatus object in the parameter status , for use by the application.
When the IDataReaderListener on the IDataReader is not enabled with the DDS.StatusKind.RequestedIncompatibleQos, the DDS.StatusKind.RequestedIncompatibleQos change will propagate to the ISubscriberListener of the ISubscriber (if enabled) or to the IDomainParticipantListener of the IDomainParticipant (if enabled).
entityInterface | reader the IDataReader provided by the Data Distribution Service. |
status | the RequestedIncompatibleQosStatus object provided by the Data Distribution Service. |
void DDS.IDataReaderListener.OnSampleLost | ( | IDataReader | entityInterface, |
SampleLostStatus | status | ||
) |
NOTE: This operation is not yet implemented. It is scheduled for a future release.
entityInterface | the IDataReader the Listener is applied to |
status | the SampleLostStatus status |
void DDS.IDataReaderListener.OnSampleRejected | ( | IDataReader | entityInterface, |
SampleRejectedStatus | status | ||
) |
This operation called by the Data Distribution Service when a (received) sample has been rejected.
Samples may be rejected by the IDataReader when it runs out of ResourceLimitsQosPolicy 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 implementation may be left empty when this functionality is not needed. This operation will only be called when the relevant IDataReaderListener is installed and enabled with the DDS.StatusKind.SampleLost.
entityInterface | contains a pointer to the IDataReader for which a sample has been rejected (this is an input to the application provided by the Data Distribution Service). |
status | contains the SampleRejectedStatus object (this is an input to the application provided by the Data Distribution Service). |
void DDS.IDataReaderListener.OnSubscriptionMatched | ( | IDataReader | entityInterface, |
SubscriptionMatchedStatus | status | ||
) |
This operation is called by the Data Distribution Service when a new match has been discovered for the current subscription, or when an existing match has ceased to exist.
Usually this means that a new IDataWriter that matches the ITopic and that has compatible Qos as the current IDataReader has either been discovered, or that a previously discovered IDataWriter has ceased to be matched to the current IDataReader. A IDataWriter may cease to match when it gets deleted, when it changes its Qos to a value that is incompatible with the current IDataReader or when either the IDataReader or the IDataWriter has chosen to put its matching counterpart on its ignore-list using the DDS.IDomainParticipant.IgnoreSubscription or DDS.IDomainParticipant.IgnorePublication operations.
The implementation of this IListener operation may be left empty when this functionality is not needed: it will only be called when the relevant IDataReaderListener is installed and enabled for the DDS.StatusKind.SubscriptionMatched.
entityInterface | contains a pointer to the IDataReader for which a match has been discovered (this is an input to the application provided by the Data Distribution Service). |
status | contains the SubscriptionMatchedStatus object (this is an input to the application provided by the Data Distribution Service). |