OpenSplice C# API  v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
DDS.ITopic Interface Reference

ITopic is the most basic description of the data to be published and subscribed. More...

Inheritance diagram for DDS.ITopic:
Inheritance graph
Collaboration diagram for DDS.ITopic:
Collaboration graph

Public Member Functions

ReturnCode GetInconsistentTopicStatus (ref InconsistentTopicStatus aStatus)
 This operation obtains the InconsistentTopicStatus of the ITopic. More...
 
ReturnCode GetQos (ref TopicQos qos)
 This operation obtains the current set of QoS policies associated with the ITopic. More...
 
ReturnCode SetListener (ITopicListener listener, StatusKind mask)
 This operation attaches an ITopicListener to the ITopic. More...
 
ReturnCode SetQos (TopicQos qos)
 This operation replaces the existing set of QosPolicy settings for an ITopic. More...
 
- Public Member Functions inherited from DDS.IEntity
ReturnCode Enable ()
 This operation enables the IEntity on which it is being called when the IEntity was created with the EntityFactoryQosPolicy set to false. More...
 

Properties

ITopicListener Listener [get]
 This property returns the TopicListener currently attached to the ITopic. More...
 
- Properties inherited from DDS.IEntity
InstanceHandle InstanceHandle [get]
 This operation returns the InstanceHandle of the builtin topic sample that represents the specified IEntity. More...
 
StatusKind StatusChanges [get]
 This operation returns a mask with the communication statuses in the IEntity that are triggered. More...
 
IStatusCondition StatusCondition [get]
 This property allows access to the IStatusCondition associated with the IEntity. More...
 
- Properties inherited from DDS.ITopicDescription
string Name [get]
 Gets the name of this ITopicDescription. More...
 
IDomainParticipant Participant [get]
 Gets the IDomainParticipant associated with this ITopicDescription. More...
 
string TypeName [get]
 Gets the name of the registered data type that is associated with this ITopicDescription. More...
 

Detailed Description

ITopic is the most basic description of the data to be published and subscribed.

A ITopic is identified by its name, which must be unique in the whole Domain. In addition (by virtue of extending ITopicDescription) it fully identifies the type of data that can be communicated when publishing or subscribing to the ITopic. ITopic is the only ITopicDescription that can be used for publications and therefore a specialized IDataWriter is associated to the ITopic.

Definition at line 2291 of file DdsDcpsInterfaces.cs.

Member Function Documentation

◆ GetInconsistentTopicStatus()

ReturnCode DDS.ITopic.GetInconsistentTopicStatus ( ref InconsistentTopicStatus  aStatus)

This operation obtains the InconsistentTopicStatus of the ITopic.

The InconsistentTopicStatus indicates that there exists an ITopic with the same name but with different characteristics. The InconsistentTopicStatus can also be monitored using a TopicListener or by using the associated IStatusCondition.

Parameters
aStatusThe contents of the InconsistentTopicStatus of the ITopic will be copied into the location specified by aStatus.
Returns
Return codes are:

◆ GetQos()

ReturnCode DDS.ITopic.GetQos ( ref TopicQos  qos)

This operation obtains the current set of QoS policies associated with the ITopic.

The operation returns the set of QoS policies currently associated with this ITopic in the provided qos parameter.

Parameters
qosA reference to a TopicQos used to return the QoS policies of the ITopic.
Returns
Return codes are:

◆ SetListener()

ReturnCode DDS.ITopic.SetListener ( ITopicListener  listener,
StatusKind  mask 
)

This operation attaches an ITopicListener to the ITopic.

Only one ITopicListener can be attached to each ITopic. If an ITopicListener was already attached, the operation will replace it with the new one. When listener is null, it represents a listener that is treated as a No-Operation for all statuses activated in the bit mask.

Communication Status
For each communication status, the StatusChanged flag is initially set to false. It becomes true when the communication status changes, and for each communication status activated in the provided mask parameter, the associated ITopicListener operation is invoked and the communication status is reset to false, as the listener implicitly accesses the status which is passed as an parameter to invoked listener operation. The status is reset prior to calling the listener operation, so if the application calls the get_<status_name> from inside the listener it will see that the status is already reset. An exception to this rule it the null listener, which does not reset the communication statuses for which it is invoked.

For the ITopicListener the following statuses are applicable:

Status bits are declared as a constant and can be used by the application in an OR operation to create a tailored mask. With a mask set to 0 the caller indicates that the created entity not respond to any of its available statuses. The DDS will therefore attempt to propagate these statuses to its factory.

Status Propagation
In case a communication status is not activated in the mask of the ITopicListener, the IDomainParticipantListener of the containing IDomainParticipant is invoked (if attached and activated for the status that occurred). This allows the application to set a default behaviour in the IDomainParticipantListener of the containing DomainParticipant and a Topic specific behaviour when needed. In case the IDomainParticipantListener is also not attached or the communication status is not activated in its mask, the application is not notified of the change.

Parameters
listenerThe listener to be attached to the ITopic.
maskA bit mask in which each bit enables the invocation of the TopicListener for a certain status.
Returns
Return codes are:

◆ SetQos()

ReturnCode DDS.ITopic.SetQos ( TopicQos  qos)

This operation replaces the existing set of QosPolicy settings for an ITopic.

The parameter qos contains the QosPolicy settings which are to be applied to this ITopic. The provided QosPolicy settings are checked for self-consistency and mutability. When the application tries to change a QosPolicy setting for an enabled ITopic, which can only be set before the ITopic is enabled, the operation will fail and an ImmutablePolicy is returned. In other words, the application must provide the currently set QosPolicy settings in case of the immutable QosPolicy settings. Only the mutable QosPolicy settings can be changed. When qos contains conflicting QosPolicy settings (not self-consistent), the operation will fail and an InconsistentPolicy is returned.

The set of QosPolicy settings specified by the qos parameter are applied on top of the existing QoS, replacing the values of any policies previously set (provided, the operation returned OK).

Parameters
qosThe new set of QosPolicy settings for a ITopic.
Returns
Return codes are:
  • DDS.ReturnCode Ok - The new TopicQos is set.
  • DDS.ReturnCode Error - An internal error has occured.
  • DDS.ReturnCode AlreadyDeleted - The ITopic has already been deleted.
  • DDS.ReturnCode OutOfResources - The DDS ran out of resources to complete this operation.
  • DDS.ReturnCode BadParameter - The parameter qos is not a valid topicQos. It contains a QosPolicy setting with an invalid Duration value or an enum value that is outside its legal boundaries.
  • DDS.ReturnCode Unsupported - one or more of the selected QosPolicy values are currently not supported by OpenSplice.
  • DDS.ReturnCode ImmutablePolicy - The parameter qos contains an immutable QosPolicy setting with a different value than set during enabling of the ITopic.
  • DDS.ReturnCode InconsistentPolicy - The parameter qos contains conflicting QosPolicy settings,e.g. a history depth that is higher than the specified resource limits.

Property Documentation

◆ Listener

ITopicListener DDS.ITopic.Listener
get

This property returns the TopicListener currently attached to the ITopic.

Only one listener can be attached to the ITopic at any particular time. This property returns the listener that is currently attached to the ITopic. When no listener is attached the null is returned.

Returns
returns the TopicListener currently attached to the ITopic.

Definition at line 2378 of file DdsDcpsInterfaces.cs.


The documentation for this interface was generated from the following file: