Click or drag to resize

Subscriber Class

A Subscriber is the object responsible for the actual reception of the data resulting from its subscriptions.
Inheritance Hierarchy

Namespace:  OpenDDSharp.DDS
Assembly:  OpenDDSharp (in OpenDDSharp.dll) Version: 0.4.1.0
Syntax
public class Subscriber : Entity

The Subscriber type exposes the following members.

Properties
  NameDescription
Public propertyInstanceHandle
Gets the InstanceHandle that represents the Entity.
(Inherited from Entity.)
Public propertyParticipant
Gets the DomainParticipant to which the Subscriber belongs.
Public propertyStatusChanges
Gets 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.
(Inherited from Entity.)
Public propertyStatusCondition
Allows access to the StatusCondition associated with the Entity. The returned condition can then be added to a WaitSet so that the application can wait for specific status changes that affect the Entity.
(Inherited from Entity.)
Top
Methods
  NameDescription
Public methodBeginAccess
Indicates that the application is about to access the data samples in any of the DataReader objects attached to the Subscriber.
Public methodCreateDataReader(ITopicDescription)
Creates a new DataReader with the default QoS policies and without listener attached.
Public methodCreateDataReader(ITopicDescription, DataReaderQos)
Creates a new DataReader with the desired QoS policies and without listener attached.
Public methodCreateDataReader(ITopicDescription, DataReaderListener)
Creates a new DataReader with the default QoS policies and attaches to it the specified DataReaderListener. The specified DataReaderListener will be attached with the default StatusMask.
Public methodCreateDataReader(ITopicDescription, DataReaderQos, DataReaderListener)
Creates a new DataReader with the desired QoS policies and attaches to it the specified DataReaderListener. The specified DataReaderListener will be attached with the default StatusMask.
Public methodCreateDataReader(ITopicDescription, DataReaderListener, StatusMask)
Creates a new DataReader with the default QoS policies and attaches to it the specified DataReaderListener.
Public methodCreateDataReader(ITopicDescription, DataReaderQos, DataReaderListener, StatusMask)
Creates a new DataReader with the desired QoS policies and attaches to it the specified DataReaderListener.
Public methodDeleteContainedEntities
This operation deletes all the entities that were created by means of the "create" operations on the Subscriber. That is, it deletes all contained DataReader objects. This pattern is applied recursively. In this manner the operation DeleteContainedEntities on the Subscriber will end up deleting all the entities recursively contained in the Subscriber, that is also the QueryCondition and ReadCondition objects belonging to the contained DataReaders.
Public methodDeleteDataReader
Deletes a DataReader that belongs to the Subscriber.
Public methodEnable
Enables the Entity. The enable operation is idempotent. Calling enable on an already enabled Entity returns Ok and has no effect.
(Inherited from Entity.)
Public methodEndAccess
Indicates that the application has finished accessing the data samples in DataReader objects managed by the Subscriber.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetDataReaders(IListDataReader)
Allows the application to access the DataReader objects that contain samples with any sample states, any view states, and any instance states.
Public methodGetDataReaders(IListDataReader, SampleStateMask, ViewStateMask, InstanceStateMask)
Allows the application to access the DataReader objects that contain samples with the specified sampleStates, viewStates, and instanceStates.
Public methodGetDefaultDataReaderQos
Gets the default value of the DataReader QoS, that is, the QoS policies which will be used for newly created DataReader entities in the case where the QoS policies are defaulted in the CreateDataReader operation.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetListener
Allows access to the attached SubscriberListener.
Public methodGetQos
Gets the Subscriber QoS policies.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLookupDataReader
Gets a previously-created DataReader belonging to the Subscriber that is attached to a Topic with a matching topicName. If no such DataReader exists, the operation will return .
Public methodNotifyDataReaders
Invokes the operation OnDataAvailable on the DataReaderListener objects attached to contained DataReader entities with a DataAvailableStatus that is considered changed.
Public methodSetDefaultDataReaderQos
Sets a default value of the DataReader QoS policies which will be used for newly created DataReader entities in the case where the QoS policies are defaulted in the CreateDataReader operation.
Public methodSetListener(SubscriberListener)
Public methodSetListener(SubscriberListener, StatusMask)
Sets the SubscriberListener.
Public methodSetQos
Sets the Subscriber QoS policies.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

A Subscriber acts on the behalf of one or several DataReader objects that are related to it. When it receives data (from the other parts of the system), it builds the list of concerned DataReader objects, and then indicates to the application that data is available, through its listener or by enabling related conditions. The application can access the list of concerned DataReader objects through the operation GetDataReaders and then access the data available though operations on the DataReader.

All operations except for the operations SetQos(SubscriberQos), GetQos(SubscriberQos), SetListener, GetListener, Enable, StatusCondition, CreateDataReader, return the value NotEnabled if the Subscriber has not been enabled yet.

See Also