Class DynamicPubSubType
Defined in File DynamicPubSubType.h
Inheritance Relationships
Base Type
public eprosima::fastdds::dds::TopicDataType
(Class TopicDataType)
Class Documentation
-
class DynamicPubSubType : public eprosima::fastdds::dds::TopicDataType
Public Functions
-
RTPS_DllAPI DynamicPubSubType()
-
RTPS_DllAPI DynamicPubSubType(DynamicType_ptr pDynamicType)
-
virtual RTPS_DllAPI ~DynamicPubSubType()
- virtual RTPS_DllAPI void * createData () override
Create a Data Type.
- Returns:
Void pointer to the created object.
- virtual RTPS_DllAPI void deleteData (void *data) override
Remove a previously created object.
- Parameters:
data – Pointer to the created Data.
- virtual RTPS_DllAPI bool deserialize (eprosima::fastrtps::rtps::SerializedPayload_t *payload, void *data) override
Deserialize method, it should be implemented by the user, since it is abstract.
- Parameters:
payload – [in] Pointer to the payload
data – [out] Pointer to the data
- Returns:
True if correct.
- virtual RTPS_DllAPI bool getKey (void *data, eprosima::fastrtps::rtps::InstanceHandle_t *ihandle, bool force_md5=false) override
Get the key associated with the data.
- Parameters:
data – [in] Pointer to the data.
ihandle – [out] Pointer to the Handle.
force_md5 – [in] Force MD5 checking.
- Returns:
True if correct.
- inline virtual RTPS_DllAPI std::function< uint32_t()> getSerializedSizeProvider (void *data) override
Returns a function which can be used to calculate the serialized size of the provided data.
- Parameters:
data – [in] Pointer to data.
- Returns:
Functor which calculates the serialized size of the data.
- virtual RTPS_DllAPI std::function< uint32_t()> getSerializedSizeProvider (void *data, fastdds::dds::DataRepresentationId_t data_representation) override
Returns a function which can be used to calculate the serialized size of the provided data.
- Parameters:
data – [in] Pointer to data.
data_representation – [in] Representation that should be used for calculating the serialized size.
- Returns:
Functor which calculates the serialized size of the data.
- inline virtual RTPS_DllAPI bool serialize (void *data, eprosima::fastrtps::rtps::SerializedPayload_t *payload) override
Serialize method, it should be implemented by the user, since it is abstract. It is VERY IMPORTANT that the user sets the SerializedPayload length correctly.
- Parameters:
data – [in] Pointer to the data
payload – [out] Pointer to the payload
- Returns:
True if correct.
- virtual RTPS_DllAPI bool serialize (void *data, eprosima::fastrtps::rtps::SerializedPayload_t *payload, fastdds::dds::DataRepresentationId_t data_representation) override
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:
data – [in] Pointer to the data
payload – [out] Pointer to the payload
data_representation – [in] Representation that should be used to encode the data into the payload.
- Returns:
True if correct.
- RTPS_DllAPI void CleanDynamicType ()
- RTPS_DllAPI DynamicType_ptr GetDynamicType () const
- RTPS_DllAPI ReturnCode_t SetDynamicType (DynamicData_ptr pData)
- RTPS_DllAPI ReturnCode_t SetDynamicType (DynamicType_ptr pType)
Protected Functions
-
void UpdateDynamicTypeInfo()
Protected Attributes
-
DynamicType_ptr dynamic_type_
-
unsigned char *m_keyBuffer
-
enum eprosima::fastrtps::types::DynamicPubSubType APPENDABLE
-
RTPS_DllAPI DynamicPubSubType()