RTT::mqueue::MQSendRecv Class Reference

#include <MQSendRecv.hpp>

Inheritance diagram for RTT::mqueue::MQSendRecv:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void cleanupStream ()
void cleanupStream ()
virtual void mqNewSample (base::DataSourceBase::shared_ptr ds)
virtual void mqNewSample (base::DataSourceBase::shared_ptr ds)
bool mqRead (base::DataSourceBase::shared_ptr ds)
bool mqRead (base::DataSourceBase::shared_ptr ds)
virtual bool mqReady (base::DataSourceBase::shared_ptr ds, base::ChannelElementBase *chan)
virtual bool mqReady (base::DataSourceBase::shared_ptr ds, base::ChannelElementBase *chan)
 MQSendRecv (types::TypeMarshaller const &transport)
 MQSendRecv (types::TypeMarshaller const &transport)
bool mqWrite (base::DataSourceBase::shared_ptr ds)
bool mqWrite (base::DataSourceBase::shared_ptr ds)
void setupStream (base::DataSourceBase::shared_ptr ds, base::PortInterface *port, ConnPolicy const &policy, bool is_sender)
void setupStream (base::DataSourceBase::shared_ptr ds, base::PortInterface *port, ConnPolicy const &policy, bool is_sender)
 ~MQSendRecv ()
 ~MQSendRecv ()

Protected Attributes

char * buf
void * marshaller_cookie
int max_size
int mdata_size
bool minit_done
bool mis_sender
mqd_t mqdes
std::string mqname
types::TypeMarshaller const & mtransport

Detailed Description

Implements the sending/receiving of mqueue messages. It can only be OR sender OR receiver (logical XOR).

Definition at line 54 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.


Constructor & Destructor Documentation

MQSendRecv::MQSendRecv ( types::TypeMarshaller const &  transport  ) 

Create a channel element for remote data exchange.

Parameters:
transport The type specific object that will be used to marshal the data.

Definition at line 63 of file MQSendRecv.cpp.

MQSendRecv::~MQSendRecv (  ) 

Definition at line 146 of file MQSendRecv.cpp.

RTT::mqueue::MQSendRecv::MQSendRecv ( types::TypeMarshaller const &  transport  ) 

Create a channel element for remote data exchange.

Parameters:
transport The type specific object that will be used to marshal the data.
RTT::mqueue::MQSendRecv::~MQSendRecv (  ) 

Member Function Documentation

void RTT::mqueue::MQSendRecv::cleanupStream (  ) 
void MQSendRecv::cleanupStream (  ) 

Definition at line 152 of file MQSendRecv.cpp.

virtual void RTT::mqueue::MQSendRecv::mqNewSample ( base::DataSourceBase::shared_ptr  ds  )  [virtual]

Adapts the mq send/receive buffer size according to the data in mqdata_source, or the value set in mdata_size;

Parameters:
sample 
void MQSendRecv::mqNewSample ( base::DataSourceBase::shared_ptr  ds  )  [virtual]

Adapts the mq send/receive buffer size according to the data in mqdata_source, or the value set in mdata_size;

Parameters:
sample 

Definition at line 181 of file MQSendRecv.cpp.

bool RTT::mqueue::MQSendRecv::mqRead ( base::DataSourceBase::shared_ptr  ds  ) 

Read from the message queue.

Parameters:
sample stores the resulting data sample.
Returns:
true if an item could be read.
bool MQSendRecv::mqRead ( base::DataSourceBase::shared_ptr  ds  ) 

Read from the message queue.

Parameters:
sample stores the resulting data sample.
Returns:
true if an item could be read.

Definition at line 239 of file MQSendRecv.cpp.

virtual bool RTT::mqueue::MQSendRecv::mqReady ( base::DataSourceBase::shared_ptr  ds,
base::ChannelElementBase chan 
) [virtual]

Works only in receive mode, waits for a new sample and adapts the receive buffer to match it's size.

Returns:
bool MQSendRecv::mqReady ( base::DataSourceBase::shared_ptr  ds,
base::ChannelElementBase chan 
) [virtual]

Works only in receive mode, waits for a new sample and adapts the receive buffer to match it's size.

Returns:

Definition at line 191 of file MQSendRecv.cpp.

bool RTT::mqueue::MQSendRecv::mqWrite ( base::DataSourceBase::shared_ptr  ds  ) 

Write to the message queue

Parameters:
ds the data sample to write
is_data_sample true if the sample is used for initialization, false if it is a proper write
Returns:
true if it could be sent.
bool MQSendRecv::mqWrite ( base::DataSourceBase::shared_ptr  ds  ) 

Write to the message queue

Parameters:
ds the data sample to write
is_data_sample true if the sample is used for initialization, false if it is a proper write
Returns:
true if it could be sent.

Definition at line 254 of file MQSendRecv.cpp.

void RTT::mqueue::MQSendRecv::setupStream ( base::DataSourceBase::shared_ptr  ds,
base::PortInterface port,
ConnPolicy const &  policy,
bool  is_sender 
)
void MQSendRecv::setupStream ( base::DataSourceBase::shared_ptr  ds,
base::PortInterface port,
ConnPolicy const &  policy,
bool  is_sender 
)

Definition at line 68 of file MQSendRecv.cpp.


Member Data Documentation

char * RTT::mqueue::MQSendRecv::buf [protected]

Send/Receive buffer. It is initialized to the size of the value provided by the ConnPolicy or, if the policy has a zero data size, the sample given to setupStream

Its size is saved in max_size

Definition at line 79 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

A private blob that is returned by mtransport.getCookie(). It is used by the marshallers if they need private internal data to do the marshalling

Definition at line 67 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

The size of buf.

Definition at line 91 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

The size of the data, as specified in the ConnPolicy when creating the stream, or calculated using the transport when that size was zero.

Definition at line 102 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

True if setupStream() was called, false after cleanupStream().

Definition at line 87 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

True if this object is a sender.

Definition at line 83 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

mqd_t RTT::mqueue::MQSendRecv::mqdes [protected]

MQueue file descriptor.

Definition at line 71 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

std::string RTT::mqueue::MQSendRecv::mqname [protected]

The name of the queue, as specified in the ConnPolicy when creating the stream, or self-calculated when that name was empty.

Definition at line 96 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.

Transport marshaller used for size calculations and data updates.

Definition at line 61 of file install/include/rtt/transports/mqueue/MQSendRecv.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


rtt
Author(s): RTT Developers
autogenerated on Fri Jan 11 09:50:09 2013