You are here: Part 2: Core Concepts > Sending Data > DataWriter QosPolicies > ENTITY_NAME QosPolicy (DDS Extension)

ENTITY_NAME QosPolicy (DDS Extension)

The ENTITY_NAME QosPolicy assigns a name and role name to a DomainParticipant, Publisher, Subscriber, DataReader, or DataWriter.

How the name is used is strictly application-dependent.

It is useful to attach names that are meaningful to the user. These names (except for Publishers and Subscribers) are propagated during discovery so that applications can use these names to identify, in a user-context, the entities that it discovers. Also, Connext DDS tools will print the names of discovered entities (except for Publishers and Subscribers).

The role_name identifies the role of the entity. It is used by the Collaborative DataWriter feature (see Availability QoS Policy and Collaborative DataWriters). With Durable Subscriptions, role_name is used to specify to which Durable Subscription the DataReader belongs. (see Availability QoS Policy and Required Subscriptions.

This QosPolicy contains the members listed in DDS_EntityNameQoSPolicy.

DDS_EntityNameQoSPolicy

Type

Field Name

Description

char *

name

A null-terminated string up to 255 characters in length.

To set this in XML, see Entity Names.

char *

role_name

A null-terminated string up to 255 characters in length.

To set this in XML, see Entity Names.

For Collaborative DataWriters, this name is used to specify to which endpoint group the DataWriter belongs. See. Availability QoS Policy and Collaborative DataWriters.

For Required and Durable Subscriptions this name is used to specify to which Subscription the DataReader belongs. See Required Subscriptions.

These names will appear in the built-in topic for the entity (see the tables in Built-in DataReaders).

Prior to get_qos(), if the name and/or role_name field in this QosPolicy is not null, Connext DDS assumes the memory to be valid and big enough and may write to it. If that is not desired, set name and/or role_name to NULL before calling get_qos() and Connext DDS will allocate adequate memory for name.

When you call the destructor of entity’s QoS structure (DomainParticipantQos, DataReaderQos, or DataWriterQos) (in C++, C++/CLI, and C#) or <entity>Qos_finalize() (in C), Connext DDS will attempt to free the memory used for name and role_name if it is not NULL. If this behavior is not desired, set name and/or role_name to NULL before you call the destructor of entity’s QoS structure or DomainParticipantQos_finalize().

Properties

This QosPolicy cannot be modified after the entity is enabled.

Related QosPolicies

Applicable Entities

System Resource Considerations

If the value of name in this QosPolicy is not NULL, some memory will be consumed in storing the information in the database, but should not significantly impact the use of resource.

© 2017 RTI