summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--docs/sphinx/gnuradio_sphinx.py27
-rw-r--r--docs/sphinx/source/index.rst13
-rw-r--r--docs/sphinx/source/uhd.rst18
-rwxr-xr-xgnuradio-core/src/examples/mp-sched/affinity_set.py5
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.h6
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.i4
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block_detail.cc2
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block_detail.h4
-rw-r--r--gnuradio-core/src/lib/runtime/qa_gr_top_block.cc2
-rw-r--r--gnuradio-core/src/lib/runtime/runtime.i2
-rw-r--r--gnuradio-core/src/lib/swig/gnuradio.i1
-rw-r--r--gnuradio-core/src/python/gnuradio/gr/qa_affinity.py49
-rw-r--r--gr-blocks/grc/blocks_complex_to_real.xml8
-rw-r--r--gr-utils/src/python/modtool/templates.py4
-rw-r--r--gr-wxgui/src/python/fftsink_nongl.py17
-rw-r--r--grc/python/Port.py1
-rw-r--r--gruel/src/include/gruel/thread.h6
-rw-r--r--gruel/src/lib/thread.cc40
-rw-r--r--volk/apps/CMakeLists.txt2
20 files changed, 161 insertions, 54 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b81d76ce8..16e4ef378 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,8 +41,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
# Set the version information here
set(VERSION_INFO_MAJOR_VERSION 3)
set(VERSION_INFO_API_COMPAT 6)
-set(VERSION_INFO_MINOR_VERSION 5)
-set(VERSION_INFO_MAINT_VERSION git)
+set(VERSION_INFO_MINOR_VERSION 4)
+set(VERSION_INFO_MAINT_VERSION 1)
include(GrVersion) #setup version info
# Append -O2 optimization flag for Debug builds
diff --git a/docs/sphinx/gnuradio_sphinx.py b/docs/sphinx/gnuradio_sphinx.py
index e8ca867f8..06a3150c4 100644
--- a/docs/sphinx/gnuradio_sphinx.py
+++ b/docs/sphinx/gnuradio_sphinx.py
@@ -107,7 +107,32 @@ common_block_members =[
'to_basic_block',
'unique_id',
'make',
- ]
+ 'alias',
+ 'is_set_max_noutput_items',
+ 'max_noutput_items',
+ 'max_output_buffer',
+ 'message_ports_in',
+ 'message_ports_out',
+ 'min_output_buffer',
+ 'pc_input_buffers_full',
+ 'pc_input_buffers_full_var',
+ 'pc_noutput_items',
+ 'pc_noutput_items_var',
+ 'pc_nproduced',
+ 'pc_nproduced_var',
+ 'pc_output_buffers_full',
+ 'pc_output_buffers_full_var',
+ 'pc_work_time',
+ 'pc_work_time_var',
+ 'processor_affinity',
+ 'set_block_alias',
+ 'set_max_noutput_items',
+ 'unset_max_noutput_items',
+ 'set_max_output_buffer',
+ 'set_min_output_buffer',
+ 'set_processor_affinity',
+ 'symbol_name',
+ 'unset_processor_affinity', ]
class OldBlockDocumenter(FunctionDocumenter):
"""
diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst
index 38d859aaf..eafebc8d0 100644
--- a/docs/sphinx/source/index.rst
+++ b/docs/sphinx/source/index.rst
@@ -38,6 +38,19 @@ Core Framework
gnuradio.qtgui <qtgui/index>
gnuradio.wxgui <wxgui/index>
+Hardware Interfaces
+------------------
+
+.. autosummary::
+ :nosignatures:
+
+ gnuradio.uhd
+
+.. toctree::
+ :hidden:
+
+ gnuradio.uhd <uhd>
+
Utilities
---------
diff --git a/docs/sphinx/source/uhd.rst b/docs/sphinx/source/uhd.rst
new file mode 100644
index 000000000..d9ecf3a51
--- /dev/null
+++ b/docs/sphinx/source/uhd.rst
@@ -0,0 +1,18 @@
+gnuradio.uhd
+============
+
+.. automodule:: gnuradio.uhd
+
+.. autooldblock:: gnuradio.uhd.usrp_sink
+.. autooldblock:: gnuradio.uhd.usrp_source
+.. autooldblock:: gnuradio.uhd.amsg_source
+.. autoclass:: gnuradio.uhd.stream_cmd_t
+.. autoclass:: gnuradio.uhd.time_spec_t
+.. autoclass:: gnuradio.uhd.meta_range_t
+.. autoclass:: gnuradio.uhd.stream_args_t
+.. autoclass:: gnuradio.uhd.device_addr_t
+.. autoclass:: gnuradio.uhd.tune_request_t
+.. autoclass:: gnuradio.uhd.tune_result_t
+.. autoclass:: gnuradio.uhd.sensor_value_t
+
+
diff --git a/gnuradio-core/src/examples/mp-sched/affinity_set.py b/gnuradio-core/src/examples/mp-sched/affinity_set.py
index 6db632e0f..65e929051 100755
--- a/gnuradio-core/src/examples/mp-sched/affinity_set.py
+++ b/gnuradio-core/src/examples/mp-sched/affinity_set.py
@@ -42,9 +42,6 @@ class affinity_set(gr.top_block):
self.connect((self.gr_filt_0, 0), (self.gr_filt_1, 0))
self.connect((self.gr_filt_1, 0), (self.gr_null_sink_0, 0))
-
- # QT sink close method reimplementation
-
def get_samp_rate(self):
return self.samp_rate
@@ -58,7 +55,7 @@ if __name__ == '__main__':
tb.start()
while(1):
- ret = raw_input('Press Enter to quit: ')
+ ret = raw_input('Enter a new Core # or Press Enter to quit: ')
if(len(ret) == 0):
tb.stop()
sys.exit(0)
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index 6919b204e..c3898a5c0 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -328,14 +328,14 @@ struct GR_CORE_API gr_block : gras::Block
// ----------------------------------------------------------------------------
// Functions to handle thread affinity
- std::vector<unsigned int> d_affinity; // thread affinity proc. mask
+ std::vector<int> d_affinity; // thread affinity proc. mask
/*!
* \brief Set the thread's affinity to processor core \p n.
*
* \param mask a vector of unsigned ints of the core numbers available to this block.
*/
- void set_processor_affinity(const std::vector<unsigned int> &mask){d_affinity=mask;}
+ void set_processor_affinity(const std::vector<int> &mask){d_affinity=mask;}
/*!
* \brief Remove processor affinity to a specific core.
@@ -345,7 +345,7 @@ struct GR_CORE_API gr_block : gras::Block
/*!
* \brief Get the current processor affinity.
*/
- std::vector<unsigned int> processor_affinity() { return d_affinity; }
+ std::vector<int> processor_affinity() { return d_affinity; }
///////////////// private vars //////////////////////
diff --git a/gnuradio-core/src/lib/runtime/gr_block.i b/gnuradio-core/src/lib/runtime/gr_block.i
index a80f64d02..a53489f9a 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.i
+++ b/gnuradio-core/src/lib/runtime/gr_block.i
@@ -83,9 +83,9 @@ class gr_block : public gr_basic_block {
float pc_work_time_var();
// Methods to manage processor affinity.
- void set_processor_affinity(const gr_vector_uint &mask);
+ void set_processor_affinity(const std::vector<int> &mask);
void unset_processor_affinity();
- gr_vector_uint processor_affinity();
+ std::vector<int> processor_affinity();
// internal use
gr_block_detail_sptr detail () const { return d_detail; }
diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc
index 82081039a..af80e61cf 100644
--- a/gnuradio-core/src/lib/runtime/gr_block_detail.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block_detail.cc
@@ -215,7 +215,7 @@ gr_block_detail::get_tags_in_range(std::vector<gr_tag_t> &v,
}
void
-gr_block_detail::set_processor_affinity(const std::vector<unsigned int> &mask)
+gr_block_detail::set_processor_affinity(const std::vector<int> &mask)
{
if(threaded) {
try {
diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.h b/gnuradio-core/src/lib/runtime/gr_block_detail.h
index 32a01e763..15d85135a 100644
--- a/gnuradio-core/src/lib/runtime/gr_block_detail.h
+++ b/gnuradio-core/src/lib/runtime/gr_block_detail.h
@@ -159,9 +159,9 @@ class GR_CORE_API gr_block_detail {
/*!
* \brief Set core affinity of block to the cores in the vector mask.
*
- * \param mask a vector of unsigned ints of the core numbers available to this block.
+ * \param mask a vector of ints of the core numbers available to this block.
*/
- void set_processor_affinity(const std::vector<unsigned int> &mask);
+ void set_processor_affinity(const std::vector<int> &mask);
/*!
* \brief Unset core affinity.
diff --git a/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc b/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc
index 1d3dafadf..6bbc9ceb8 100644
--- a/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc
+++ b/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc
@@ -269,7 +269,7 @@ void qa_gr_top_block::t11_set_block_affinity()
gr_block_sptr src (gr_make_null_source(sizeof(float)));
gr_block_sptr snk (gr_make_null_sink(sizeof(float)));
- std::vector<unsigned int> set(1, 0), ret;
+ std::vector<int> set(1, 0), ret;
src->set_processor_affinity(set);
tb->connect(src, 0, snk, 0);
diff --git a/gnuradio-core/src/lib/runtime/runtime.i b/gnuradio-core/src/lib/runtime/runtime.i
index 935b43742..2da3f40a4 100644
--- a/gnuradio-core/src/lib/runtime/runtime.i
+++ b/gnuradio-core/src/lib/runtime/runtime.i
@@ -67,7 +67,7 @@
//the bare minimum block inheritance interface to make things work but keep swig cxx file size down
%include <gras/gras.hpp>
-%include <gras/element.hpp>
+%import <gras/element.i>
namespace gras
{
struct Block : gras::Element{};
diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i
index 3a421ad5d..0f02554c9 100644
--- a/gnuradio-core/src/lib/swig/gnuradio.i
+++ b/gnuradio-core/src/lib/swig/gnuradio.i
@@ -44,6 +44,7 @@
// local file
%include <gr_shared_ptr.i>
+%include <gr_types.h>
%include <std_complex.i>
%include <std_vector.i>
%include <stl.i>
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_affinity.py b/gnuradio-core/src/python/gnuradio/gr/qa_affinity.py
new file mode 100644
index 000000000..7b3ca6ed6
--- /dev/null
+++ b/gnuradio-core/src/python/gnuradio/gr/qa_affinity.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+from gnuradio import gr, gr_unittest
+
+class test_affinity(gr_unittest.TestCase):
+
+ def setUp(self):
+ self.tb = gr.top_block()
+
+ def tearDown(self):
+ self.tb = None
+
+ def test_000(self):
+ # Just run some data through and make sure it doesn't puke.
+ src_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+
+ src = gr.vector_source_f(src_data)
+ snk = gr.vector_sink_f()
+
+ src.set_processor_affinity([0,])
+ self.tb.connect(src, snk)
+ self.tb.run()
+
+ a = src.processor_affinity()
+
+ self.assertEqual((0,), a)
+
+if __name__ == '__main__':
+ gr_unittest.run(test_affinity, "test_affinity.xml")
diff --git a/gr-blocks/grc/blocks_complex_to_real.xml b/gr-blocks/grc/blocks_complex_to_real.xml
index 0fe77dc1c..6737f1da3 100644
--- a/gr-blocks/grc/blocks_complex_to_real.xml
+++ b/gr-blocks/grc/blocks_complex_to_real.xml
@@ -24,13 +24,7 @@
</sink>
<source>
<name>re</name>
- <type>real</type>
+ <type>float</type>
<vlen>$vlen</vlen>
</source>
- <source>
- <name>im</name>
- <type>real</type>
- <vlen>$vlen</vlen>
- <optional>1</optional>
- </source>
</block>
diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py
index 87eb9f470..58617336e 100644
--- a/gr-utils/src/python/modtool/templates.py
+++ b/gr-utils/src/python/modtool/templates.py
@@ -473,7 +473,7 @@ Templates['grc_xml'] = '''<?xml version="1.0"?>
* optional (set to 1 for optional inputs) -->
<sink>
<name>in</name>
- <type><!-- e.g. int, real, complex, byte, short, xxx_vector, ...--></type>
+ <type><!-- e.g. int, float, complex, byte, short, xxx_vector, ...--></type>
</sink>
<!-- Make one 'source' node per output. Sub-nodes:
@@ -483,7 +483,7 @@ Templates['grc_xml'] = '''<?xml version="1.0"?>
* optional (set to 1 for optional inputs) -->
<source>
<name>out</name>
- <type><!-- e.g. int, real, complex, byte, short, xxx_vector, ...--></type>
+ <type><!-- e.g. int, float, complex, byte, short, xxx_vector, ...--></type>
</source>
</block>
'''
diff --git a/gr-wxgui/src/python/fftsink_nongl.py b/gr-wxgui/src/python/fftsink_nongl.py
index c756d8a3b..c38abbb22 100644
--- a/gr-wxgui/src/python/fftsink_nongl.py
+++ b/gr-wxgui/src/python/fftsink_nongl.py
@@ -132,7 +132,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
# FIXME We need to add 3dB to all bins but the DC bin
self.log = gr.nlog10_ff(20, self.fft_size,
- -10*math.log10(self.fft_size) # Adjust for number of bins
+ -20*math.log10(self.fft_size) # Adjust for number of bins
-10*math.log10(power/self.fft_size) # Adjust for windowing loss
-20*math.log10(ref_scale/2)) # Adjust for reference scale
@@ -177,7 +177,7 @@ class fft_sink_c(gr.hier_block2, fft_sink_base):
# FIXME We need to add 3dB to all bins but the DC bin
self.log = gr.nlog10_ff(20, self.fft_size,
- -10*math.log10(self.fft_size) # Adjust for number of bins
+ -20*math.log10(self.fft_size) # Adjust for number of bins
-10*math.log10(power/self.fft_size) # Adjust for windowing loss
-20*math.log10(ref_scale/2)) # Adjust for reference scale
@@ -606,6 +606,8 @@ class test_app_block (stdgui2.std_top_block):
# Generate a complex sinusoid
#src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
+ noise1 = analog.noise_source_c(analog.GR_UNIFORM, 1.0/10)
+ add1 = blocks.add_cc()
# We add these throttle blocks so that this demo doesn't
# suck down all the CPU available. Normally you wouldn't use these.
@@ -616,17 +618,24 @@ class test_app_block (stdgui2.std_top_block):
ref_level=0, y_per_div=20, y_divs=10)
vbox.Add (sink1.win, 1, wx.EXPAND)
- self.connect(src1, thr1, sink1)
+ self.connect(src1, (add1,0))
+ self.connect(noise1, (add1,1))
+ self.connect(add1, thr1, sink1)
#src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
+ noise2 = analog.noise_source_f(analog.GR_UNIFORM, 1.0/10)
+ add2 = blocks.add_ff()
+
thr2 = gr.throttle(gr.sizeof_float, input_rate)
sink2 = fft_sink_f (panel, title="Real Data", fft_size=fft_size*2,
sample_rate=input_rate, baseband_freq=100e3,
ref_level=0, y_per_div=20, y_divs=10)
vbox.Add (sink2.win, 1, wx.EXPAND)
- self.connect(src2, thr2, sink2)
+ self.connect(src2, (add2,0))
+ self.connect(noise2, (add2,1))
+ self.connect(add2, thr2, sink2)
def main ():
app = stdgui2.stdapp (test_app_block, "FFT Sink Test App")
diff --git a/grc/python/Port.py b/grc/python/Port.py
index 4c0175f90..8cc9e9ad0 100644
--- a/grc/python/Port.py
+++ b/grc/python/Port.py
@@ -90,6 +90,7 @@ class Port(_Port, _GUIPort):
"""
self._n = n
if n['type'] == 'msg': n['key'] = 'msg'
+ if n['type'] == 'message': n['key'] = n['name']
if dir == 'source' and not n.find('key'):
n['key'] = str(block._source_count)
block._source_count += 1
diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h
index 60832675c..10c6c38cc 100644
--- a/gruel/src/include/gruel/thread.h
+++ b/gruel/src/include/gruel/thread.h
@@ -75,7 +75,7 @@ namespace gruel {
* support in this way since 10.5 is not what we want or can use in
* this fashion).
*/
- GRUEL_API void thread_bind_to_processor(const std::vector<unsigned int> &mask);
+ GRUEL_API void thread_bind_to_processor(const std::vector<int> &mask);
/*! \brief Convineince function to bind the current thread to a single core.
*
@@ -87,7 +87,7 @@ namespace gruel {
* support in this way since 10.5 is not what we want or can use in
* this fashion).
*/
- GRUEL_API void thread_bind_to_processor(unsigned int n);
+ GRUEL_API void thread_bind_to_processor(int n);
/*! \brief Bind a thread to a set of cores.
*
@@ -101,7 +101,7 @@ namespace gruel {
* support in this way since 10.5 is not what we want or can use in
* this fashion).
*/
- GRUEL_API void thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask);
+ GRUEL_API void thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask);
/*! \brief Convineince function to bind the a thread to a single core.
diff --git a/gruel/src/lib/thread.cc b/gruel/src/lib/thread.cc
index 8ebe822fb..a5116b687 100644
--- a/gruel/src/lib/thread.cc
+++ b/gruel/src/lib/thread.cc
@@ -38,33 +38,33 @@ namespace gruel {
}
void
- thread_bind_to_processor(unsigned int n)
+ thread_bind_to_processor(int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(const std::vector<int> &mask)
{
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, unsigned int n)
+ thread_bind_to_processor(gr_thread_t thread, int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(thread, mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
{
//DWORD_PTR mask = (1 << n);
DWORD_PTR dword_mask = 0;
- std::vector<unsigned int> _mask = mask;
- std::vector<unsigned int>::iterator itr;
+ std::vector<int> _mask = mask;
+ std::vector<int>::iterator itr;
for(itr = _mask.begin(); itr != _mask.end(); itr++)
dword_mask |= (1 << (*itr));
@@ -106,25 +106,25 @@ namespace gruel {
}
void
- thread_bind_to_processor(unsigned int n)
+ thread_bind_to_processor(int n)
{
// Not implemented on OSX
}
void
- thread_bind_to_processor(gr_thread_t thread, unsigned int n)
+ thread_bind_to_processor(gr_thread_t thread, int n)
{
// Not implemented on OSX
}
void
- thread_bind_to_processor(const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(const std::vector<int> &mask)
{
// Not implemented on OSX
}
void
- thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
{
// Not implemented on OSX
}
@@ -157,32 +157,32 @@ namespace gruel {
}
void
- thread_bind_to_processor(unsigned int n)
+ thread_bind_to_processor(int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(const std::vector<int> &mask)
{
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, unsigned int n)
+ thread_bind_to_processor(gr_thread_t thread, int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(thread, mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
{
cpu_set_t set;
size_t len = sizeof(cpu_set_t);
- std::vector<unsigned int> _mask = mask;
- std::vector<unsigned int>::iterator itr;
+ std::vector<int> _mask = mask;
+ std::vector<int>::iterator itr;
CPU_ZERO(&set);
for(itr = _mask.begin(); itr != _mask.end(); itr++)
diff --git a/volk/apps/CMakeLists.txt b/volk/apps/CMakeLists.txt
index d8084a653..f847dd624 100644
--- a/volk/apps/CMakeLists.txt
+++ b/volk/apps/CMakeLists.txt
@@ -1,5 +1,5 @@
#
-# Copyright 2011-2012 Free Software Foundation, Inc.
+# Copyright 2011-2013 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by