summaryrefslogtreecommitdiff
path: root/gr-pager
diff options
context:
space:
mode:
Diffstat (limited to 'gr-pager')
-rw-r--r--gr-pager/CMakeLists.txt102
-rw-r--r--gr-pager/apps/CMakeLists.txt22
-rw-r--r--gr-pager/grc/CMakeLists.txt26
-rw-r--r--gr-pager/lib/CMakeLists.txt76
-rw-r--r--gr-pager/lib/Makefile.am1
-rw-r--r--gr-pager/lib/pager_api.h33
-rw-r--r--gr-pager/lib/pager_flex_deinterleave.h7
-rw-r--r--gr-pager/lib/pager_flex_frame.h7
-rw-r--r--gr-pager/lib/pager_flex_parse.h7
-rw-r--r--gr-pager/lib/pager_flex_sync.h7
-rw-r--r--gr-pager/lib/pager_slicer_fb.h7
-rw-r--r--gr-pager/python/CMakeLists.txt49
-rw-r--r--gr-pager/swig/CMakeLists.txt51
13 files changed, 380 insertions, 15 deletions
diff --git a/gr-pager/CMakeLists.txt b/gr-pager/CMakeLists.txt
new file mode 100644
index 000000000..b138acc38
--- /dev/null
+++ b/gr-pager/CMakeLists.txt
@@ -0,0 +1,102 @@
+# 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-pager" ENABLE_GR_PAGER
+ Boost_FOUND
+ ENABLE_GR_CORE_
+)
+
+GR_SET_GLOBAL(GR_PAGER_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}/lib
+)
+
+########################################################################
+# Begin conditional configuration
+########################################################################
+IF(ENABLE_GR_PAGER)
+
+########################################################################
+# Setup CPack components
+########################################################################
+INCLUDE(GrPackage)
+CPACK_SET(CPACK_COMPONENT_GROUP_PAGER_DESCRIPTION "The GNU Radio Pager Blocks")
+
+CPACK_COMPONENT("pager_runtime"
+ GROUP "Pager"
+ DISPLAY_NAME "Runtime"
+ DESCRIPTION "Runtime"
+ DEPENDS "core_runtime"
+)
+
+CPACK_COMPONENT("pager_devel"
+ GROUP "Pager"
+ DISPLAY_NAME "Development"
+ DESCRIPTION "C++ headers, package config, import libraries"
+ DEPENDS "core_devel"
+)
+
+CPACK_COMPONENT("pager_python"
+ GROUP "Pager"
+ DISPLAY_NAME "Python"
+ DESCRIPTION "Python modules for runtime; GRC xml files"
+ DEPENDS "core_python;pager_runtime"
+)
+
+CPACK_COMPONENT("pager_swig"
+ GROUP "Pager"
+ DISPLAY_NAME "SWIG"
+ DESCRIPTION "SWIG development .i files"
+ DEPENDS "core_swig;pager_python;pager_devel"
+)
+
+########################################################################
+# Add subdirectories
+########################################################################
+ADD_SUBDIRECTORY(lib)
+IF(ENABLE_PYTHON)
+ ADD_SUBDIRECTORY(python)
+ ADD_SUBDIRECTORY(swig)
+ ADD_SUBDIRECTORY(grc)
+ ADD_SUBDIRECTORY(apps)
+ENDIF(ENABLE_PYTHON)
+
+########################################################################
+# Create Pkg Config File
+########################################################################
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-pager.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pager.pc
+@ONLY)
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-pager.pc
+ DESTINATION ${GR_LIBRARY_DIR}/pkgconfig
+ COMPONENT "pager_devel"
+)
+
+ENDIF(ENABLE_GR_PAGER)
diff --git a/gr-pager/apps/CMakeLists.txt b/gr-pager/apps/CMakeLists.txt
new file mode 100644
index 000000000..4b7cd54fa
--- /dev/null
+++ b/gr-pager/apps/CMakeLists.txt
@@ -0,0 +1,22 @@
+# 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.
+
+#FIXME
+#not bothering to install because the apps require gr-usrp
+#which we are choosing not to support in the cmake build system
diff --git a/gr-pager/grc/CMakeLists.txt b/gr-pager/grc/CMakeLists.txt
new file mode 100644
index 000000000..a9c39c4c4
--- /dev/null
+++ b/gr-pager/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
+ pager_slicer_fb.xml
+ pager_flex_sync.xml
+ pager_flex_deinterleave.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "pager_python"
+)
diff --git a/gr-pager/lib/CMakeLists.txt b/gr-pager/lib/CMakeLists.txt
new file mode 100644
index 000000000..c797f733b
--- /dev/null
+++ b/gr-pager/lib/CMakeLists.txt
@@ -0,0 +1,76 @@
+# 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_PAGER_INCLUDE_DIRS}
+)
+
+INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+
+########################################################################
+# Setup library
+########################################################################
+LIST(APPEND gr_pager_sources
+ pager_flex_frame.cc
+ pager_slicer_fb.cc
+ pager_flex_sync.cc
+ pager_flex_deinterleave.cc
+ pager_flex_parse.cc
+ pageri_bch3221.cc
+ pageri_flex_modes.cc
+ pageri_util.cc
+)
+
+LIST(APPEND pager_libs
+ gnuradio-core
+ ${Boost_LIBRARIES}
+)
+
+ADD_LIBRARY(gnuradio-pager SHARED ${gr_pager_sources})
+TARGET_LINK_LIBRARIES(gnuradio-pager ${pager_libs})
+SET_TARGET_PROPERTIES(gnuradio-pager PROPERTIES DEFINE_SYMBOL "gnuradio_pager_EXPORTS")
+SET_TARGET_PROPERTIES(gnuradio-pager PROPERTIES SOVERSION ${LIBVER})
+
+INSTALL(TARGETS gnuradio-pager
+ LIBRARY DESTINATION ${GR_LIBRARY_DIR} COMPONENT "pager_runtime" # .so/.dylib file
+ ARCHIVE DESTINATION ${GR_LIBRARY_DIR} COMPONENT "pager_devel" # .lib file
+ RUNTIME DESTINATION ${GR_RUNTIME_DIR} COMPONENT "pager_runtime" # .dll file
+)
+
+########################################################################
+# Install header files
+########################################################################
+INSTALL(FILES
+ pager_api.h
+ pager_slicer_fb.h
+ pager_flex_sync.h
+ pager_flex_deinterleave.h
+ pager_flex_parse.h
+ pager_flex_frame.h
+ pageri_bch3221.h
+ pageri_flex_modes.h
+ pageri_util.h
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio
+ COMPONENT "pager_devel"
+)
diff --git a/gr-pager/lib/Makefile.am b/gr-pager/lib/Makefile.am
index 29c82ebe8..b6131171d 100644
--- a/gr-pager/lib/Makefile.am
+++ b/gr-pager/lib/Makefile.am
@@ -25,6 +25,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
# These headers get installed in ${prefix}/include/gnuradio
grinclude_HEADERS = \
+ pager_api.h \
pager_slicer_fb.h \
pager_flex_sync.h \
pager_flex_deinterleave.h \
diff --git a/gr-pager/lib/pager_api.h b/gr-pager/lib/pager_api.h
new file mode 100644
index 000000000..4312c5ae3
--- /dev/null
+++ b/gr-pager/lib/pager_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_PAGER_API_H
+#define INCLUDED_PAGER_API_H
+
+#include <gruel/attributes.h>
+
+#ifdef gnuradio_pager_EXPORTS
+# define PAGER_API __GR_ATTR_EXPORT
+#else
+# define PAGER_API __GR_ATTR_IMPORT
+#endif
+
+#endif /* INCLUDED_PAGER_API_H */
diff --git a/gr-pager/lib/pager_flex_deinterleave.h b/gr-pager/lib/pager_flex_deinterleave.h
index 7211a71ad..87094490d 100644
--- a/gr-pager/lib/pager_flex_deinterleave.h
+++ b/gr-pager/lib/pager_flex_deinterleave.h
@@ -22,23 +22,24 @@
#ifndef INCLUDED_PAGER_FLEX_DEINTERLEAVE_H
#define INCLUDED_PAGER_FLEX_DEINTERLEAVE_H
+#include <pager_api.h>
#include <gr_sync_decimator.h>
class pager_flex_deinterleave;
typedef boost::shared_ptr<pager_flex_deinterleave> pager_flex_deinterleave_sptr;
-pager_flex_deinterleave_sptr pager_make_flex_deinterleave();
+PAGER_API pager_flex_deinterleave_sptr pager_make_flex_deinterleave();
/*!
* \brief flex deinterleave description
* \ingroup pager_blk
*/
-class pager_flex_deinterleave : public gr_sync_decimator
+class PAGER_API pager_flex_deinterleave : public gr_sync_decimator
{
private:
// Constructors
- friend pager_flex_deinterleave_sptr pager_make_flex_deinterleave();
+ friend PAGER_API pager_flex_deinterleave_sptr pager_make_flex_deinterleave();
pager_flex_deinterleave();
// One FLEX block of deinterleaved data
diff --git a/gr-pager/lib/pager_flex_frame.h b/gr-pager/lib/pager_flex_frame.h
index 1f4999e2b..857b49d29 100644
--- a/gr-pager/lib/pager_flex_frame.h
+++ b/gr-pager/lib/pager_flex_frame.h
@@ -21,6 +21,7 @@
#ifndef INCLUDED_PAGER_FLEX_FRAME_H
#define INCLUDED_PAGER_FLEX_FRAME_H
+#include <pager_api.h>
#include <boost/shared_ptr.hpp>
class pager_flex_frame;
@@ -29,15 +30,15 @@ typedef boost::shared_ptr<pager_flex_frame> pager_flex_frame_sptr;
/*!
* \brief public constructor for pager_flex_frame
*/
-pager_flex_frame_sptr pager_make_flex_frame();
+PAGER_API pager_flex_frame_sptr pager_make_flex_frame();
/*!
* \brief flex_frame.
*/
-class pager_flex_frame {
+class PAGER_API pager_flex_frame {
// Constructor is private to force use of shared_ptr
pager_flex_frame();
- friend pager_flex_frame_sptr pager_make_flex_frame();
+ friend PAGER_API pager_flex_frame_sptr pager_make_flex_frame();
public:
~pager_flex_frame();
diff --git a/gr-pager/lib/pager_flex_parse.h b/gr-pager/lib/pager_flex_parse.h
index 0f7cfb370..dcbd19eae 100644
--- a/gr-pager/lib/pager_flex_parse.h
+++ b/gr-pager/lib/pager_flex_parse.h
@@ -22,6 +22,7 @@
#ifndef INCLUDED_PAGER_FLEX_PARSE_H
#define INCLUDED_PAGER_FLEX_PARSE_H
+#include <pager_api.h>
#include <gr_sync_block.h>
#include <gr_msg_queue.h>
#include <pageri_flex_modes.h>
@@ -30,7 +31,7 @@
class pager_flex_parse;
typedef boost::shared_ptr<pager_flex_parse> pager_flex_parse_sptr;
-pager_flex_parse_sptr pager_make_flex_parse(gr_msg_queue_sptr queue, float freq);
+PAGER_API pager_flex_parse_sptr pager_make_flex_parse(gr_msg_queue_sptr queue, float freq);
#define FIELD_DELIM ((unsigned char)128)
@@ -38,11 +39,11 @@ pager_flex_parse_sptr pager_make_flex_parse(gr_msg_queue_sptr queue, float freq)
* \brief flex parse description
* \ingroup pager_blk
*/
-class pager_flex_parse : public gr_sync_block
+class PAGER_API pager_flex_parse : public gr_sync_block
{
private:
// Constructors
- friend pager_flex_parse_sptr pager_make_flex_parse(gr_msg_queue_sptr queue, float freq);
+ friend PAGER_API pager_flex_parse_sptr pager_make_flex_parse(gr_msg_queue_sptr queue, float freq);
pager_flex_parse(gr_msg_queue_sptr queue, float freq);
std::ostringstream d_payload;
diff --git a/gr-pager/lib/pager_flex_sync.h b/gr-pager/lib/pager_flex_sync.h
index b401bf532..53b6f950a 100644
--- a/gr-pager/lib/pager_flex_sync.h
+++ b/gr-pager/lib/pager_flex_sync.h
@@ -22,24 +22,25 @@
#ifndef INCLUDED_PAGER_FLEX_SYNC_H
#define INCLUDED_PAGER_FLEX_SYNC_H
+#include <pager_api.h>
#include <gr_block.h>
class pager_flex_sync;
typedef boost::shared_ptr<pager_flex_sync> pager_flex_sync_sptr;
typedef std::vector<gr_int64> gr_int64_vector;
-pager_flex_sync_sptr pager_make_flex_sync();
+PAGER_API pager_flex_sync_sptr pager_make_flex_sync();
/*!
* \brief flex sync description
* \ingroup pager_blk
*/
-class pager_flex_sync : public gr_block
+class PAGER_API pager_flex_sync : public gr_block
{
private:
// Constructors
- friend pager_flex_sync_sptr pager_make_flex_sync();
+ friend PAGER_API pager_flex_sync_sptr pager_make_flex_sync();
pager_flex_sync();
// State machine transitions
diff --git a/gr-pager/lib/pager_slicer_fb.h b/gr-pager/lib/pager_slicer_fb.h
index 75eea3cd3..b3d92780f 100644
--- a/gr-pager/lib/pager_slicer_fb.h
+++ b/gr-pager/lib/pager_slicer_fb.h
@@ -22,21 +22,22 @@
#ifndef INCLUDED_PAGER_SLICER_FB_H
#define INCLUDED_PAGER_SLICER_FB_H
+#include <pager_api.h>
#include <gr_sync_block.h>
class pager_slicer_fb;
typedef boost::shared_ptr<pager_slicer_fb> pager_slicer_fb_sptr;
-pager_slicer_fb_sptr pager_make_slicer_fb(float alpha);
+PAGER_API pager_slicer_fb_sptr pager_make_slicer_fb(float alpha);
/*!
* \brief slicer description
* \ingroup pager_blk
*/
-class pager_slicer_fb : public gr_sync_block
+class PAGER_API pager_slicer_fb : public gr_sync_block
{
private:
- friend pager_slicer_fb_sptr pager_make_slicer_fb(float alpha);
+ friend PAGER_API pager_slicer_fb_sptr pager_make_slicer_fb(float alpha);
pager_slicer_fb(float alpha);
unsigned char slice(float sample);
diff --git a/gr-pager/python/CMakeLists.txt b/gr-pager/python/CMakeLists.txt
new file mode 100644
index 000000000..26fbf6f09
--- /dev/null
+++ b/gr-pager/python/CMakeLists.txt
@@ -0,0 +1,49 @@
+# 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(
+ FILES
+ __init__.py
+ pager_utils.py
+ flex_demod.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/pager
+ COMPONENT "pager_python"
+)
+
+########################################################################
+# Handle the unit tests
+########################################################################
+IF(ENABLE_TESTING)
+INCLUDE(GrTest)
+FILE(GLOB py_qa_test_files "qa_*.py")
+FOREACH(py_qa_test_file ${py_qa_test_files})
+ GET_FILENAME_COMPONENT(py_qa_test_name ${py_qa_test_file} NAME_WE)
+ SET(GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig
+ ${CMAKE_BINARY_DIR}/gr-pager/python
+ ${CMAKE_BINARY_DIR}/gr-pager/swig
+ )
+ SET(GR_TEST_TARGET_DEPS gruel gnuradio-core gnuradio-pager)
+ GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file})
+ENDFOREACH(py_qa_test_file)
+ENDIF(ENABLE_TESTING)
diff --git a/gr-pager/swig/CMakeLists.txt b/gr-pager/swig/CMakeLists.txt
new file mode 100644
index 000000000..24cab0c9a
--- /dev/null
+++ b/gr-pager/swig/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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_PAGER_INCLUDE_DIRS}
+ ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
+)
+
+SET(GR_SWIG_LIBRARIES gnuradio-pager)
+
+GR_SWIG_MAKE(pager_swig pager_swig.i)
+
+GR_SWIG_INSTALL(
+ TARGETS pager_swig
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/pager
+ COMPONENT "pager_python"
+)
+
+INSTALL(
+ FILES
+ pager_swig.i
+ pager_flex_deinterleave.i
+ pager_flex_frame.i
+ pager_flex_parse.i
+ pager_flex_sync.i
+ pager_slicer_fb.i
+ DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
+ COMPONENT "pager_swig"
+)