Loading...
Searching...
No Matches
gr::messages::msg_queue Class Reference

thread-safe message queue More...

`#include <gnuradio/messages/msg_queue.h>`

## Public Member Functions

| msg_queue (unsigned int limit)
| ~msg_queue ()
void | insert_tail (pmt::pmt_t msg)
| Insert message at tail of queue.
pmt::pmt_t | delete_head ()
| Delete message from head of queue and return it. Block if no message is available.
pmt::pmt_t | delete_head_nowait ()
| If there's a message in the q, delete it and return it. If no message is available, return pmt::pmt_t().
void | flush ()
| Delete all messages from the queue.
bool | empty_p () const
| is the queue empty?
bool | full_p () const
| is the queue full?
unsigned int | count () const
| return number of messages in queue
unsigned int | limit () const
| return limit on number of message in queue. 0 -> unbounded

## Detailed Description

thread-safe message queue

## Constructor & Destructor Documentation

## msg_queue()

gr::messages::msg_queue::msg_queue | ( | unsigned int | limit | ) |

References limit().

## ~msg_queue()

gr::messages::msg_queue::~msg_queue | ( |  | ) |

## Member Function Documentation

## count()

unsigned int gr::messages::msg_queue::count | ( |  | ) | const

inline

return number of messages in queue

Referenced by full_p().

## delete_head()

pmt::pmt_t gr::messages::msg_queue::delete_head | ( |  | ) |

Delete message from head of queue and return it. Block if no message is available.

## delete_head_nowait()

pmt::pmt_t gr::messages::msg_queue::delete_head_nowait | ( |  | ) |

If there's a message in the q, delete it and return it. If no message is available, return pmt::pmt_t().

## empty_p()

bool gr::messages::msg_queue::empty_p | ( |  | ) | const

inline

is the queue empty?

## flush()

void gr::messages::msg_queue::flush | ( |  | ) |

Delete all messages from the queue.

## full_p()

bool gr::messages::msg_queue::full_p | ( |  | ) | const

inline

is the queue full?

References count().

## insert_tail()

void gr::messages::msg_queue::insert_tail | ( | pmt::pmt_t | msg | ) |

Insert message at tail of queue.

Parameters

  msg | message

Block if queue if full.

## limit()

unsigned int gr::messages::msg_queue::limit | ( |  | ) | const

inline

return limit on number of message in queue. 0 -> unbounded

Referenced by msg_queue().

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

- messages/msg_queue.h