RTI Connext Cert C API  Version 2.4.15
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Publisher

DDS_Publisher entity and associated elements More...

Data Structures

struct  DDS_PublisherQos
 <<cert>> QoS policies supported by a DDS_Publisher entity. More...
struct  DDS_PublisherListener
 <<interface>> <<cert>> DDS_Listener for DDS_Publisher status. More...

Macros

#define DDS_PublisherQos_INITIALIZER
 <<cert>> Initializer for new QoS instances.
#define DDS_PublisherListener_INITIALIZER
 <<cert>> Initializer for new DDS_PublisherListener.

Typedefs

typedef struct DDS_PublisherImpl DDS_Publisher
 <<interface>> <<cert>> A publisher is the object responsible for the actual dissemination of publications.

Functions

DDS_ReturnCode_t DDS_PublisherQos_initialize (struct DDS_PublisherQos *self)
 <<cert>> Initializer for new QoS instances.
DDS_ReturnCode_t DDS_PublisherQos_copy (struct DDS_PublisherQos *self, const struct DDS_PublisherQos *source)
 <<cert>> Copy the contents of the given QoS into this QoS.
DDS_Boolean DDS_PublisherQos_is_equal (const struct DDS_PublisherQos *left, const struct DDS_PublisherQos *right)
 <<cert>> Compare two DDS_PublisherQos policies for equality.
DDS_EntityDDS_Publisher_as_entity (DDS_Publisher *publisher)
 <<cert>> Access a DDS_Publisher's supertype instance.
DDS_DataWriterDDS_Publisher_create_datawriter (DDS_Publisher *self, DDS_Topic *topic, const struct DDS_DataWriterQos *qos, const struct DDS_DataWriterListener *listener, DDS_StatusMask mask)
 <<cert>> Creates a DDS_DataWriter that will be attached and belong to the DDS_Publisher.
DDS_DataWriterDDS_Publisher_lookup_datawriter (DDS_Publisher *self, const char *topic_name)
 <<cert>> Retrieves the DDS_DataWriter for a specific DDS_Topic.
DDS_DomainParticipantDDS_Publisher_get_participant (DDS_Publisher *self)
 <<cert>> Returns the DDS_DomainParticipant to which the DDS_Publisher belongs.

Variables

struct DDS_DataWriterQos DDS_DATAWRITER_QOS_DEFAULT
 <<cert>> Special value for creating DDS_DataWriter with default QoS

Detailed Description

DDS_Publisher entity and associated elements


Macro Definition Documentation

#define DDS_PublisherQos_INITIALIZER

<<cert>> Initializer for new QoS instances.

New DDS_PublisherQos instance stored on the stack should be initialized with this value before they are passed to any function. 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:

#define DDS_PublisherListener_INITIALIZER

<<cert>> Initializer for new DDS_PublisherListener.

All the new DDS_PublisherListener instances allocated in the stack should be initialized to this value.No memory is allocated.

See also:
DDS_PublisherListener

Typedef Documentation

typedef struct DDS_PublisherImpl DDS_Publisher

<<interface>> <<cert>> A publisher is the object responsible for the actual dissemination of publications.

QoS:
DDS_PublisherQos
Listener:
DDS_PublisherListener

A publisher acts on the behalf of one or several DDS_DataWriter objects that belong to it. When it is informed of a change to the data associated with one of its DDS_DataWriter objects, it decides when it is appropriate to actually send the data-update message. In making this decision, it considers any extra information that goes with the data (timestamp, writer, etc.) as well as the QoS of the DDS_Publisher and the DDS_DataWriter.

The following operations may be called even if the DDS_Publisher is not enabled. Other operations will fail with the value DDS_RETCODE_NOT_ENABLED if called on a disabled DDS_Publisher:


Function Documentation

DDS_ReturnCode_t DDS_PublisherQos_initialize ( struct DDS_PublisherQos self)

<<cert>> Initializer for new QoS instances.

New DDS_PublisherQos instances on heap should be initialized with this function before they are passed to any function. This step ensures that those contained QoS policies that use dynamic memory are properly initialized. This function does not allocate memory.

Parameters:
self<<in>> Cannot be NULL.
Returns:
One of the Standard Return Codes
DDS_ReturnCode_t DDS_PublisherQos_copy ( struct DDS_PublisherQos self,
const struct DDS_PublisherQos source 
)

<<cert>> Copy the contents of the given QoS into this QoS.

DDS_PublisherQos instances can use dynamic memory because of the sequences contained in some QoS policies. A shallow copy by assignment is therefore unsafe. This function performs a deep-copy, allocating memory if necessary.

Parameters:
self<<in>> Cannot be NULL.
source<<in>> The DDS_PublisherQos to copy from.
Returns:
One of the Standard Return Codes
MT Safety:
UNSAFE. This operation is not thread safe. This operation does not protect the source or destination from being modified by another thread while the source is being copied to the destination.
API Restriction:
This function must only be called after DDS_DomainParticipantFactory_get_instance.
See also:
DDS_PublisherQos_INITIALIZER
DDS_PublisherQos_initialize
DDS_Boolean DDS_PublisherQos_is_equal ( const struct DDS_PublisherQos left,
const struct DDS_PublisherQos right 
)

<<cert>> Compare two DDS_PublisherQos policies for equality.

Parameters:
[in]leftThe left side of the comparison.
[in]rightThe right side of the comparison.
Returns:
DDS_BOOLEAN_TRUE if left is equal to right, otherwise DDS_BOOLEAN_FALSE.
MT Safety:
UNSAFE. This operation does not protect against the left or right side from being modified by another thread while the comparison is made.
See also:
DDS_PublisherQos_INITIALIZER
DDS_PublisherQos_initialize
DDS_Entity* DDS_Publisher_as_entity ( DDS_Publisher publisher)

<<cert>> Access a DDS_Publisher's supertype instance.

Parameters:
publisher<<in>> Cannot be NULL.
Returns:
The DDS_Entity that is supertype instance of the publisher.
DDS_DataWriter* DDS_Publisher_create_datawriter ( DDS_Publisher self,
DDS_Topic topic,
const struct DDS_DataWriterQos qos,
const struct DDS_DataWriterListener listener,
DDS_StatusMask  mask 
)

<<cert>> Creates a DDS_DataWriter that will be attached and belong to the DDS_Publisher.

Precondition:
If publisher is enabled, topic must have been enabled. Otherwise, this operation will fail and no DDS_DataWriter will be created.
The given DDS_Topic must have been created from the same participant as this publisher. If it was created from a different participant, this function will fail.
Parameters:
self<<in>> Cannot be NULL.
topic<<in>> The DDS_Topic that the DDS_DataWriter will be associated with. Cannot be NULL.
qos<<in>> QoS to be used for creating the new DDS_DataWriter. The special value DDS_DATAWRITER_QOS_DEFAULT can be used to indicate that the DDS_DataWriter should be created with the default DDS_DataWriterQos set in the DDS_Publisher.

Cannot be NULL.

Parameters:
listener<<in>> The listener of the DDS_DataWriter.
mask<<in>>. Changes of communication status to be invoked on the listener.
Returns:
A DDS_DataWriter of a derived class specific to the data type associated with the DDS_Topic or NULL if an error occurred.
MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
See also:
Specifying QoS on entities for information on setting QoS before entity creation
DDS_DataWriterQos for rules on consistency among QoS
DDS_DATAWRITER_QOS_DEFAULT
DDS_DataWriter* DDS_Publisher_lookup_datawriter ( DDS_Publisher self,
const char *  topic_name 
)

<<cert>> Retrieves the DDS_DataWriter for a specific DDS_Topic.

This returned DDS_DataWriter is either enabled or disabled.

Parameters:
self<<in>> Cannot be NULL.
topic_name<<in>> Name of the DDS_Topic associated with the DDS_DataWriter that is to be looked up. Cannot be NULL.
Returns:
A DDS_DataWriter that belongs to the DDS_Publisher attached to the DDS_Topic with topic_name. If no such DDS_DataWriter exists, this operation returns NULL.

If more than one DDS_DataWriter is attached to the DDS_Publisher with the same topic_name, then this operation may return any one of them.

MT Safety:
This operation is thread safe. However, note that the arguments are not protected from being modified by other threads and must not be modified until the call returns.
DDS_DomainParticipant* DDS_Publisher_get_participant ( DDS_Publisher self)

<<cert>> Returns the DDS_DomainParticipant to which the DDS_Publisher belongs.

Parameters:
self<<in>> Cannot be NULL.
Returns:
the DDS_DomainParticipant to which the DDS_Publisher belongs.
MT Safety:
. This operation is thread safe on a valid DDS_DataWriter.

Variable Documentation

struct DDS_DataWriterQos DDS_DATAWRITER_QOS_DEFAULT

<<cert>> Special value for creating DDS_DataWriter with default QoS

When used in DDS_Publisher_create_datawriter, this special value is used to indicate that the DDS_DataWriter should be created with the default DDS_DataWriter QoS.

See also:
DDS_Publisher_create_datawriter

RTI Connext Cert C API Version 2.4.15 Copyright © Tue Jan 21 2025 Real-Time Innovations, Inc