diff options
-rw-r--r-- | docs/doxygen/swig_doc.py | 10 | ||||
-rw-r--r-- | docs/sphinx/gnuradio_sphinx.py | 16 | ||||
-rw-r--r-- | docs/sphinx/source/gr/index.rst | 1 | ||||
-rw-r--r-- | docs/sphinx/source/gr/misc.rst | 1 | ||||
-rw-r--r-- | gnuradio-runtime/lib/CMakeLists.txt | 6 | ||||
-rw-r--r-- | gnuradio-runtime/lib/gr_block_registry.cc | 30 | ||||
-rw-r--r-- | gnuradio-runtime/lib/pmt/CMakeLists.txt | 36 | ||||
-rw-r--r-- | gnuradio-runtime/swig/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-blocks/python/qa_file_metadata.py | 4 | ||||
-rw-r--r-- | gr-digital/include/digital/additive_scrambler_bb.h | 22 | ||||
-rw-r--r-- | gr-digital/include/digital/constellation_receiver_cb.h | 26 | ||||
-rw-r--r-- | gr-digital/include/digital/descrambler_bb.h | 6 | ||||
-rw-r--r-- | gr-digital/include/digital/kurtotic_equalizer_cc.h | 2 | ||||
-rw-r--r-- | gr-digital/include/digital/mpsk_receiver_cc.h | 14 |
14 files changed, 98 insertions, 77 deletions
diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index f24608b3ee..da104a2e00 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -218,14 +218,16 @@ def make_block2_entry(di, block): descriptions = [] # For new style blocks all the relevant documentation should be # associated with the 'make' method. + class_description = combine_descriptions(block) make_func = block.get_member('make', DoxyFunction) - description = combine_descriptions(make_func) + make_description = combine_descriptions(make_func) + description = class_description + "\n\nConstructor Specific Documentation:\n\n" + make_description # Associate the combined description with the class and # the make function. output = [] - #output.append(make_class_entry( - # block, description=description, - # ignored_methods=['make'], params=make_func.params)) + output.append(make_class_entry( + block, description=description, + ignored_methods=['make'], params=make_func.params)) makename = block.name() + '::make' output.append(make_func_entry( make_func, name=makename, description=description, diff --git a/docs/sphinx/gnuradio_sphinx.py b/docs/sphinx/gnuradio_sphinx.py index f1e16481ba..8b52ed3ba6 100644 --- a/docs/sphinx/gnuradio_sphinx.py +++ b/docs/sphinx/gnuradio_sphinx.py @@ -132,7 +132,21 @@ common_block_members =[ 'set_min_output_buffer', 'set_processor_affinity', 'symbol_name', - 'unset_processor_affinity', ] + 'unset_processor_affinity', + 'disconnect_all', + 'index', + 'length', + 'lock', + 'primitive_connect', + 'primitive_disconnect', + 'primitive_message_port_register_hier_in', + 'primitive_message_port_register_hier_out', + 'primitive_msg_connect', + 'primitive_msg_disconnect', + 'to_hier_block2', + 'type', + 'unlock', +] class OldBlockDocumenter(FunctionDocumenter): """ diff --git a/docs/sphinx/source/gr/index.rst b/docs/sphinx/source/gr/index.rst index 9ae25d38cf..cef9d560e2 100644 --- a/docs/sphinx/source/gr/index.rst +++ b/docs/sphinx/source/gr/index.rst @@ -26,7 +26,6 @@ Miscellaneous gnuradio.gr.feval_ll gnuradio.gr.feval gnuradio.gr.prefs - gnuradio.gr.test gnuradio.gr.message gnuradio.gr.msg_queue gnuradio.gr.enable_realtime_scheduling diff --git a/docs/sphinx/source/gr/misc.rst b/docs/sphinx/source/gr/misc.rst index b0a3f3ba10..013f3fc53d 100644 --- a/docs/sphinx/source/gr/misc.rst +++ b/docs/sphinx/source/gr/misc.rst @@ -6,7 +6,6 @@ gnuradio.gr: Miscellaneous .. autofunction:: gnuradio.gr.feval_ll .. autofunction:: gnuradio.gr.feval .. autofunction:: gnuradio.gr.prefs -.. autofunction:: gnuradio.gr.test .. autofunction:: gnuradio.gr.message .. autofunction:: gnuradio.gr.msg_queue .. autofunction:: gnuradio.gr.enable_realtime_scheduling diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt index ee80ed4d5b..fd4e169daf 100644 --- a/gnuradio-runtime/lib/CMakeLists.txt +++ b/gnuradio-runtime/lib/CMakeLists.txt @@ -60,8 +60,8 @@ include_directories(${GNURADIO_RUNTIME_INCLUDE_DIRS} ######################################################################## # Include subdirs rather to populate to the sources lists. ######################################################################## -GR_INCLUDE_SUBDIRECTORY(messages) GR_INCLUDE_SUBDIRECTORY(pmt) +GR_INCLUDE_SUBDIRECTORY(messages) GR_INCLUDE_SUBDIRECTORY(thread) ######################################################################## @@ -136,6 +136,7 @@ endif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)") list(APPEND gnuradio_runtime_libs volk + gnuradio-pmt ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES} ) @@ -269,13 +270,14 @@ list(APPEND test_gnuradio_runtime_sources qa_sincos.cc pmt/qa_pmt.cc pmt/qa_pmt_prims.cc + ${CMAKE_CURRENT_BINARY_DIR}/pmt/qa_pmt_unv.cc ) include_directories(${CPPUNIT_INCLUDE_DIRS}) link_directories(${CPPUNIT_LIBRARY_DIRS}) add_library(test-gnuradio-runtime SHARED ${test_gnuradio_runtime_sources}) -target_link_libraries(test-gnuradio-runtime gnuradio-runtime ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES}) +target_link_libraries(test-gnuradio-runtime gnuradio-runtime gnuradio-pmt ${CPPUNIT_LIBRARIES} ${Boost_LIBRARIES} ${LOG4CPP_LIBRARIES}) ######################################################################## # Build the test executable diff --git a/gnuradio-runtime/lib/gr_block_registry.cc b/gnuradio-runtime/lib/gr_block_registry.cc index eaa770dcaf..a80673691a 100644 --- a/gnuradio-runtime/lib/gr_block_registry.cc +++ b/gnuradio-runtime/lib/gr_block_registry.cc @@ -1,3 +1,25 @@ +/* -*- c++ -*- */ +/* + * Copyright 2012-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. + */ + #include <gr_basic_block.h> #include <gr_block_registry.h> #include <gr_tpb_detail.h> @@ -32,7 +54,7 @@ void gr_block_registry::block_unregister(gr_basic_block* block){ d_ref_map = pmt::dict_delete(d_ref_map, pmt::intern(block->symbol_name())); if(block->alias_set()){ d_ref_map = pmt::dict_delete(d_ref_map, pmt::intern(block->alias())); - } + } } std::string gr_block_registry::register_symbolic_name(gr_basic_block* block){ @@ -44,14 +66,14 @@ std::string gr_block_registry::register_symbolic_name(gr_basic_block* block){ } void gr_block_registry::register_symbolic_name(gr_basic_block* block, std::string name){ - if(dict_has_key(d_ref_map, pmt::intern(name))){ + if(pmt::dict_has_key(d_ref_map, pmt::intern(name))){ throw std::runtime_error("symbol already exists, can not re-use!"); } - d_ref_map = dict_add(d_ref_map, pmt::intern(name), pmt::make_any(block)); + d_ref_map = pmt::dict_add(d_ref_map, pmt::intern(name), pmt::make_any(block)); } gr_basic_block_sptr gr_block_registry::block_lookup(pmt::pmt_t symbol){ - pmt::pmt_t ref = dict_ref(d_ref_map, symbol, pmt::PMT_NIL); + pmt::pmt_t ref = pmt::dict_ref(d_ref_map, symbol, pmt::PMT_NIL); if(pmt::eq(ref, pmt::PMT_NIL)){ throw std::runtime_error("block lookup failed! block not found!"); } diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt index 3c1a2dec03..30a62ead7f 100644 --- a/gnuradio-runtime/lib/pmt/CMakeLists.txt +++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt @@ -72,21 +72,27 @@ add_custom_command( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) -list(APPEND gnuradio_runtime_sources - ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc - ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc +set(pmt_sources + ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt_io.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt_pool.cc + ${CMAKE_CURRENT_SOURCE_DIR}/pmt_serialize.cc +) + +list(APPEND gnuradio_pmt_libs + ${Boost_LIBRARIES} + ${LOG4CPP_LIBRARIES} +) + +add_library(gnuradio-pmt SHARED ${pmt_sources}) +target_link_libraries(gnuradio-pmt ${gnuradio_pmt_libs}) + +GR_LIBRARY_FOO(gnuradio-pmt RUNTIME_COMPONENT "runtime" DEVEL_COMPONENT "runtime_devel") + +add_dependencies(gnuradio-pmt + pmt_generated ) -if(ENABLE_TESTING) - list(APPEND test_gnuradio_runtime_sources - ${CMAKE_CURRENT_BINARY_DIR}/qa_pmt_unv.cc - ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt_prims.cc - ${CMAKE_CURRENT_SOURCE_DIR}/qa_pmt.cc - ) -endif(ENABLE_TESTING) +# Testing is handled in gnuradio-runtime tests one level down. -add_custom_target(pmt_generated - DEPENDS ${PMT_SERIAL_TAGS_H} ${CMAKE_CURRENT_BINARY_DIR}/pmt_unv_int.h) diff --git a/gnuradio-runtime/swig/CMakeLists.txt b/gnuradio-runtime/swig/CMakeLists.txt index 930f1fa2b0..3bff08383f 100644 --- a/gnuradio-runtime/swig/CMakeLists.txt +++ b/gnuradio-runtime/swig/CMakeLists.txt @@ -34,6 +34,7 @@ set(GR_SWIG_INCLUDE_DIRS link_directories(${Boost_LIBRARY_DIRS}) set(GR_SWIG_LIBRARIES + gnuradio-pmt gnuradio-runtime ${LOG4CPP_LIBRARIES} ) diff --git a/gr-blocks/python/qa_file_metadata.py b/gr-blocks/python/qa_file_metadata.py index 3112ea69b0..de571303f7 100644 --- a/gr-blocks/python/qa_file_metadata.py +++ b/gr-blocks/python/qa_file_metadata.py @@ -79,7 +79,7 @@ class test_file_metadata(gr_unittest.TestCase): info = parse_file_metadata.parse_header(header, False) extra_str = handle.read(info["extra_len"]) - self.assertGreater(len(extra_str), 0) + self.assertEquals(len(extra_str) > 0, True) handle.close() try: @@ -158,7 +158,7 @@ class test_file_metadata(gr_unittest.TestCase): info = parse_file_metadata.parse_header(header, False) extra_str = handle.read(info["extra_len"]) - self.assertGreater(len(extra_str), 0) + self.assertEquals(len(extra_str) > 0, True) handle.close() try: diff --git a/gr-digital/include/digital/additive_scrambler_bb.h b/gr-digital/include/digital/additive_scrambler_bb.h index c0ae70e7b1..bc4d4b36e9 100644 --- a/gr-digital/include/digital/additive_scrambler_bb.h +++ b/gr-digital/include/digital/additive_scrambler_bb.h @@ -32,10 +32,18 @@ namespace gr { /*! * \ingroup coding_blk * + * \brief + * Scramble an input stream using an LFSR. + * * \details - * Scramble an input stream using an LFSR. This block works on the - * LSB only of the input data stream, i.e., on an "unpacked - * binary" stream, and produces the same format on its output. + * This block works on the LSB only of the input data stream, + * i.e., on an "unpacked binary" stream, and produces the same + * format on its output. + * + * The scrambler works by XORing the incoming bit stream by the + * output of the LFSR. Optionally, after 'count' bits have been + * processed, the shift register is reset to the seed value. + * This allows processing fixed length vectors of samples. */ class DIGITAL_API additive_scrambler_bb : virtual public gr_sync_block { @@ -46,19 +54,11 @@ namespace gr { /*! * \brief Create additive scrambler. * - * Scramble an input stream using an LFSR. This block works on - * the LSB only of the input data stream, i.e., on an "unpacked - * binary" stream, and produces the same format on its output. - * * \param mask Polynomial mask for LFSR * \param seed Initial shift register contents * \param len Shift register length * \param count Number of bits after which shift register is reset, 0=never * - * The scrambler works by XORing the incoming bit stream by the - * output of the LFSR. Optionally, after 'count' bits have been - * processed, the shift register is reset to the seed value. - * This allows processing fixed length vectors of samples. */ static sptr make(int mask, int seed, int len, int count=0); diff --git a/gr-digital/include/digital/constellation_receiver_cb.h b/gr-digital/include/digital/constellation_receiver_cb.h index 0ade7fc217..31138974ef 100644 --- a/gr-digital/include/digital/constellation_receiver_cb.h +++ b/gr-digital/include/digital/constellation_receiver_cb.h @@ -31,36 +31,16 @@ namespace gr { namespace digital { /*! - * \brief This block takes care of receiving generic modulated signals - * through phase, frequency, and symbol synchronization. - * \ingroup modulators_blk + * \brief This block makes hard decisions about the received + * symbols (using a constellation object) and also fine tunes + * phase synchronization. * * \details - * This block takes care of receiving generic modulated signals - * through phase, frequency, and symbol synchronization. It - * performs carrier frequency and phase locking as well as symbol - * timing recovery. * * The phase and frequency synchronization are based on a Costas * loop that finds the error of the incoming signal point compared * to its nearest constellation point. The frequency and phase of * the NCO are updated according to this error. - * - * The symbol synchronization is done using a modified Mueller and - * Muller circuit from the paper: - * - * "G. R. Danesfahani, T.G. Jeans, "Optimisation of modified - * Mueller and Muller algorithm," Electronics Letters, Vol. 31, - * no. 13, 22 June 1995, pp. 1032 - 1033." - * - * This circuit interpolates the downconverted sample (using the - * NCO developed by the Costas loop) every mu samples, then it - * finds the sampling error based on this and the past symbols and - * the decision made on the samples. Like the phase error - * detector, there are optimized decision algorithms for BPSK and - * QPKS, but 8PSK uses another brute force computation against all - * possible symbols. The modifications to the M&M used here reduce - * self-noise. */ class DIGITAL_API constellation_receiver_cb : virtual public gr_block diff --git a/gr-digital/include/digital/descrambler_bb.h b/gr-digital/include/digital/descrambler_bb.h index da8a3b0e88..9fa1d68425 100644 --- a/gr-digital/include/digital/descrambler_bb.h +++ b/gr-digital/include/digital/descrambler_bb.h @@ -45,10 +45,8 @@ namespace gr { typedef boost::shared_ptr<descrambler_bb> sptr; /*! - * Descramble an input stream using an LFSR. This block works on - * the LSB only of the input data stream, i.e., on an "unpacked - * binary" stream, and produces the same format on its output. - * + * \brief Make a descrambler block. + * * \param mask Polynomial mask for LFSR * \param seed Initial shift register contents * \param len Shift register length diff --git a/gr-digital/include/digital/kurtotic_equalizer_cc.h b/gr-digital/include/digital/kurtotic_equalizer_cc.h index d32533b76e..be8c5f5cc2 100644 --- a/gr-digital/include/digital/kurtotic_equalizer_cc.h +++ b/gr-digital/include/digital/kurtotic_equalizer_cc.h @@ -34,7 +34,7 @@ namespace gr { * \ingroup equalizers_blk * * \details - * WARNING: This block does not yet work. + * Warning: This block does not yet work. * * "Y. Guo, J. Zhao, Y. Sun, "Sign kurtosis maximization based blind * equalization algorithm," IEEE Conf. on Control, Automation, diff --git a/gr-digital/include/digital/mpsk_receiver_cc.h b/gr-digital/include/digital/mpsk_receiver_cc.h index 9470cd8376..68874d178e 100644 --- a/gr-digital/include/digital/mpsk_receiver_cc.h +++ b/gr-digital/include/digital/mpsk_receiver_cc.h @@ -35,12 +35,10 @@ namespace gr { * \ingroup synchronizers_blk * * \details - * This block takes care of receiving M-PSK modulated signals - * through phase, frequency, and symbol synchronization. It - * performs carrier frequency and phase locking as well as symbol - * timing recovery. It works with (D)BPSK, (D)QPSK, and (D)8PSK - * as tested currently. It should also work for OQPSK and PI/4 - * DQPSK. + * It performs carrier frequency and phase locking as well as + * symbol timing recovery. It works with (D)BPSK, (D)QPSK, and + * (D)8PSK as tested currently. It should also work for OQPSK and + * PI/4 DQPSK. * * The phase and frequency synchronization are based on a Costas * loop that finds the error of the incoming signal point compared @@ -74,9 +72,9 @@ namespace gr { typedef boost::shared_ptr<mpsk_receiver_cc> sptr; /*! - * \brief Buil M-PSK receiver block. + * \brief Make a M-PSK receiver block. * - * \param M modulation order of the M-PSK modulation + * \param M modulation order of the M-PSK modulation * \param theta any constant phase rotation from the real axis of the constellation * \param loop_bw Loop bandwidth to set gains of phase/freq tracking loop * \param fmin minimum normalized frequency value the loop can achieve |