summaryrefslogtreecommitdiff
path: root/gr-scigen/grc
diff options
context:
space:
mode:
authormanojgudi2013-10-07 14:04:07 +0530
committermanojgudi2013-10-07 14:04:07 +0530
commite9576e44ef8f0ad67d8cd8a4e025a0f8da0727f8 (patch)
tree3a77657667b4ef037f712ee68a5ec86c86cba5c5 /gr-scigen/grc
parented97c528ce61496e10d612a4f5e9aef509b65ccf (diff)
downloadgnuradio-e9576e44ef8f0ad67d8cd8a4e025a0f8da0727f8.tar.gz
gnuradio-e9576e44ef8f0ad67d8cd8a4e025a0f8da0727f8.tar.bz2
gnuradio-e9576e44ef8f0ad67d8cd8a4e025a0f8da0727f8.zip
added gr-scimod block+CMake change | compiles fine
Diffstat (limited to 'gr-scigen/grc')
-rw-r--r--gr-scigen/grc/CMakeLists.txt24
-rw-r--r--gr-scigen/grc/scigen.xml82
2 files changed, 106 insertions, 0 deletions
diff --git a/gr-scigen/grc/CMakeLists.txt b/gr-scigen/grc/CMakeLists.txt
new file mode 100644
index 000000000..ca8f65d18
--- /dev/null
+++ b/gr-scigen/grc/CMakeLists.txt
@@ -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
+ scigen.xml
+ DESTINATION ${GRC_BLOCKS_DIR}
+ COMPONENT "scigen_python"
+)
diff --git a/gr-scigen/grc/scigen.xml b/gr-scigen/grc/scigen.xml
new file mode 100644
index 000000000..d8c7a25bf
--- /dev/null
+++ b/gr-scigen/grc/scigen.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Add Block:
+## all types, 1 output, 2 to inf inputs
+###################################################
+ -->
+<block>
+ <name>generic</name>
+ <key>scigen_generic</key>
+ <category>scigen</category>
+
+ <import>import scigen</import>
+ <make>scigen.generic()
+self.$(id).set_parameters($func_name, $window)
+ </make>
+ <param>
+ <name>IO Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option><name>FC32_FC32</name><key>fc32_fc32</key></option>
+ <option><name>F32_F32</name><key>f32_f32</key></option>
+ <option><name>SC32_SC32</name><key>sc32_sc32</key></option>
+ <option><name>S32_S32</name><key>s32_s32</key></option>
+ <option><name>SC16_SC16</name><key>sc16_sc16</key></option>
+ <option><name>S16_S16</name><key>s16_s16</key></option>
+ <option><name>SC8_SC8</name><key>sc8_sc8</key></option>
+ <option><name>S8_S8</name><key>s8_s8</key></option>
+ </param>
+ <param>
+ <name>Num Inputs</name>
+ <key>num_inputs</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Vec Length</name>
+ <key>vlen</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Window</name>
+ <key>window</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+
+ <param>
+ <name>Function Name</name>
+ <key>func_name</key>
+ <value>""</value>
+ <type>string</type>
+ </param>
+
+
+ <!--
+ Check if number of inputs are greater than 0, and if vector length
+ is greater than 0.
+ -->
+ <check>$num_inputs &gt; 0</check>
+ <check>$vlen &gt; 0</check>
+ <sink>
+ <name>in</name>
+ <type>$(str($type).split('_')[0])</type>
+ <vlen>$vlen</vlen>
+ <nports>$num_inputs</nports>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$(str($type).split('_')[1])</type>
+ <vlen>$vlen</vlen>
+ </source>
+ <doc>
+Scilab Generic Block
+
+> Check if your scilab function requires multiple inputs
+> Make sure you have same n_input_items when you have multiple inputs
+ </doc>
+</block>