Holoscan SDK v4.2.0

Class FastDdsPubSubNetworkContext

Base Type

class FastDdsPubSubNetworkContext : public holoscan::PubSubContext

PubSubContext subclass that uses FastDDS as the backend.

FastDdsPubSubNetworkContext overrides setup_backend() to create and inject FastDDS-based discovery, transport, and serializer components into the GXF PubSubContext.

This is the default backend when HOLOSCAN_ENABLE_FASTDDS is defined. The auto-creation path in Fragment::create_pubsub_network_context() returns an instance of this class.

Public Functions

HOLOSCAN_NETWORK_CONTEXT_FORWARD_ARGS_SUPER (FastDdsPubSubNetworkContext, PubSubContext) FastDdsPubSubNetworkContext()=default
virtual void setup(ComponentSpec &spec) override

Define the network context specification.

Parameters

spec – The reference to the component specification.

std::shared_ptr<NativeBufferProtocolAdapter> native_buffer_adapter() const

Protected Functions

virtual void setup_backend() override

Set up the PubSub backend (discovery, transport, serializer).

Called automatically from initialize() after the GXF component is created and get() returns a valid pointer.

The default implementation is a no-op. Subclasses should override this to create backend components and inject them into the GXF PubSubContext:

Copy
Copied!
            

void setup_backend() override { auto* gxf_ctx = get(); gxf_ctx->set_discovery(std::make_shared<MyDiscovery>(...)); gxf_ctx->set_transport(std::make_shared<MyTransport>(...)); gxf_ctx->set_serializer(std::make_shared<MySerializer>(...)); gxf_ctx->initialize(); gxf_ctx->init_context(); }

See also

DDSPubSubNetworkContext for the FastDDS backend implementation.

Previous Class FastDdsPubSubContext
Next Class FastDdsSerializer
© Copyright 2022-2026, NVIDIA. Last updated on May 11, 2026