Holoscan SDK v4.2.0

Program Listing for File fastdds_holoscan_entity_type_support.hpp

Return to documentation for file (include/holoscan/pubsub/fastdds/pubsub/fastdds_holoscan_entity_type_support.hpp)

Copy
Copied!
            

/* * 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_PUBSUB_FASTDDS_HOLOSCAN_ENTITY_TYPE_SUPPORT_HPP #define HOLOSCAN_PUBSUB_FASTDDS_PUBSUB_FASTDDS_HOLOSCAN_ENTITY_TYPE_SUPPORT_HPP #include <cstdint> #include <string> #include <vector> #include <fastdds/dds/topic/TopicDataType.hpp> namespace holoscan { struct HoloscanEntityData { std::vector<uint8_t> serialized_data; std::string source_operator; int64_t timestamp_ns = 0; bool contains_gpu_tensors = false; int32_t gpu_device_id = 0; std::string publisher_gid; uint8_t descriptor_format_version = 0; std::string protocol_name; }; class FastDdsHoloscanEntityTypeSupport : public eprosima::fastdds::dds::TopicDataType { public: FastDdsHoloscanEntityTypeSupport(); ~FastDdsHoloscanEntityTypeSupport() override = default; // Delete copy operations (TopicDataType is typically not copied) FastDdsHoloscanEntityTypeSupport(const FastDdsHoloscanEntityTypeSupport&) = delete; FastDdsHoloscanEntityTypeSupport& operator=(const FastDdsHoloscanEntityTypeSupport&) = delete; // Allow move operations FastDdsHoloscanEntityTypeSupport(FastDdsHoloscanEntityTypeSupport&&) = default; FastDdsHoloscanEntityTypeSupport& operator=(FastDdsHoloscanEntityTypeSupport&&) = default; bool serialize(const void* data, eprosima::fastdds::rtps::SerializedPayload_t& payload, eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; bool deserialize(eprosima::fastdds::rtps::SerializedPayload_t& payload, void* data) override; uint32_t calculate_serialized_size( const void* data, eprosima::fastdds::dds::DataRepresentationId_t data_representation) override; void* create_data() override; void delete_data(void* data) override; bool compute_key(eprosima::fastdds::rtps::SerializedPayload_t& payload, eprosima::fastdds::rtps::InstanceHandle_t& handle, bool force_md5) override; bool compute_key(const void* data, eprosima::fastdds::rtps::InstanceHandle_t& handle, bool force_md5) override; inline bool is_bounded() const override { return false; } inline bool is_plain(eprosima::fastdds::dds::DataRepresentationId_t) const override { return false; } }; } // namespace holoscan #endif// HOLOSCAN_PUBSUB_FASTDDS_PUBSUB_FASTDDS_HOLOSCAN_ENTITY_TYPE_SUPPORT_HPP

© Copyright 2022-2026, NVIDIA. Last updated on May 29, 2026