diff options
author | Piotr Krysik <ptrkrysik@gmail.com> | 2016-07-18 10:23:24 +0200 |
---|---|---|
committer | Piotr Krysik <ptrkrysik@gmail.com> | 2016-07-18 10:23:24 +0200 |
commit | 74c4ca96278537a4d891130f00ea0d0a7a59bdb9 (patch) | |
tree | 2436f6336d64729a75a915452bf1640b228d1848 | |
parent | 58a4c4d4c0f4691ae09f6a2d4e97b8158137ab79 (diff) |
Removed blocks related to old frequency correction loop (controlled const source and old clock offset corrector)
-rw-r--r-- | grc/gsm_block_tree.xml | 2 | ||||
-rw-r--r-- | grc/misc_utils/CMakeLists.txt | 2 | ||||
-rw-r--r-- | grc/misc_utils/gsm_clock_offset_corrector.xml | 47 | ||||
-rw-r--r-- | grc/misc_utils/gsm_controlled_const_source_f.xml | 26 | ||||
-rw-r--r-- | hier_blocks/misc_utils/gsm_clock_offset_corrector.grc | 797 | ||||
-rw-r--r-- | include/grgsm/CMakeLists.txt | 4 | ||||
-rw-r--r-- | include/grgsm/misc_utils/CMakeLists.txt | 5 | ||||
-rw-r--r-- | include/grgsm/misc_utils/controlled_const_source_f.h | 58 | ||||
-rw-r--r-- | lib/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lib/misc_utils/controlled_const_source_f_impl.cc | 86 | ||||
-rw-r--r-- | lib/misc_utils/controlled_const_source_f_impl.h | 53 | ||||
-rw-r--r-- | python/CMakeLists.txt | 1 | ||||
-rw-r--r-- | python/__init__.py | 1 | ||||
-rw-r--r-- | python/misc_utils/clock_offset_corrector.py | 80 | ||||
-rw-r--r-- | swig/grgsm_swig.i | 3 |
15 files changed, 4 insertions, 1162 deletions
diff --git a/grc/gsm_block_tree.xml b/grc/gsm_block_tree.xml index 99628d6..5a0fbc0 100644 --- a/grc/gsm_block_tree.xml +++ b/grc/gsm_block_tree.xml @@ -58,10 +58,8 @@ <block>gsm_extract_system_info</block> <block>gsm_extract_immediate_assignment</block> <block>gsm_controlled_rotator_cc</block> - <block>gsm_controlled_const_source_f</block> <block>gsm_controlled_fractional_resampler_cc</block> <block>gsm_message_printer</block> - <block>gsm_clock_offset_corrector</block> <block>gsm_clock_offset_corrector_tagged</block> <block>gsm_tmsi_dumper</block> </cat> diff --git a/grc/misc_utils/CMakeLists.txt b/grc/misc_utils/CMakeLists.txt index a64d2eb..7bdf894 100644 --- a/grc/misc_utils/CMakeLists.txt +++ b/grc/misc_utils/CMakeLists.txt @@ -21,10 +21,8 @@ install(FILES gsm_extract_system_info.xml gsm_extract_immediate_assignment.xml gsm_controlled_rotator_cc.xml - gsm_controlled_const_source_f.xml gsm_message_printer.xml gsm_bursts_printer.xml - gsm_clock_offset_corrector.xml gsm_clock_offset_corrector_tagged.xml gsm_tmsi_dumper.xml gsm_burst_file_sink.xml diff --git a/grc/misc_utils/gsm_clock_offset_corrector.xml b/grc/misc_utils/gsm_clock_offset_corrector.xml deleted file mode 100644 index 1a58397..0000000 --- a/grc/misc_utils/gsm_clock_offset_corrector.xml +++ /dev/null @@ -1,47 +0,0 @@ -<block> - <name>Clock Offset Corrector</name> - <key>gsm_clock_offset_corrector</key> - <import>import grgsm</import> - <make>grgsm.clock_offset_corrector( - fc=$fc, - ppm=$ppm, - samp_rate_in=$samp_rate_in, -)</make> - <callback>set_fc($fc)</callback> - <callback>set_ppm($ppm)</callback> - <callback>set_samp_rate_in($samp_rate_in)</callback> - <param> - <name>fc</name> - <key>fc</key> - <value>fc</value> - <type>float</type> - </param> - <param> - <name>ppm</name> - <key>ppm</key> - <value>ppm</value> - <type>float</type> - </param> - <param> - <name>samp_rate_in</name> - <key>samp_rate_in</key> - <value>samp_rate_in</value> - <type>float</type> - </param> - <sink> - <name>in</name> - <type>complex</type> - <vlen>1</vlen> - </sink> - <sink> - <name>ppm_in</name> - <type>message</type> - <optional>True</optional> - </sink> - <source> - <name>out</name> - <type>complex</type> - <vlen>1</vlen> - </source> - <doc>Piotr Krysik</doc> -</block> diff --git a/grc/misc_utils/gsm_controlled_const_source_f.xml b/grc/misc_utils/gsm_controlled_const_source_f.xml deleted file mode 100644 index 603fc5c..0000000 --- a/grc/misc_utils/gsm_controlled_const_source_f.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0"?> -<block> - <name>Controlled Const Source</name> - <key>gsm_controlled_const_source_f</key> - <import>import grgsm</import> - <make>grgsm.controlled_const_source_f($constant)</make> - <callback>set_constant($constant)</callback> - - <param> - <name>constant</name> - <key>constant</key> - <value>0</value> - <type>float</type> - </param> - - <sink> - <name>constant_msg</name> - <type>message</type> - <optional>1</optional> - </sink> - - <source> - <name>out</name> - <type>float</type> - </source> -</block> diff --git a/hier_blocks/misc_utils/gsm_clock_offset_corrector.grc b/hier_blocks/misc_utils/gsm_clock_offset_corrector.grc deleted file mode 100644 index 2222d7e..0000000 --- a/hier_blocks/misc_utils/gsm_clock_offset_corrector.grc +++ /dev/null @@ -1,797 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<?grc format='1' created='3.7.9'?> -<flow_graph> - <timestamp>Thu Nov 6 10:22:20 2014</timestamp> - <block> - <key>options</key> - <param> - <key>author</key> - <value>Piotr Krysik</value> - </param> - <param> - <key>window_size</key> - <value>2280, 1024</value> - </param> - <param> - <key>category</key> - <value>GSM</value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>description</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(10, 10)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>generate_options</key> - <value>hb</value> - </param> - <param> - <key>hier_block_src_path</key> - <value>.:</value> - </param> - <param> - <key>id</key> - <value>clock_offset_corrector</value> - </param> - <param> - <key>max_nouts</key> - <value>0</value> - </param> - <param> - <key>qt_qss_theme</key> - <value></value> - </param> - <param> - <key>realtime_scheduling</key> - <value></value> - </param> - <param> - <key>run_command</key> - <value>{python} -u {filename}</value> - </param> - <param> - <key>run_options</key> - <value>prompt</value> - </param> - <param> - <key>run</key> - <value>True</value> - </param> - <param> - <key>thread_safe_setters</key> - <value></value> - </param> - <param> - <key>title</key> - <value>Clock offset corrector</value> - </param> - </block> - <block> - <key>variable</key> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(736, 19)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>samp_rate_out</value> - </param> - <param> - <key>value</key> - <value>samp_rate_in</value> - </param> - </block> - <block> - <key>blocks_add_const_vxx</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>const</key> - <value>samp_rate_in/samp_rate_out</value> - </param> - <param> - <key>affinity</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>0</value> - </param> - <param> - <key>_coordinate</key> - <value>(552, 331)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>blocks_add_const_vxx_0</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>maxoutbuf</key> - <value>0</value> - </param> - <param> - <key>minoutbuf</key> - <value>0</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - </block> - <block> - <key>blocks_multiply_const_vxx</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>const</key> - <value>fc/samp_rate_out*(2*math.pi)/1e6</value> - </param> - <param> - <key>affinity</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(432, 220)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>blocks_multiply_const_vxx_0</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>maxoutbuf</key> - <value>0</value> - </param> - <param> - <key>minoutbuf</key> - <value>0</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - </block> - <block> - <key>blocks_multiply_const_vxx</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>const</key> - <value>1.0e-6*samp_rate_in/samp_rate_out</value> - </param> - <param> - <key>affinity</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>0</value> - </param> - <param> - <key>_coordinate</key> - <value>(392, 331)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>blocks_multiply_const_vxx_0_0</value> - </param> - <param> - <key>type</key> - <value>float</value> - </param> - <param> - <key>maxoutbuf</key> - <value>0</value> - </param> - <param> - <key>minoutbuf</key> - <value>0</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - </block> - <block> - <key>parameter</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(274, 19)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>fc</value> - </param> - <param> - <key>label</key> - <value>fc</value> - </param> - <param> - <key>short_id</key> - <value></value> - </param> - <param> - <key>type</key> - <value>eng_float</value> - </param> - <param> - <key>value</key> - <value>936.6e6</value> - </param> - </block> - <block> - <key>fractional_resampler_xx</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>affinity</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>0</value> - </param> - <param> - <key>_coordinate</key> - <value>(592, 537)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>fractional_resampler_xx_0</value> - </param> - <param> - <key>maxoutbuf</key> - <value>0</value> - </param> - <param> - <key>minoutbuf</key> - <value>0</value> - </param> - <param> - <key>phase_shift</key> - <value>0</value> - </param> - <param> - <key>resamp_ratio</key> - <value>samp_rate_in/samp_rate_out</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - </block> - <block> - <key>gsm_controlled_const_source_f</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>affinity</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(184, 220)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>gsm_controlled_const_source_f_0</value> - </param> - <param> - <key>maxoutbuf</key> - <value>0</value> - </param> - <param> - <key>minoutbuf</key> - <value>0</value> - </param> - <param> - <key>constant</key> - <value>ppm</value> - </param> - </block> - <block> - <key>gsm_controlled_rotator_cc</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>affinity</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(952, 193)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>gsm_controlled_rotator_cc_0</value> - </param> - <param> - <key>maxoutbuf</key> - <value>0</value> - </param> - <param> - <key>minoutbuf</key> - <value>0</value> - </param> - <param> - <key>phase_inc</key> - <value>0</value> - </param> - <param> - <key>samp_rate</key> - <value>samp_rate_out</value> - </param> - </block> - <block> - <key>import</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(11, 125)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>math_imp</value> - </param> - <param> - <key>import</key> - <value>import math</value> - </param> - </block> - <block> - <key>pad_sink</key> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(1168, 204)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>pad_sink_1</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>label</key> - <value>out</value> - </param> - <param> - <key>num_streams</key> - <value>1</value> - </param> - <param> - <key>optional</key> - <value>False</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - </block> - <block> - <key>pad_source</key> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(32, 188)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>pad_source_0</value> - </param> - <param> - <key>label</key> - <value>in</value> - </param> - <param> - <key>num_streams</key> - <value>1</value> - </param> - <param> - <key>optional</key> - <value>False</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - </block> - <block> - <key>parameter</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(496, 19)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>ppm</value> - </param> - <param> - <key>label</key> - <value>ppm</value> - </param> - <param> - <key>short_id</key> - <value></value> - </param> - <param> - <key>type</key> - <value>eng_float</value> - </param> - <param> - <key>value</key> - <value>0</value> - </param> - </block> - <block> - <key>pad_source</key> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(32, 244)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>ppm_in</value> - </param> - <param> - <key>label</key> - <value>ppm_in</value> - </param> - <param> - <key>num_streams</key> - <value>1</value> - </param> - <param> - <key>optional</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>message</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - </block> - <block> - <key>parameter</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>_coordinate</key> - <value>(368, 19)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>samp_rate_in</value> - </param> - <param> - <key>label</key> - <value>samp_rate_in</value> - </param> - <param> - <key>short_id</key> - <value></value> - </param> - <param> - <key>type</key> - <value>eng_float</value> - </param> - <param> - <key>value</key> - <value>1625000.0/6.0*4.0</value> - </param> - </block> - <block> - <key>parameter</key> - <param> - <key>alias</key> - <value></value> - </param> - <param> - <key>comment</key> - <value></value> - </param> - <param> - <key>_enabled</key> - <value>False</value> - </param> - <param> - <key>_coordinate</key> - <value>(592, 20)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - <param> - <key>id</key> - <value>samp_rate_out</value> - </param> - <param> - <key>label</key> - <value>samp_rate_out</value> - </param> - <param> - <key>short_id</key> - <value></value> - </param> - <param> - <key>type</key> - <value>eng_float</value> - </param> - <param> - <key>value</key> - <value>1625000.0/6.0*4.0</value> - </param> - </block> - <connection> - <source_block_id>blocks_add_const_vxx_0</source_block_id> - <sink_block_id>fractional_resampler_xx_0</sink_block_id> - <source_key>0</source_key> - <sink_key>1</sink_key> - </connection> - <connection> - <source_block_id>blocks_multiply_const_vxx_0</source_block_id> - <sink_block_id>gsm_controlled_rotator_cc_0</sink_block_id> - <source_key>0</source_key> - <sink_key>1</sink_key> - </connection> - <connection> - <source_block_id>blocks_multiply_const_vxx_0_0</source_block_id> - <sink_block_id>blocks_add_const_vxx_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>fractional_resampler_xx_0</source_block_id> - <sink_block_id>gsm_controlled_rotator_cc_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gsm_controlled_const_source_f_0</source_block_id> - <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gsm_controlled_const_source_f_0</source_block_id> - <sink_block_id>blocks_multiply_const_vxx_0_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gsm_controlled_rotator_cc_0</source_block_id> - <sink_block_id>pad_sink_1</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>pad_source_0</source_block_id> - <sink_block_id>fractional_resampler_xx_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>pad_source_0</source_block_id> - <sink_block_id>gsm_controlled_rotator_cc_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>ppm_in</source_block_id> - <sink_block_id>gsm_controlled_const_source_f_0</sink_block_id> - <source_key>out</source_key> - <sink_key>constant_msg</sink_key> - </connection> -</flow_graph> diff --git a/include/grgsm/CMakeLists.txt b/include/grgsm/CMakeLists.txt index 210320a..dc9b191 100644 --- a/include/grgsm/CMakeLists.txt +++ b/include/grgsm/CMakeLists.txt @@ -23,9 +23,7 @@ install(FILES plotting.hpp api.h - gsmtap.h - msg_to_tag.h - controlled_fractional_resampler_cc.h DESTINATION include/grgsm + gsmtap.h DESTINATION include/grgsm ) add_subdirectory(decoding) diff --git a/include/grgsm/misc_utils/CMakeLists.txt b/include/grgsm/misc_utils/CMakeLists.txt index d85ac21..d21dcca 100644 --- a/include/grgsm/misc_utils/CMakeLists.txt +++ b/include/grgsm/misc_utils/CMakeLists.txt @@ -29,7 +29,8 @@ install(FILES extract_system_info.h extract_immediate_assignment.h controlled_rotator_cc.h - controlled_const_source_f.h message_printer.h - tmsi_dumper.h DESTINATION include/grgsm/misc_utils + tmsi_dumper.h + msg_to_tag.h + controlled_fractional_resampler_cc.h DESTINATION include/grgsm/misc_utils ) diff --git a/include/grgsm/misc_utils/controlled_const_source_f.h b/include/grgsm/misc_utils/controlled_const_source_f.h deleted file mode 100644 index 235c731..0000000 --- a/include/grgsm/misc_utils/controlled_const_source_f.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- c++ -*- */ -/* - * @file - * @author Piotr Krysik <ptrkrysik@gmail.com> - * @section LICENSE - * - * Gr-gsm 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. - * - * Gr-gsm 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 gr-gsm; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GSM_CONTROLLED_CONST_SOURCE_F_H -#define INCLUDED_GSM_CONTROLLED_CONST_SOURCE_F_H - -#include <grgsm/api.h> -#include <gnuradio/sync_block.h> - -namespace gr { - namespace gsm { - - /*! - * \brief <+description of block+> - * \ingroup gsm - * - */ - class GRGSM_API controlled_const_source_f : virtual public gr::sync_block - { - public: - typedef boost::shared_ptr<controlled_const_source_f> sptr; - - /*! - * \brief Return a shared_ptr to a new instance of gsm::controlled_const_source_f. - * - * To avoid accidental use of raw pointers, gsm::controlled_const_source_f's - * constructor is in a private implementation - * class. gsm::controlled_const_source_f::make is the public interface for - * creating new instances. - */ - static sptr make(float constant); - virtual void set_constant(float constant) = 0; - }; - - } // namespace gsm -} // namespace gr - -#endif /* INCLUDED_GSM_CONTROLLED_CONST_SOURCE_F_H */ - diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 35195e0..73fef92 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -50,7 +50,6 @@ list(APPEND grgsm_sources flow_control/burst_fnr_filter_impl.cc flow_control/dummy_burst_filter_impl.cc misc_utils/controlled_rotator_cc_impl.cc - misc_utils/controlled_const_source_f_impl.cc misc_utils/controlled_fractional_resampler_cc_impl.cc misc_utils/msg_to_tag_impl.cc misc_utils/message_printer_impl.cc diff --git a/lib/misc_utils/controlled_const_source_f_impl.cc b/lib/misc_utils/controlled_const_source_f_impl.cc deleted file mode 100644 index ee8d0ae..0000000 --- a/lib/misc_utils/controlled_const_source_f_impl.cc +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- c++ -*- */ -/* - * @file - * @author Piotr Krysik <ptrkrysik@gmail.com> - * @section LICENSE - * - * Gr-gsm 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. - * - * Gr-gsm 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 gr-gsm; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <gnuradio/io_signature.h> -#include "controlled_const_source_f_impl.h" - -namespace gr { - namespace gsm { - - controlled_const_source_f::sptr - controlled_const_source_f::make(float constant) - { - return gnuradio::get_initial_sptr - (new controlled_const_source_f_impl(constant)); - } - - void controlled_const_source_f_impl::set_constant_msg(pmt::pmt_t msg){ - if(pmt::is_real(msg)){ - set_constant(pmt::to_double(msg)); - } - } - - /* - * The private constructor - */ - controlled_const_source_f_impl::controlled_const_source_f_impl(float constant) - : gr::sync_block("controlled_const_source_f", - gr::io_signature::make(0, 0, 0), - gr::io_signature::make(1, 1, sizeof(float))) - { - set_constant(constant); - message_port_register_in(pmt::mp("constant_msg")); - set_msg_handler(pmt::mp("constant_msg"), boost::bind(&controlled_const_source_f_impl::set_constant_msg, this, _1)); - } - - /* - * Our virtual destructor. - */ - controlled_const_source_f_impl::~controlled_const_source_f_impl() - { - } - - int - controlled_const_source_f_impl::work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) - { - float *optr = (float*)output_items[0]; - float t; - - t = d_constant; - std::fill_n(optr, noutput_items, t); - - return noutput_items; - } - - void controlled_const_source_f_impl::set_constant(float constant){ - d_constant = constant; - } - - } /* namespace gsm */ -} /* namespace gr */ - diff --git a/lib/misc_utils/controlled_const_source_f_impl.h b/lib/misc_utils/controlled_const_source_f_impl.h deleted file mode 100644 index 36a6258..0000000 --- a/lib/misc_utils/controlled_const_source_f_impl.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -*- c++ -*- */ -/* - * @file - * @author Piotr Krysik <ptrkrysik@gmail.com> - * @section LICENSE - * - * Gr-gsm 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. - * - * Gr-gsm 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 gr-gsm; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, - * Boston, MA 02110-1301, USA. - */ - -#ifndef INCLUDED_GSM_CONTROLLED_CONST_SOURCE_F_IMPL_H -#define INCLUDED_GSM_CONTROLLED_CONST_SOURCE_F_IMPL_H - -#include <grgsm/misc_utils/controlled_const_source_f.h> - -namespace gr { - namespace gsm { - - class controlled_const_source_f_impl : public controlled_const_source_f - { - private: - float d_constant; - void set_constant_msg(pmt::pmt_t msg); - - public: - controlled_const_source_f_impl(float constant); - ~controlled_const_source_f_impl(); - - // Where all the action really happens - int work(int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); - - virtual void set_constant(float constant); - }; - - } // namespace gsm -} // namespace gr - -#endif /* INCLUDED_GSM_CONTROLLED_CONST_SOURCE_F_IMPL_H */ - diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index bee42a8..89157ed 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -41,7 +41,6 @@ GR_PYTHON_INSTALL( receiver/fcch_detector.py receiver/chirpz.py misc_utils/arfcn.py - misc_utils/clock_offset_corrector.py misc_utils/clock_offset_corrector_tagged.py misc_utils/hier_block.py DESTINATION ${GR_PYTHON_DIR}/grgsm ) diff --git a/python/__init__.py b/python/__init__.py index 2e35f6c..76c6b99 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -50,7 +50,6 @@ from hier_block import hier_block from fcch_burst_tagger import fcch_burst_tagger from sch_detector import sch_detector from fcch_detector import fcch_detector -from clock_offset_corrector import clock_offset_corrector from clock_offset_corrector_tagged import clock_offset_corrector_tagged from gsm_input import gsm_input from gsm_wideband_input import gsm_wideband_input diff --git a/python/misc_utils/clock_offset_corrector.py b/python/misc_utils/clock_offset_corrector.py deleted file mode 100644 index ce222a0..0000000 --- a/python/misc_utils/clock_offset_corrector.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python -################################################## -# Gnuradio Python Flow Graph -# Title: Clock offset corrector -# Author: Piotr Krysik -# Generated: Wed Nov 19 08:38:40 2014 -################################################## - -from gnuradio import blocks -from gnuradio import gr -from gnuradio.filter import firdes -import grgsm -import math - -class clock_offset_corrector(grgsm.hier_block): - - def __init__(self, fc=936.6e6, ppm=0, samp_rate_in=1625000.0/6.0*4.0): - grgsm.hier_block.__init__( - self, "Clock offset corrector", - gr.io_signature(1, 1, gr.sizeof_gr_complex*1), - gr.io_signature(1, 1, gr.sizeof_gr_complex*1), - ) - self.message_port_register_hier_in("ppm_in") - - ################################################## - # Parameters - ################################################## - self.fc = fc - self.ppm = ppm - self.samp_rate_in = samp_rate_in - - ################################################## - # Variables - ################################################## - self.samp_rate_out = samp_rate_out = samp_rate_in - - ################################################## - # Blocks - ################################################## - self.gsm_controlled_rotator_cc_0 = grgsm.controlled_rotator_cc(0,samp_rate_out) - self.gsm_controlled_const_source_f_0 = grgsm.controlled_const_source_f(ppm) - self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((fc/samp_rate_out*(2*math.pi)/1e6, )) - - ################################################## - # Connections - ################################################## - self.msg_connect((self, 'ppm_in'), (self.gsm_controlled_const_source_f_0, 'constant_msg')) - self.connect((self.blocks_multiply_const_vxx_0, 0), (self.gsm_controlled_rotator_cc_0, 1)) - self.connect((self.gsm_controlled_const_source_f_0, 0), (self.blocks_multiply_const_vxx_0, 0)) - self.connect((self.gsm_controlled_rotator_cc_0, 0), (self, 0)) - self.connect((self, 0), (self.gsm_controlled_rotator_cc_0, 0)) - - def get_fc(self): - return self.fc - - def set_fc(self, fc): - self.fc = fc - self.blocks_multiply_const_vxx_0.set_k((self.fc/self.samp_rate_out*(2*math.pi)/1e6, )) - - def get_ppm(self): - return self.ppm - - def set_ppm(self, ppm): - self.ppm = ppm - self.gsm_controlled_const_source_f_0.set_constant(self.ppm) - - def get_samp_rate_in(self): - return self.samp_rate_in - - def set_samp_rate_in(self, samp_rate_in): - self.samp_rate_in = samp_rate_in - self.set_samp_rate_out(self.samp_rate_in) - - def get_samp_rate_out(self): - return self.samp_rate_out - - def set_samp_rate_out(self, samp_rate_out): - self.samp_rate_out = samp_rate_out - self.gsm_controlled_rotator_cc_0.set_samp_rate(self.samp_rate_out) - self.blocks_multiply_const_vxx_0.set_k((self.fc/self.samp_rate_out*(2*math.pi)/1e6, )) diff --git a/swig/grgsm_swig.i b/swig/grgsm_swig.i index 39fc3d4..3233e18 100644 --- a/swig/grgsm_swig.i +++ b/swig/grgsm_swig.i @@ -23,7 +23,6 @@ #include "grgsm/flow_control/burst_fnr_filter.h" #include "grgsm/flow_control/dummy_burst_filter.h" #include "grgsm/misc_utils/bursts_printer.h" -#include "grgsm/misc_utils/controlled_const_source_f.h" #include "grgsm/misc_utils/controlled_rotator_cc.h" #include "grgsm/misc_utils/extract_system_info.h" #include "grgsm/misc_utils/extract_immediate_assignment.h" @@ -86,8 +85,6 @@ GR_SWIG_BLOCK_MAGIC2(gsm, extract_system_info); GR_SWIG_BLOCK_MAGIC2(gsm, extract_immediate_assignment); %include "grgsm/misc_utils/controlled_rotator_cc.h" GR_SWIG_BLOCK_MAGIC2(gsm, controlled_rotator_cc); -%include "grgsm/misc_utils/controlled_const_source_f.h" -GR_SWIG_BLOCK_MAGIC2(gsm, controlled_const_source_f); %include "grgsm/misc_utils/message_printer.h" GR_SWIG_BLOCK_MAGIC2(gsm, message_printer); %include "grgsm/misc_utils/tmsi_dumper.h" |