Public Member Functions | Protected Attributes
micros_rtt::MQSendRecv Class Reference

#include <mq_send_recv.hpp>

Inheritance diagram for micros_rtt::MQSendRecv:
Inheritance graph

List of all members.

Public Member Functions

void cleanupStream ()
virtual void mqNewSample (int size)
bool mqRead (SerializedMessage &m)
virtual bool mqReady (ChannelElementBase *chan)
 MQSendRecv ()
bool mqWrite (SerializedMessage &m)
void setupStream (ConnectionBasePtr connection, int size, bool is_sender)
 ~MQSendRecv ()

Protected Attributes

char * buf
int max_size
int mdata_size
bool minit_done
bool mis_sender
mqd_t mqdes
std::string mqname

Detailed Description

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

Definition at line 36 of file mq_send_recv.hpp.

Constructor & Destructor Documentation

Create a channel element for remote data exchange.

transportThe type specific object that will be used to marshal the data.

Definition at line 38 of file mq_send_recv.cpp.

Definition at line 111 of file mq_send_recv.cpp.

Member Function Documentation

Definition at line 118 of file mq_send_recv.cpp.

void micros_rtt::MQSendRecv::mqNewSample ( int  size) [virtual]

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


Definition at line 144 of file mq_send_recv.cpp.

Read from the message queue.

samplestores the resulting data sample.
true if an item could be read.

Definition at line 174 of file mq_send_recv.cpp.

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


Definition at line 154 of file mq_send_recv.cpp.

Write to the message queue

dsthe data sample to write
is_data_sampletrue if the sample is used for initialization, false if it is a proper write
true if it could be sent.

Definition at line 193 of file mq_send_recv.cpp.

void micros_rtt::MQSendRecv::setupStream ( ConnectionBasePtr  connection,
int  size,
bool  is_sender 

Definition at line 43 of file mq_send_recv.cpp.

Member Data Documentation

char* micros_rtt::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 51 of file mq_send_recv.hpp.

The size of buf.

Definition at line 63 of file mq_send_recv.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 74 of file mq_send_recv.hpp.

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

Definition at line 59 of file mq_send_recv.hpp.

True if this object is a sender.

Definition at line 55 of file mq_send_recv.hpp.

mqd_t micros_rtt::MQSendRecv::mqdes [protected]

MQueue file descriptor.

Definition at line 43 of file mq_send_recv.hpp.

std::string micros_rtt::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 68 of file mq_send_recv.hpp.

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

Author(s): Zaile Jiang , Xiaodong Yi , Minglong Li
autogenerated on Sat Jun 8 2019 19:02:21