GNU Radio 3.5.1 C++ API
gruel Namespace Reference

Include this header to use the message passing features. More...

Classes

class  msg_accepter
 Virtual base class that accepts messages. More...
class  msg_accepter_msgq
 Concrete class that accepts messages and inserts them into a message queue. More...
class  msg_queue
 thread-safe message queue More...
struct  rt_sched_param
struct  sys_pri
class  thread_body_wrapper
class  thread_group

Typedefs

typedef signed long long high_res_timer_type
 Typedef for the timer tick count.
typedef boost::thread thread
typedef boost::mutex mutex
typedef boost::mutex::scoped_lock scoped_lock
typedef boost::condition_variable condition_variable

Enumerations

enum  rt_status_t { RT_OK = 0, RT_NOT_IMPLEMENTED, RT_NO_PRIVS, RT_OTHER_ERROR }
enum  rt_sched_policy { RT_SCHED_RR = 0, RT_SCHED_FIFO = 1 }

Functions

high_res_timer_type high_res_timer_now (void)
 Get the current time in ticks.
high_res_timer_type high_res_timer_tps (void)
 Get the number of ticks per second.
high_res_timer_type high_res_timer_epoch (void)
 Get the tick count at the epoch.
static pmt::pmt_t send (msg_accepter_sptr accepter, const pmt::pmt_t &msg)
 send message to msg_accepter
static pmt::pmt_t send (msg_accepter *accepter, const pmt::pmt_t &msg)
 send message to msg_accepter
static pmt::pmt_t send (msg_accepter &accepter, const pmt::pmt_t &msg)
 send message to msg_accepter
static pmt::pmt_t send (pmt::pmt_t accepter, const pmt::pmt_t &msg)
 send message to msg_accepter
msg_queue_sptr make_msg_queue (unsigned int limit=0)
static int rt_priority_min ()
static int rt_priority_max ()
static int rt_priority_default ()
rt_status_t GRUEL_API enable_realtime_scheduling (rt_sched_param=rt_sched_param())
 If possible, enable "realtime" scheduling.In general, this means that the code will be scheduled before any non-realtime (normal) processes. Note that if your code contains an non-blocking infinite loop and you enable realtime scheduling, it's possible to hang the system.
GRUEL_API void mask_signals ()

Detailed Description

Include this header to use the message passing features.

System independent way to ask for realtime scheduling.

See also:
sys_pri.h

Typedef Documentation

typedef boost::condition_variable gruel::condition_variable
typedef signed long long gruel::high_res_timer_type

Typedef for the timer tick count.

typedef boost::mutex gruel::mutex
typedef boost::mutex::scoped_lock gruel::scoped_lock
typedef boost::thread gruel::thread

Enumeration Type Documentation

Enumerator:
RT_SCHED_RR 
RT_SCHED_FIFO 
Enumerator:
RT_OK 
RT_NOT_IMPLEMENTED 
RT_NO_PRIVS 
RT_OTHER_ERROR 

Function Documentation

gruel::high_res_timer_type gruel::high_res_timer_epoch ( void  ) [inline]

Get the tick count at the epoch.

References high_res_timer_now(), and high_res_timer_tps().

gruel::high_res_timer_type gruel::high_res_timer_now ( void  ) [inline]

Get the current time in ticks.

Referenced by high_res_timer_epoch().

gruel::high_res_timer_type gruel::high_res_timer_tps ( void  ) [inline]

Get the number of ticks per second.

Referenced by high_res_timer_epoch().

msg_queue_sptr gruel::make_msg_queue ( unsigned int  limit = 0)
GRUEL_API void gruel::mask_signals ( )
static int gruel::rt_priority_default ( ) [inline, static]
static int gruel::rt_priority_max ( ) [inline, static]
static int gruel::rt_priority_min ( ) [inline, static]
static pmt::pmt_t gruel::send ( msg_accepter *  accepter,
const pmt::pmt_t msg 
) [inline, static]

send message to msg_accepter

Parameters:
accepteris the target of the send.
msgis the message to send. It's usually a pmt tuple.

Sending a message is an asynchronous operation. The send call will not wait for the message either to arrive at the destination or to be received.

Returns:
msg

References gruel::msg_accepter::post().

static pmt::pmt_t gruel::send ( msg_accepter_sptr  accepter,
const pmt::pmt_t msg 
) [inline, static]

send message to msg_accepter

Parameters:
accepteris the target of the send.
msgis the message to send. It's usually a pmt tuple.

Sending a message is an asynchronous operation. The send call will not wait for the message either to arrive at the destination or to be received.

Returns:
msg

Referenced by send().

static pmt::pmt_t gruel::send ( msg_accepter &  accepter,
const pmt::pmt_t msg 
) [inline, static]

send message to msg_accepter

Parameters:
accepteris the target of the send.
msgis the message to send. It's usually a pmt tuple.

Sending a message is an asynchronous operation. The send call will not wait for the message either to arrive at the destination or to be received.

Returns:
msg

References gruel::msg_accepter::post().

static pmt::pmt_t gruel::send ( pmt::pmt_t  accepter,
const pmt::pmt_t msg 
) [inline, static]

send message to msg_accepter

Parameters:
accepteris the target of the send. precond: pmt_is_msg_accepter(accepter)
msgis the message to send. It's usually a pmt tuple.

Sending a message is an asynchronous operation. The send call will not wait for the message either to arrive at the destination or to be received.

Returns:
msg

References pmt::pmt_msg_accepter_ref(), and send().