Class astutedds::dcps::Publisher
ClassList > astutedds > dcps > Publisher
Container for DataWriters.
#include <dcps.hpp>
Public Functions
| Type | Name |
|---|---|
| Publisher (DomainParticipant * participant) |
|
| Publisher (const Publisher &) = delete |
|
| ReturnCode_t | begin_coherent_changes () Begin a coherent set of changes Buffers subsequent writes until end_coherent_changes() flushes them. |
| void | buffer_coherent_write (DataWriter * writer, const std::vector< uint8_t > & data) Add data to the coherent buffer (called by DataWriter when coherent is active) |
| void | buffer_coherent_write_dual (DataWriter * writer, const std::vector< uint8_t > & xcdr1, const std::vector< uint8_t > & xcdr2) |
| ReturnCode_t | copy_from_topic_qos (DataWriterQos & writer_qos, const TopicQos & topic_qos) const Copy Topic-level QoS policies into DataWriter QoS (DDS §2.2.2.4.1.17) |
| DataWriter * | create_datawriter (Topic * topic, const DataWriterQos & qos=DataWriterQos{}) Create a DataWriter for a topic. |
| DataWriter * | create_datawriter (Topic * topic, const DataWriterQos & qos, DataWriterListener * listener, StatusMask mask=STATUS_MASK_ALL) Create a DataWriter with listener and status mask (PSM overload) |
| DataWriterQos | default_datawriter_qos () const Return the default DataWriter QoS (value return) |
| ReturnCode_t | delete_contained_entities () Delete all DataWriters owned by this Publisher (DDS §2.2.2.4.1.14) |
| bool | delete_datawriter (DataWriter * writer) Delete a DataWriter . |
| ReturnCode_t | enable () noexcept |
| ReturnCode_t | end_coherent_changes () End a coherent set of changes — flush buffered writes. |
| std::vector< DataWriter * > | get_datawriters () const |
| ReturnCode_t | get_default_datawriter_qos (DataWriterQos & qos) const Get the default DataWriter QoS (out-param, PSM style) |
| InstanceHandle_t | get_instance_handle () noexcept const |
| const PublisherQos & | get_qos () const |
| StatusMask | get_status_changes () noexcept const |
| EntityStatusCondition * | get_statuscondition () noexcept |
| bool | is_coherent_active () const |
| bool | is_enabled () noexcept const |
| bool | is_suspended () noexcept const |
| DataWriter * | lookup_datawriter (const std::string & topic_name) const Lookup a DataWriter by itsTopic name (DDS §2.2.2.4.1.7) |
| Publisher & | operator= (const Publisher &) = delete |
| DomainParticipant * | participant () const |
| ReturnCode_t | resume_publications () End a suspended-publications region (DDS §2.2.2.4.1.9) |
| ReturnCode_t | set_default_datawriter_qos (const DataWriterQos & qos) Set the Publisher 's defaultDataWriter QoS. |
| void | set_qos (const PublisherQos & qos) |
| ReturnCode_t | suspend_publications () Hint that a burst of writes is about to be issued (DDS §2.2.2.4.1.8) |
| ReturnCode_t | wait_for_acknowledgments (const Duration_t & max_wait) Wait until all writers in this Publisher have acked their samples (DDS §2.2.2.4.1.12) |
| const std::vector< std::unique_ptr< DataWriter > > & | writers () const |
| ~Publisher () = default |
Public Functions Documentation
function Publisher [1/2]
astutedds::dcps::Publisher::Publisher (
DomainParticipant * participant
)
function Publisher [2/2]
astutedds::dcps::Publisher::Publisher (
const Publisher &
) = delete
function begin_coherent_changes
Begin a coherent set of changes Buffers subsequent writes until end_coherent_changes() flushes them.
inline ReturnCode_t astutedds::dcps::Publisher::begin_coherent_changes ()
function buffer_coherent_write
Add data to the coherent buffer (called by DataWriter when coherent is active)
void astutedds::dcps::Publisher::buffer_coherent_write (
DataWriter * writer,
const std::vector< uint8_t > & data
)
function buffer_coherent_write_dual
void astutedds::dcps::Publisher::buffer_coherent_write_dual (
DataWriter * writer,
const std::vector< uint8_t > & xcdr1,
const std::vector< uint8_t > & xcdr2
)
function copy_from_topic_qos
Copy Topic-level QoS policies into DataWriter QoS (DDS §2.2.2.4.1.17)
inline ReturnCode_t astutedds::dcps::Publisher::copy_from_topic_qos (
DataWriterQos & writer_qos,
const TopicQos & topic_qos
) const
Overwrites the DataWriter QoS policies that are also defined at Topic level (durability, deadline, latency_budget, liveliness, reliability, destination_order, history, resource_limits, ownership, transport_priority, lifespan, durability_service, representation) with the values from topic_qos. Policies that only exist on DataWriter (ownership_strength, writer_data_lifecycle, user_data, heartbeat_period) are left untouched.
function create_datawriter [1/2]
Create a DataWriter for a topic.
DataWriter * astutedds::dcps::Publisher::create_datawriter (
Topic * topic,
const DataWriterQos & qos=DataWriterQos {}
)
function create_datawriter [2/2]
Create a DataWriter with listener and status mask (PSM overload)
inline DataWriter * astutedds::dcps::Publisher::create_datawriter (
Topic * topic,
const DataWriterQos & qos,
DataWriterListener * listener,
StatusMask mask=STATUS_MASK_ALL
)
function default_datawriter_qos
Return the default DataWriter QoS (value return)
inline DataWriterQos astutedds::dcps::Publisher::default_datawriter_qos () const
function delete_contained_entities
Delete all DataWriters owned by this Publisher (DDS §2.2.2.4.1.14)
inline ReturnCode_t astutedds::dcps::Publisher::delete_contained_entities ()
function delete_datawriter
Delete a DataWriter .
bool astutedds::dcps::Publisher::delete_datawriter (
DataWriter * writer
)
function enable
inline ReturnCode_t astutedds::dcps::Publisher::enable () noexcept
function end_coherent_changes
End a coherent set of changes — flush buffered writes.
ReturnCode_t astutedds::dcps::Publisher::end_coherent_changes ()
function get_datawriters
inline std::vector< DataWriter * > astutedds::dcps::Publisher::get_datawriters () const
function get_default_datawriter_qos
Get the default DataWriter QoS (out-param, PSM style)
inline ReturnCode_t astutedds::dcps::Publisher::get_default_datawriter_qos (
DataWriterQos & qos
) const
DDS §2.2.2.4.1.16 — returns the QoS most recently supplied to set_default_datawriter_qos, or DataWriterQos{} defaults if never set.
function get_instance_handle
inline InstanceHandle_t astutedds::dcps::Publisher::get_instance_handle () noexcept const
function get_qos
inline const PublisherQos & astutedds::dcps::Publisher::get_qos () const
function get_status_changes
inline StatusMask astutedds::dcps::Publisher::get_status_changes () noexcept const
function get_statuscondition
inline EntityStatusCondition * astutedds::dcps::Publisher::get_statuscondition () noexcept
function is_coherent_active
inline bool astutedds::dcps::Publisher::is_coherent_active () const
function is_enabled
inline bool astutedds::dcps::Publisher::is_enabled () noexcept const
function is_suspended
inline bool astutedds::dcps::Publisher::is_suspended () noexcept const
function lookup_datawriter
Lookup a DataWriter by itsTopic name (DDS §2.2.2.4.1.7)
DataWriter * astutedds::dcps::Publisher::lookup_datawriter (
const std::string & topic_name
) const
Returns the first DataWriter attached to a Topic whose name matches topic_name, or nullptr if no such writer exists in this Publisher.
function operator=
Publisher & astutedds::dcps::Publisher::operator= (
const Publisher &
) = delete
function participant
inline DomainParticipant * astutedds::dcps::Publisher::participant () const
function resume_publications
End a suspended-publications region (DDS §2.2.2.4.1.9)
inline ReturnCode_t astutedds::dcps::Publisher::resume_publications ()
function set_default_datawriter_qos
Set the Publisher 's defaultDataWriter QoS.
inline ReturnCode_t astutedds::dcps::Publisher::set_default_datawriter_qos (
const DataWriterQos & qos
)
DDS §2.2.2.4.1.15 — subsequent create_datawriter calls that request DATAWRITER_QOS_DEFAULT use this stored value. Passing the sentinel value DataWriterQos{} resets the default.
function set_qos
inline void astutedds::dcps::Publisher::set_qos (
const PublisherQos & qos
)
function suspend_publications
Hint that a burst of writes is about to be issued (DDS §2.2.2.4.1.8)
inline ReturnCode_t astutedds::dcps::Publisher::suspend_publications ()
The spec permits this to be a no-op that only affects the observable is_suspended() flag; AstuteDDS does not currently throttle or buffer while suspended.
function wait_for_acknowledgments
Wait until all writers in this Publisher have acked their samples (DDS §2.2.2.4.1.12)
ReturnCode_t astutedds::dcps::Publisher::wait_for_acknowledgments (
const Duration_t & max_wait
)
Sequentially calls DataWriter::wait_for_acknowledgments on each owned writer with the caller's max_wait; returns RETCODE_TIMEOUT if any writer times out.
function writers
inline const std::vector< std::unique_ptr< DataWriter > > & astutedds::dcps::Publisher::writers () const
function ~Publisher
astutedds::dcps::Publisher::~Publisher () = default
The documentation for this class was generated from the following file include/astutedds/dcps/dcps.hpp