GCS  0.2.3
Public Member Functions | Protected Member Functions
gu::prodcons::Consumer Class Referenceabstract

Consumer interface. More...

#include <gu_prodcons.hpp>

Public Member Functions

 Consumer ()
 Default constructor.
 
virtual ~Consumer ()
 Default destructor.
 
void queue_and_wait (const Message &msg, Message *ack)
 Queue message and wait for ack. More...
 

Protected Member Functions

const Messageget_next_msg ()
 Get the first message from the message queue. More...
 
void return_ack (const Message &msg)
 Return ack message for the producer. More...
 
virtual void notify ()=0
 Virtual method to notify consumer about queued message.
 

Detailed Description

Consumer interface.

Member Function Documentation

const Message* gu::prodcons::Consumer::get_next_msg ( )
protected

Get the first message from the message queue.

Get the first message from the message queue. Note that this method does not remove the first message from message queue.

Returns
Next message from the message queue
void gu::prodcons::Consumer::queue_and_wait ( const Message msg,
Message ack 
)

Queue message and wait for ack.

Parameters
[in]msgMessage to be queued
[out]ackAck returned by consumer
void gu::prodcons::Consumer::return_ack ( const Message msg)
protected

Return ack message for the producer.

Return ack message for the producer. Note that this method pops the first message from the message queue.

Parameters
msgAck message corresponding the current head of mque

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