summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorTom Rondeau2010-11-28 19:15:27 -0500
committerTom Rondeau2010-11-28 19:15:27 -0500
commit4649aa471222351e8586b90e98bb947325d340b6 (patch)
tree107785d3e4c4a8fba938112b94e5329d6c834954 /gnuradio-core/src/lib
parent7d14fec5653b7aa92de8ef9ba76f02b7181ee928 (diff)
downloadgnuradio-4649aa471222351e8586b90e98bb947325d340b6.tar.gz
gnuradio-4649aa471222351e8586b90e98bb947325d340b6.tar.bz2
gnuradio-4649aa471222351e8586b90e98bb947325d340b6.zip
Changing propagation policy enum type name and making a few other minor edits.
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.cc4
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.h8
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block_executor.cc12
3 files changed, 12 insertions, 12 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.cc b/gnuradio-core/src/lib/runtime/gr_block.cc
index 52be37e3b..81a55af9d 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block.cc
@@ -169,14 +169,14 @@ gr_block::get_tags_in_range(std::vector<pmt::pmt_t> &v,
d_detail->get_tags_in_range(v, which_output, start, end, key);
}
-gr_block::TAG_PROPAGATION_POLICY
+gr_block::tag_propagation_policy_t
gr_block::tag_propagation_policy()
{
return d_tag_propagation_policy;
}
void
-gr_block::set_tag_propagation_policy(TAG_PROPAGATION_POLICY p)
+gr_block::set_tag_propagation_policy(tag_propagation_policy_t p)
{
d_tag_propagation_policy = p;
}
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index 36eed3d10..ad7fa9555 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -63,7 +63,7 @@ class gr_block : public gr_basic_block {
WORK_DONE = -1
};
- enum TAG_PROPAGATION_POLICY {
+ enum tag_propagation_policy_t {
TPP_DONT = 0,
TPP_ALL_TO_ALL = 1,
TPP_ONE_TO_ONE = 2
@@ -217,12 +217,12 @@ class gr_block : public gr_basic_block {
/*!
* \brief Asks for the policy used by the scheduler to moved tags downstream.
*/
- TAG_PROPAGATION_POLICY tag_propagation_policy();
+ tag_propagation_policy_t tag_propagation_policy();
/*!
* \brief Set the policy by the scheduler to determine how tags are moved downstream.
*/
- void set_tag_propagation_policy(TAG_PROPAGATION_POLICY p);
+ void set_tag_propagation_policy(tag_propagation_policy_t p);
// ----------------------------------------------------------------------------
@@ -233,7 +233,7 @@ class gr_block : public gr_basic_block {
gr_block_detail_sptr d_detail; // implementation details
unsigned d_history;
bool d_fixed_rate;
- TAG_PROPAGATION_POLICY d_tag_propagation_policy; // policy for moving tags downstream
+ tag_propagation_policy_t d_tag_propagation_policy; // policy for moving tags downstream
protected:
diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.cc b/gnuradio-core/src/lib/runtime/gr_block_executor.cc
index 59799069a..4a35e25d5 100644
--- a/gnuradio-core/src/lib/runtime/gr_block_executor.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block_executor.cc
@@ -1,6 +1,6 @@
/* -*- c++ -*- */
/*
- * Copyright 2004,2008,2009 Free Software Foundation, Inc.
+ * Copyright 2004,2008,2009,2010 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
@@ -88,7 +88,7 @@ min_available_space (gr_block_detail *d, int output_multiple)
}
static bool
-propagate_tags(gr_block::TAG_PROPAGATION_POLICY policy, gr_block_detail *d,
+propagate_tags(gr_block::tag_propagation_policy_t policy, gr_block_detail *d,
const std::vector<uint64_t> &start_nitems_read, double rrate,
std::vector<pmt::pmt_t> &rtags)
{
@@ -100,10 +100,10 @@ propagate_tags(gr_block::TAG_PROPAGATION_POLICY policy, gr_block_detail *d,
}
switch(policy) {
- case(gr_block::TPP_DONT):
+ case gr_block::TPP_DONT:
return true;
break;
- case(gr_block::TPP_ALL_TO_ALL):
+ case gr_block::TPP_ALL_TO_ALL:
// every tag on every input propogates to everyone downstream
for(int i = 0; i < d->ninputs(); i++) {
d->get_tags_in_range(rtags, i, start_nitems_read[i],
@@ -122,7 +122,7 @@ propagate_tags(gr_block::TAG_PROPAGATION_POLICY policy, gr_block_detail *d,
}
}
break;
- case(gr_block::TPP_ONE_TO_ONE):
+ case gr_block::TPP_ONE_TO_ONE:
// tags from input i only go to output i
// this requires d->ninputs() == d->noutputs; this is checked when this
// type of tag-propagation system is selected in gr_block_detail
@@ -362,7 +362,7 @@ gr_block_executor::run_one_iteration()
for (int i = 0; i < d->noutputs (); i++)
d_output_items[i] = d->output(i)->write_pointer();
- // determine where to start looking for new tags as 1 past nitems read
+ // determine where to start looking for new tags
for (int i = 0; i < d->ninputs(); i++)
d_start_nitems_read[i] = d->nitems_read(i);