summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2013-11-01 17:57:39 -0400
committerTom Rondeau <tom@trondeau.com>2013-11-01 17:57:39 -0400
commit9c1e8f1c6579d22e17f9f194dcff5d2af32192be (patch)
tree32bae065aba21f6563caff29fc86f87a1d8412d0 /gnuradio-runtime/lib
parentc3f9b78534477a292a3bd5887fbd282c76a38430 (diff)
runtime: changed name from set_group_delay to declare_sample_delay.
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r--gnuradio-runtime/lib/block.cc18
-rw-r--r--gnuradio-runtime/lib/buffer.cc20
-rw-r--r--gnuradio-runtime/lib/flat_flowgraph.cc2
3 files changed, 20 insertions, 20 deletions
diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc
index af963c9977..442f8dde77 100644
--- a/gnuradio-runtime/lib/block.cc
+++ b/gnuradio-runtime/lib/block.cc
@@ -44,7 +44,7 @@ namespace gr {
d_is_unaligned(false),
d_relative_rate (1.0),
d_history(1),
- d_group_delay(0),
+ d_attr_delay(0),
d_fixed_rate(false),
d_max_noutput_items_set(false),
d_max_noutput_items(0),
@@ -123,30 +123,30 @@ namespace gr {
}
void
- block::set_group_delay(unsigned delay)
+ block::declare_sample_delay(unsigned delay)
{
- d_group_delay = delay;
+ d_attr_delay = delay;
if(d_detail) {
unsigned int nins = static_cast<unsigned int>(d_detail->ninputs());
for(unsigned int n = 0; n < nins; n++) {
- d_detail->input(n)->set_group_delay(d_group_delay);
+ d_detail->input(n)->declare_sample_delay(d_attr_delay);
}
}
}
void
- block::set_group_delay(int which, unsigned delay)
+ block::declare_sample_delay(int which, unsigned delay)
{
- d_group_delay = delay;
+ d_attr_delay = delay;
if(d_detail) {
- d_detail->input(which)->set_group_delay(d_group_delay);
+ d_detail->input(which)->declare_sample_delay(d_attr_delay);
}
}
unsigned
- block::group_delay(int which) const
+ block::sample_delay(int which) const
{
- return d_group_delay;
+ return d_attr_delay;
}
// stub implementation: 1:1
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc
index b5cc19c35b..afa3efac34 100644
--- a/gnuradio-runtime/lib/buffer.cc
+++ b/gnuradio-runtime/lib/buffer.cc
@@ -203,7 +203,7 @@ namespace gr {
buf->index_sub(buf->d_write_index,
nzero_preload),
link));
- r->set_group_delay(delay);
+ r->declare_sample_delay(delay);
buf->d_readers.push_back(r.get ());
return r;
@@ -262,7 +262,7 @@ namespace gr {
// therefore lose little time this way.
while(itr != d_item_tags.end()) {
item_time = (*itr).offset;
- if(item_time+d_max_reader_delay < max_time) {
+ if(item_time+d_max_reader_delay + bufsize() < max_time) {
d_item_tags.erase(itr);
itr = d_item_tags.begin();
}
@@ -282,7 +282,7 @@ namespace gr {
buffer_reader::buffer_reader(buffer_sptr buffer, unsigned int read_index,
block_sptr link)
: d_buffer(buffer), d_read_index(read_index), d_abs_read_offset(0), d_link(link),
- d_group_delay(0)
+ d_attr_delay(0)
{
s_buffer_reader_count++;
@@ -296,17 +296,17 @@ namespace gr {
}
void
- buffer_reader::set_group_delay(unsigned delay)
+ buffer_reader::declare_sample_delay(unsigned delay)
{
- d_group_delay = delay;
- d_buffer->d_max_reader_delay = std::max(d_group_delay,
+ d_attr_delay = delay;
+ d_buffer->d_max_reader_delay = std::max(d_attr_delay,
d_buffer->d_max_reader_delay);
}
unsigned
- buffer_reader::group_delay() const
+ buffer_reader::sample_delay() const
{
- return d_group_delay;
+ return d_attr_delay;
}
int
@@ -342,7 +342,7 @@ namespace gr {
uint64_t item_time;
while(itr != d_buffer->get_tags_end()) {
- item_time = (*itr).offset + d_group_delay;
+ item_time = (*itr).offset + d_attr_delay;
if((item_time >= abs_start) && (item_time < abs_end)) {
std::vector<long>::iterator id_itr;
@@ -351,7 +351,7 @@ namespace gr {
// If id is not in the vector of marked blocks
if(id_itr == itr->marked_deleted.end()) {
tag_t t = *itr;
- t.offset += d_group_delay;
+ t.offset += d_attr_delay;
v.push_back(t);
v.back().marked_deleted.clear();
}
diff --git a/gnuradio-runtime/lib/flat_flowgraph.cc b/gnuradio-runtime/lib/flat_flowgraph.cc
index 52fdfba621..9e5964cb7d 100644
--- a/gnuradio-runtime/lib/flat_flowgraph.cc
+++ b/gnuradio-runtime/lib/flat_flowgraph.cc
@@ -200,7 +200,7 @@ namespace gr {
std::cout << "Setting input " << dst_port << " from edge " << (*e) << std::endl;
detail->set_input(dst_port, buffer_add_reader(src_buffer, grblock->history()-1, grblock,
- grblock->group_delay(src_port)));
+ grblock->sample_delay(src_port)));
}
}