Program Listing for File fastdds_pubsub_network_context.hpp
↰ Return to documentation for file (include/holoscan/pubsub/fastdds/network_contexts/gxf/fastdds_pubsub_network_context.hpp)
/*
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef HOLOSCAN_PUBSUB_FASTDDS_NETWORK_CONTEXTS_GXF_FASTDDS_PUBSUB_NETWORK_CONTEXT_HPP
#define HOLOSCAN_PUBSUB_FASTDDS_NETWORK_CONTEXTS_GXF_FASTDDS_PUBSUB_NETWORK_CONTEXT_HPP
#include <memory>
#include <string>
#include <holoscan/core/network_contexts/gxf/pubsub_context.hpp>
namespace holoscan {
class NativeBufferProtocolAdapter;
// Forward declarations for DDS backend components
class FastDdsPubSubContext; // Resource: DDS DomainParticipant + CUDA stream
class FastDdsDiscovery;
class FastDdsTransport;
class FastDdsSerializer;
class FastDdsNativeBufferAdapter;
class FastDdsPubSubNetworkContext : public PubSubContext {
public:
HOLOSCAN_NETWORK_CONTEXT_FORWARD_ARGS_SUPER(FastDdsPubSubNetworkContext, PubSubContext)
FastDdsPubSubNetworkContext() = default;
void setup(ComponentSpec& spec) override;
std::shared_ptr<NativeBufferProtocolAdapter> native_buffer_adapter() const;
protected:
void setup_backend() override;
private:
Parameter<std::string> native_buffer_policy_;
Parameter<int64_t> native_buffer_acquire_timeout_ms_;
Parameter<int64_t> native_buffer_export_ttl_ms_;
Parameter<bool> native_buffer_use_eager_acquire_;
// DDS backend objects — kept alive for the lifetime of this context.
std::shared_ptr<FastDdsPubSubContext> dds_context_;
std::shared_ptr<FastDdsDiscovery> dds_discovery_;
std::shared_ptr<FastDdsTransport> dds_transport_;
std::shared_ptr<FastDdsSerializer> dds_serializer_;
std::shared_ptr<FastDdsNativeBufferAdapter> native_adapter_;
};
} // namespace holoscan
#endif/* HOLOSCAN_PUBSUB_FASTDDS_NETWORK_CONTEXTS_GXF_FASTDDS_PUBSUB_NETWORK_CONTEXT_HPP */