howto: add GRC wrappers to squaring blocks
authorJohnathan Corgan <jcorgan@corganenterprises.com>
Thu, 12 Nov 2009 18:58:55 +0000 (10:58 -0800)
committerJohnathan Corgan <jcorgan@corganenterprises.com>
Thu, 12 Nov 2009 18:58:55 +0000 (10:58 -0800)
gr-howto-write-a-block/Makefile.am
gr-howto-write-a-block/Makefile.common
gr-howto-write-a-block/configure.ac
gr-howto-write-a-block/grc/.gitignore [new file with mode: 0644]
gr-howto-write-a-block/grc/Makefile.am [new file with mode: 0644]
gr-howto-write-a-block/grc/howto_square2_ff.xml [new file with mode: 0644]
gr-howto-write-a-block/grc/howto_square_ff.xml [new file with mode: 0644]

index ce2e4e8ca2c6ea94a0499b842eff1bc0b544abdb..d5c46498d8f1aeb2b007f3f807981a8b37bff5fb 100644 (file)
@@ -31,7 +31,7 @@ EXTRA_DIST = \
        Makefile.swig.gen.t \
        version.sh
 
-SUBDIRS = config lib swig python
+SUBDIRS = config lib swig python grc
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA =
index 4b808112511afb5f5c6a50e63496e1c27c303780..c81bc780dcf4efc2ed61a369ef0a562baa745439 100644 (file)
@@ -50,6 +50,9 @@ swigincludedir = $(grincludedir)/swig
 grpythondir = $(pythondir)/gnuradio
 grpyexecdir = $(pyexecdir)/gnuradio
 
+# Data directory for grc block wrappers
+grc_blocksdir = $(prefix)/share/gnuradio/grc/blocks
+
 # Don't assume that make predefines $(RM), because BSD make does
 # not. We define it now in configure.ac using AM_PATH_PROG, but now
 # here have to add a -f to be like GNU make.
index 8241f7ec1aaea4ae1589065c3199a3e4c43e1957..9525ac0e6ee3ed42b1ba53da9c9da03202e4c824 100644 (file)
@@ -72,6 +72,7 @@ dnl AX_BOOST_WSERIALIZATION
 AC_CONFIG_FILES([\
          Makefile \
          config/Makefile \
+         grc/Makefile \
          lib/Makefile \
          python/Makefile \
          python/run_tests \
diff --git a/gr-howto-write-a-block/grc/.gitignore b/gr-howto-write-a-block/grc/.gitignore
new file mode 100644 (file)
index 0000000..b336cc7
--- /dev/null
@@ -0,0 +1,2 @@
+/Makefile
+/Makefile.in
diff --git a/gr-howto-write-a-block/grc/Makefile.am b/gr-howto-write-a-block/grc/Makefile.am
new file mode 100644 (file)
index 0000000..32dcf1b
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# Copyright 2009 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 $(top_srcdir)/Makefile.common
+
+grcblocksdir = $(grc_blocksdir)
+
+dist_grcblocks_DATA = \
+       howto_square_ff.xml \
+       howto_square2_ff.xml
+
diff --git a/gr-howto-write-a-block/grc/howto_square2_ff.xml b/gr-howto-write-a-block/grc/howto_square2_ff.xml
new file mode 100644 (file)
index 0000000..2b46106
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<block>
+  <name>Square2</name>
+  <key>howto_square2_ff</key>
+  <category>HOWTO</category>
+  <import>from gnuradio import howto</import>
+  <make>howto.square2_ff()</make>
+
+  <sink>
+    <name>in</name>
+    <type>float</type>
+  </sink>
+
+  <source>
+    <name>out</name>
+    <type>float</type>
+  </source>
+</block>
diff --git a/gr-howto-write-a-block/grc/howto_square_ff.xml b/gr-howto-write-a-block/grc/howto_square_ff.xml
new file mode 100644 (file)
index 0000000..ed318bf
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<block>
+  <name>Square</name>
+  <key>howto_square_ff</key>
+  <category>HOWTO</category>
+  <import>from gnuradio import howto</import>
+  <make>howto.square_ff()</make>
+
+  <sink>
+    <name>in</name>
+    <type>float</type>
+  </sink>
+
+  <source>
+    <name>out</name>
+    <type>float</type>
+  </source>
+</block>