forked from gnuradio/gnuradio
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
filter: work on creating gr-filter top-level component.
Builds but does not bring in libgnuradio-fft.so symbols.
- Loading branch information
Showing
21 changed files
with
1,098 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# Copyright 2012 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-filter" ENABLE_GR_FILTER | ||
ENABLE_GRUEL | ||
ENABLE_VOLK | ||
Boost_FOUND | ||
ENABLE_GR_CORE | ||
ENABLE_GR_FFT | ||
) | ||
|
||
GR_SET_GLOBAL(FILTER_INCLUDE_DIRS | ||
${CMAKE_CURRENT_SOURCE_DIR}/lib | ||
${CMAKE_CURRENT_SOURCE_DIR}/include | ||
) | ||
|
||
######################################################################## | ||
# Begin conditional configuration | ||
######################################################################## | ||
if(ENABLE_GR_FILTER) | ||
|
||
######################################################################## | ||
# Setup CPack components | ||
######################################################################## | ||
include(GrPackage) | ||
CPACK_SET(CPACK_COMPONENT_GROUP_FILTER_DESCRIPTION "GNU Radio Filter Blocks") | ||
|
||
CPACK_COMPONENT("filter_runtime" | ||
GROUP "Filter" | ||
DISPLAY_NAME "Runtime" | ||
DESCRIPTION "Runtime" | ||
DEPENDS "core_runtime" | ||
) | ||
|
||
CPACK_COMPONENT("filter_devel" | ||
GROUP "Filter" | ||
DISPLAY_NAME "Development" | ||
DESCRIPTION "C++ headers, package config, import libraries" | ||
DEPENDS "core_devel" | ||
) | ||
|
||
CPACK_COMPONENT("filter_python" | ||
GROUP "Filter" | ||
DISPLAY_NAME "Python" | ||
DESCRIPTION "Python modules for runtime; GRC xml files" | ||
DEPENDS "core_python;filter_runtime" | ||
) | ||
|
||
CPACK_COMPONENT("filter_swig" | ||
GROUP "Filter" | ||
DISPLAY_NAME "SWIG" | ||
DESCRIPTION "SWIG development .i files" | ||
DEPENDS "core_swig;filter_python;filter_devel" | ||
) | ||
|
||
######################################################################## | ||
# Add subdirectories | ||
######################################################################## | ||
add_subdirectory(include/filter) | ||
add_subdirectory(lib) | ||
if(ENABLE_PYTHON) | ||
add_subdirectory(swig) | ||
add_subdirectory(python) | ||
add_subdirectory(grc) | ||
endif(ENABLE_PYTHON) | ||
#add_subdirectory(examples) | ||
add_subdirectory(doc) | ||
|
||
######################################################################## | ||
# Create Pkg Config File | ||
######################################################################## | ||
configure_file( | ||
${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-filter.pc.in | ||
${CMAKE_CURRENT_BINARY_DIR}/gnuradio-filter.pc | ||
@ONLY) | ||
|
||
install( | ||
FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-filter.pc | ||
DESTINATION ${GR_LIBRARY_DIR}/pkgconfig | ||
COMPONENT "filter_devel" | ||
) | ||
|
||
endif(ENABLE_GR_FILTER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2012 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 README.filter | ||
DESTINATION ${GR_PKG_DOC_DIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This is the gr-filter package. It contains signal processing blocks to | ||
perform filtering operations. | ||
|
||
The Python namespace is in gnuradio.filter, which would be normally | ||
imported as: | ||
|
||
from gnuradio import filter | ||
|
||
See the Doxygen documentation for details about the blocks available | ||
in this package. A quick listing of the details can be found in Python | ||
after importing by using: | ||
|
||
help(filter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*! \page page_filter filter Signal Processing Blocks | ||
|
||
\section Introduction | ||
|
||
This is the gr-filter package. It contains signal processing blocks to | ||
perform filtering operations. | ||
|
||
The Python namespace is in gnuradio.filter, which would be normally | ||
imported as: | ||
|
||
\code | ||
from gnuradio import filter | ||
\endcode | ||
|
||
See the Doxygen documentation for details about the blocks available | ||
in this package. A quick listing of the details can be found in Python | ||
after importing by using: | ||
|
||
\code | ||
help(filter) | ||
\endcode | ||
|
||
\section Dependencies | ||
|
||
The filter blocks depend on \ref page_fft. | ||
|
||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
prefix=@prefix@ | ||
exec_prefix=@exec_prefix@ | ||
libdir=@libdir@ | ||
includedir=@includedir@ | ||
|
||
Name: gnuradio-filter | ||
Description: GNU Radio's filter signal processing blocks | ||
Requires: gnuradio-core gnuradio-fft | ||
Version: @LIBVER@ | ||
Libs: -L${libdir} -lgnuradio-filter | ||
Cflags: -I${includedir} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2012 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 | ||
filter_block_tree.xml | ||
DESTINATION ${GRC_BLOCKS_DIR} | ||
COMPONENT "filter_python" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
Copyright 2012 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. | ||
--> | ||
|
||
<!-- | ||
################################################### | ||
##Block Tree for GR Filter blocks. | ||
################################################### | ||
--> | ||
<cat> | ||
<name></name> <!-- Blank for Root Name --> | ||
<cat> | ||
<name>Filters</name> | ||
</cat> | ||
</cat> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# Copyright 2012 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. | ||
|
||
######################################################################## | ||
# generate helper scripts to expand templated files | ||
######################################################################## | ||
include(GrPython) | ||
|
||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py " | ||
#!${PYTHON_EXECUTABLE} | ||
import sys, os, re | ||
sys.path.append('${GR_CORE_PYTHONPATH}') | ||
os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}' | ||
os.chdir('${CMAKE_CURRENT_BINARY_DIR}') | ||
if __name__ == '__main__': | ||
import build_utils | ||
root, inp = sys.argv[1:3] | ||
for sig in sys.argv[3:]: | ||
name = re.sub ('X+', sig, root) | ||
d = build_utils.standard_dict2(name, sig, 'filter') | ||
build_utils.expand_template(d, inp) | ||
") | ||
|
||
macro(expand_h root) | ||
#make a list of all the generated files | ||
unset(expanded_files_h) | ||
foreach(sig ${ARGN}) | ||
string(REGEX REPLACE "X+" ${sig} name ${root}) | ||
list(APPEND expanded_files_h ${CMAKE_CURRENT_BINARY_DIR}/${name}.h) | ||
endforeach(sig) | ||
|
||
#create a command to generate the files | ||
add_custom_command( | ||
OUTPUT ${expanded_files_h} | ||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.h.t | ||
COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} | ||
${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py | ||
${root} ${root}.h.t ${ARGN} | ||
) | ||
|
||
#install rules for the generated h files | ||
list(APPEND generated_includes ${expanded_files_h}) | ||
endmacro(expand_h) | ||
|
||
######################################################################## | ||
# Invoke macro to generate various sources | ||
####################################################################### | ||
#expand_h(fir_filter_XXX fff ccc ccf fcc fsf scc) | ||
|
||
#add_custom_target(filter_generated_includes DEPENDS | ||
# ${generated_includes} | ||
#) | ||
|
||
######################################################################## | ||
# Install header files | ||
######################################################################## | ||
install(FILES | ||
api.h | ||
fir_filter_fff.h | ||
DESTINATION ${GR_INCLUDE_DIR}/gnuradio/fft | ||
COMPONENT "fft_devel" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2012 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_FILTER_API_H | ||
#define INCLUDED_FILTER_API_H | ||
|
||
#include <gruel/attributes.h> | ||
|
||
#ifdef gnuradio_filter_EXPORTS | ||
# define FILTER_API __GR_ATTR_EXPORT | ||
#else | ||
# define FILTER_API __GR_ATTR_IMPORT | ||
#endif | ||
|
||
#endif /* INCLUDED_FILTER_API_H */ |
Oops, something went wrong.