23 #ifndef INCLUDED_GR_MSG_QUEUE_H 24 #define INCLUDED_GR_MSG_QUEUE_H 47 typedef boost::shared_ptr<msg_queue>
sptr;
49 static sptr make(
unsigned int limit = 0);
81 bool empty_p()
const {
return d_count == 0; }
84 bool full_p()
const {
return d_limit != 0 && d_count >= d_limit; }
87 unsigned int count()
const {
return d_count; }
90 unsigned int limit()
const {
return d_limit; }
boost::shared_ptr< msg_queue > sptr
Definition: msg_queue.h:47
bool full_p() const
is the queue full?
Definition: msg_queue.h:84
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
void handle(message::sptr msg)
Generic msg_handler method: insert the message.
Definition: msg_queue.h:55
bool empty_p() const
is the queue empty?
Definition: msg_queue.h:81
thread-safe message queue
Definition: msg_queue.h:36
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
unsigned int count() const
return number of messages in queue
Definition: msg_queue.h:87
boost::shared_ptr< message > sptr
Definition: message.h:42
boost::mutex mutex
Definition: thread.h:48
boost::condition_variable condition_variable
Definition: thread.h:50
abstract class of message handlers
Definition: msg_handler.h:38
unsigned int limit() const
return limit on number of message in queue. 0 -> unbounded
Definition: msg_queue.h:90