11 #ifndef INCLUDED_GR_MSG_QUEUE_H 12 #define INCLUDED_GR_MSG_QUEUE_H 35 typedef std::shared_ptr<msg_queue>
sptr;
37 static sptr make(
unsigned int limit = 0);
69 bool empty_p()
const {
return d_count == 0; }
72 bool full_p()
const {
return d_limit != 0 && d_count >= d_limit; }
75 unsigned int count()
const {
return d_count; }
78 unsigned int limit()
const {
return d_limit; }
GR_RUNTIME_API const pmt::pmt_t msg()
void handle(message::sptr msg) override
Generic msg_handler method: insert the message.
Definition: msg_queue.h:43
bool full_p() const
is the queue full?
Definition: msg_queue.h:72
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
bool empty_p() const
is the queue empty?
Definition: msg_queue.h:69
thread-safe message queue
Definition: msg_queue.h:24
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::shared_ptr< msg_queue > sptr
Definition: msg_queue.h:35
unsigned int count() const
return number of messages in queue
Definition: msg_queue.h:75
boost::mutex mutex
Definition: thread.h:37
std::shared_ptr< message > sptr
Definition: message.h:30
boost::condition_variable condition_variable
Definition: thread.h:39
abstract class of message handlers
Definition: msg_handler.h:26
unsigned int limit() const
return limit on number of message in queue. 0 -> unbounded
Definition: msg_queue.h:78