mb_runtime_thread_per_block Class Reference

Concrete runtime that uses a thread per mblock. More...

#include <mb_runtime_thread_per_block.h>

Inheritance diagram for mb_runtime_thread_per_block:

Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector< mb_worker * >
::iterator 
worker_iter_t

Public Member Functions

 mb_runtime_thread_per_block ()
 ~mb_runtime_thread_per_block ()
bool run (const std::string &instance_name, const std::string &class_name, pmt_t user_arg, pmt_t *result)
 Construct and run the specified mblock hierarchy.
void request_shutdown (pmt_t result)

Public Attributes

omni_mutex d_workers_mutex
std::vector< mb_worker * > d_workers
bool d_shutdown_in_progress
pmt_t d_shutdown_result
mb_msg_queue d_msgq
mb_timer_queue d_timer_queue

Protected Member Functions

mb_mblock_sptr create_component (const std::string &instance_name, const std::string &class_name, pmt_t user_arg)
pmt_t schedule_one_shot_timeout (const mb_time &abs_time, pmt_t user_data, mb_msg_accepter_sptr accepter)
pmt_t schedule_periodic_timeout (const mb_time &first_abs_time, const mb_time &delta_time, pmt_t user_data, mb_msg_accepter_sptr accepter)
void cancel_timeout (pmt_t handle)


Detailed Description

Concrete runtime that uses a thread per mblock.

Member Typedef Documentation


Constructor & Destructor Documentation

mb_runtime_thread_per_block::mb_runtime_thread_per_block (  ) 

mb_runtime_thread_per_block::~mb_runtime_thread_per_block (  ) 


Member Function Documentation

void mb_runtime_thread_per_block::cancel_timeout ( pmt_t  handle  )  [protected, virtual]

Reimplemented from mb_runtime_base.

mb_mblock_sptr mb_runtime_thread_per_block::create_component ( const std::string &  instance_name,
const std::string &  class_name,
pmt_t  user_arg 
) [protected, virtual]

Implements mb_runtime_base.

void mb_runtime_thread_per_block::request_shutdown ( pmt_t  result  )  [virtual]

Reimplemented from mb_runtime_base.

bool mb_runtime_thread_per_block::run ( const std::string &  instance_name,
const std::string &  class_name,
pmt_t  user_arg,
pmt_t result 
) [virtual]

Construct and run the specified mblock hierarchy.

This routine turns into the m-block scheduler, and blocks until the system is shutdown.

Parameters:
instance_name name of the top-level mblock (conventionally "top")
class_name The class of the top-level mblock to create.
user_arg The argument to pass to the top-level mblock constructor
result The value passed to shutdown_all.
Returns:
true if the system ran successfully.

Implements mb_runtime.

pmt_t mb_runtime_thread_per_block::schedule_one_shot_timeout ( const mb_time abs_time,
pmt_t  user_data,
mb_msg_accepter_sptr  accepter 
) [protected, virtual]

Reimplemented from mb_runtime_base.

pmt_t mb_runtime_thread_per_block::schedule_periodic_timeout ( const mb_time first_abs_time,
const mb_time delta_time,
pmt_t  user_data,
mb_msg_accepter_sptr  accepter 
) [protected, virtual]

Reimplemented from mb_runtime_base.


Member Data Documentation


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

Generated on Wed Jul 29 06:31:20 2009 for GNU Radio 3.2.2 C++ API by  doxygen 1.5.9