aboutsummaryrefslogtreecommitdiffstats
path: root/grc
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2012-04-06 15:29:14 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2012-04-06 15:29:14 +0200
commit0efd28de6bc86c3e474cfad70d1e5889575224a7 (patch)
treed3d12127a6315f026505629bec961d32696271e6 /grc
initial commit
Diffstat (limited to 'grc')
-rw-r--r--grc/CMakeLists.txt24
-rw-r--r--grc/osmosdr_sink_c.xml13
-rw-r--r--grc/osmosdr_source_c.xml44
3 files changed, 81 insertions, 0 deletions
diff --git a/grc/CMakeLists.txt b/grc/CMakeLists.txt
new file mode 100644
index 0000000..f5f5593
--- /dev/null
+++ b/grc/CMakeLists.txt
@@ -0,0 +1,24 @@
+# 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
+ osmosdr_source_c.xml
+ osmosdr_sink_c.xml
+ DESTINATION share/gnuradio/grc/blocks
+)
diff --git a/grc/osmosdr_sink_c.xml b/grc/osmosdr_sink_c.xml
new file mode 100644
index 0000000..727abb2
--- /dev/null
+++ b/grc/osmosdr_sink_c.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<block>
+ <name>OsmoSDR Sink</name>
+ <key>osmosdr_sink_c</key>
+ <category>OsmoSDR</category>
+ <import>import osmosdr</import>
+ <make>osmosdr.sink_c()</make>
+
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+</block>
diff --git a/grc/osmosdr_source_c.xml b/grc/osmosdr_source_c.xml
new file mode 100644
index 0000000..6d8cb15
--- /dev/null
+++ b/grc/osmosdr_source_c.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<block>
+ <name>OsmoSDR Source</name>
+ <key>osmosdr_source_c</key>
+ <category>OsmoSDR</category>
+ <import>import osmosdr</import>
+ <make>osmosdr.source_c($args)
+self.$(id).set_center_freq($freq)
+self.$(id).set_samp_rate($rate)
+self.$(id).set_gain($gain)
+ </make>
+ <callback>set_center_freq($freq)</callback>
+ <callback>set_samp_rate($rate)</callback>
+ <callback>set_gain($gain)</callback>
+ <param>
+ <name>Device specific arguments</name>
+ <key>args</key>
+ <value></value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Frequency (Hz)</name>
+ <key>freq</key>
+ <value>392.8e6</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Samplerate (Hz)</name>
+ <key>rate</key>
+ <value>2048000</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Gain (dB)</name>
+ <key>gain</key>
+ <value>20.0</value>
+ <type>real</type>
+ </param>
+ <check>($freq &gt;= 50e6) and ($freq &lt;= 2.2e9)</check>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>