![]() |
OpenSplice C# API
v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
|
ITopic is the most basic description of the data to be published and subscribed. More...
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... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
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... | |
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.
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.
aStatus | The contents of the InconsistentTopicStatus of the ITopic will be copied into the location specified by aStatus. |
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.
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.
listener | The listener to be attached to the ITopic. |
mask | A bit mask in which each bit enables the invocation of the TopicListener for a certain status. |
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).
qos | The new set of QosPolicy settings for a ITopic. |
|
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.
Definition at line 2378 of file DdsDcpsInterfaces.cs.