Class FastDdsPubSubNetworkContext
Defined in File fastdds_pubsub_network_context.hpp
Base Type
public holoscan::PubSubContext(Class PubSubContext)
-
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_FASTDDSis defined. The auto-creation path inFragment::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:
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 alsoDDSPubSubNetworkContext for the FastDDS backend implementation.