diff options
Diffstat (limited to 'gr-noaa')
-rw-r--r-- | gr-noaa/CMakeLists.txt | 87 | ||||
-rw-r--r-- | gr-noaa/apps/.gitignore | 2 | ||||
-rw-r--r-- | gr-noaa/apps/CMakeLists.txt | 33 | ||||
-rw-r--r-- | gr-noaa/grc/CMakeLists.txt | 26 | ||||
-rw-r--r-- | gr-noaa/lib/CMakeLists.txt | 66 | ||||
-rw-r--r-- | gr-noaa/lib/Makefile.am | 1 | ||||
-rw-r--r-- | gr-noaa/lib/noaa_api.h | 33 | ||||
-rw-r--r-- | gr-noaa/lib/noaa_hrpt_decoder.h | 7 | ||||
-rw-r--r-- | gr-noaa/lib/noaa_hrpt_deframer.h | 7 | ||||
-rw-r--r-- | gr-noaa/lib/noaa_hrpt_pll_cf.h | 7 | ||||
-rw-r--r-- | gr-noaa/swig/CMakeLists.txt | 56 |
11 files changed, 315 insertions, 10 deletions
diff --git a/gr-noaa/CMakeLists.txt b/gr-noaa/CMakeLists.txt new file mode 100644 index 000000000..621dd5d6e --- /dev/null +++ b/gr-noaa/CMakeLists.txt @@ -0,0 +1,87 @@ +# Copyright 2011 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. + +######################################################################## +# Setup dependencies +######################################################################## +include(GrBoost) + +######################################################################## +# Register component +######################################################################## +include(GrComponent) +GR_REGISTER_COMPONENT("gr-noaa" ENABLE_GR_NOAA + Boost_FOUND + ENABLE_GR_CORE +) + +GR_SET_GLOBAL(GR_NOAA_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/lib +) + +######################################################################## +# Begin conditional configuration +######################################################################## +if(ENABLE_GR_NOAA) + +######################################################################## +# Setup CPack components +######################################################################## +include(GrPackage) +CPACK_SET(CPACK_COMPONENT_GROUP_NOAA_DESCRIPTION "GNU Radio NOAA Blocks") + +CPACK_COMPONENT("noaa_runtime" + GROUP "NOAA" + DISPLAY_NAME "Runtime" + DESCRIPTION "Runtime" + DEPENDS "core_runtime" +) + +CPACK_COMPONENT("noaa_devel" + GROUP "NOAA" + DISPLAY_NAME "Development" + DESCRIPTION "C++ headers, package config, import libraries" + DEPENDS "core_devel" +) + +CPACK_COMPONENT("noaa_python" + GROUP "NOAA" + DISPLAY_NAME "Python" + DESCRIPTION "Python modules for runtime; GRC xml files" + DEPENDS "core_python;noaa_runtime" +) + +CPACK_COMPONENT("noaa_swig" + GROUP "NOAA" + DISPLAY_NAME "SWIG" + DESCRIPTION "SWIG development .i files" + DEPENDS "core_swig;noaa_python;noaa_devel" +) + +######################################################################## +# Add subdirectories +######################################################################## +add_subdirectory(lib) +if(ENABLE_PYTHON) + add_subdirectory(swig) + add_subdirectory(grc) + add_subdirectory(apps) +endif(ENABLE_PYTHON) + +endif(ENABLE_GR_NOAA) diff --git a/gr-noaa/apps/.gitignore b/gr-noaa/apps/.gitignore index cd8d543cc..be02dd265 100644 --- a/gr-noaa/apps/.gitignore +++ b/gr-noaa/apps/.gitignore @@ -1,3 +1,3 @@ *.dat -*.txt +#*.txt *.hrpt diff --git a/gr-noaa/apps/CMakeLists.txt b/gr-noaa/apps/CMakeLists.txt new file mode 100644 index 000000000..37d07ffa0 --- /dev/null +++ b/gr-noaa/apps/CMakeLists.txt @@ -0,0 +1,33 @@ +# Copyright 2011 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(GrPython) + +GR_PYTHON_INSTALL( + PROGRAMS + hrpt_decode.py + hrpt_demod.py + file_rx_hrpt.py + file_rx_lrit.py + usrp_rx_hrpt.py + usrp_rx_hrpt_nogui.py + usrp_rx_lrit.py + DESTINATION ${GR_RUNTIME_DIR} + COMPONENT "noaa_python" +) diff --git a/gr-noaa/grc/CMakeLists.txt b/gr-noaa/grc/CMakeLists.txt new file mode 100644 index 000000000..92d707477 --- /dev/null +++ b/gr-noaa/grc/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright 2011 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. + +install(FILES + noaa_hrpt_decoder.xml + noaa_hrpt_deframer.xml + noaa_hrpt_pll_cf.xml + DESTINATION ${GRC_BLOCKS_DIR} + COMPONENT "noaa_python" +) diff --git a/gr-noaa/lib/CMakeLists.txt b/gr-noaa/lib/CMakeLists.txt new file mode 100644 index 000000000..a3509df84 --- /dev/null +++ b/gr-noaa/lib/CMakeLists.txt @@ -0,0 +1,66 @@ +# Copyright 2011 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. + +######################################################################## +# Setup the include and linker paths +######################################################################## +include_directories( + ${GNURADIO_CORE_INCLUDE_DIRS} + ${GR_NOAA_INCLUDE_DIRS} +) + +include_directories(${Boost_INCLUDE_DIRS}) +link_directories(${Boost_LIBRARY_DIRS}) + +######################################################################## +# Setup library +######################################################################## +list(APPEND gr_noaa_sources + noaa_hrpt_decoder.cc + noaa_hrpt_deframer.cc + noaa_hrpt_pll_cf.cc +) + +list(APPEND noaa_libs + gnuradio-core + ${Boost_LIBRARIES} +) + +add_library(gnuradio-noaa SHARED ${gr_noaa_sources}) +target_link_libraries(gnuradio-noaa ${noaa_libs}) +set_target_properties(gnuradio-noaa PROPERTIES DEFINE_SYMBOL "gnuradio_noaa_EXPORTS") +set_target_properties(gnuradio-noaa PROPERTIES SOVERSION ${LIBVER}) + +install(TARGETS gnuradio-noaa + LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "noaa_runtime" # .so/.dylib file + ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "noaa_devel" # .lib file + RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "noaa_runtime" # .dll file +) + +######################################################################## +# Install header files +######################################################################## +install(FILES + noaa_api.h + noaa_hrpt_decoder.h + noaa_hrpt_deframer.h + noaa_hrpt_pll_cf.h + DESTINATION ${GR_INCLUDE_DIR}/gnuradio + COMPONENT "noaa_devel" +) diff --git a/gr-noaa/lib/Makefile.am b/gr-noaa/lib/Makefile.am index ba660a398..8eedbbb18 100644 --- a/gr-noaa/lib/Makefile.am +++ b/gr-noaa/lib/Makefile.am @@ -42,6 +42,7 @@ libgnuradio_noaa_la_LIBADD = \ libgnuradio_noaa_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS) grinclude_HEADERS = \ + noaa_api.h \ noaa_hrpt_decoder.h \ noaa_hrpt_deframer.h \ noaa_hrpt_pll_cf.h diff --git a/gr-noaa/lib/noaa_api.h b/gr-noaa/lib/noaa_api.h new file mode 100644 index 000000000..d3c3fbf2d --- /dev/null +++ b/gr-noaa/lib/noaa_api.h @@ -0,0 +1,33 @@ +/* + * Copyright 2011 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. + */ + +#ifndef INCLUDED_NOAA_API_H +#define INCLUDED_NOAA_API_H + +#include <gruel/attributes.h> + +#ifdef gnuradio_noaa_EXPORTS +# define NOAA_API __GR_ATTR_EXPORT +#else +# define NOAA_API __GR_ATTR_IMPORT +#endif + +#endif /* INCLUDED_NOAA_API_H */ diff --git a/gr-noaa/lib/noaa_hrpt_decoder.h b/gr-noaa/lib/noaa_hrpt_decoder.h index 9d67d7108..4db09106e 100644 --- a/gr-noaa/lib/noaa_hrpt_decoder.h +++ b/gr-noaa/lib/noaa_hrpt_decoder.h @@ -23,17 +23,18 @@ #ifndef INCLUDED_NOAA_HRPT_DECODER_H #define INCLUDED_NOAA_HRPT_DECODER_H +#include <noaa_api.h> #include <gr_sync_block.h> class noaa_hrpt_decoder; typedef boost::shared_ptr<noaa_hrpt_decoder> noaa_hrpt_decoder_sptr; -noaa_hrpt_decoder_sptr +NOAA_API noaa_hrpt_decoder_sptr noaa_make_hrpt_decoder(bool verbose, bool output_files); -class noaa_hrpt_decoder : public gr_sync_block +class NOAA_API noaa_hrpt_decoder : public gr_sync_block { - friend noaa_hrpt_decoder_sptr noaa_make_hrpt_decoder(bool verbose, bool output_files); + friend NOAA_API noaa_hrpt_decoder_sptr noaa_make_hrpt_decoder(bool verbose, bool output_files); noaa_hrpt_decoder(bool verbose, bool output_files); // Configuration diff --git a/gr-noaa/lib/noaa_hrpt_deframer.h b/gr-noaa/lib/noaa_hrpt_deframer.h index b11d0fa2b..d254746af 100644 --- a/gr-noaa/lib/noaa_hrpt_deframer.h +++ b/gr-noaa/lib/noaa_hrpt_deframer.h @@ -23,17 +23,18 @@ #ifndef INCLUDED_NOAA_HRPT_DEFRAMER_H #define INCLUDED_NOAA_HRPT_DEFRAMER_H +#include <noaa_api.h> #include <gr_block.h> class noaa_hrpt_deframer; typedef boost::shared_ptr<noaa_hrpt_deframer> noaa_hrpt_deframer_sptr; -noaa_hrpt_deframer_sptr +NOAA_API noaa_hrpt_deframer_sptr noaa_make_hrpt_deframer(); -class noaa_hrpt_deframer : public gr_block +class NOAA_API noaa_hrpt_deframer : public gr_block { - friend noaa_hrpt_deframer_sptr noaa_make_hrpt_deframer(); + friend NOAA_API noaa_hrpt_deframer_sptr noaa_make_hrpt_deframer(); noaa_hrpt_deframer(); unsigned int d_state; diff --git a/gr-noaa/lib/noaa_hrpt_pll_cf.h b/gr-noaa/lib/noaa_hrpt_pll_cf.h index 507d47fe7..8d3e8f8d5 100644 --- a/gr-noaa/lib/noaa_hrpt_pll_cf.h +++ b/gr-noaa/lib/noaa_hrpt_pll_cf.h @@ -23,17 +23,18 @@ #ifndef INCLUDED_NOAA_HRPT_PLL_CF_H #define INCLUDED_NOAA_HRPT_PLL_CF_H +#include <noaa_api.h> #include <gr_sync_block.h> class noaa_hrpt_pll_cf; typedef boost::shared_ptr<noaa_hrpt_pll_cf> noaa_hrpt_pll_cf_sptr; -noaa_hrpt_pll_cf_sptr +NOAA_API noaa_hrpt_pll_cf_sptr noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset); -class noaa_hrpt_pll_cf : public gr_sync_block +class NOAA_API noaa_hrpt_pll_cf : public gr_sync_block { - friend noaa_hrpt_pll_cf_sptr noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset); + friend NOAA_API noaa_hrpt_pll_cf_sptr noaa_make_hrpt_pll_cf(float alpha, float beta, float max_offset); noaa_hrpt_pll_cf(float alpha, float beta, float max_offset); float d_alpha; // 1st order loop constant diff --git a/gr-noaa/swig/CMakeLists.txt b/gr-noaa/swig/CMakeLists.txt new file mode 100644 index 000000000..1d754aabb --- /dev/null +++ b/gr-noaa/swig/CMakeLists.txt @@ -0,0 +1,56 @@ +# Copyright 2011 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. + +######################################################################## +# Setup swig generation +######################################################################## +include(GrPython) +include(GrSwig) + +set(GR_SWIG_INCLUDE_DIRS + ${GR_NOAA_INCLUDE_DIRS} + ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} +) + +set(GR_SWIG_LIBRARIES gnuradio-noaa) + +GR_SWIG_MAKE(noaa_swig noaa_swig.i) + +GR_SWIG_INSTALL( + TARGETS noaa_swig + DESTINATION ${GR_PYTHON_DIR}/gnuradio/noaa + COMPONENT "noaa_python" +) + +install( + FILES + noaa_swig.i + noaa_hrpt_decoder.i + noaa_hrpt_deframer.i + noaa_hrpt_pll_cf.i + DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig + COMPONENT "noaa_swig" +) + +GR_PYTHON_INSTALL( + FILES + __init__.py + DESTINATION ${GR_PYTHON_DIR}/gnuradio/noaa + COMPONENT "noaa_python" +) |