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

This class is the abstract base class for all the DCPS objects. It acts as a generic class for IEntity objects. More...

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

Public Member Functions

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

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...
 

Detailed Description

This class is the abstract base class for all the DCPS objects. It acts as a generic class for IEntity objects.

Definition at line 667 of file DdsDcpsInterfaces.cs.

Member Function Documentation

◆ Enable()

ReturnCode DDS.IEntity.Enable ( )

This operation enables the IEntity on which it is being called when the IEntity was created with the EntityFactoryQosPolicy set to false.

This operation enables the IEntity. Created IEntity objects can start in either an enabled or disabled state. This is controlled by the value of the EntityFactoryQosPolicy on the corresponding factory for the IEntity. Enabled entities are immediately activated at creation time meaning all their immutable QoS settings can no longer be changed. Disabled Entities are not yet activated, so it is still possible to change there immutable QoS settings. However, once activated the immutable QoS settings can no longer be changed.

Creating disabled entities can make sense when the creator of the IEntity does not yet know which QoS settings to apply, thus allowing another piece of code to set the QoS later on. This is for example the case in the DLRL, where the ObjectHomes create all underlying DCPS entities but do not know which QoS settings to apply. The user can then apply the required QoS settings afterwards.

The default setting of EntityFactoryQosPolicy is such that, by default, entities are created in an enabled state so that it is not necessary to explicitly call enable on newly created entities.

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

If an IEntity has not yet been enabled, the only operations that can be invoked on it are: the ones to set, get or copy the QosPolicy settings, the ones that set (or get) the listener, the ones that get the IStatusCondition, the GetStatusChanges operation (although the status of a disabled entity never changes), and the factory operations that create, delete or lookup(This includes the LookupTopicDescription() but not FindTopic()) other Entities. Other operations will return the error NotEnabled.

Entities created from a factory that is disabled, are created disabled regardless of the setting of the EntityFactoryQosPolicy. Calling enable on an IEntity whose factory is not enabled will fail and return PreconditionNotMet.

If the EntityFactoryQosPolicy has AutoenableCreatedEntities set to true, the enable operation on the factory will automatically enable all Entities created from the factory.

The Listeners associated with an IEntity are not called until the IEntity is enabled. Conditions associated with an IEntity that is not enabled are "inactive", that is, have a TriggerValue which is false.

In addition to the general description, the enable operation on a Subscriber has special meaning in specific usecases. This applies only to Subscribers with PresentationQoS coherent-access set to true with access-scope set to group.

In this case the subscriber is always created in a disabled state, regardless of the factory's auto-enable created entities setting. While the subscriber remains disabled, DataReaders can be created that will participate in coherent transactions of the subscriber (See DDS.ISubscriber.BeginAccess()) and DDS.ISubscriber.EndAccess() operations for more information).

All DataReaders will also be created in a disabled state. Coherency with group access-scope requires data to be delivered as a transaction, atomically, to all eligible readers. Therefore data should not be delivered to any single DataReader immediately after it's created, as usual, but only after the application has finished creating all DataReaders for a given Subscriber. At this point, the application should enable the Subscriber which in turn enables all its DataReaders.

Returns
Return codes are:

Property Documentation

◆ InstanceHandle

InstanceHandle DDS.IEntity.InstanceHandle
get

This operation returns the InstanceHandle of the builtin topic sample that represents the specified IEntity.

The relevant state of some IEntity objects are distributed using builtin topics. Each builtin topic sample represents the state of a specific IEntity and has a unique instanceHandle. This operation returns the instanceHandle of the builtin topic sample that represents the specified IEntity.

Some Entities (IPublisher and ISubscriber) do not have a corresponding builtin topic sample, but they still have an instanceHandle that uniquely identifies the IEntity. The instanceHandles obtained this way can also be used to check whether a specific IEntity is located in a specific IDomainParticipant.

Definition at line 801 of file DdsDcpsInterfaces.cs.

◆ StatusChanges

StatusKind DDS.IEntity.StatusChanges
get

This operation returns a mask with the communication statuses in the IEntity that are triggered.

This operation returns a mask with the communication statuses in the IEntity that are triggered. That is the set of communication statuses whose value have changed since the last time the application called this operation. This operation shows whether a change has occurred even when the status seems unchanged because the status changed back to the original status.

When the IEntity is first created or if the IEntity is not enabled, all communication statuses are in the un-triggered state so the mask returned by the operation is empty.

The result value is a bit mask in which each bit shows which value has changed.

Each status bit is declared as a constant and can be used in an AND operation to check the status bit against the result of type StatusMask. Not all statuses are relevant to all IEntity objects. See the respective Listener interfaces for each IEntity for more information.

Definition at line 785 of file DdsDcpsInterfaces.cs.

◆ StatusCondition

IStatusCondition DDS.IEntity.StatusCondition
get

This property allows access to the IStatusCondition associated with the IEntity.

Each IEntity has a IStatusCondition associated with it. This operation allows access to the IStatusCondition associated with the IEntity. The returned condition can then be added to a WaitSet so that the application can wait for specific status changes that affect the IEntity.

Definition at line 749 of file DdsDcpsInterfaces.cs.


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