#include <DynamicPubSubType.hpp>

Public Member Functions | |
| FASTDDS_EXPORTED_API | DynamicPubSubType ()=default |
| FASTDDS_EXPORTED_API | DynamicPubSubType (traits< DynamicType >::ref_type type) |
| Constructs a DynamicPubSubType from a DynamicType. | |
| FASTDDS_EXPORTED_API | DynamicPubSubType (traits< DynamicType >::ref_type type, const xtypes::TypeInformation &type_information) |
| Constructs a DynamicPubSubType from a DynamicType and a TypeInformation. | |
| virtual FASTDDS_EXPORTED_API | ~DynamicPubSubType () |
| FASTDDS_EXPORTED_API void * | create_data () override |
| Create a new data object of the specified type. | |
| FASTDDS_EXPORTED_API void | delete_data (void *data) override |
| Deletes an object previously allocated via create_data. | |
| FASTDDS_EXPORTED_API bool | deserialize (eprosima::fastdds::rtps::SerializedPayload_t &payload, void *data) override |
| Deserialize an object from the given payload. | |
| FASTDDS_EXPORTED_API traits< DynamicType >::ref_type | get_dynamic_type () const noexcept |
| Returns a copy of the internal DynamicType object. | |
| FASTDDS_EXPORTED_API bool | compute_key (eprosima::fastdds::rtps::SerializedPayload_t &payload, eprosima::fastdds::rtps::InstanceHandle_t &ihandle, bool force_md5=false) override |
| Calculate the key associated to a given object. | |
| FASTDDS_EXPORTED_API bool | compute_key (const void *const data, eprosima::fastdds::rtps::InstanceHandle_t &ihandle, bool force_md5=false) override |
| Calculate the key associated to a given object. | |
| FASTDDS_EXPORTED_API uint32_t | calculate_serialized_size (const void *const data, DataRepresentationId_t data_representation) override |
| Provide a functor that calculates a specified object serialized size. | |
| FASTDDS_EXPORTED_API bool | serialize (const void *const data, eprosima::fastdds::rtps::SerializedPayload_t &payload, fastdds::dds::DataRepresentationId_t data_representation) override |
| Serialize an object into a given payload. | |
| FASTDDS_EXPORTED_API ReturnCode_t | set_dynamic_type (traits< DynamicType >::ref_type type) |
| Sets up the internal DynamicType object. | |
| FASTDDS_EXPORTED_API void | register_type_object_representation () override |
| Register TypeObject representation in Fast DDS TypeObjectRegistry. | |
| 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::TypeIdentifierPair & | type_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_ |
|
default |
| FASTDDS_EXPORTED_API DynamicPubSubType | ( | traits< DynamicType >::ref_type | type | ) |
Constructs a DynamicPubSubType from a DynamicType.
| type | DynamicType object associated to the data |
| FASTDDS_EXPORTED_API DynamicPubSubType | ( | traits< DynamicType >::ref_type | type, |
| const xtypes::TypeInformation & | type_information ) |
Constructs a DynamicPubSubType from a DynamicType and a TypeInformation.
This constructor is only meant to be used when the registration of the corresponding TypeSupport in the participant is meant to avoid registering the TypeObject in the xtypes::TypeObjectRegistry; that is, when the TypeObject registration has already been performed. This is for instance the case when the DynamicType is created from a TypeObject obtained from a remote TypeInformation that only has the minimal type identifiers but not the complete ones.
| type | DynamicType object associated to the data |
| type_information | TypeInformation object associated to the data |
|
virtual |
|
overridevirtual |
Provide a functor that calculates a specified object serialized size.
| [in] | data | object whose payload footprint to calculate |
| [in] | data_representation | Representation that should be used for calculating the serialized size. |
Implements TopicDataType.
|
overridevirtual |
Calculate the key associated to a given object.
| data | object which key is calculated |
| ihandle | InstanceHandle_t to fill in |
| force_md5 | use always md5 even if key payload footprint is smaller than the hash |
Implements TopicDataType.
|
overridevirtual |
Calculate the key associated to a given object.
| payload | SerializedPayload_t containing the serialized object which key is calculated |
| ihandle | InstanceHandle_t to fill in |
| force_md5 | use always md5 even if key payload footprint is smaller than the hash |
Implements TopicDataType.
|
overridevirtual |
Create a new data object of the specified type.
Implements TopicDataType.
|
overridevirtual |
Deletes an object previously allocated via create_data.
| data | pointer to the object to be deleted |
Implements TopicDataType.
|
overridevirtual |
Deserialize an object from the given payload.
| payload | SerializedPayload_t to parse |
| data | object to fill in with payload data |
Implements TopicDataType.
|
noexcept |
Returns a copy of the internal DynamicType object.
|
overridevirtual |
Register TypeObject representation in Fast DDS TypeObjectRegistry.
Reimplemented from TopicDataType.
|
overridevirtual |
Serialize an object into a given payload.
| [in] | data | object to serialize |
| [out] | payload | SerializedPayload_t to fill in |
| [in] | data_representation | Representation that should be used to encode the data into the payload. |
Implements TopicDataType.
| FASTDDS_EXPORTED_API ReturnCode_t set_dynamic_type | ( | traits< DynamicType >::ref_type | type | ) |
Sets up the internal DynamicType object.
| type | DynamicType to copy |