The Subscriber configures, creates, manages and destroys DataReaders.
|
inline |
This operation indicates that the application is about to access the data samples in any of the DataReader objects contained in the Subscriber s. The application is expected to use this operation only if PRESENTATION QosPolicy of the Subscriber has the access_scope set to GROUP. [Otherwise this routine has no effect.]
|
inline |
This operation copies the QoS settings in a_topic_qos to the corresponding settings in a_datareader_qos. The a_datareader_qos parameter is populated with a copy of the QoS policies from the a_topic_qos structure. QoS entries in the datareader qos structure will be overwritten with the values from the topic.
|
inline |
This operation creates a DataReader. The created DataReader is contained within the Subscriber s. It is associated with the Topic, ContentFilteredTopic, or MultiTopic indicated by a_topic, and has the DataReaderQos indicated by qos. The qos argument may be passed DDS.DATAREADER_QOS_DEFAULT, which indicates that the Subscriber should use its currently configured default data reader QoS values. The DataReaderListener a_listener, is installed at creation time.
The created DataReader (if not NULL) must be destroyed by a call to Subscriber.delete_datareader().
This routine will fail if the provided QoS settings are internally inconsistent. In this case, the routine will return NULL.
|
inline |
This operation deletes all the DataReaders created by means of the Subscriber.create_datareader() operation on the Subscriber s. This routine will recursively call the corresponding delete_contained_entities() operation on each of the contained DataReader objects. If successful, this operation will recursively delete all objects contained with this Subscriber. After successful execution, the application may delete the Subscriber by calling DomainParticipant.delete_subscriber().
If any of the objects cannot be deleted, this routine will return ReturnCode_t.RETCODE_PRECONDITION_NOT_MET.
|
inline |
This operation deletes a DataReader. If the provided DataReader a_datareader was not created by Subscriber s, the routine will fail and will return ReturnCode_t.RETCODE_PRECONDITION_NOT_MET. If the indicated DataReader has any outstanding ReadCondition or QueryCondition objects the routine will fail and will return ReturnCode_t.RETCODE_PRECONDITION_NOT_MET. If the indicated DataReader has any outstanding 'loans' (from read() or take() operations), the routine will fail and will return ReturnCode_.tRETCODE_PRECONDITION_NOT_MET.
|
inlinevirtual |
Enables the Subscriber. A Subscriber is created either enabled or not based on the DomainParticipantQos setting entity_factory. When a Subscriber is not enabled, only the following sub-set of all Subscriber operations are legal:
Any other Subscriber operation may return the ReturnCode_t.RETCODE_NOT_ENABLED error. Subscriber_enable() may be called on an already enabled Subscriber [it will have no effect].
Reimplemented from Entity.
|
inline |
This operation closes a corresponding Subscriber.begin_access().
|
inline |
This operation allows the application to access DataReader objects that contain samples with the specified sample_states, view_states, and instance_states.
If the PRESENTATION QosPolicy of the Subscriber to which the DataReader belongs has the access_scope set to GROUP, this operation should be invoked only inside a begin_access/end_access block. Otherwise it will return the error PRECONDITION_NOT_MET.
The returned collection of DataReader objects may either be a set (containing each DataReader at most once in no specified order), or a list (containing each DataReader one or more times in a specific order).
This difference supports alternate access mechanisms.
|
inline |
Provides access to the default DataReaderQos settings held in the Subscriber s. The provided qos argument is populated with the current default qos settings.
|
inlinevirtual |
|
inline |
This operation returns the currently installed SubscriberListener.
|
inline |
This operation returns the DomainParticipant this Subscriber belongs to.
|
inline |
Returns the current SubscriberQos settings held in the Subscriber s. The qos parameter is populated with a copy of the current Subscriber QoS properties.
|
inline |
This operation retrieves a previously-created DataReader contained in the Subscriber, attached to a Topic named topic_name. If multiple DataReaders are found, one of them will be returned. If no matching DataReader is found, this routine will return NULL.
This routine is useful to obtain access to a particular built-in DataReader.
|
inline |
Sets the default DataReaderQos held in the Subscriber. This default qos will be used during subsequent calls to Subscriber.create_datareader() if the special DDS.DATAREADER_QOS_DEFAULT value is provided for qos. This routine may fail if the provided qos argument is not internally consistent. In this case, ReturnCode_t.RETCODE_INCONSISTENT_POLICY will be returned, and no changes will be made to the Subscriber.
|
inline |
Installs a SubscriberListener on Subscriber s. Only one listener may be attached to a Subscriber at a time. A call to set_listener() will replace any current listener with a_listener.
a_listener can be NULL, which indicates a listener that does nothing.
|
inline |
Sets the SubscriberQos values. These QoS values affect the behavior of the Subscriber. This routine may fail if the provided qos argument is not internally consistent. In this case, ReturnCode_t.RETCODE_INCONSISTENT_POLICY will be returned, and no changes will be made to the Subscriber QoS.