RTI Connext DDS Micro
Version 2.4.6
|
DDS_DomainParticipant entity and associated elements More...
Data Structures | |
struct | DDS_DomainParticipantListener |
<<interface>> <<cert>> Listener for participant status. More... | |
struct | DDS_DomainParticipantQos |
<<cert>> QoS policies supported by a DDS_DomainParticipant entity. More... | |
Macros | |
#define | DDS_DomainParticipantListener_INITIALIZER |
<<cert>> Initializer for new DDS_DomainParticipantListener. More... | |
#define | DDS_DomainParticipantQos_INITIALIZER |
<<cert>> Initializer for new QoS instances. More... | |
Typedefs | |
typedef struct DDS_DomainParticipantImpl | DDS_DomainParticipant |
<<interface>> <<cert>> Container for all DDS_DomainEntity objects. More... | |
Variables | |
struct DDS_TopicQos | DDS_TOPIC_QOS_DEFAULT |
<<cert>> Special value for creating a DDS_Topic with default QoS. Note that this is the only supported parameter in RTI Connext Micro when creating a topic. More... | |
struct DDS_PublisherQos | DDS_PUBLISHER_QOS_DEFAULT |
<<cert>> Special value for creating a DDS_Publisher with default QoS. More... | |
struct DDS_SubscriberQos | DDS_SUBSCRIBER_QOS_DEFAULT |
<<cert>> Special value for creating a DDS_Subscriber with default QoS. More... | |
DDS_DomainParticipant entity and associated elements
#define DDS_DomainParticipantListener_INITIALIZER |
<<cert>> Initializer for new DDS_DomainParticipantListener.
No memory is allocated. New DDS_DomainParticipantListener instances stored in the stack should be initialized with this value before they are passed to any functions.
#define DDS_DomainParticipantQos_INITIALIZER |
<<cert>> Initializer for new QoS instances.
DDS_DomainParticipantQos instances stored on the stack should be initialized with this value before they are passed to any functions. This step ensures that those contained QoS policies that use dynamic memory are properly initialized. This does not allocate memory. The simplest way to create a new QoS structure is to initialize it on the stack at the time of its creation:
typedef struct DDS_DomainParticipantImpl DDS_DomainParticipant |
<<interface>> <<cert>> Container for all DDS_DomainEntity objects.
The DomainParticipant object plays several roles: - It acts as a container for all other DDS_Entity objects. - It acts as factory for the DDS_Publisher, DDS_Subscriber, DDS_Topic and DDS_Entity objects. - It represents the participation of the application on a communication plane that isolates applications running on the same set of physical computers from each other. A domain establishes a virtual network linking all applications that share the same domainId
and isolating them from applications running on different domains. In this way, several independent distributed applications can coexist in the same physical network without interfering, or even being aware of each other. The following operations may be called even if the DDS_DomainParticipant is not enabled. Other operations will fail with the value DDS_RETCODE_NOT_ENABLED if called on a disabled DomainParticipant:
DDS_ReturnCode_t DDS_DomainParticipantQos_initialize | ( | struct DDS_DomainParticipantQos * | self | ) |
Initializer for new QoS instances.
DDS_DomainParticipantQos instances on heap should be initialized with this functionbefore they are passed to any functions. This step ensures that those contained QoS policies that use dynamic memory are properly initialized. This functiondoes not allocate memory.
self | <<in>> Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipantQos_copy | ( | struct DDS_DomainParticipantQos * | self, |
const struct DDS_DomainParticipantQos * | source | ||
) |
Copy the contents of the given QoS into this QoS.
DDS_DomainParticipantQos instances can use dynamic memory because of the sequences contained in some QoS policies. A shallow copy by assignment is therefore unsafe. This functionperforms a deep-copy, allocating memory if necessary.
DDS_ReturnCode_t DDS_DomainParticipantQos_finalize | ( | struct DDS_DomainParticipantQos * | self | ) |
Free any dynamic memory allocated by the policies in this DDS_DomainParticipantQos.
Some QoS policies may use dynamic memory (regardless of whether the QoS itself is in dynamic memory). This functionfrees that memory but otherwise leaves this QoS unchanged. It should be called on all instances before they are freed (or, in the case of stack-based instances, before they go out of scope). This functiondoes not leave this object in an invalid state. It is permissable to finalize a QoS and then subsequently allocate new dynamic memory in one or more of its QoS policies. Note that if this QoS instance is stored in heap memory, calling this functionwill not call free() on it; the user is responsible for explicitly freeing any heap-based QoS instance after calling this function.
self | <<in>> Cannot be NULL. |
DDS_Entity* DDS_DomainParticipant_as_entity | ( | DDS_DomainParticipant * | domain | ) |
<<cert>> Access a DDS_DomainParticipant's supertype instance.
domain | <<in>> Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_get_default_publisher_qos | ( | DDS_DomainParticipant * | self, |
struct DDS_PublisherQos * | qos | ||
) |
Copy the default DDS_PublisherQos values into the provided DDS_PublisherQos instance.
The retrieved qos
will match the set of values specified on the last successful call to DDS_DomainParticipant_set_default_publisher_qos, or else, if the call was never made, the default values listed in DDS_PublisherQos. This functionmay potentially allocate memory depending on the sequences contained in some QoS policies. If DDS_PUBLISHER_QOS_DEFAULT is specified as the qos
parameter when DDS_DomainParticipant_create_topic is called, the default value of the QoS set in the factory, equivalent to the value obtained by calling DDS_DomainParticipant_get_default_publisher_qos, will be used to create the DDS_Publisher.
DDS_ReturnCode_t DDS_DomainParticipant_set_default_publisher_qos | ( | DDS_DomainParticipant * | self, |
const struct DDS_PublisherQos * | qos | ||
) |
Set the default DDS_PublisherQos values for this domain participant.
This default value will be used for newly created DDS_Publisher if DDS_PUBLISHER_QOS_DEFAULT is specified as the qos
parameter when DDS_DomainParticipant_create_publisher is called.
qos
parameter.self | <<in>> Cannot be NULL. |
qos | <<in>> Default qos to be set. The special value DDS_PUBLISHER_QOS_DEFAULT may be passed as qos to indicate that the default QoS should be reset back to the initial values the factory would used if DDS_DomainParticipant_set_default_publisher_qos had never been called. Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_get_default_subscriber_qos | ( | DDS_DomainParticipant * | self, |
struct DDS_SubscriberQos * | qos | ||
) |
Copy the default DDS_SubscriberQos values into the provided DDS_SubscriberQos instance.
The retrieved qos
will match the set of values specified on the last successful call to DDS_DomainParticipant_set_default_subscriber_qos, or else, if the call was never made, the default values listed in DDS_SubscriberQos. This functionmay potentially allocate memory depending on the sequences contained in some QoS policies. If DDS_SUBSCRIBER_QOS_DEFAULT is specified as the qos
parameter when DDS_DomainParticipant_create_subscriber is called, the default value of the QoS set in the factory, equivalent to the value obtained by calling DDS_DomainParticipant_get_default_subscriber_qos, will be used to create the DDS_Subscriber.
DDS_ReturnCode_t DDS_DomainParticipant_set_default_subscriber_qos | ( | DDS_DomainParticipant * | self, |
const struct DDS_SubscriberQos * | qos | ||
) |
Set the default DDS_SubscriberQos values for this domain participant.
This default value will be used for newly created DDS_Subscriber if DDS_SUBSCRIBER_QOS_DEFAULT is specified as the qos
parameter when DDS_DomainParticipant_create_subscriber is called.
qos
parameter.self | <<in>> Cannot be NULL. |
qos | <<in>> Default qos to be set. The special value DDS_SUBSCRIBER_QOS_DEFAULT may be passed as qos to indicate that the default QoS should be reset back to the initial values the factory would used if DDS_DomainParticipant_set_default_subscriber_qos had never been called. Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_get_default_topic_qos | ( | DDS_DomainParticipant * | self, |
struct DDS_TopicQos * | qos | ||
) |
Copies the default DDS_TopicQos values for this domain participant into the given DDS_TopicQos instance.
The retrieved qos
will match the set of values specified on the last successful call to DDS_DomainParticipant_set_default_topic_qos, or else, if the call was never made, the default values listed in DDS_TopicQos. This functionmay potentially allocate memory depending on the sequences contained in some QoS policies.
qos
parameter.DDS_ReturnCode_t DDS_DomainParticipant_set_default_topic_qos | ( | DDS_DomainParticipant * | self, |
const struct DDS_TopicQos * | qos | ||
) |
Set the default DDS_TopicQos values for this domain participant.
This default value will be used for newly created DDS_Topic if DDS_TOPIC_QOS_DEFAULT is specified as the qos
parameter when DDS_DomainParticipant_create_topic is called.
qos
parameter.self | <<in>> Cannot be NULL. |
qos | <<in>> Default qos to be set. The special value DDS_TOPIC_QOS_DEFAULT may be passed as qos to indicate that the default QoS should be reset back to the initial values the factory would have used if DDS_DomainParticipant_set_default_topic_qos had never been called. Cannot be NULL. |
DDS_Publisher* DDS_DomainParticipant_create_publisher | ( | DDS_DomainParticipant * | self, |
const struct DDS_PublisherQos * | qos, | ||
const struct DDS_PublisherListener * | listener, | ||
DDS_StatusMask | mask | ||
) |
<<cert>> Creates a DDS_Publisher with the desired QoS policies and attaches to it the specified DDS_PublisherListener.
listener
is specified, none of the listener callback functionscan be NULL.self | <<in>> Cannot be NULL. |
qos | <<in>> QoS to be used for creating the new DDS_Publisher. The special value DDS_PUBLISHER_QOS_DEFAULT can be used to indicate that the DDS_Publisher should be created with the default DDS_PublisherQos set in the DDS_DomainParticipant. Cannot be NULL. |
listener | <<in>>. Listener to be attached to the newly created DDS_Publisher. |
mask | <<in>>. Changes of communication status to be invoked on the listener. |
DDS_ReturnCode_t DDS_DomainParticipant_delete_publisher | ( | DDS_DomainParticipant * | self, |
DDS_Publisher * | p | ||
) |
Deletes an existing DDS_Publisher.
self | <<in>> Cannot be NULL. |
p | <<in>> DDS_Publisher to be deleted. |
DDS_Subscriber* DDS_DomainParticipant_create_subscriber | ( | DDS_DomainParticipant * | self, |
const struct DDS_SubscriberQos * | qos, | ||
const struct DDS_SubscriberListener * | listener, | ||
DDS_StatusMask | mask | ||
) |
<<cert>> Creates a DDS_Subscriber with the desired QoS policies and attaches to it the specified DDS_SubscriberListener.
listener
is specified, none of the listener callback functionscan be NULL.qos
, it is not safe to create the publisher while another thread may be simultaneously calling DDS_DomainParticipant_set_default_subscriber_qos.self | <<in>> Cannot be NULL. |
qos | <<in>> QoS to be used for creating the new DDS_Subscriber. The special value DDS_SUBSCRIBER_QOS_DEFAULT can be used to indicate that the DDS_Subscriber should be created with the default DDS_SubscriberQos set in the DDS_DomainParticipant. Cannot be NULL. |
listener | <<in>>. Listener to be attached to the newly created DDS_Subscriber. |
mask | <<in>>. Changes of communication status to be invoked on the listener. |
DDS_ReturnCode_t DDS_DomainParticipant_delete_subscriber | ( | DDS_DomainParticipant * | self, |
DDS_Subscriber * | s | ||
) |
Deletes an existing DDS_Subscriber.
self | <<in>> Cannot be NULL. |
s | <<in>> DDS_Subscriber to be deleted. |
DDS_Topic* DDS_DomainParticipant_create_topic | ( | DDS_DomainParticipant * | self, |
const char * | topic_name, | ||
const char * | type_name, | ||
const struct DDS_TopicQos * | qos, | ||
const struct DDS_TopicListener * | listener, | ||
DDS_StatusMask | mask | ||
) |
<<cert>> Creates a DDS_Topic with the desired QoS policies
topic_name
attached to the same DDS_DomainParticipant. If the application attempts this, this functionwill fail and return a NULL topic.qos
, it is not safe create the publisher while another thread may be simultaneously calling DDS_DomainParticipant_set_default_topic_qos.self | <<in>> Cannot be NULL. |
topic_name | <<in>> Name for the new topic, must not exceed 255 characters. Cannot be NULL. |
type_name | <<in>> The type to which the new DDS_Topic will be bound. Cannot be NULL. |
qos | <<in>> QoS to be used for creating the new DDS_Topic. The special value DDS_TOPIC_QOS_DEFAULT can be used to indicate that the DDS_Topic should be created with the default DDS_TopicQos set in the DDS_DomainParticipant. Cannot be NULL. |
listener | <<in>>. Listener to be attached to the newly created DDS_Topic. |
mask | <<in>>. Changes of communication status to be invoked on the listener. |
DDS_ReturnCode_t DDS_DomainParticipant_delete_topic | ( | DDS_DomainParticipant * | self, |
DDS_Topic * | topic | ||
) |
Deletes a DDS_Topic.
DDS_Topic* DDS_DomainParticipant_find_topic | ( | DDS_DomainParticipant * | self, |
const char * | topic_name, | ||
const struct DDS_Duration_t * | timeout | ||
) |
Finds an existing (or ready to exist) DDS_Topic, based on its name.
If a DDS_Topic of the same name already exists, it gives access to it, otherwise it waits until either another mechanism creates it, or else completes when the specified timeout
occurs. DDS_Topic obtained by DDS_DomainParticipant_find_topic must also be deleted by means of DDS_DomainParticipant_delete_topic. If DDS_Topic is obtained multiple times by means of DDS_DomainParticipant_find_topic or DDS_DomainParticipant_create_topic, it must also be deleted that same number of times using DDS_DomainParticipant_delete_topic
self | <<in>> Cannot be NULL. |
topic_name | <<in>> Name of the DDS_Topic to search for. Cannot be NULL. |
timeout | <<in>> The time to wait if the DDS_Topic doesn't exist already. Cannot be NULL. |
DDS_TopicDescription* DDS_DomainParticipant_lookup_topicdescription | ( | DDS_DomainParticipant * | self, |
const char * | topic_name | ||
) |
<<cert>> Lookup an existing locally-created DDS_TopicDescription, based on its name.
The returned topic can either be enabled or disabled. The operation DDS_DomainParticipant_lookup_topicdescription searches among the locally created topics and returns a pointer to a DDS_TopicDescription. It is possible to delete the DDS_TopicDescription returned by DDS_DomainParticipant_lookup_topicdescription, provided it has no readers or writers, but then it is really deleted and subsequent lookups will fail.
self | <<in>> Cannot be NULL. |
topic_name | <<in>> Name of DDS_TopicDescription to search for. This string must be no more than 255 characters. Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_add_peer | ( | DDS_DomainParticipant * | self, |
const char * | peer | ||
) |
<<eXtension>> <<cert>> Attempt to contact one or more additional peer participants.
Add the given peer description to the list of peers with which this DDS_DomainParticipant will try to communicate. This functionmay be called at any time after this DDS_DomainParticipant has been created, before or after it has been enabled. If it is called after DDS_Entity_enable, an attempt will be made to contact the new peer(s) immediately. If it is called before, the peer description will simply be added to the list that was populated by DDS_DiscoveryQosPolicy::initial_peers; the first attempted contact will take place after this DDS_DomainParticipant is enabled. Adding a peer description with this functiondoes not guarantee that any peer(s) discovered as a result will exactly correspond to those described:
DDS_DomainId_t DDS_DomainParticipant_get_domain_id | ( | DDS_DomainParticipant * | self | ) |
<<cert>> Get the unique domain identifier.
This operation retrieves the domain_id
used to create the DDS_DomainParticipant. The domain_id
identifies the DDS domain to which the DDS_DomainParticipant belongs. Each DDS domain represents a separate data 'communication plane' isolated from other domains.
self | <<in>> Cannot be NULL. |
domainId
that was used to create the domainDDS_ReturnCode_t DDS_DomainParticipant_delete_contained_entities | ( | DDS_DomainParticipant * | self | ) |
Delete all the entities that were created by means of the "create" operations on the DDS_DomainParticipant.
This operation deletes all contained DDS_Publisher, DDS_Subscriber, and DDS_Topic. Prior to deleting each contained entity, this operation will recursively call the corresponding delete_contained_entities operation on each contained entity (if applicable). This pattern is applied recursively. In this manner the operation delete_contained_entities() on the DDS_DomainParticipant will end up deleting all the entities recursively contained in the DDS_DomainParticipant, that is also the DDS_DataWriter, and DDS_DataReader. The operation will fail with DDS_RETCODE_PRECONDITION_NOT_MET if any of the contained entities is in a state where it cannot be deleted. If delete_contained_entities() completes successfully, the application may delete the DDS_DomainParticipant knowing that it has no contained entities.
self | <<in>> Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_get_current_time | ( | DDS_DomainParticipant * | self, |
struct DDS_Time_t * | current_time | ||
) |
<<cert>> Returns the current value of the time.
The current value of the time that RTI Connext Micro uses to time-stamp DDS_DataWriter and to set the reception-timestamp for the data updates that it receives.
self | <<in>> Cannot be NULL. |
current_time | <<inout>> Current time to be filled up. Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_get_discovered_participants | ( | DDS_DomainParticipant * | self, |
struct DDS_InstanceHandleSeq * | participant_handles | ||
) |
Returns a sequence containing DDS_InstanceHandle_t for all the remote DDS_DomainParticipant that have been discovered by the DDS_DomainParticipant.
self | <<in>> Cannot be NULL. |
participant_handles | <<out>> sequence of DDS_InstanceHandle_t where the result will be stored. |
DDS_ReturnCode_t DDS_DomainParticipant_get_discovered_participant_data | ( | DDS_DomainParticipant * | self, |
struct DDS_ParticipantBuiltinTopicData * | participant_data, | ||
const DDS_InstanceHandle_t * | participant_handle | ||
) |
Returns information about a remote DDS_DomainParticipant that has been discovered by the DDS_DomainParticipant.
self | <<in>> Cannot be NULL. |
participant_data | <<out>> information about the remote DDS_DomainParticipant. |
participant_handle | <<in>> DDS_InstanceHandle_t identifying the remote DDS_DomainParticipant. |
DDS_ReturnCode_t DDS_DomainParticipant_set_qos | ( | DDS_DomainParticipant * | self, |
const struct DDS_DomainParticipantQos * | qos | ||
) |
Change the QoS of this domain participant.
The DDS_DomainParticipantQos::entity_factory can be changed. The other policies are immutable.
self | <<in>> Cannot be NULL. |
qos | <<in>> Set of policies to be applied to DDS_DomainParticipant. Policies must be consistent. Immutable policies cannot be changed after DDS_DomainParticipant is enabled. The special value DDS_PARTICIPANT_QOS_DEFAULT can be used to indicate that the QoS of the DDS_DomainParticipant should be changed to match the current default DDS_DomainParticipantQos set in the DDS_DomainParticipantFactory. Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_get_qos | ( | DDS_DomainParticipant * | self, |
struct DDS_DomainParticipantQos * | qos | ||
) |
Get the participant QoS.
This functionmay potentially allocate memory depending on the sequences contained in some QoS policies.
DDS_ReturnCode_t DDS_DomainParticipant_set_listener | ( | DDS_DomainParticipant * | self, |
const struct DDS_DomainParticipantListener * | l, | ||
DDS_StatusMask | mask | ||
) |
Sets the participant listener.
self | <<in>> Cannot be NULL. |
l | <<in>> Listener to be installed on entity. |
mask | <<in>> Changes of communication status to be invoked on the listener. The callback functionon the listener cannot be NULL if the corresponding status is turned on in the mask . |
|
read |
Get the participant listener.
self | <<in>> Cannot be NULL. |
DDS_ReturnCode_t DDS_DomainParticipant_register_type | ( | DDS_DomainParticipant * | participant, |
const char * | type_name, | ||
struct NDDS_Type_Plugin * | plugin | ||
) |
<<eXtension>> <<cert>> Allows an application to communicate to RTI Connext Micro the existence of a data type.
The generated implementation of the operation embeds all the knowledge that has to be communicated to the middleware in order to make it able to manage the contents of data of that type. This includes in particular the key definition that will allow RTI Connext Micro to distinguish different instances of the same type. The same NDDS_Type_Plugin can be registered multiple times with a DDS_DomainParticipant using the same or different values for the type_name
. If register_type
is called multiple times on the same NDDS_Type_Plugin with the same DDS_DomainParticipant and type_name
, the second (and subsequent) registrations are ignored by the operation fails with DDS_RETCODE_OK.
type_name
to register two different NDDS_Type_Plugin with the same DDS_DomainParticipant, or else the operation will fail and DDS_RETCODE_PRECONDITION_NOT_MET will be returned.participant | <<in>> the DDS_DomainParticipant to register the data type Foo with. Cannot be NULL. |
type_name | <<in>> the type name under with the data type Foo is registered with the participant; this type name is used when creating a new DDS_Topic. (See DDS_DomainParticipant_create_topic.) The name may not be NULL or longer than 255 characters. |
plugin | <<in>> the Foo type plugin to register the data type with. Cannot be NULL. |
|
read |
Allows an application to unregister a data type from RTI Connext Micro. After calling unregister_type, no further communication using that type is possible.
The generated implementation of the operation removes all the information about a type from RTI Connext Micro. No further communication using that type is possible.
type_name
is registered with the participant and all DDS_Topic objects referencing the type have been destroyed. If the type is not registered with the participant, or if any DDS_Topic is associated with the type, the operation will fail with DDS_RETCODE_ERROR.participant | <<in>> the DDS_DomainParticipant to unregister the data type Foo from. Cannot be NULL. |
type_name | <<in>> the type name under with the data type Foo is registered with the participant. The name should match a name that has been previously used to register a type with the participant. Cannot be NULL. |
struct DDS_TopicQos DDS_TOPIC_QOS_DEFAULT |
<<cert>> Special value for creating a DDS_Topic with default QoS. Note that this is the only supported parameter in RTI Connext Micro when creating a topic.
RTI Connext Micro does not support Topic QoS. This represents the a placeholder for Topic QoS values.This is the only valid paramater that can be passed into the DDS_DomainParticipant_create_topic function (no other values for QoS are supported).
struct DDS_PublisherQos DDS_PUBLISHER_QOS_DEFAULT |
<<cert>> Special value for creating a DDS_Publisher with default QoS.
When used in DDS_DomainParticipant_create_publisher, this special value is used to indicate that the DDS_Publisher should be created with the default DDS_Publisher QoS.
struct DDS_SubscriberQos DDS_SUBSCRIBER_QOS_DEFAULT |
<<cert>> Special value for creating a DDS_Subscriber with default QoS.
When used in DDS_DomainParticipant_create_subscriber, this special value is used to indicate that the DDS_Subscriber should be created with the default DDS_Subscriber QoS.