CoreDX DDS C# Reference Manual
Public Member Functions | List of all members
Subscriber Class Reference
Inheritance diagram for Subscriber:
DomainEntity Entity

Public Member Functions

override ReturnCode_t enable ()
 
override InstanceHandle_t get_instance_handle ()
 
DataReader create_datareader (TopicDescription topic, DataReaderQos dr_qos, DataReaderListener listener, uint mask)
 
ReturnCode_t delete_datareader (DataReader datareader)
 
ReturnCode_t delete_contained_entities ()
 
DataReader lookup_datareader (String topic_name)
 
ReturnCode_t get_datareaders (List< DataReader > readers, long sample_states, long view_states, long instance_states)
 
DomainParticipant get_participant ()
 
ReturnCode_t set_qos (SubscriberQos qos)
 
ReturnCode_t get_qos (SubscriberQos qos)
 
ReturnCode_t set_listener (SubscriberListener new_listener, uint mask)
 
SubscriberListener get_listener ()
 
ReturnCode_t begin_access ()
 
ReturnCode_t end_access ()
 
ReturnCode_t set_default_datareader_qos (DataReaderQos qos)
 
ReturnCode_t get_default_datareader_qos (DataReaderQos qos)
 
ReturnCode_t copy_from_topic_qos (DataReaderQos qos, TopicQos topic_qos)
 
- Public Member Functions inherited from Entity
virtual StatusCondition get_statuscondition ()
 
virtual uint get_status_changes ()
 

Detailed Description

The Subscriber configures, creates, manages and destroys DataReaders.

Member Function Documentation

ReturnCode_t begin_access ( )
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.]

Not Yet Supported:
This is currently unsupported in the C# language binding.
ReturnCode_t copy_from_topic_qos ( DataReaderQos  qos,
TopicQos  topic_qos 
)
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.

DataReader create_datareader ( TopicDescription  topic,
DataReaderQos  dr_qos,
DataReaderListener  listener,
uint  mask 
)
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.

ReturnCode_t delete_contained_entities ( )
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.

ReturnCode_t delete_datareader ( DataReader  datareader)
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.

override ReturnCode_t enable ( )
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.

ReturnCode_t end_access ( )
inline

This operation closes a corresponding Subscriber.begin_access().

Not Yet Supported:
This is currently unsupported in the C# language binding.
ReturnCode_t get_datareaders ( List< DataReader readers,
long  sample_states,
long  view_states,
long  instance_states 
)
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).

  1. If PRESENTATION access_scope is INSTANCE or TOPIC, the returned collection is a set.
  2. If PRESENTATION access_scope is GROUP and ordered_access is set to TRUE, then the returned collection is a list.

This difference supports alternate access mechanisms.

Not Yet Supported:
This is currently unsupported in the C# language binding.
ReturnCode_t get_default_datareader_qos ( DataReaderQos  qos)
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.

override InstanceHandle_t get_instance_handle ( )
inlinevirtual

Gets the handle that locally identifies this Entity.

Reimplemented from Entity.

SubscriberListener get_listener ( )
inline

This operation returns the currently installed SubscriberListener.

DomainParticipant get_participant ( )
inline

This operation returns the DomainParticipant this Subscriber belongs to.

ReturnCode_t get_qos ( SubscriberQos  qos)
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.

DataReader lookup_datareader ( String  topic_name)
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.

ReturnCode_t set_default_datareader_qos ( DataReaderQos  qos)
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.

ReturnCode_t set_listener ( SubscriberListener  new_listener,
uint  mask 
)
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.

ReturnCode_t set_qos ( SubscriberQos  qos)
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.


© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.