Public Member Functions
RTT::types::TypeMarshaller Class Reference

#include <TypeMarshaller.hpp>

Inheritance diagram for RTT::types::TypeMarshaller:
Inheritance graph

List of all members.

Public Member Functions

virtual void * createCookie () const
virtual void deleteCookie (void *cookie) const
virtual std::pair< void const
*, int > 
fillBlob (base::DataSourceBase::shared_ptr source, void *blob, int size, void *cookie=0) const =0
virtual unsigned int getSampleSize (base::DataSourceBase::shared_ptr sample, void *cookie=0) const =0
virtual bool updateFromBlob (const void *blob, int size, base::DataSourceBase::shared_ptr target, void *cookie=0) const =0

Detailed Description

Objects implementing this interface have the capability to convert data sources to and from a binary representation.

Definition at line 61 of file TypeMarshaller.hpp.

Member Function Documentation

virtual void* RTT::types::TypeMarshaller::createCookie ( ) const [inline, virtual]

Overload in subclasses for marshallers that need to allocate some internal data. The protocol will call deleteCookie(void*) accordingly

Definition at line 68 of file TypeMarshaller.hpp.

virtual void RTT::types::TypeMarshaller::deleteCookie ( void *  cookie) const [inline, virtual]

Called to delete a cookie created with createCookie

Definition at line 70 of file TypeMarshaller.hpp.

virtual std::pair<void const*,int> RTT::types::TypeMarshaller::fillBlob ( base::DataSourceBase::shared_ptr  source,
void *  blob,
int  size,
void *  cookie = 0 
) const [pure virtual]

Create an transportable object for a protocol which contains the value of source. This must be a real-time function which does not allocate memory

sourceThe data to be read
blobSuggested target memory area to write to. In case the type marshaller does not need this, it will return an alternative as a first element in the returned std::pair.
sizeThe size of the memory area pointed by blob
Returns (0,0) if the filling failed, otherwise, points to the filled memory area and the effectively written size. The returned pointer may differ from blob, in case blob was not used. The returned size must be lower or equal than size

Implemented in RTT::mqueue::MQTemplateProtocol< T >, and RTT::mqueue::MQSerializationProtocol< T >.

virtual unsigned int RTT::types::TypeMarshaller::getSampleSize ( base::DataSourceBase::shared_ptr  sample,
void *  cookie = 0 
) const [pure virtual]

Returns the size in bytes of a marshalled data element.

the size.

Implemented in RTT::mqueue::MQSerializationProtocol< T >, and RTT::mqueue::MQTemplateProtocol< T >.

virtual bool RTT::types::TypeMarshaller::updateFromBlob ( const void *  blob,
int  size,
base::DataSourceBase::shared_ptr  target,
void *  cookie = 0 
) const [pure virtual]

Update target with the contents of blob which is an object of a protocol. The given data source is guaranteed to be an AssignableDataSource

Implemented in RTT::mqueue::MQSerializationProtocol< T >, and RTT::mqueue::MQTemplateProtocol< T >.

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

Author(s): RTT Developers
autogenerated on Sat Jun 8 2019 18:46:40