MCProxy

Communication

The module Communication provide a communication with a synchronised job queue, messaging formats and wrapper to hide the details.

Classes

struct  clock_msg
 Message used from module Timer. It is the contain of a reminder. More...
struct  config_msg
 Message used from module Proxy to set and delete interfaces of the proxy instances. More...
struct  debug_msg
 Message to collect debug information for the module Proxy. More...
struct  intrusive_message
 Message container implements an intrusive pointer to save a pointer of a message with a reference counter. More...
class  message_queue< T >
 Fixed sized synchronised job queue. More...
struct  proxy_msg
 Generic message for the message_queue. More...
struct  receiver_msg
 Message used from module Receiver to inform the module Proxy Instance of received a message. More...
struct  routing_msg
 Message used from module Proxy Instance to introduce the module Routing. More...
struct  test_msg
 Test message to test the message queue and the intrusive pointer. More...
class  worker
 Wraps the job queue to a basic worker like an simple actor pattern. More...

Functions

unsigned int message_queue::current_size ()
message_queue::dequeue (void)
void message_queue::enqueue (T t)
bool message_queue::is_empty ()
int message_queue::max_size ()
 message_queue::message_queue (int size)

Function Documentation

template<typename T >
unsigned int message_queue< T >::current_size (  )  [inline, inherited]

Return the current size of the message queue.

template<typename T >
T message_queue< T >::dequeue ( void   )  [inline, inherited]

get and el element on head and wait if empty.

template<typename T>
void message_queue< T >::enqueue ( t  )  [inline, inherited]

add an element on tail and wait if full.

Referenced by worker::add_msg().

template<typename T >
bool message_queue< T >::is_empty (  )  [inline, inherited]

Return true if the message queue is empty.

template<typename T >
int message_queue< T >::max_size (  )  [inline, inherited]

Return the set size.

template<typename T >
message_queue< T >::message_queue ( int  size  )  [inline, inherited]

Create a message_queue with a fixed size.

Parameters:
size size of the message_queue.