RTI Connext Traditional C++ API Version 7.1.0

DDSPublisher entity and associated elements More...

Classes

struct  DDS_PublisherQos
 QoS policies supported by a DDSPublisher entity. More...
 
class  DDSPublisherListener
 <<interface>> DDSListener for DDSPublisher status. More...
 
class  DDSPublisherSeq
 Declares IDL sequence < DDSPublisher > . More...
 
class  DDSPublisher
 <<interface>> A publisher is the object responsible for the actual dissemination of publications. More...
 

Functions

DDS_Boolean DDS_PublisherQos_equals (const struct DDS_PublisherQos *self, const struct DDS_PublisherQos *other)
 Compares two DDS_PublisherQos for equality. More...
 
DDS_ReturnCode_t DDS_PublisherQos::print () const
 Prints this DDS_PublisherQos to stdout. More...
 
DDS_ReturnCode_t DDS_PublisherQos::to_string (char *string, DDS_UnsignedLong &string_size) const
 Obtains a string representation of this DDS_PublisherQos. More...
 
DDS_ReturnCode_t DDS_PublisherQos::to_string (char *string, DDS_UnsignedLong &string_size, const DDS_PublisherQos &base) const
 Obtains a string representation of this DDS_PublisherQos. More...
 
DDS_ReturnCode_t DDS_PublisherQos::to_string (char *string, DDS_UnsignedLong &string_size, const DDS_QosPrintFormat &format) const
 Obtains a string representation of this DDS_PublisherQos. More...
 
DDS_ReturnCode_t DDS_PublisherQos::to_string (char *string, DDS_UnsignedLong &string_size, const DDS_PublisherQos &base, const DDS_QosPrintFormat &format) const
 Obtains a string representation of this DDS_PublisherQos. More...
 
DDS_ReturnCode_t DDS_PublisherQos::to_string (char *string, DDS_UnsignedLong &string_size, const DDS_QosPrintAll_t &) const
 Obtains a string representation of this DDS_PublisherQos. More...
 
DDS_ReturnCode_t DDS_PublisherQos::to_string (char *string, DDS_UnsignedLong &string_size, const DDS_QosPrintAll_t &, const DDS_QosPrintFormat &format) const
 Obtains a string representation of this DDS_PublisherQos. More...
 

Variables

const struct DDS_DataWriterQos DDS_DATAWRITER_QOS_DEFAULT
 Special value for creating DDSDataWriter with default QoS. More...
 
const struct DDS_DataWriterQos DDS_DATAWRITER_QOS_USE_TOPIC_QOS
 Special value for creating DDSDataWriter with a combination of the default DDS_DataWriterQos and the DDS_TopicQos. More...
 

Detailed Description

DDSPublisher entity and associated elements

Function Documentation

◆ DDS_PublisherQos_equals()

DDS_Boolean DDS_PublisherQos_equals ( const struct DDS_PublisherQos self,
const struct DDS_PublisherQos other 
)

Compares two DDS_PublisherQos for equality.

Parameters
self<<in>> This PublisherQos.
other<<in>> The other PublisherQos to be compared with this PublisherQos.
Returns
DDS_BOOLEAN_TRUE if the two Qos objects are equal or DDS_BOOLEAN_FALSE otherwise.

Referenced by DDS_PublisherQos::operator!=(), and DDS_PublisherQos::operator==().

◆ print()

DDS_ReturnCode_t DDS_PublisherQos::print ( ) const
inline

Prints this DDS_PublisherQos to stdout.

Only the differences between this DDS_PublisherQos and the documented default are printed. If you wish to print everything regardless, see DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const. The output is formatted according to the default values for DDS_QosPrintFormat.

Returns
DDS_RETCODE_OK if no error was encountered.

◆ to_string() [1/6]

DDS_ReturnCode_t DDS_PublisherQos::to_string ( char *  string,
DDS_UnsignedLong string_size 
) const
inline

Obtains a string representation of this DDS_PublisherQos.

Only the differences between this DDS_PublisherQos and the documented default are printed to idref_PublisherQose string. If you wish to print everything regardless, see DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const. The output is formatted according to the default values for DDS_QosPrintFormat.

If the supplied buffer is NULL, the required length of the string is returned via the string_size parameter.

If the supplied buffer is not NULL, the string representation of the DDS_PublisherQos is written to the buffer.

Parameters
string<<out>> The char buffer that will be used to store the string representation of this DDS_PublisherQos. If NULL, this function will return the required length of this buffer through the string_size parameter.
string_size<<inout>> Cannot be NULL. The size of the supplied buffer. If the supplied buffer is NULL, or if the supplied buffer is not large enough, this value will be updated with the required length of the buffer.
Returns
DDS_RETCODE_OK if no error was encountered.
See also
DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const

◆ to_string() [2/6]

DDS_ReturnCode_t DDS_PublisherQos::to_string ( char *  string,
DDS_UnsignedLong string_size,
const DDS_PublisherQos base 
) const
inline

Obtains a string representation of this DDS_PublisherQos.

This overload behaves the same as DDS_PublisherQos::to_string but allows the caller to specify the DDS_PublisherQos, which is used as the base profile. Only the differences between the QoS and the base profile are included in the output string.

Parameters
string<<out>> The char buffer that will be used to store the string representation of this DDS_PublisherQos. If NULL, this function will return the required length of this buffer through the string_size parameter.
string_size<<inout>> Cannot be NULL. The size of the supplied buffer. If the supplied buffer is NULL, or if the supplied buffer is not large enough, this value will be updated with the required length of the buffer.
base<<in>> The DDS_PublisherQos to be used as the base QoS profile. Only the differences with respect to this base profile will be included in the output string.
Returns
DDS_RETCODE_OK if no error was encountered.
See also
DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const

References DDS_QosPrintFormat_INITIALIZER.

◆ to_string() [3/6]

DDS_ReturnCode_t DDS_PublisherQos::to_string ( char *  string,
DDS_UnsignedLong string_size,
const DDS_QosPrintFormat format 
) const
inline

Obtains a string representation of this DDS_PublisherQos.

This overload behaves the same as DDS_PublisherQos::to_string but allows the caller to specify the DDS_QosPrintFormat which is used to format the output.

Parameters
string<<out>> The char buffer that will be used to store the string representation of this DDS_PublisherQos. If NULL, this function will return the required length of this buffer through the string_size parameter.
string_size<<inout>> Cannot be NULL. The size of the supplied buffer. If the supplied buffer is NULL, or if the supplied buffer is not large enough, this value will be updated with the required length of the buffer.
format<<in>> The DDS_QosPrintFormat to be used to format the output string.
Returns
DDS_RETCODE_OK if no error was encountered.
See also
DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const

References DDS_RETCODE_ERROR, and DDS_RETCODE_OK.

◆ to_string() [4/6]

DDS_ReturnCode_t DDS_PublisherQos::to_string ( char *  string,
DDS_UnsignedLong string_size,
const DDS_PublisherQos base,
const DDS_QosPrintFormat format 
) const
inline

Obtains a string representation of this DDS_PublisherQos.

Only the differences between this DDS_PublisherQos and the DDS_PublisherQos supplied as the base are printed to the string.

If the supplied buffer is NULL, the required length of the string is returned via the string_size parameter.

If the supplied buffer is not NULL, the string representation of the DDS_PublisherQos is written to the buffer.

Parameters
string<<out>> The char buffer that will be used to store the string representation of this DDS_PublisherQos. If NULL, this function will return the required length of this buffer through the string_size parameter.
string_size<<inout>> Cannot be NULL. The size of the supplied buffer. If the supplied buffer is NULL, or if the supplied buffer is not large enough, this value will be updated with the required length of the buffer.
base<<in>> The DDS_PublisherQos to be used as the base QoS profile. Only the differences with respect to this base profile will be included in the output string.
format<<in>> The DDS_QosPrintFormat to be used to format the output string.
Returns
DDS_RETCODE_OK if no error was encountered.

◆ to_string() [5/6]

DDS_ReturnCode_t DDS_PublisherQos::to_string ( char *  string,
DDS_UnsignedLong string_size,
const DDS_QosPrintAll_t  
) const
inline

Obtains a string representation of this DDS_PublisherQos.

This overload behaves the same as DDS_PublisherQos::to_string but prints the entire DDS_PublisherQos object. The only valid value for the argument of type DDS_QosPrintAll_t is DDS_QOS_PRINT_ALL.

For example

PublisherQos qos;
char *str = NULL;
DDS_UnsignedLong str_size = 0;
qos.to_string(str, str_size, QOS_PRINT_ALL);
RTICdrUnsignedLong DDS_UnsignedLong
Defines an unsigned long integer data type, equivalent to IDL/CDR unsigned long.
Definition: dds_c.1.0/interface/common.ifc:249
DDS_ReturnCode_t to_string(char *string, DDS_UnsignedLong &string_size) const
Obtains a string representation of this DDS_PublisherQos.
Definition: publication.ifc:1346

The resultant string is formatted according to the default value for DDS_QosPrintFormat.

Parameters
string<<out>> The char buffer that will be used to store the string representation of this DDS_PublisherQos. If NULL, this function will return the required length of this buffer through the string_size parameter.
string_size<<inout>> Cannot be NULL. The size of the supplied buffer. If the supplied buffer is NULL, or if the supplied buffer is not large enough, this value will be updated with the required length of the buffer.
Returns
DDS_RETCODE_OK if no error was encountered.
See also
DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const

References DDS_QosPrintFormat_INITIALIZER.

◆ to_string() [6/6]

DDS_ReturnCode_t DDS_PublisherQos::to_string ( char *  string,
DDS_UnsignedLong string_size,
const DDS_QosPrintAll_t ,
const DDS_QosPrintFormat format 
) const
inline

Obtains a string representation of this DDS_PublisherQos.

This overload behaves the same as the DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_QosPrintAll_t&) const overload. The only difference is that it allows the caller to specify the DDS_QosPrintFormat which is used to format the resultant string.

Parameters
string<<out>> The char buffer that will be used to store the string representation of this DDS_PublisherQos. If NULL, this function will return the required length of this buffer through the string_size parameter.
string_size<<inout>> Cannot be NULL. The size of the supplied buffer. If the supplied buffer is NULL, or if the supplied buffer is not large enough, this value will be updated with the required length of the buffer.
format<<in>> The DDS_QosPrintFormat to be used to format the output string.
Returns
DDS_RETCODE_OK if no error was encountered.
See also
DDS_PublisherQos::to_string(char*, DDS_UnsignedLong&, const DDS_PublisherQos&, const DDS_QosPrintFormat&) const

Variable Documentation

◆ DDS_DATAWRITER_QOS_DEFAULT

const struct DDS_DataWriterQos DDS_DATAWRITER_QOS_DEFAULT
extern

Special value for creating DDSDataWriter with default QoS.

When used in DDSPublisher::create_datawriter, this special value is used to indicate that the DDSDataWriter should be created with the default DDSDataWriter QoS by means of the operation get_default_datawriter_qos and using the resulting QoS to create the DDSDataWriter.

When used in DDSPublisher::set_default_datawriter_qos, this special value is used to indicate that the default QoS should be reset back to the initial value that would be used if the DDSPublisher::set_default_datawriter_qos operation had never been called.

When used in DDSDataWriter::set_qos, this special value is used to indicate that the QoS of the DDSDataWriter should be changed to match the current defualt QoS set in the DDSPublisher that the DDSDataWriter belongs to.

Warning
This value is a constant and should never be modified. You cannot use this value to get the default QoS values for a DataWriter; for this purpose, use DDSDomainParticipant::get_default_datawriter_qos.
See also
DDSPublisher::create_datawriter
DDSPublisher::set_default_datawriter_qos
DDSDataWriter::set_qos
Examples
HelloWorld_publisher.cxx.

◆ DDS_DATAWRITER_QOS_USE_TOPIC_QOS

const struct DDS_DataWriterQos DDS_DATAWRITER_QOS_USE_TOPIC_QOS
extern

Special value for creating DDSDataWriter with a combination of the default DDS_DataWriterQos and the DDS_TopicQos.

The use of this value is equivalent to the application obtaining the default DDS_DataWriterQos and the DDS_TopicQos (by means of the operation DDSTopic::get_qos) and then combining these two QoS using the operation DDSPublisher::copy_from_topic_qos whereby any policy that is set on the DDS_TopicQos "overrides" the corresponding policy on the default QoS. The resulting QoS is then applied to the creation of the DDSDataWriter.

This value should only be used in DDSPublisher::create_datawriter.

See also
DDSPublisher::create_datawriter
DDSPublisher::get_default_datawriter_qos
DDSTopic::get_qos
DDSPublisher::copy_from_topic_qos