Index

Package: DDS.Entity

Description

package DDS.Entity is

Summary: <<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_NOT_ENABLED.

QoS:
DDSQosTypesModule

Status:
DDSStatusTypesModule

Listener:
DDS.Listener

Abstract operations

Each derived entity provides the following operations specific to its role in dds. exceptions thrown in addition to DDSReturnTypesModule_std_retcodes : DDS.RETCODE_IMMUTABLE_POLICY, DDS.RETCODE_INCONSISTENT_POLICY.

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. For example, see DDS.DomainParticipant.get_qos

Possible error codes are DDSReturnTypesModule_std_retcodes.

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.

There are two components involved when setting up listeners: the listener itself and the mask. Both of these can be NULL.

Listeners for some Entities derive from the Connext DDS Listeners for related Entities. This means that the derived Listener has all of the methods of its parent class. You can install Listeners at all levels of the object hierarchy. At the top is the DomainParticipantListener; only one can be installed in a DomainParticipant. Then every Subscriber and Publisher can have their own Listener. Finally, each Topic, DataReader and DataWriter can have their own listeners. All are optional.

Suppose, however, that an Entity does not install a Listener, or installs a Listener that does not have particular communication status selected in the bitmask. In this case, if/when that particular status changes for that Entity, the corresponding Listener for that Entity's parent is called. Status changes are "propagated" from child Entity to parent Entity until a Listener is found that is registered for that status. Connext DDS will give up and drop the status-change event only if no Listeners have been installed in the object hierarchy to be called back for the specific status.

The following table describes the effect of different combinations of Listeners and Status Bit Masks considering the hierarchical processing.

Effect of Different Combinations of Listeners and Status Bit Masks
No Bits Set in Mask Some/All Bits Set in Mask
Listener is Specified Connext DDS finds the next most relevant listener for the changed status For the statuses that are enabled in the mask, the most relevant listener will be called. The 'statusChangedFlag' for the relevant status is reset
Listener is NULL Connext DDS behaves as if the listener is not installed and finds the next most relevant listener for that status Connext DDS behaves as if the listener is installed, but the callback is doing nothing. This is called a "nil" listener

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

Types

Ref (abstract)

type Ref is limited interface;

Ref_Access

type Ref_Access is access all Ref'Class;

Subprograms & Entries

Enable (abstract)

procedure Enable 
(Self: not null access Ref) is abstract;

Summary: 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 DDSEntityFactoryQosModule QoS policy on the corresponding factory for the DDS.Entity.

By default, DDSEntityFactoryQosModule 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:

  • set or get the QoS policies (including default QoS policies) and listener
  • DDS.Entity.get_statuscondition
  • 'factory' operations
  • DDS.Entity.get_status_changes and other get status operations (although the status of a disabled entity never changes)
  • 'lookup' operations

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

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

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

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

    If DDS.EntityFactoryQosPolicy.autoenable_created_entities is TRUE, the enable operation on a factory will automatically enable all entities created from that factory (for example, enabling a DDS.Publisher will enable all its contained DDS.DataWriter objects)

    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.

    self: <<in>> Cannot be NULL

    Raises: One of the DDSReturnTypesModules_std_retcodes, DDSReturnTypesModule_std_retcodes or DDS.RETCODE_PRECONDITION_NOT_MET.

  • Get_StatusCondition (abstract)

    function Get_StatusCondition 
    (Self: not null access Ref) return DDS.StatusCondition.Ref_Access is abstract;

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

    self: <<in>> Cannot be NULL

    Returns: the status condition associated with this entity.

    Get_Status_Changes (abstract)

    function Get_Status_Changes 
    (Self: not null access Ref) return DDS.StatusMask is abstract;

    Summary: 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() procedure.

    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.

    self: <<in>> Cannot be NULL

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


    See also: DDSStatusTypesModule

    Get_Instance_Handle (abstract)

    function Get_Instance_Handle 
    (Self: not null access Ref) return DDS.InstanceHandle_T is abstract;

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

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

    self: <<in>> Cannot be NULL

    Returns: the instance handle associated with this entity.

    Get_Entity_Kind (abstract)

    function Get_Entity_Kind 
    (Self: not null access Ref) return DDS.EntityKind_T is abstract;

    GetInterface (abstract)

    function GetInterface 
    (Self: not null access constant Ref) return System.Address is abstract;

    SetInterface (abstract)

    procedure SetInterface 
    (Self: not null access Ref;
    To: System.Address) is abstract;