Struct AstuteDDSContext
#include <types.hpp>
Classes
| Type | Name |
|---|---|
| struct | NodeEndpoint |
Public Attributes
| Type | Name |
|---|---|
| std::vector< std::string > | clients Service names of every rmw_client_t alive in this context. |
| AstuteDDS_Publisher | dds_pub = { nullptr }Factory for all DataWriters created by this context. |
| AstuteDDS_Subscriber | dds_sub = { nullptr }Factory for all DataReaders created by this context. |
| std::mutex | endpoint_mtx |
| std::vector< NodeEndpoint > | local_clients |
| std::vector< NodeEndpoint > | local_publishers |
| std::vector< NodeEndpoint > | local_services |
| std::vector< NodeEndpoint > | local_subscriptions |
| std::mutex | node_mtx Protects nodes . |
| std::vector< std::pair< std::string, std::string > > | nodes (name, namespace) of every node created in this context. |
| AstuteDDS_Participant | participant = { nullptr }The one DomainParticipant this RMW context owns. |
| std::vector< std::string > | services Service names of every rmw_service_t alive in this context. |
| std::mutex | svc_mtx Protects services andclients . |
| std::mutex | topic_mtx |
| std::map< std::string, int > | topic_refcount |
Detailed Description
Per-context state pointed to by rmw_context_t::impl.
Owns the DomainParticipant plus the two DDS entity factories (a Publisher for DataWriters, a Subscriber for DataReaders). Also holds in-process registries — nodes and service/client names — so graph queries and rmw_service_server_is_available() can answer sensibly when everything lives in one process.
Public Attributes Documentation
variable clients
Service names of every rmw_client_t alive in this context.
std::vector<std::string> AstuteDDSContext::clients;
variable dds_pub
Factory for all DataWriters created by this context.
AstuteDDS_Publisher AstuteDDSContext::dds_pub;
variable dds_sub
Factory for all DataReaders created by this context.
AstuteDDS_Subscriber AstuteDDSContext::dds_sub;
variable endpoint_mtx
std::mutex AstuteDDSContext::endpoint_mtx;
variable local_clients
std::vector<NodeEndpoint> AstuteDDSContext::local_clients;
variable local_publishers
std::vector<NodeEndpoint> AstuteDDSContext::local_publishers;
variable local_services
std::vector<NodeEndpoint> AstuteDDSContext::local_services;
variable local_subscriptions
std::vector<NodeEndpoint> AstuteDDSContext::local_subscriptions;
variable node_mtx
Protects nodes .
std::mutex AstuteDDSContext::node_mtx;
variable nodes
(name, namespace) of every node created in this context.
std::vector<std::pair<std::string, std::string> > AstuteDDSContext::nodes;
variable participant
The one DomainParticipant this RMW context owns.
AstuteDDS_Participant AstuteDDSContext::participant;
variable services
Service names of every rmw_service_t alive in this context.
std::vector<std::string> AstuteDDSContext::services;
variable svc_mtx
Protects services andclients .
std::mutex AstuteDDSContext::svc_mtx;
variable topic_mtx
std::mutex AstuteDDSContext::topic_mtx;
Reference count per DDS topic name.
astutedds::dcps::DomainParticipant::create_topic() deduplicates by name: a second astutedds_create_topic() call for a topic name that already exists on this participant returns the SAME Topic* rather than creating a new one (e.g. when a publisher and a subscription, or several of either, share a topic). astutedds_delete_topic() has no refcounting of its own, so deleting it as soon as the first side is torn down frees memory a still-live DataWriter/DataReader on the other side continues to reference. Every rmw_create_publisher/ rmw_create_subscription call must increment this counter after a successful astutedds_create_topic(), and every rmw_destroy_ publisher/rmw_destroy_subscription (and any later failure path in create) must go through release_topic_ref() instead of calling astutedds_delete_topic() directly, only actually deleting once the count reaches zero. Protected by topic_mtx.
variable topic_refcount
std::map<std::string, int> AstuteDDSContext::topic_refcount;
The documentation for this class was generated from the following file include/astutedds/rmw/types.hpp