Orocos Real-Time Toolkit
2.8.3
|
For each transportable type T, specify the conversion functions. More...
#include <rtt/transports/mqueue/MQTemplateProtocol.hpp>
Public Types | |
typedef T | UserType |
The given T parameter is the type for reading DataSources. More... | |
Public Member Functions | |
BOOST_STATIC_ASSERT (!boost::has_virtual_destructor< T >::value) | |
We don't support types with virtual functions ! TODO: use this type trait to make the necessary adjustments in the memcopy (adding the vptr table offset). More... | |
virtual std::pair< void const *, int > | fillBlob (base::DataSourceBase::shared_ptr source, void *blob, int size, void *cookie) const |
Create an transportable object for a protocol which contains the value of source. More... | |
virtual bool | updateFromBlob (const void *blob, int size, base::DataSourceBase::shared_ptr target, void *cookie) const |
Update target with the contents of blob which is an object of a protocol. More... | |
virtual unsigned int | getSampleSize (base::DataSourceBase::shared_ptr ignored, void *cookie) const |
Returns the size in bytes of a marshalled data element. More... | |
virtual base::ChannelElementBase::shared_ptr | createStream (base::PortInterface *port, const ConnPolicy &policy, bool is_sender) const |
Creates a streaming channel element for reading or writing over this transport. More... | |
virtual void * | createCookie () const |
Overload in subclasses for marshallers that need to allocate some internal data. More... | |
virtual void | deleteCookie (void *cookie) const |
Called to delete a cookie created with createCookie. More... | |
For each transportable type T, specify the conversion functions.
Definition at line 61 of file MQTemplateProtocol.hpp.
typedef T RTT::mqueue::MQTemplateProtocol< T >::UserType |
The given T parameter is the type for reading DataSources.
Definition at line 74 of file MQTemplateProtocol.hpp.
RTT::mqueue::MQTemplateProtocol< T >::BOOST_STATIC_ASSERT | ( | !boost::has_virtual_destructor< T >::value | ) |
We don't support types with virtual functions ! TODO: use this type trait to make the necessary adjustments in the memcopy (adding the vptr table offset).
|
inlinevirtualinherited |
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.
Referenced by RTT::mqueue::MQSendRecv::setupStream().
|
inlinevirtualinherited |
Creates a streaming channel element for reading or writing over this transport.
It returns a ChannelElementBase that provides the implementation of sending or receiving data through the transport. Both sender and receiver find each other using the channel_id argument. Transports that do not support streaming may return null
port | The port for which this channel is setup. |
channel_id | If the transport receives a non-empty channel_id, it will create a channel that connects to this id. If channel id is empty, it will be filled in with a unique identifier that identifies this channel. This allows the local caller to connect to the remote channel in a second invocation of createRemoteChannel. |
is_sender | Set to true in case you will write() to this channel element, set it to false in case you will read() from this channel element. |
Implements RTT::types::TypeTransporter.
Definition at line 69 of file MQTemplateProtocolBase.hpp.
References RTT::types::TypeInfo::buildDataStorage(), RTT::Error, and RTT::internal::DataSourceTypeInfo< T >::getTypeInfo().
|
inlinevirtualinherited |
Called to delete a cookie created with createCookie.
Definition at line 70 of file TypeMarshaller.hpp.
References RTT::types::TypeMarshaller::fillBlob(), RTT::types::TypeMarshaller::getSampleSize(), and RTT::types::TypeMarshaller::updateFromBlob().
Referenced by RTT::mqueue::MQSendRecv::cleanupStream().
|
inlinevirtual |
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
source | The data to be read |
blob | Suggested 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. |
size | The size of the memory area pointed by blob |
size
Implements RTT::types::TypeMarshaller.
Definition at line 76 of file MQTemplateProtocol.hpp.
|
inlinevirtual |
Returns the size in bytes of a marshalled data element.
Implements RTT::types::TypeMarshaller.
Definition at line 94 of file MQTemplateProtocol.hpp.
|
inlinevirtual |
Update target with the contents of blob which is an object of a protocol.
The given data source is guaranteed to be an AssignableDataSource
Implements RTT::types::TypeMarshaller.
Definition at line 83 of file MQTemplateProtocol.hpp.
References RTT::internal::AssignableDataSource< T >::narrow(), and RTT::internal::AssignableDataSource< T >::set().