Fast DDS  Version 3.0.1
Fast DDS
Loading...
Searching...
No Matches
MinimalUnionHeaderPubSubType Class Reference

This class represents the TopicDataType of the type MinimalUnionHeader defined by the user in the IDL file. More...

#include <dds_xtypes_typeobjectPubSubTypes.hpp>

Inheritance diagram for MinimalUnionHeaderPubSubType:

Public Types

typedef MinimalUnionHeader type
 

Public Member Functions

eProsima_user_DllExport MinimalUnionHeaderPubSubType ()
 
eProsima_user_DllExport ~MinimalUnionHeaderPubSubType () override
 
eProsima_user_DllExport bool serialize (const void *const data, eprosima::fastdds::rtps::SerializedPayload_t &payload, eprosima::fastdds::dds::DataRepresentationId_t data_representation) override
 Serialize method, it should be implemented by the user, since it is abstract.
 
eProsima_user_DllExport bool deserialize (eprosima::fastdds::rtps::SerializedPayload_t &payload, void *data) override
 Deserialize method, it should be implemented by the user, since it is abstract.
 
eProsima_user_DllExport uint32_t calculate_serialized_size (const void *const data, eprosima::fastdds::dds::DataRepresentationId_t data_representation) override
 Calculates the serialized size of the provided data.
 
eProsima_user_DllExport bool compute_key (eprosima::fastdds::rtps::SerializedPayload_t &payload, eprosima::fastdds::rtps::InstanceHandle_t &ihandle, bool force_md5=false) override
 Get the key associated with the data.
 
eProsima_user_DllExport bool compute_key (const void *const data, eprosima::fastdds::rtps::InstanceHandle_t &ihandle, bool force_md5=false) override
 Get the key associated with the data.
 
eProsima_user_DllExport void * create_data () override
 Create a Data Type.
 
eProsima_user_DllExport void delete_data (void *data) override
 Remove a previously created object.
 
eProsima_user_DllExport void register_type_object_representation () override
 Register TypeObject type representation.
 
- Public Member Functions inherited from TopicDataType
FASTDDS_EXPORTED_API TopicDataType ()=default
 Constructor.
 
virtual FASTDDS_EXPORTED_API ~TopicDataType ()=default
 Destructor.
 
FASTDDS_EXPORTED_API void set_name (const std::string &nam)
 Set topic data type name.
 
FASTDDS_EXPORTED_API void set_name (std::string &&nam)
 Set topic data type name.
 
FASTDDS_EXPORTED_API const std::string & get_name () const
 Get topic data type name.
 
FASTDDS_EXPORTED_API const xtypes::TypeIdentifierPairtype_identifiers () const
 Get the type identifiers.
 
virtual FASTDDS_EXPORTED_API bool is_bounded () const
 Checks if the type is bounded.
 
virtual FASTDDS_EXPORTED_API bool is_plain (DataRepresentationId_t) const
 Checks if the type is plain when using a specific encoding.
 
virtual FASTDDS_EXPORTED_API bool construct_sample (void *memory) const
 Construct a sample on a memory location.
 

Additional Inherited Members

- Public Attributes inherited from TopicDataType
uint32_t max_serialized_type_size {0}
 Maximum serialized size of the type in bytes.
 
bool is_compute_key_provided {false}
 Indicates whether the method to obtain the key has been implemented.
 
- Protected Attributes inherited from TopicDataType
xtypes::TypeIdentifierPair type_identifiers_
 

Detailed Description

This class represents the TopicDataType of the type MinimalUnionHeader defined by the user in the IDL file.

Member Typedef Documentation

◆ type

Constructor & Destructor Documentation

◆ MinimalUnionHeaderPubSubType()

eProsima_user_DllExport MinimalUnionHeaderPubSubType ( )

◆ ~MinimalUnionHeaderPubSubType()

eProsima_user_DllExport ~MinimalUnionHeaderPubSubType ( )
override

Member Function Documentation

◆ calculate_serialized_size()

eProsima_user_DllExport uint32_t calculate_serialized_size ( const void *const  data,
eprosima::fastdds::dds::DataRepresentationId_t  data_representation 
)
overridevirtual

Calculates the serialized size of the provided data.

Parameters
[in]dataPointer to data.
[in]data_representationRepresentation that should be used for calculating the serialized size.
Returns
Serialized size of the data.

Implements TopicDataType.

◆ compute_key() [1/2]

eProsima_user_DllExport bool compute_key ( const void *const  data,
eprosima::fastdds::rtps::InstanceHandle_t ihandle,
bool  force_md5 = false 
)
overridevirtual

Get the key associated with the data.

Parameters
[in]dataPointer to the data.
[out]ihandlePointer to the Handle.
[in]force_md5Force MD5 checking.
Returns
True if correct.

Implements TopicDataType.

◆ compute_key() [2/2]

eProsima_user_DllExport bool compute_key ( eprosima::fastdds::rtps::SerializedPayload_t payload,
eprosima::fastdds::rtps::InstanceHandle_t ihandle,
bool  force_md5 = false 
)
overridevirtual

Get the key associated with the data.

Parameters
[in]payloadPointer to the payload containing the data.
[out]ihandlePointer to the Handle.
[in]force_md5Force MD5 checking.
Returns
True if correct.

Implements TopicDataType.

◆ create_data()

eProsima_user_DllExport void * create_data ( )
overridevirtual

Create a Data Type.

Returns
Void pointer to the created object.

Implements TopicDataType.

◆ delete_data()

eProsima_user_DllExport void delete_data ( void *  data)
overridevirtual

Remove a previously created object.

Parameters
dataPointer to the created Data.

Implements TopicDataType.

◆ deserialize()

eProsima_user_DllExport bool deserialize ( eprosima::fastdds::rtps::SerializedPayload_t payload,
void *  data 
)
overridevirtual

Deserialize method, it should be implemented by the user, since it is abstract.

Parameters
[in]payloadPointer to the payload
[out]dataPointer to the data
Returns
True if correct.

Implements TopicDataType.

◆ register_type_object_representation()

eProsima_user_DllExport void register_type_object_representation ( )
overridevirtual

Register TypeObject type representation.

Reimplemented from TopicDataType.

◆ serialize()

eProsima_user_DllExport bool serialize ( const void *const  data,
eprosima::fastdds::rtps::SerializedPayload_t payload,
eprosima::fastdds::dds::DataRepresentationId_t  data_representation 
)
overridevirtual

Serialize method, it should be implemented by the user, since it is abstract.

If not implemented, this method will call the serialize method in which the topic data representation is not considered. It is VERY IMPORTANT that the user sets the SerializedPayload length correctly.

Parameters
[in]dataPointer to the data
[out]payloadPointer to the payload
[in]data_representationRepresentation that should be used to encode the data into the payload.
Returns
True if correct.

Implements TopicDataType.


The documentation for this class was generated from the following file: