Class astutedds::dcps::DomainParticipant

ClassList > astutedds > dcps > DomainParticipant

Entry point for DDS communication in a domain. More...

  • #include <dcps.hpp>

Classes

Type Name
struct DiscoveredPublication
Aggregate view of a single discovered remote DataWriter combined with identity fields from its owning participant. One record per remote endpoint. Copies (rather than pointers) so the caller does not need to worry about lifetime relative to the underlying discovery caches.
struct DiscoveredSubscription
struct TopicSnapshot

Public Types

Type Name
typedef std::function< DataReader *(Topic *, Subscriber *)> DataReaderFactory
typedef std::function< void(const std::string &topic, const ReceivedSample &)> DataReceivedCallback
Set callback for received data.
typedef std::function< DataWriter *(Topic *, Publisher *)> DataWriterFactory
Factory function types for creating typed DataWriter/DataReader subclasses.
typedef std::function< void(const std::string &topic_name, const std::vector< uint8_t > &data)> SendDataCallback
Set callback for sending data (used by transport layer)
typedef std::function< void(const std::string &topic_name)> SubscribeCallback
Set callback for subscribing to topics (used by transport layer)

Public Functions

Type Name
DomainParticipant (uint32_t domain_id, uint32_t participant_id)
DomainParticipant (const DomainParticipant &) = delete
bool contains_entity (InstanceHandle_t handle) const
ContentFilteredTopic * create_contentfilteredtopic (const char * name, Topic * related_topic, const char * filter_expression, const StringSeq & expression_parameters)
Create a content-filtered topic.
Publisher * create_publisher (const PublisherQos & qos=PublisherQos{})
Create a publisher.
Publisher * create_publisher (const PublisherQos & qos, PublisherListener * listener, StatusMask mask=STATUS_MASK_ALL)
Create a publisher with listener and status mask (PSM overload)
Replier * create_replier (const std::string & service_name, const std::string & request_type_name, const std::string & reply_type_name, const ReplierQos & qos=ReplierQos{})
Create a Replier (service-side RPC endpoint) for a service.
Requester * create_requester (const std::string & service_name, const std::string & request_type_name, const std::string & reply_type_name, const RequesterQos & qos=RequesterQos{})
Create a Requester (client-side RPC endpoint) for a service.
Subscriber * create_subscriber (const SubscriberQos & qos=SubscriberQos{})
Create a subscriber.
Subscriber * create_subscriber (const SubscriberQos & qos, SubscriberListener * listener, StatusMask mask=STATUS_MASK_ALL)
Create a subscriber with listener and status mask (PSM overload)
Topic * create_topic (const std::string & topic_name, const std::string & type_name, const TopicQos & qos=TopicQos{})
Create a topic in this domain.
Topic * create_topic (const char * topic_name, const char * type_name, const TopicQos & qos, TopicListener * listener, StatusMask mask=STATUS_MASK_ALL)
Create a topic with listener and status mask (PSM overload)
TimerService * deadline_timers ()
ReturnCode_t delete_contained_entities ()
Delete all contained entities (topics, publishers, subscribers)
bool delete_contentfilteredtopic (ContentFilteredTopic * cft)
Delete a content-filtered topic.
bool delete_publisher (Publisher * publisher)
Delete a publisher.
bool delete_replier (Replier * replier)
Delete a Replier previously returned bycreate_replier() .
bool delete_requester (Requester * requester)
Delete a Requester previously returned bycreate_requester() .
bool delete_subscriber (Subscriber * subscriber)
Delete a subscriber.
bool delete_topic (Topic * topic)
Delete a topic.
void deliver_data (const std::string & topic_name, const std::vector< uint8_t > & data, const rtps::GUID_t & writer_guid=rtps::GUID_t{}, int32_t ownershipStrength=0, const rtps::SequenceNumber_t & sequenceNumber=rtps::SequenceNumber_t{}, uint64_t coherent_set_start_sn=0, bool end_of_coherent_set=false)
Deliver received data to appropriate DataReaders.
void deliver_dispose (const std::string & topic_name, const std::vector< uint8_t > & keyPayload, const rtps::GUID_t & writer_guid, const rtps::SequenceNumber_t & sequenceNumber, uint32_t statusInfoBits)
Deliver a keyed DISPOSE / UNREGISTER notification.
uint32_t domain_id () const
bool enable ()
Enable the participant (start discovery)
BuiltinSubscriber * get_builtin_subscriber ()
ReturnCode_t get_default_publisher_qos (PublisherQos & qos) const
ReturnCode_t get_default_subscriber_qos (SubscriberQos & qos) const
ReturnCode_t get_default_topic_qos (TopicQos & qos) const
ReturnCode_t get_discovered_participant_data (ParticipantBuiltinTopicData & data, InstanceHandle_t handle) const
ReturnCode_t get_discovered_participants (std::vector< InstanceHandle_t > & participant_handles) const
std::vector< DiscoveredPublication > get_discovered_publications () const
Enumerate all currently discovered remote DataWriters, one record per endpoint, each self-contained (embeds owning participant identity).
std::vector< DiscoveredSubscription > get_discovered_subscriptions () const
Enumerate all currently discovered remote DataReaders.
ReturnCode_t get_discovered_topic_data (TopicBuiltinTopicData & data, InstanceHandle_t handle) const
std::vector< std::pair< std::string, std::string > > get_discovered_topic_names_and_types () const
Return a deduplicated list of {topic_name, type_name} pairs seen across all discovered remote writers and readers. Used by the RMW graph query API (rmw_get_topic_names_and_types).
ReturnCode_t get_discovered_topics (std::vector< InstanceHandle_t > & topic_handles) const
InstanceHandle_t get_instance_handle () noexcept const
DomainParticipantListener * get_listener () const
StatusMask get_listener_mask () const
const DomainParticipantQos & get_qos () const
DataReaderFactory get_reader_factory (const std::string & type_name) const
Look up a registered reader factory for the given type name.
StatusMask get_status_changes () noexcept const
EntityStatusCondition * get_statuscondition () noexcept
DataWriterFactory get_writer_factory (const std::string & type_name) const
Look up a registered writer factory for the given type name.
const rtps::GuidPrefix_t & guid_prefix () const
bool is_enabled () const
LivelinessManager * liveliness_manager ()
void local_deliver (const std::string & topic_name, const std::vector< uint8_t > & data, const rtps::GUID_t & writer_guid, const rtps::SequenceNumber_t & sequenceNumber)
Deliver a sample from a local DataWriter to same-participant DataReaders.
void local_deliver_coherent (const std::string & topic_name, const std::vector< uint8_t > & data, const rtps::GUID_t & writer_guid, const rtps::SequenceNumber_t & sequenceNumber, uint64_t coherent_set_start_sn, bool end_of_coherent_set)
Phase 3.d — intra-participant loopback with coherent-set markers.
void match_reader_to_discovered_writers (DataReader * reader, const std::vector< std::string > & subPartitions)
Match a newly created reader against already-discovered remote writers. Fires on_subscription_matched or on_requested_incompatible_qos as appropriate.
void match_writer_to_discovered_readers (DataWriter * writer, const std::vector< std::string > & pubPartitions)
Match a newly created writer against already-discovered remote readers. Fires on_publication_matched or on_offered_incompatible_qos as appropriate.
void notify_subscription (const std::string & topic_name)
Notify that a subscription was created.
DomainParticipant & operator= (const DomainParticipant &) = delete
uint32_t participant_id () const
void register_reader (const std::string & topic_name, const std::string & type_name, const std::vector< std::string > & partitions={}, const DataReaderQos & qos={}, const std::vector< uint8_t > & contentFilterPayload={}, const std::vector< uint8_t > & topic_data={}, const std::vector< uint8_t > & group_data={})
Register a reader with the transport layer.
void register_type_factory (const std::string & type_name, DataWriterFactory wf, DataReaderFactory rf)
Register typed DataWriter/DataReader factories for a type name.
void register_writer (const std::string & topic_name, const std::string & type_name, const std::vector< std::string > & partitions={}, const DataWriterQos & qos={}, const std::vector< uint8_t > & topic_data={}, const std::vector< uint8_t > & group_data={})
Register a writer with the transport layer.
void replay_history_to_reader (DataWriter * writer)
Replay TRANSIENT_LOCAL writer history to a newly matched reader. Called when a new remote reader matches a local writer with TRANSIENT_LOCAL durability.
rtps::RtpsUdpTransport * rtps_transport () const
void send_data (const std::string & topic_name, const std::vector< uint8_t > & data)
Send data via the transport layer.
void send_data (const std::string & topic_name, const std::vector< uint8_t > & xcdr1Data, const std::vector< uint8_t > & xcdr2Data)
Send dual-encoded data via the transport layer.
void send_data_coherent (const std::string & topic_name, const std::vector< uint8_t > & xcdr1Data, const std::vector< uint8_t > & xcdr2Data, uint64_t in_start_sn, bool end_of_set, uint64_t & out_start_sn)
Phase 3.d — send a sample as part of an active coherent set.
void send_dispose (const std::string & topic_name, const std::vector< uint8_t > & xcdr1Data, const std::vector< uint8_t > & xcdr2Data, uint32_t statusInfoBits, int64_t tsSecondsOverride=-1, uint32_t tsFractionOverride=0)
Send a keyed DATA(K) DISPOSE / UNREGISTER via the transport.
void set_data_received_callback (DataReceivedCallback callback)
void set_listener (DomainParticipantListener * listener, StatusMask mask=STATUS_MASK_ALL)
void set_participant_lease_duration_seconds (uint32_t sec)
Override the outbound SPDP PID_PARTICIPANT_LEASE_DURATION. Defaults to 100 s per RTPS 2.5. Values below 1 s are clamped to 1 s. If called before enable() the new value is applied when the transport is created; if called after, the change takes effect on the next SPDP announcement.
void set_qos (const DomainParticipantQos & qos)
void set_send_data_callback (SendDataCallback callback)
void set_spdp_announce_interval_ms (uint32_t ms)
Override the SPDP announcement interval in milliseconds. Defaults to 3000 ms. Values below 50 ms are clamped. Applies immediately when called after enable() .
void set_subscribe_callback (SubscribeCallback callback)
void stop ()
Stop the participant.
std::vector< TopicSnapshot > topics_snapshot () const
void unregister_reader (const std::string & topic_name)
Unregister a reader from the transport layer.
void unregister_writer (const std::string & topic_name)
Unregister a writer from the transport layer.
~DomainParticipant ()

Detailed Description

The DomainParticipant provides: * Factory methods for Topics, Publishers, Subscribers * SPDP participant discovery * SEDP endpoint discovery * Transport management

Public Types Documentation

typedef DataReaderFactory

using astutedds::dcps::DomainParticipant::DataReaderFactory =  std::function<DataReader *(Topic *, Subscriber *)>;

typedef DataReceivedCallback

Set callback for received data.

using astutedds::dcps::DomainParticipant::DataReceivedCallback =  std::function<void(const std::string &topic, const ReceivedSample &)>;


typedef DataWriterFactory

Factory function types for creating typed DataWriter/DataReader subclasses.

using astutedds::dcps::DomainParticipant::DataWriterFactory =  std::function<DataWriter *(Topic *, Publisher *)>;

Registered via register_type_factory(); used by Publisher::create_datawriter() and Subscriber::create_datareader() so that dynamic_cast to the typed subclass succeeds (required by the OMG interop test suite's shape_main.cxx).


typedef SendDataCallback

Set callback for sending data (used by transport layer)

using astutedds::dcps::DomainParticipant::SendDataCallback =  std::function<void(const std::string &topic_name, const std::vector<uint8_t> &data)>;


typedef SubscribeCallback

Set callback for subscribing to topics (used by transport layer)

using astutedds::dcps::DomainParticipant::SubscribeCallback =  std::function<void(const std::string &topic_name)>;


Public Functions Documentation

function DomainParticipant [1/2]

astutedds::dcps::DomainParticipant::DomainParticipant (
    uint32_t domain_id,
    uint32_t participant_id
) 

function DomainParticipant [2/2]

astutedds::dcps::DomainParticipant::DomainParticipant (
    const DomainParticipant &
) = delete

function contains_entity

bool astutedds::dcps::DomainParticipant::contains_entity (
    InstanceHandle_t handle
) const

§2.2.2.2.1.19 — check whether the given handle refers to any entity currently created by (or discovered under) this participant. Matches the participant itself, its topics, publishers, subscribers, contained DataWriters/DataReaders, and any discovered remote participant/writer/reader.


function create_contentfilteredtopic

Create a content-filtered topic.

ContentFilteredTopic * astutedds::dcps::DomainParticipant::create_contentfilteredtopic (
    const char * name,
    Topic * related_topic,
    const char * filter_expression,
    const StringSeq & expression_parameters
) 

Parameters:

  • name The name of the filtered topic
  • related_topic The related Topic
  • filter_expression SQL-like filter expression
  • expression_parameters Parameters for the filter expression

Returns:

Pointer to the new ContentFilteredTopic, or nullptr on error


function create_publisher [1/2]

Create a publisher.

Publisher * astutedds::dcps::DomainParticipant::create_publisher (
    const PublisherQos & qos=PublisherQos {}
) 


function create_publisher [2/2]

Create a publisher with listener and status mask (PSM overload)

inline Publisher * astutedds::dcps::DomainParticipant::create_publisher (
    const PublisherQos & qos,
    PublisherListener * listener,
    StatusMask mask=STATUS_MASK_ALL
) 


function create_replier

Create a Replier (service-side RPC endpoint) for a service.

Replier * astutedds::dcps::DomainParticipant::create_replier (
    const std::string & service_name,
    const std::string & request_type_name,
    const std::string & reply_type_name,
    const ReplierQos & qos=ReplierQos {}
) 

Topic derivation matches create_requester().


function create_requester

Create a Requester (client-side RPC endpoint) for a service.

Requester * astutedds::dcps::DomainParticipant::create_requester (
    const std::string & service_name,
    const std::string & request_type_name,
    const std::string & reply_type_name,
    const RequesterQos & qos=RequesterQos {}
) 

The service_name is unqualified; the two underlying topics are derived as rq/<service_name>Request and rr/<service_name>Reply (matching the ROS 2 / DDS-RPC convention).


function create_subscriber [1/2]

Create a subscriber.

Subscriber * astutedds::dcps::DomainParticipant::create_subscriber (
    const SubscriberQos & qos=SubscriberQos {}
) 


function create_subscriber [2/2]

Create a subscriber with listener and status mask (PSM overload)

inline Subscriber * astutedds::dcps::DomainParticipant::create_subscriber (
    const SubscriberQos & qos,
    SubscriberListener * listener,
    StatusMask mask=STATUS_MASK_ALL
) 


function create_topic [1/2]

Create a topic in this domain.

Topic * astutedds::dcps::DomainParticipant::create_topic (
    const std::string & topic_name,
    const std::string & type_name,
    const TopicQos & qos=TopicQos {}
) 


function create_topic [2/2]

Create a topic with listener and status mask (PSM overload)

inline Topic * astutedds::dcps::DomainParticipant::create_topic (
    const char * topic_name,
    const char * type_name,
    const TopicQos & qos,
    TopicListener * listener,
    StatusMask mask=STATUS_MASK_ALL
) 


function deadline_timers

inline TimerService * astutedds::dcps::DomainParticipant::deadline_timers () 

Access the shared deadline TimerService. Returns nullptr if the participant has not been enable()d yet. Not part of the public DDS API — used by DataWriter / DataReader hooks.


function delete_contained_entities

Delete all contained entities (topics, publishers, subscribers)

ReturnCode_t astutedds::dcps::DomainParticipant::delete_contained_entities () 


function delete_contentfilteredtopic

Delete a content-filtered topic.

bool astutedds::dcps::DomainParticipant::delete_contentfilteredtopic (
    ContentFilteredTopic * cft
) 


function delete_publisher

Delete a publisher.

bool astutedds::dcps::DomainParticipant::delete_publisher (
    Publisher * publisher
) 


function delete_replier

Delete a Replier previously returned bycreate_replier() .

bool astutedds::dcps::DomainParticipant::delete_replier (
    Replier * replier
) 


function delete_requester

Delete a Requester previously returned bycreate_requester() .

bool astutedds::dcps::DomainParticipant::delete_requester (
    Requester * requester
) 


function delete_subscriber

Delete a subscriber.

bool astutedds::dcps::DomainParticipant::delete_subscriber (
    Subscriber * subscriber
) 


function delete_topic

Delete a topic.

bool astutedds::dcps::DomainParticipant::delete_topic (
    Topic * topic
) 


function deliver_data

Deliver received data to appropriate DataReaders.

void astutedds::dcps::DomainParticipant::deliver_data (
    const std::string & topic_name,
    const std::vector< uint8_t > & data,
    const rtps::GUID_t & writer_guid=rtps::GUID_t {},
    int32_t ownershipStrength=0,
    const rtps::SequenceNumber_t & sequenceNumber=rtps::SequenceNumber_t {},
    uint64_t coherent_set_start_sn=0,
    bool end_of_coherent_set=false
) 

Phase 3.d — the trailing coherent_set_start_sn and end_of_coherent_set parameters carry the RTPS §8.7.6 inline-QoS markers extracted by the transport so the reader can buffer the sample into its coherent-set queue. Both default to zero / false for the ubiquitous non-coherent delivery path (existing intra-participant loopback and Python bindings unaffected).


function deliver_dispose

Deliver a keyed DISPOSE / UNREGISTER notification.

void astutedds::dcps::DomainParticipant::deliver_dispose (
    const std::string & topic_name,
    const std::vector< uint8_t > & keyPayload,
    const rtps::GUID_t & writer_guid,
    const rtps::SequenceNumber_t & sequenceNumber,
    uint32_t statusInfoBits
) 

Called by the transport when a DATA(K) with PID_STATUS_INFO is received. Adds an invalid ReceivedSample to matched local DataReaders with instance_state set to NOT_ALIVE_DISPOSED_INSTANCE_STATE or NOT_ALIVE_NO_WRITERS_INSTANCE_STATE (for UNREGISTERED). DDS §2.2.2.5.1.7.


function domain_id

inline uint32_t astutedds::dcps::DomainParticipant::domain_id () const

function enable

Enable the participant (start discovery)

bool astutedds::dcps::DomainParticipant::enable () 


function get_builtin_subscriber

BuiltinSubscriber * astutedds::dcps::DomainParticipant::get_builtin_subscriber () 

§2.2.2.2.1.13 — return the built-in Subscriber carrying typed DataReaders on the four DDS built-in topics (DCPSParticipant, DCPSTopic, DCPSPublication, DCPSSubscription). The returned pointer is owned by the participant; do NOT delete. Returns nullptr if the participant has not been enable()d. Lazily constructed on first call; the same instance is returned on every subsequent call.


function get_default_publisher_qos

inline ReturnCode_t astutedds::dcps::DomainParticipant::get_default_publisher_qos (
    PublisherQos & qos
) const

function get_default_subscriber_qos

inline ReturnCode_t astutedds::dcps::DomainParticipant::get_default_subscriber_qos (
    SubscriberQos & qos
) const

function get_default_topic_qos

inline ReturnCode_t astutedds::dcps::DomainParticipant::get_default_topic_qos (
    TopicQos & qos
) const

function get_discovered_participant_data

ReturnCode_t astutedds::dcps::DomainParticipant::get_discovered_participant_data (
    ParticipantBuiltinTopicData & data,
    InstanceHandle_t handle
) const

§2.2.2.2.1.16 — retrieve ParticipantBuiltinTopicData for a specific discovered participant. Returns RETCODE_PRECONDITION_NOT_MET if handle is not currently tracked, RETCODE_NOT_ENABLED if the participant is not enabled, RETCODE_OK on success.


function get_discovered_participants

ReturnCode_t astutedds::dcps::DomainParticipant::get_discovered_participants (
    std::vector< InstanceHandle_t > & participant_handles
) const

§2.2.2.2.1.15 — retrieve list of participants currently discovered on this participant's domain (excludes self). participant_handles is cleared then populated with a stable-per-process InstanceHandle_t for each discovered participant (derived from its SPDP GUID prefix + built-in participant entity id). Returns RETCODE_NOT_ENABLED before enable(), RETCODE_OK otherwise.


function get_discovered_publications

Enumerate all currently discovered remote DataWriters, one record per endpoint, each self-contained (embeds owning participant identity).

std::vector< DiscoveredPublication > astutedds::dcps::DomainParticipant::get_discovered_publications () const


function get_discovered_subscriptions

Enumerate all currently discovered remote DataReaders.

std::vector< DiscoveredSubscription > astutedds::dcps::DomainParticipant::get_discovered_subscriptions () const


function get_discovered_topic_data

ReturnCode_t astutedds::dcps::DomainParticipant::get_discovered_topic_data (
    TopicBuiltinTopicData & data,
    InstanceHandle_t handle
) const

§2.2.2.2.1.18 — retrieve TopicBuiltinTopicData for a topic handle previously returned by get_discovered_topics(). Returns RETCODE_PRECONDITION_NOT_MET if handle is not currently tracked, RETCODE_OK on success.


function get_discovered_topic_names_and_types

Return a deduplicated list of {topic_name, type_name} pairs seen across all discovered remote writers and readers. Used by the RMW graph query API (rmw_get_topic_names_and_types).

std::vector< std::pair< std::string, std::string > > astutedds::dcps::DomainParticipant::get_discovered_topic_names_and_types () const


function get_discovered_topics

ReturnCode_t astutedds::dcps::DomainParticipant::get_discovered_topics (
    std::vector< InstanceHandle_t > & topic_handles
) const

§2.2.2.2.1.17 — retrieve list of topics known to this participant: locally-created topics plus remotely-discovered topic names inferred from SEDP DCPSTopic announcements (§8.5.4.2) and from any discovered writer/reader's topic name.


function get_instance_handle

inline InstanceHandle_t astutedds::dcps::DomainParticipant::get_instance_handle () noexcept const

function get_listener

inline DomainParticipantListener * astutedds::dcps::DomainParticipant::get_listener () const

function get_listener_mask

inline StatusMask astutedds::dcps::DomainParticipant::get_listener_mask () const

function get_qos

inline const DomainParticipantQos & astutedds::dcps::DomainParticipant::get_qos () const

function get_reader_factory

Look up a registered reader factory for the given type name.

DataReaderFactory astutedds::dcps::DomainParticipant::get_reader_factory (
    const std::string & type_name
) const


function get_status_changes

inline StatusMask astutedds::dcps::DomainParticipant::get_status_changes () noexcept const

function get_statuscondition

inline EntityStatusCondition * astutedds::dcps::DomainParticipant::get_statuscondition () noexcept

function get_writer_factory

Look up a registered writer factory for the given type name.

DataWriterFactory astutedds::dcps::DomainParticipant::get_writer_factory (
    const std::string & type_name
) const

Returns:

The factory, or nullptr-wrapping empty std::function if not registered.


function guid_prefix

inline const rtps::GuidPrefix_t & astutedds::dcps::DomainParticipant::guid_prefix () const

function is_enabled

inline bool astutedds::dcps::DomainParticipant::is_enabled () const

function liveliness_manager

inline LivelinessManager * astutedds::dcps::DomainParticipant::liveliness_manager () 

Access the participant's liveliness manager. Returns nullptr if the participant has not been enable()d yet. Not part of the public DDS API — used by DataWriter / DataReader hooks.


function local_deliver

Deliver a sample from a local DataWriter to same-participant DataReaders.

void astutedds::dcps::DomainParticipant::local_deliver (
    const std::string & topic_name,
    const std::vector< uint8_t > & data,
    const rtps::GUID_t & writer_guid,
    const rtps::SequenceNumber_t & sequenceNumber
) 

Intra-participant loopback: called by DataWriter::write() alongside the transport publish() so that same-participant readers can receive the sample without going through the RTPS/UDP path (which drops packets whose sender GUID prefix matches our own — see udp_transport.cpp).

Honours topic name, PublisherQos::partition vs SubscriberQos::partition matching, writer/reader RxO QoS compatibility, and per-reader DataReaderQos::ignore_local_publications. The RTPS transport publish path is untouched; remote (cross-participant) delivery still flows through the UDP transport unchanged.


function local_deliver_coherent

Phase 3.d — intra-participant loopback with coherent-set markers.

void astutedds::dcps::DomainParticipant::local_deliver_coherent (
    const std::string & topic_name,
    const std::vector< uint8_t > & data,
    const rtps::GUID_t & writer_guid,
    const rtps::SequenceNumber_t & sequenceNumber,
    uint64_t coherent_set_start_sn,
    bool end_of_coherent_set
) 

Same as local_deliver() but stamps the delivered ReceivedSample with coherent_set_start_sn and end_of_coherent_set so the same-participant DataReader can buffer the sample into its coherent queue and flush atomically on the end marker.


function match_reader_to_discovered_writers

Match a newly created reader against already-discovered remote writers. Fires on_subscription_matched or on_requested_incompatible_qos as appropriate.

void astutedds::dcps::DomainParticipant::match_reader_to_discovered_writers (
    DataReader * reader,
    const std::vector< std::string > & subPartitions
) 


function match_writer_to_discovered_readers

Match a newly created writer against already-discovered remote readers. Fires on_publication_matched or on_offered_incompatible_qos as appropriate.

void astutedds::dcps::DomainParticipant::match_writer_to_discovered_readers (
    DataWriter * writer,
    const std::vector< std::string > & pubPartitions
) 


function notify_subscription

Notify that a subscription was created.

void astutedds::dcps::DomainParticipant::notify_subscription (
    const std::string & topic_name
) 


function operator=

DomainParticipant & astutedds::dcps::DomainParticipant::operator= (
    const DomainParticipant &
) = delete

function participant_id

inline uint32_t astutedds::dcps::DomainParticipant::participant_id () const

function register_reader

Register a reader with the transport layer.

void astutedds::dcps::DomainParticipant::register_reader (
    const std::string & topic_name,
    const std::string & type_name,
    const std::vector< std::string > & partitions={},
    const DataReaderQos & qos={},
    const std::vector< uint8_t > & contentFilterPayload={},
    const std::vector< uint8_t > & topic_data={},
    const std::vector< uint8_t > & group_data={}
) 

Parameters:

  • topic_name The topic the reader is subscribing to
  • type_name The IDL type name for the topic
  • partitions Partition names for this reader's subscriber

function register_type_factory

Register typed DataWriter/DataReader factories for a type name.

void astutedds::dcps::DomainParticipant::register_type_factory (
    const std::string & type_name,
    DataWriterFactory wf,
    DataReaderFactory rf
) 

When create_datawriter()/create_datareader() sees a topic whose type_name() matches, it delegates object construction to these factories instead of allocating a plain DataWriter/DataReader.


function register_writer

Register a writer with the transport layer.

void astutedds::dcps::DomainParticipant::register_writer (
    const std::string & topic_name,
    const std::string & type_name,
    const std::vector< std::string > & partitions={},
    const DataWriterQos & qos={},
    const std::vector< uint8_t > & topic_data={},
    const std::vector< uint8_t > & group_data={}
) 

Parameters:

  • topic_name The topic the writer is publishing to
  • partitions Partition names for this writer's publisher

function replay_history_to_reader

Replay TRANSIENT_LOCAL writer history to a newly matched reader. Called when a new remote reader matches a local writer with TRANSIENT_LOCAL durability.

void astutedds::dcps::DomainParticipant::replay_history_to_reader (
    DataWriter * writer
) 


function rtps_transport

inline rtps::RtpsUdpTransport * astutedds::dcps::DomainParticipant::rtps_transport () const

Low-level access to the underlying RTPS transport. Intended for tests and diagnostic tooling only — the DCPS API surface is the supported entry point for production code. Returns nullptr before enable() has been called successfully.


function send_data [1/2]

Send data via the transport layer.

void astutedds::dcps::DomainParticipant::send_data (
    const std::string & topic_name,
    const std::vector< uint8_t > & data
) 

Parameters:

  • topic_name The topic to send on
  • data The serialized data

function send_data [2/2]

Send dual-encoded data via the transport layer.

void astutedds::dcps::DomainParticipant::send_data (
    const std::string & topic_name,
    const std::vector< uint8_t > & xcdr1Data,
    const std::vector< uint8_t > & xcdr2Data
) 

Parameters:

  • topic_name The topic to send on
  • xcdr1Data XCDR1 serialized data
  • xcdr2Data XCDR2 serialized data

function send_data_coherent

Phase 3.d — send a sample as part of an active coherent set.

void astutedds::dcps::DomainParticipant::send_data_coherent (
    const std::string & topic_name,
    const std::vector< uint8_t > & xcdr1Data,
    const std::vector< uint8_t > & xcdr2Data,
    uint64_t in_start_sn,
    bool end_of_set,
    uint64_t & out_start_sn
) 

Wraps RtpsUdpTransport::publish_coherent(). If in_start_sn is 0 the transport allocates a fresh writer SN and stores it back in out_start_sn; otherwise the existing set start SN is reused verbatim. On the last sample of the set, end_of_set = true causes the transport to emit PID_END_COHERENT_SET so peer readers flush the buffered set.


function send_dispose

Send a keyed DATA(K) DISPOSE / UNREGISTER via the transport.

void astutedds::dcps::DomainParticipant::send_dispose (
    const std::string & topic_name,
    const std::vector< uint8_t > & xcdr1Data,
    const std::vector< uint8_t > & xcdr2Data,
    uint32_t statusInfoBits,
    int64_t tsSecondsOverride=-1,
    uint32_t tsFractionOverride=0
) 

DDS §2.2.2.4.2.13 / RTPS §8.7.4.1 & §9.6.3.9. statusInfoBits carries the StatusInfo_t bits (bit 0 = DISPOSED, bit 1 = UNREGISTERED). Called by DataWriter::dispose() / unregister_instance() through the send_dispose_callback_ wired up in Publisher::create_datawriter().

tsSecondsOverride / tsFractionOverride pin the wire INFO_TS timestamp so dispose_w_timestamp / unregister_instance_w_timestamp (DDS §2.2.2.4.2.14/17) can supply an explicit source_timestamp. A negative seconds override means "use current wall clock".


function set_data_received_callback

inline void astutedds::dcps::DomainParticipant::set_data_received_callback (
    DataReceivedCallback callback
) 

function set_listener

inline void astutedds::dcps::DomainParticipant::set_listener (
    DomainParticipantListener * listener,
    StatusMask mask=STATUS_MASK_ALL
) 

function set_participant_lease_duration_seconds

Override the outbound SPDP PID_PARTICIPANT_LEASE_DURATION. Defaults to 100 s per RTPS 2.5. Values below 1 s are clamped to 1 s. If called before enable() the new value is applied when the transport is created; if called after, the change takes effect on the next SPDP announcement.

void astutedds::dcps::DomainParticipant::set_participant_lease_duration_seconds (
    uint32_t sec
) 


function set_qos

void astutedds::dcps::DomainParticipant::set_qos (
    const DomainParticipantQos & qos
) 

function set_send_data_callback

inline void astutedds::dcps::DomainParticipant::set_send_data_callback (
    SendDataCallback callback
) 

function set_spdp_announce_interval_ms

Override the SPDP announcement interval in milliseconds. Defaults to 3000 ms. Values below 50 ms are clamped. Applies immediately when called after enable() .

void astutedds::dcps::DomainParticipant::set_spdp_announce_interval_ms (
    uint32_t ms
) 


function set_subscribe_callback

inline void astutedds::dcps::DomainParticipant::set_subscribe_callback (
    SubscribeCallback callback
) 

function stop

Stop the participant.

void astutedds::dcps::DomainParticipant::stop () 


function topics_snapshot

std::vector< TopicSnapshot > astutedds::dcps::DomainParticipant::topics_snapshot () const

function unregister_reader

Unregister a reader from the transport layer.

void astutedds::dcps::DomainParticipant::unregister_reader (
    const std::string & topic_name
) 

§1.1b-A fast-path — see unregister_writer. Called from Subscriber::delete_datareader.


function unregister_writer

Unregister a writer from the transport layer.

void astutedds::dcps::DomainParticipant::unregister_writer (
    const std::string & topic_name
) 

§1.1b-A fast-path: emits a SEDP DATA(w) DISPOSE so peers unmatch immediately rather than waiting for the lease sweeper. Called from Publisher::delete_datawriter on clean shutdown.


function ~DomainParticipant

astutedds::dcps::DomainParticipant::~DomainParticipant () 


The documentation for this class was generated from the following file include/astutedds/dcps/dcps.hpp