RTI Connext .Net APIs  Version 5.0.0
DDS::Entity Class Referenceabstract

<<interface>> Abstract base class for all the DDS objects that support QoS policies, a listener, and a status condition. More...

#include <managed_infrastructure.h>

Inheritance diagram for DDS::Entity:
DDS::DomainEntity DDS::DomainParticipant DDS::DataReader DDS::DataWriter DDS::Publisher DDS::Subscriber DDS::Topic DDS::TypedDataReader< T > DDS::TypedDataReader< Bytes^  > DDS::TypedDataReader< DynamicData^  > DDS::TypedDataReader< Foo^  > DDS::TypedDataReader< KeyedBytes^  > DDS::TypedDataReader< KeyedString^  > DDS::TypedDataReader< ParticipantBuiltinTopicData^  > DDS::TypedDataReader< PublicationBuiltinTopicData^  > DDS::TypedDataReader< StringWrapper^  > DDS::TypedDataReader< SubscriptionBuiltinTopicData^  > DDS::TypedDataReader< TopicBuiltinTopicData^  > DDS::TypedDataWriter< T > DDS::TypedDataWriter< Bytes^  > DDS::TypedDataWriter< DynamicData^  > DDS::TypedDataWriter< Foo^  > DDS::TypedDataWriter< KeyedBytes^  > DDS::TypedDataWriter< KeyedString^  > DDS::TypedDataWriter< StringWrapper^  >

Public Member Functions

virtual void enable () override
 Enables the DDS::Entity.
 
virtual StatusConditionget_statuscondition () override
 Allows access to the DDS::StatusCondition associated with the DDS::Entity.
 
virtual StatusMask get_status_changes () override
 Retrieves the list of communication statuses in the DDS::Entity that are triggered.
 
virtual InstanceHandle_t get_instance_handle () override
 Allows access to the DDS::InstanceHandle_t associated with the DDS::Entity.
 

Detailed Description

<<interface>> Abstract base class for all the DDS objects that support QoS policies, a listener, and a status condition.

All operations except for set_qos(), get_qos(), set_listener(), get_listener() and enable(), may return the value DDS::Retcode_NotEnabled.

QoS:
QoS Policies
Status:
Status Kinds
Listener:
DDS::Listener

Abstract operations

Each derived entity provides the following operations specific to its role in RTI Connext.

set_qos (abstract)

This operation sets the QoS policies of the DDS::Entity.

This operation must be provided by each of the derived DDS::Entity classes (DDS::DomainParticipant, DDS::Topic, DDS::Publisher, DDS::DataWriter, DDS::Subscriber, and DDS::DataReader) so that the policies that are meaningful to each DDS::Entity can be set.

Precondition
Certain policies are immutable (see QoS Policies): they can only be set at DDS::Entity creation time or before the entity is enabled. If set_qos() is invoked after the DDS::Entity is enabled and it attempts to change the value of an immutable policy, the operation will fail and return DDS::Retcode_ImmutablePolicy.
Certain values of QoS policies can be incompatible with the settings of the other policies. The set_qos() operation will also fail if it specifies a set of values that, once combined with the existing values, would result in an inconsistent set of policies. In this case, the operation will fail and return DDS::Retcode_InconsistentPolicy.
If the application supplies a non-default value for a QoS policy that is not supported by the implementation of the service, the set_qos operation will fail and return DDS::Retcode_Unsupported.
Postcondition
The existing set of policies is only changed if the set_qos() operation succeeds. This is indicated by a return code of ::DDS::Exception::RETCODE_OK. In all other cases, none of the policies are modified.

Each derived DDS::Entity class (DDS::DomainParticipant, DDS::Topic, DDS::Publisher, DDS::DataWriter, DDS::Subscriber, DDS::DataReader) has a corresponding special value of the QoS (DDS::DomainParticipantFactory::PARTICIPANT_QOS_DEFAULT, DDS::DomainParticipant::PUBLISHER_QOS_DEFAULT, DDS::DomainParticipant::SUBSCRIBER_QOS_DEFAULT, DDS::DomainParticipant::TOPIC_QOS_DEFAULT, DDS::Publisher::DATAWRITER_QOS_DEFAULT, DDS::Subscriber::DATAREADER_QOS_DEFAULT). This special value may be used as a parameter to the set_qos operation to indicate that the QoS of the DDS::Entity should be changed to match the current default QoS set in the DDS::Entity's factory. The operation set_qos cannot modify the immutable QoS, so a successful return of the operation indicates that the mutable QoS for the Entity has been modified to match the current default for the DDS::Entity's factory.

The set of policies specified in the qos parameter are applied on top of the existing QoS, replacing the values of any policies previously set.

Possible error codes returned in addition to Standard Return Codes : DDS::Retcode_ImmutablePolicy, or DDS::Retcode_InconsistentPolicy.

get_qos (abstract)

This operation allows access to the existing set of QoS policies for the DDS::Entity. This operation must be provided by each of the derived DDS::Entity classes (DDS::DomainParticipant, DDS::Topic, DDS::Publisher, DDS::DataWriter, DDS::Subscriber, and DDS::DataReader), so that the policies that are meaningful to each DDS::Entity can be retrieved.

Possible error codes are Standard Return Codes.

set_listener (abstract)

This operation installs a DDS::Listener on the DDS::Entity. The listener will only be invoked on the changes of communication status indicated by the specified mask.

This operation must be provided by each of the derived DDS::Entity classes (DDS::DomainParticipant, DDS::Topic, DDS::Publisher, DDS::DataWriter, DDS::Subscriber, and DDS::DataReader), so that the listener is of the concrete type suitable to the particular DDS::Entity.

It is permitted to use null as the value of the listener. The null listener behaves as if the mask is DDS::StatusMask::STATUS_MASK_NONE.

Postcondition
Only one listener can be attached to each DDS::Entity. If a listener was already set, the operation set_listener() will replace it with the new one. Consequently, if the value null is passed for the listener parameter to the set_listener operation, any existing listener will be removed.

get_listener (abstract)

This operation allows access to the existing DDS::Listener attached to the DDS::Entity.

This operation must be provided by each of the derived DDS::Entity classes (DDS::DomainParticipant, DDS::Topic, DDS::Publisher, DDS::DataWriter, DDS::Subscriber, and DDS::DataReader) so that the listener is of the concrete type suitable to the particular DDS::Entity.

If no listener is installed on the DDS::Entity, this operation will return null.

Member Function Documentation

virtual void DDS::Entity::enable ( )
pure virtual

Enables the DDS::Entity.

This operation enables the Entity. Entity objects can be created either enabled or disabled. This is controlled by the value of the ENTITY_FACTORY QoS policy on the corresponding factory for the DDS::Entity.

By default, ENTITY_FACTORY is set so that it is not necessary to explicitly call DDS::Entity::enable on newly created entities.

The DDS::Entity::enable operation is idempotent. Calling enable on an already enabled Entity returns OK and has no effect.

If a DDS::Entity has not yet been enabled, the following kinds of operations may be invoked on it:

Other operations may explicitly state that they may be called on disabled entities; those that do not will return the error DDS::Retcode_NotEnabled.

It is legal to delete an DDS::Entity that has not been enabled by calling the proper operation on its factory.

Entities created from a factory that is disabled are created disabled, regardless of the setting of the DDS::EntityFactoryQosPolicy.

Calling enable on an Entity whose factory is not enabled will fail and return DDS::Retcode_PreconditionNotMet.

If DDS::EntityFactoryQosPolicy::autoenable_created_entities is TRUE, the enable operation on a factory will automatically enable all entities created from that factory.

Listeners associated with an entity are not called until the entity is enabled.

Conditions associated with a disabled entity are "inactive," that is, they have a trigger_value == FALSE.

Exceptions
Oneof the Standard Return Codes, Standard Return Codes or DDS::Retcode_PreconditionNotMet.

Implemented in DDS::DataReader, DDS::Subscriber, DDS::DataWriter, DDS::Publisher, DDS::DomainParticipant, and DDS::Topic.

virtual StatusCondition ^ DDS::Entity::get_statuscondition ( )
pure virtual

Allows access to the DDS::StatusCondition associated with the DDS::Entity.

The returned condition can then be added to a DDS::WaitSet so that the application can wait for specific status changes that affect the DDS::Entity.

Returns
the status condition associated with this entity.

Implemented in DDS::DataReader, DDS::Subscriber, DDS::DataWriter, DDS::Publisher, DDS::DomainParticipant, and DDS::Topic.

virtual StatusMask DDS::Entity::get_status_changes ( )
pure virtual

Retrieves the list of communication statuses in the DDS::Entity that are triggered.

That is, the list of statuses whose value has changed since the last time the application read the status using the get_*_status() method.

When the entity is first created or if the entity is not enabled, all communication statuses are in the "untriggered" state so the list returned by the get_status_changes operation will be empty.

The list of statuses returned by the get_status_changes operation refers to the status that are triggered on the Entity itself and does not include statuses that apply to contained entities.

Returns
list of communication statuses in the DDS::Entity that are triggered.
See Also
Status Kinds

Implemented in DDS::DataReader, DDS::Subscriber, DDS::DataWriter, DDS::Publisher, DDS::DomainParticipant, and DDS::Topic.

virtual InstanceHandle_t DDS::Entity::get_instance_handle ( )
pure virtual

Allows access to the DDS::InstanceHandle_t associated with the DDS::Entity.

This operation returns the DDS::InstanceHandle_t that represents the DDS::Entity.

Returns
the instance handle associated with this entity.

Implemented in DDS::DataReader, DDS::Subscriber, DDS::DataWriter, DDS::Publisher, DDS::DomainParticipant, and DDS::Topic.


RTI Connext .Net APIs Version 5.0.0 Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc