summaryrefslogtreecommitdiff
path: root/gr-fec
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fec')
-rw-r--r--gr-fec/CMakeLists.txt35
-rw-r--r--gr-fec/apps/CMakeLists.txt2
-rw-r--r--gr-fec/examples/CMakeLists.txt1
-rw-r--r--gr-fec/grc/CMakeLists.txt6
-rw-r--r--gr-fec/include/gnuradio/fec/CMakeLists.txt5
-rw-r--r--gr-fec/lib/CMakeLists.txt4
-rw-r--r--gr-fec/lib/generic_decoder.cc8
-rw-r--r--gr-fec/lib/generic_encoder.cc8
-rw-r--r--gr-fec/lib/reed-solomon/CMakeLists.txt1
-rw-r--r--gr-fec/lib/viterbi/CMakeLists.txt1
-rw-r--r--gr-fec/python/fec/CMakeLists.txt1
-rw-r--r--gr-fec/python/fec/LDPC/CMakeLists.txt3
-rw-r--r--gr-fec/python/fec/polar/CMakeLists.txt4
-rw-r--r--gr-fec/python/fec/polar/polar_channel_construction44
-rw-r--r--gr-fec/swig/CMakeLists.txt2
15 files changed, 26 insertions, 99 deletions
diff --git a/gr-fec/CMakeLists.txt b/gr-fec/CMakeLists.txt
index 338fe71864..c828fd92e7 100644
--- a/gr-fec/CMakeLists.txt
+++ b/gr-fec/CMakeLists.txt
@@ -52,40 +52,6 @@ SET(GR_PKG_FEC_EXAMPLES_DIR ${GR_PKG_DATA_DIR}/examples/fec)
if(ENABLE_GR_FEC)
########################################################################
-# Setup CPack components
-########################################################################
-include(GrPackage)
-CPACK_SET(CPACK_COMPONENT_GROUP_FEC_DESCRIPTION "GNU Radio FEC Blocks")
-
-CPACK_COMPONENT("fec_runtime"
- GROUP "FEC"
- DISPLAY_NAME "Runtime"
- DESCRIPTION "Runtime"
- DEPENDS "runtime_runtime"
-)
-
-CPACK_COMPONENT("fec_devel"
- GROUP "FEC"
- DISPLAY_NAME "Development"
- DESCRIPTION "C++ headers, package config, import libraries"
- DEPENDS "runtime_devel"
-)
-
-CPACK_COMPONENT("fec_python"
- GROUP "FEC"
- DISPLAY_NAME "Python"
- DESCRIPTION "Python modules for runtime; GRC xml files"
- DEPENDS "runtime_python;fec_runtime"
-)
-
-CPACK_COMPONENT("fec_swig"
- GROUP "FEC"
- DISPLAY_NAME "SWIG"
- DESCRIPTION "SWIG development .i files"
- DEPENDS "runtime_swig;fec_python;fec_devel"
-)
-
-########################################################################
# Add subdirectories
########################################################################
add_subdirectory(include/gnuradio/fec)
@@ -112,7 +78,6 @@ configure_file(
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-fec.pc
DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
- COMPONENT "fec_devel"
)
endif(ENABLE_GR_FEC)
diff --git a/gr-fec/apps/CMakeLists.txt b/gr-fec/apps/CMakeLists.txt
index 62fc6d26d4..41c6e4e2fc 100644
--- a/gr-fec/apps/CMakeLists.txt
+++ b/gr-fec/apps/CMakeLists.txt
@@ -32,11 +32,9 @@
#
#INSTALL(TARGETS
# DESTINATION ${GR_RUNTIME_DIR}
-# COMPONENT "fec_devel"
#)
#
#GR_PYTHON_INSTALL(
# PROGRAMS
# DESTINATION ${GR_RUNTIME_DIR}
-# COMPONENT "fec_devel"
#)
diff --git a/gr-fec/examples/CMakeLists.txt b/gr-fec/examples/CMakeLists.txt
index e1dfc4ebaf..a66df61ad0 100644
--- a/gr-fec/examples/CMakeLists.txt
+++ b/gr-fec/examples/CMakeLists.txt
@@ -40,5 +40,4 @@ install(
polar_code_example.grc
tpc_ber_curve_gen.grc
DESTINATION ${GR_PKG_FEC_EXAMPLES_DIR}
- COMPONENT "fec_python"
)
diff --git a/gr-fec/grc/CMakeLists.txt b/gr-fec/grc/CMakeLists.txt
index 27cb5af854..f61603df22 100644
--- a/gr-fec/grc/CMakeLists.txt
+++ b/gr-fec/grc/CMakeLists.txt
@@ -19,4 +19,8 @@
########################################################################
file(GLOB xml_files "*.xml")
-install(FILES ${xml_files} DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "fec_python")
+
+install(FILES
+ ${xml_files}
+ DESTINATION ${GRC_BLOCKS_DIR}
+)
diff --git a/gr-fec/include/gnuradio/fec/CMakeLists.txt b/gr-fec/include/gnuradio/fec/CMakeLists.txt
index 57594b47d8..5894b1d14a 100644
--- a/gr-fec/include/gnuradio/fec/CMakeLists.txt
+++ b/gr-fec/include/gnuradio/fec/CMakeLists.txt
@@ -60,8 +60,8 @@ install(FILES
polar_decoder_sc_list.h
polar_decoder_common.h
polar_encoder_systematic.h
- polar_decoder_sc_systematic.h DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
- COMPONENT "fec_devel"
+ polar_decoder_sc_systematic.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
)
if(GSL_FOUND)
@@ -73,6 +73,5 @@ if(GSL_FOUND)
ldpc_par_mtrx_encoder.h
ldpc_gen_mtrx_encoder.h
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
- COMPONENT "fec_devel"
)
endif(GSL_FOUND)
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index bda98016b0..7ed38404f3 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -131,7 +131,7 @@ endif(GSL_FOUND)
add_library(gnuradio-fec SHARED ${gnuradio_fec_sources})
target_link_libraries(gnuradio-fec ${gnuradio_fec_libs})
-GR_LIBRARY_FOO(gnuradio-fec RUNTIME_COMPONENT "fec_runtime" DEVEL_COMPONENT "fec_devel")
+GR_LIBRARY_FOO(gnuradio-fec)
if(ENABLE_STATIC_LIBS)
if(ENABLE_GR_CTRLPORT)
@@ -153,6 +153,6 @@ if(ENABLE_STATIC_LIBS)
endif(NOT WIN32)
install(TARGETS gnuradio-fec_static
- ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "fec_devel" # .lib file
+ ARCHIVE DESTINATION lib${LIB_SUFFIX} # .lib file
)
endif(ENABLE_STATIC_LIBS)
diff --git a/gr-fec/lib/generic_decoder.cc b/gr-fec/lib/generic_decoder.cc
index aa11aa8d5e..62d4d2a581 100644
--- a/gr-fec/lib/generic_decoder.cc
+++ b/gr-fec/lib/generic_decoder.cc
@@ -36,8 +36,6 @@ namespace gr {
d_name = name;
my_id = base_unique_id++;
-#ifdef ENABLE_GR_LOG
-#ifdef HAVE_LOG4CPP
prefs *p = prefs::singleton();
std::string config_file = p->get_string("LOG", "log_config", "");
std::string log_level = p->get_string("LOG", "log_level", "off");
@@ -58,12 +56,8 @@ namespace gr {
GR_LOG_SET_FILE_APPENDER(LOG, log_file , true,"%r :%p: %c{1} - %m%n");
}
}
- d_logger = LOG;
-#endif /* HAVE_LOG4CPP */
-#else /* ENABLE_GR_LOG */
- d_logger = NULL;
-#endif /* ENABLE_GR_LOG */
+ d_logger = LOG;
}
generic_decoder::~generic_decoder()
diff --git a/gr-fec/lib/generic_encoder.cc b/gr-fec/lib/generic_encoder.cc
index c5c7f04f55..7872f17068 100644
--- a/gr-fec/lib/generic_encoder.cc
+++ b/gr-fec/lib/generic_encoder.cc
@@ -36,8 +36,6 @@ namespace gr {
d_name = name;
my_id = base_unique_id++;
-#ifdef ENABLE_GR_LOG
-#ifdef HAVE_LOG4CPP
prefs *p = prefs::singleton();
std::string config_file = p->get_string("LOG", "log_config", "");
std::string log_level = p->get_string("LOG", "log_level", "off");
@@ -58,12 +56,8 @@ namespace gr {
GR_LOG_SET_FILE_APPENDER(LOG, log_file , true,"%r :%p: %c{1} - %m%n");
}
}
- d_logger = LOG;
-#endif /* HAVE_LOG4CPP */
-#else /* ENABLE_GR_LOG */
- d_logger = NULL;
-#endif /* ENABLE_GR_LOG */
+ d_logger = LOG;
}
generic_encoder::~generic_encoder()
diff --git a/gr-fec/lib/reed-solomon/CMakeLists.txt b/gr-fec/lib/reed-solomon/CMakeLists.txt
index 0858a670c5..3d35c9025d 100644
--- a/gr-fec/lib/reed-solomon/CMakeLists.txt
+++ b/gr-fec/lib/reed-solomon/CMakeLists.txt
@@ -46,7 +46,6 @@ list(APPEND gnuradio_fec_sources ${gr_fec_rs_sources})
#install(
# FILES ${CMAKE_CURRENT_SOURCE_DIR}/rs.h
# DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
-# COMPONENT "fec_devel"
#)
########################################################################
diff --git a/gr-fec/lib/viterbi/CMakeLists.txt b/gr-fec/lib/viterbi/CMakeLists.txt
index 3697787bcc..10c5940246 100644
--- a/gr-fec/lib/viterbi/CMakeLists.txt
+++ b/gr-fec/lib/viterbi/CMakeLists.txt
@@ -51,7 +51,6 @@ list(APPEND gnuradio_fec_sources ${viterbi_sources})
#install(
# FILES ${CMAKE_CURRENT_SOURCE_DIR}/viterbi.h
# DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fec
-# COMPONENT "fec_devel"
#)
########################################################################
diff --git a/gr-fec/python/fec/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt
index 1b20004e6e..9d170b0423 100644
--- a/gr-fec/python/fec/CMakeLists.txt
+++ b/gr-fec/python/fec/CMakeLists.txt
@@ -36,7 +36,6 @@ GR_PYTHON_INSTALL(
fec_test.py
bercurve_generator.py
DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec
- COMPONENT "fec_python"
)
add_subdirectory(polar)
diff --git a/gr-fec/python/fec/LDPC/CMakeLists.txt b/gr-fec/python/fec/LDPC/CMakeLists.txt
index 3e56ef3975..d2022412b3 100644
--- a/gr-fec/python/fec/LDPC/CMakeLists.txt
+++ b/gr-fec/python/fec/LDPC/CMakeLists.txt
@@ -26,5 +26,4 @@ GR_PYTHON_INSTALL(
Generate_LDPC_matrix_functions.py
Generate_LDPC_matrix.py
DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec/LDPC
- COMPONENT "fec_python"
-) \ No newline at end of file
+)
diff --git a/gr-fec/python/fec/polar/CMakeLists.txt b/gr-fec/python/fec/polar/CMakeLists.txt
index a863995aff..1efed062ff 100644
--- a/gr-fec/python/fec/polar/CMakeLists.txt
+++ b/gr-fec/python/fec/polar/CMakeLists.txt
@@ -28,14 +28,10 @@ GR_PYTHON_INSTALL(
channel_construction_bec.py
helper_functions.py
DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec/polar
- COMPONENT "fec_python"
)
GR_PYTHON_INSTALL(
PROGRAMS
polar_channel_construction
DESTINATION ${GR_RUNTIME_DIR}
- COMPONENT "fec_python"
)
-
-
diff --git a/gr-fec/python/fec/polar/polar_channel_construction b/gr-fec/python/fec/polar/polar_channel_construction
index 448253659e..1c999aa145 100644
--- a/gr-fec/python/fec/polar/polar_channel_construction
+++ b/gr-fec/python/fec/polar/polar_channel_construction
@@ -21,25 +21,22 @@
#
""" A tool for POLAR code channel construction."""
-from optparse import OptionParser
+from argparse import ArgumentParser
import gnuradio.fec.polar as cc
def setup_parser():
- """ Init the option parser. If derived classes need to add options,
+ """Init the argument parser. If derived classes need to add options,
override this and call the parent function. """
- parser = OptionParser(add_help_option=False)
- parser.usage = '%prog [blocksize] [designsnr] [mu]'
-
- parser.add_option("-h", "--help", action="help", help="Displays this help message.")
-
- parser.add_option("-c", "--channel", action="store", type="string", dest="channel",
- help="specify channel, currently BEC or AWGN (default='BEC')", default='BEC')
- parser.add_option("-b", "--blocksize", action="store", type="int", dest="block_size",
+ parser = ArgumentParser()
+ parser.add_argument("-c", "--channel", choices=('BEC', 'AWGN'),
+ help="specify channel, currently BEC or AWGN (default='BEC')",
+ default='BEC')
+ parser.add_argument("-b", "--blocksize", type=int, dest="block_size",
help="specify block size of polar code (default=16)", default=16)
- parser.add_option("-s", "--desgin-snr", action="store", type="float", dest="design_snr",
+ parser.add_argument("-s", "--desgin-snr", type=float, dest="design_snr",
help="specify design SNR of polar code (default=0.0)", default=0.0)
- parser.add_option("-k", "--mu", action="store", type="int", dest="mu",
+ parser.add_argument("-k", "--mu", type=int,
help="specify block size of polar code (default=2)", default=2)
return parser
@@ -47,26 +44,13 @@ def setup_parser():
def main():
""" Here we go. Parse command, choose class and run. """
- print('POLAR code channel constructor commandline tool')
+ print 'POLAR code channel constructor commandline tool'
parser = setup_parser()
- (options, args) = parser.parse_args()
-
- channel = str(options.channel)
- block_size = int(options.block_size)
- design_snr = float(options.design_snr)
- mu = int(options.mu)
-
- if len(args) > 0:
- channel = str(args[0])
- if len(args) > 1:
- block_size = int(args[1])
- if len(args) > 2:
- design_snr = float(args[2])
- if len(args) == 4:
- mu = int(args[3])
+ args = parser.parse_args()
- z_params = cc.get_z_params(False, channel, block_size, design_snr, mu)
- print(z_params)
+ z_params = cc.get_z_params(False, args.channel, args.block_size,
+ args.design_snr, args.mu)
+ print z_params
if __name__ == '__main__':
diff --git a/gr-fec/swig/CMakeLists.txt b/gr-fec/swig/CMakeLists.txt
index 443d365c98..5eaa5de748 100644
--- a/gr-fec/swig/CMakeLists.txt
+++ b/gr-fec/swig/CMakeLists.txt
@@ -48,7 +48,6 @@ GR_SWIG_MAKE(fec_swig fec_swig.i)
GR_SWIG_INSTALL(
TARGETS fec_swig
DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec
- COMPONENT "fec_python"
)
install(
@@ -56,5 +55,4 @@ install(
fec_swig.i
${CMAKE_CURRENT_BINARY_DIR}/fec_swig_doc.i
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
- COMPONENT "fec_swig"
)