Class FastDdsPubSubContext
Defined in File fastdds_pubsub_context.hpp
Base Type
public holoscan::Resource(Class Resource)
-
class FastDdsPubSubContext : public holoscan::Resource
Resource managing DDS participant and GPU staging for pub/sub.
FastDdsPubSubContext provides:
DDS DomainParticipant lifecycle management
Automatic discovery via SPDP/SEDP (no central registry needed)
Allocator for GPU tensor staging (RMMAllocator or UnboundedAllocator)
CUDA stream for async memory copies
Public Functions
- HOLOSCAN_RESOURCE_FORWARD_ARGS (FastDdsPubSubContext) FastDdsPubSubContext()=default
-
~FastDdsPubSubContext() override
-
virtual void setup(ComponentSpec &spec) override
Define the resource specification.
- Parameters
spec – The reference to the component specification.
-
virtual void initialize() override
Initialize the component.
This method is called only once when the component is created for the first time, and use of light-weight initialization.
-
inline eprosima::fastdds::dds::DomainParticipant *participant() const
Get the DDS DomainParticipant.
- Returns
Pointer to the participant, or nullptr if not initialized.
-
inline std::shared_ptr<Allocator> allocator() const
Get the allocator for GPU staging.
This allocator (typically RMMAllocator or UnboundedAllocator) is used for allocating pinned host memory buffers for GPU D2H/H2D staging operations.
- Returns
Shared pointer to the allocator.
-
inline cudaStream_t cuda_stream() const
Get the CUDA stream for staging operations.
- Returns
The CUDA stream handle.
-
eprosima::fastdds::dds::Topic *get_or_create_topic(const std::string &topic_name, const std::string &type_name)
Get or create a DDS topic.
Topics are cached and reused within this participant.
- Parameters
topic_name – The topic name (e.g., “/sensors/camera”).
type_name – The registered type name (e.g., “holoscan::Entity”).
- Returns
Pointer to the Topic, or nullptr on failure.
-
std::vector<std::string> get_discovered_topics() const
Get list of discovered topics.
- Returns
Vector of topic names currently discovered by this participant.
-
inline int32_t domain_id() const
Get the DDS domain ID.
- Returns
The domain ID.
-
inline std::string participant_name() const
Get the participant name.
- Returns
The participant name.
-
inline std::string transport_profile() const
Get the transport profile.
- Returns
The transport profile name (“LARGE_DATA”, “DEFAULT”, or “SHM_ONLY”).
-
nvidia::gxf::QoSProfile default_qos() const
Get the default QoS profile for endpoints.
Resolves the
default_qos_profilestring parameter (from YAML or Arg) into aQoSProfilestruct usingQoSProfile::from_name(). Falls back toQoSProfile::Default()if the name is empty or unrecognized.Used by FastDdsTransport when no per-topic QoS is specified.
- Returns
The resolved QoSProfile struct.
-
inline nvidia::gxf::NativeBufferPolicy native_buffer_policy() const
Get the native buffer policy.
-
int64_t native_buffer_acquire_timeout_ms() const
Get the CUDA IPC handle acquisition timeout (ms).
-
int64_t native_buffer_export_ttl_ms() const
Get the stale export TTL (ms).
-
inline const std::string &gpu_device_uuid() const
Get the GPU device UUID string.
-
inline const std::string &host_id() const
Stable host identifier (e.g. Linux /etc/machine-id) for discovery.
-
inline int32_t gpu_device_id() const
Get the GPU device ID.
-
nvidia::gxf::NativeBufferCapability native_buffer_capability() const
Get the local native buffer capability for discovery advertisement.