RTI Connext .Net APIs  Version 5.0.0
DDS::Topic Class Reference

<<interface>> The most basic description of the data to be published and subscribed. More...

#include <managed_topic.h>

Inheritance diagram for DDS::Topic:
DDS::DomainEntity DDS::ITopicDescription DDS::Entity

Public Member Functions

void get_inconsistent_topic_status (InconsistentTopicStatus% status)
 Allows the application to retrieve the ::DDS::StatusKind::INCONSISTENT_TOPIC_STATUS status of a DDS::Topic.
 
void set_qos (TopicQos^ qos)
 Set the topic QoS.
 
void set_qos_with_profile (System::String^ library_name, System::String^ profile_name)
 <<eXtension>> Change the QoS of this topic using the input XML QoS profile.
 
void get_qos (TopicQos^ qos)
 Get the topic QoS.
 
void set_listener (TopicListener^ l, StatusMask mask)
 Set the topic listener.
 
TopicListenerget_listener ()
 Get the topic listener.
 
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.
 
- Public Member Functions inherited from DDS::ITopicDescription
System::String^ get_type_name ()
 Get the associated type_name.
 
System::String^ get_name ()
 Get the name used to create this ::DDS::TopicDescription .
 
DomainParticipantget_participant ()
 Get the DDS::DomainParticipant to which the ::DDS::TopicDescription belongs.
 

Static Public Member Functions

static Topicnarrow (ITopicDescription^ topic_description)
 Narrow the given ::DDS::TopicDescription pointer to a DDS::Topic pointer.
 

Detailed Description

<<interface>> The most basic description of the data to be published and subscribed.

QoS:
DDS::TopicQos
Status:
::DDS::StatusKind::INCONSISTENT_TOPIC_STATUS, DDS::InconsistentTopicStatus
Listener:
DDS::TopicListener

A DDS::Topic is identified by its name, which must be unique in the whole domain. In addition (by virtue of extending ::DDS::TopicDescription) it fully specifies the type of the data that can be communicated when publishing or subscribing to the DDS::Topic.

DDS::Topic is the only ::DDS::TopicDescription that can be used for publications and therefore associated with a DDS::DataWriter.

The following operations may be called even if the DDS::Topic is not enabled. Other operations will fail with the value DDS::Retcode_NotEnabled if called on a disabled DDS::Topic:

See Also
Operations Allowed in Listener Callbacks
Examples:
HelloWorld_publisher.cpp, and HelloWorld_subscriber.cpp.

Member Function Documentation

static Topic ^ DDS::Topic::narrow ( ITopicDescription topic_description)
static

Narrow the given ::DDS::TopicDescription pointer to a DDS::Topic pointer.

Returns
DDS::Topic if this ::DDS::TopicDescription is a DDS::Topic. Otherwise, return NULL.
void DDS::Topic::get_inconsistent_topic_status ( InconsistentTopicStatus status)

Allows the application to retrieve the ::DDS::StatusKind::INCONSISTENT_TOPIC_STATUS status of a DDS::Topic.

Retrieve the current DDS::InconsistentTopicStatus

Parameters
status<<inout>> Status to be retrieved. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
See Also
DDS::InconsistentTopicStatus
void DDS::Topic::set_qos ( TopicQos qos)

Set the topic QoS.

The DDS::TopicQos::topic_data and DDS::TopicQos::deadline, DDS::TopicQos::latency_budget, DDS::TopicQos::transport_priority and DDS::TopicQos::lifespan can be changed. The other policies are immutable.

Parameters
qos<<in>> Set of policies to be applied to DDS::Topic.

Policies must be consistent. Immutable policies cannot be changed after DDS::Topic is enabled. The special value DDS::DomainParticipant::TOPIC_QOS_DEFAULT can be used to indicate that the QoS of the DDS::Topic should be changed to match the current default DDS::TopicQos set in the DDS::DomainParticipant. Cannot be NULL.

Exceptions
Oneof the Standard Return Codes, DDS::Retcode_ImmutablePolicy if immutable policy is changed, or DDS::Retcode_InconsistentPolicy if policies are inconsistent
See Also
DDS::TopicQos for rules on consistency among QoS
set_qos (abstract)
Operations Allowed in Listener Callbacks
void DDS::Topic::set_qos_with_profile ( System::String^  library_name,
System::String^  profile_name 
)

<<eXtension>> Change the QoS of this topic using the input XML QoS profile.

The DDS::TopicQos::topic_data and DDS::TopicQos::deadline, DDS::TopicQos::latency_budget, DDS::TopicQos::transport_priority and DDS::TopicQos::lifespan can be changed. The other policies are immutable.

Parameters
library_name<<in>> Library name containing the XML QoS profile. If library_name is null RTI Connext will use the default library (see DDS::DomainParticipant::set_default_library).
profile_name<<in>> XML QoS Profile name. If profile_name is null RTI Connext will use the default profile (see DDS::DomainParticipant::set_default_profile).
Exceptions
Oneof the Standard Return Codes, DDS::Retcode_ImmutablePolicy if immutable policy is changed, or DDS::Retcode_InconsistentPolicy if policies are inconsistent
See Also
DDS::TopicQos for rules on consistency among QoS
Operations Allowed in Listener Callbacks
void DDS::Topic::get_qos ( TopicQos qos)

Get the topic QoS.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

Parameters
qos<<inout>> QoS to be filled up. Cannot be NULL.
Exceptions
Oneof the Standard Return Codes
See Also
get_qos (abstract)
void DDS::Topic::set_listener ( TopicListener l,
StatusMask  mask 
)

Set the topic listener.

Parameters
l<<in>> Listener to be installed on entity.
mask<<in>> Changes of communication status to be invoked on the listener. See ::DDS::StatusMask.
Exceptions
Oneof the Standard Return Codes
See Also
set_listener (abstract)
TopicListener ^ DDS::Topic::get_listener ( )

Get the topic listener.

Returns
Existing listener attached to the DDS::Topic.
See Also
get_listener (abstract)
virtual void DDS::Topic::enable ( )
overridevirtual

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.

Implements DDS::Entity.

virtual StatusCondition ^ DDS::Topic::get_statuscondition ( )
overridevirtual

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.

Implements DDS::Entity.

virtual StatusMask DDS::Topic::get_status_changes ( )
overridevirtual

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

Implements DDS::Entity.

virtual InstanceHandle_t DDS::Topic::get_instance_handle ( )
overridevirtual

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.

Implements DDS::Entity.


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