Class FastDdsHoloscanEntityTypeSupport
Base Type
public eprosima::fastdds::dds::TopicDataType
-
class FastDdsHoloscanEntityTypeSupport : public eprosima::fastdds::dds::TopicDataType
DDS TopicDataType implementation for HoloscanEntityData.
This class implements the FastDDS TopicDataType interface, enabling HoloscanEntityData to be used as a DDS topic type. It handles:
CDR serialization/deserialization using FastCDR
Memory management for data instances
Size calculation for DDS
Public Functions
-
FastDdsHoloscanEntityTypeSupport()
Construct a new FastDdsHoloscanEntityTypeSupport.
Sets the type name to “holoscan::Entity” and configures for variable-size data.
Uses a 1MB initial max_serialized_type_size for payload pool allocation. With FastDDS’s default PREALLOCATED_WITH_REALLOC_MEMORY_MODE, larger messages (10-100+ MB tensors) will trigger automatic reallocation. The actual size per message is determined by calculate_serialized_size().
NoteFastDDS 3.4.2 Bug: Documentation says to use 0 for unbounded types, but this causes a null pointer crash in TopicPayloadPoolProxy::reserve_history().
-
~FastDdsHoloscanEntityTypeSupport() override = default
Destructor.
-
FastDdsHoloscanEntityTypeSupport(const FastDdsHoloscanEntityTypeSupport&) = delete
-
FastDdsHoloscanEntityTypeSupport &operator=(const FastDdsHoloscanEntityTypeSupport&) = delete
-
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
Serialize HoloscanEntityData to CDR format.
- Parameters
data – Pointer to HoloscanEntityData to serialize
payload – Output serialized payload
data_representation – Data representation (CDR encoding)
- Returns
true on success, false on failure
-
bool deserialize(eprosima::fastdds::rtps::SerializedPayload_t &payload, void *data) override
Deserialize CDR format to HoloscanEntityData.
- Parameters
payload – Input serialized payload
data – Pointer to HoloscanEntityData to populate
- Returns
true on success, false on failure
-
uint32_t calculate_serialized_size(const void *data, eprosima::fastdds::dds::DataRepresentationId_t data_representation) override
Get the serialized size of a HoloscanEntityData instance.
- Parameters
data – Pointer to HoloscanEntityData
data_representation – Data representation (CDR encoding)
- Returns
Size in bytes when serialized
-
void *create_data() override
Create a new HoloscanEntityData instance.
- Returns
Pointer to newly allocated HoloscanEntityData
-
void delete_data(void *data) override
Delete a HoloscanEntityData instance.
- Parameters
data – Pointer to HoloscanEntityData to delete
-
bool compute_key(eprosima::fastdds::rtps::SerializedPayload_t &payload, eprosima::fastdds::rtps::InstanceHandle_t &handle, bool force_md5) override
Check if this type has a key.
HoloscanEntityData does not use keyed topics.
- Returns
false (no key defined)
-
bool compute_key(const void *data, eprosima::fastdds::rtps::InstanceHandle_t &handle, bool force_md5) override
Get key from data.
- Parameters
data – Pointer to data
handle – Output instance handle
force_md5 – Force MD5 computation
- Returns
false (no key defined)
-
inline bool is_bounded() const override
Check if this type is bounded.
- Returns
false (variable-size type with serialized_data vector)
-
inline bool is_plain(eprosima::fastdds::dds::DataRepresentationId_t) const override
Check if this type is plain (all members have fixed size and no optional).
- Returns
false (contains variable-size vector and string)