summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/runtime/gr_block.h
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-02-07 13:49:58 -0500
committerTom Rondeau <trondeau@vt.edu>2013-02-07 17:34:34 -0500
commit308051abeb515b52c4fb906bdfb2622ac6183508 (patch)
tree69a667d5fb56e8965c432ed325eef03593e8985e /gnuradio-core/src/lib/runtime/gr_block.h
parent8585cd0d10ba82c9f4dd1c2b4397346c5a874d43 (diff)
sched: added ControlPort interface to setup and access perf counters.
Conflicts: gnuradio-core/src/lib/runtime/gr_block.h
Diffstat (limited to 'gnuradio-core/src/lib/runtime/gr_block.h')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index c9d2d8f530..96e07439ef 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -395,6 +395,24 @@ class GR_CORE_API gr_block : public gr_basic_block {
*/
float pc_work_time();
+ /*!
+ * \brief Sets up export of perf. counters to ControlPort. Only
+ * called by the scheduler.
+ */
+ void setup_pc_rpc();
+
+ /*!
+ * \brief Checks if this block is already exporting perf. counters
+ * to ControlPort.
+ */
+ bool is_pc_rpc_set() { return d_pc_rpc_set; }
+
+ /*!
+ * \brief If the block calls this in its constructor, it's
+ * perf. counters will not be exported.
+ */
+ void no_pc_rpc() { d_pc_rpc_set = true; }
+
// ----------------------------------------------------------------------------
// Functions to handle thread affinity
@@ -432,6 +450,7 @@ class GR_CORE_API gr_block : public gr_basic_block {
int d_max_noutput_items; // value of max_noutput_items for this block
tag_propagation_policy_t d_tag_propagation_policy; // policy for moving tags downstream
std::vector<unsigned int> d_affinity; // thread affinity proc. mask
+ bool d_pc_rpc_set;
protected:
gr_block (void){} //allows pure virtual interface sub-classes