RTI Connext Modern C++ API  Version 7.0.0
rti::core::policy::PublishModeKind_def Struct Reference

<<extension>> The enumeration for PublishMode kinds More...

#include <PolicyKind.hpp>

Public Types

enum  type {
  SYNCHRONOUS,
  ASYNCHRONOUS
}
 The underlying enum type. More...
 

Detailed Description

<<extension>> The enumeration for PublishMode kinds

Member Enumeration Documentation

◆ type

The underlying enum type.

Enumerator
SYNCHRONOUS 

Indicates to send data synchronously.

If rti::core::policy::DataWriterProtocol::push_on_write is true, data is sent immediately in the context of dds::pub::DataWriter::write().

As data is sent immediately in the context of the user thread, no flow control is applied.

See also
rti::core::policy::DataWriterProtocol::push_on_write

[default] for dds::pub::DataWriter

ASYNCHRONOUS 

Indicates to send data asynchronously.

Configures the dds::pub::DataWriter to delegate the task of data transmission to a separate publishing thread. The dds::pub::DataWriter::write() call does not send the data, but instead schedules the data to be sent later by its associated dds::pub::Publisher.

Each dds::pub::Publisher uses its dedicated publishing thread (rti::core::policy::AsynchronousPublisher) to send data for all its asynchronous DataWriters. For each asynchronous DataWriter, the associated rti::pub::FlowController determines when the publishing thread is allowed to send the data.

dds::pub::DataWriter::wait_for_asynchronous_publishing and dds::pub::Publisher::wait_for_asynchronous_publishing enable you to determine when the data has actually been sent.

See also
rti::pub::FlowController
dds::core::policy::History
dds::pub::DataWriter::wait_for_asynchronous_publishing
dds::pub::Publisher::wait_for_asynchronous_publishing
NDDS_Transport_Property_t::gather_send_buffer_count_max