[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7777 - in grc/branches/grc_reloaded: notes src/grc/el
From: |
jblum |
Subject: |
[Commit-gnuradio] r7777 - in grc/branches/grc_reloaded: notes src/grc/elements src/grc/platforms/gnuradio_python src/grc/platforms/gnuradio_python/blocks src/grc/platforms/gnuradio_python/blocks/operators src/grc/platforms/gnuradio_python/blocks/sinks src/grc/platforms/gnuradio_python/blocks/sources src/grc/platforms/gnuradio_python/blocks/variables src/grc/platforms/gnuradio_python/data |
Date: |
Fri, 22 Feb 2008 13:18:20 -0700 (MST) |
Author: jblum
Date: 2008-02-22 13:18:19 -0700 (Fri, 22 Feb 2008)
New Revision: 7777
Added:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/audio_sink.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/audio_source.xml
Modified:
grc/branches/grc_reloaded/notes/clean.sh
grc/branches/grc_reloaded/src/grc/elements/Block.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Block.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/FlowGraph.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Param.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Port.py
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/block.dtd
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_const_vxx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_vxx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_and_xx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_const_vxx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_vxx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_not_xx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_or_xx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_xor_xx.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/options.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/preferences.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_file_sink.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_null_sink.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_wavfile_sink.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_file_source.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_null_source.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_wavfile_source.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_button.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_drop_down.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_slider.xml
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/no_gui.tmpl
Log:
removed some redundant opts, added audio source sink
Modified: grc/branches/grc_reloaded/notes/clean.sh
===================================================================
--- grc/branches/grc_reloaded/notes/clean.sh 2008-02-22 19:40:19 UTC (rev
7776)
+++ grc/branches/grc_reloaded/notes/clean.sh 2008-02-22 20:18:19 UTC (rev
7777)
@@ -3,5 +3,5 @@
cd ..
pwd
rm -rf `find ./ -type f -name "*.pyc"`
-rm -rf `find ./ -type f -name "*.py~"`
+rm -rf `find ./ -type f -name "*~"`
rm -rf `find ./ -type f -name "*.bak"`
Modified: grc/branches/grc_reloaded/src/grc/elements/Block.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/elements/Block.py 2008-02-22 19:40:19 UTC
(rev 7776)
+++ grc/branches/grc_reloaded/src/grc/elements/Block.py 2008-02-22 20:18:19 UTC
(rev 7777)
@@ -160,16 +160,17 @@
@param to_code true if to_code method should be used
@return the resolved value
"""
- #create a dictionary of all possible dependency strings
- deps = dict()
for param in self.get_params():
+ #replace all $param_key:opt_key for enums
if param.is_enum():
for key in param.get_opt_keys():
- deps['$'+param.get_key()+':'+key] =
param.get_opt(key)
- else: deps['$'+param.get_key()] = to_code and
param.to_code() or param.get_value()
- #replace any dependencies with actual values
- for key,value in deps.iteritems():
- string = string.replace(key, value)
+ find = '$'+param.get_key()+':'+key
+ replace = param.get_opt(key)
+ string = string.replace(find, replace)
+ #replace all $param_key for all params
+ find = '$'+param.get_key()
+ replace = to_code and param.to_code() or
param.get_value()
+ string = string.replace(find, replace)
return string
##############################################
Modified: grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Block.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Block.py
2008-02-22 19:40:19 UTC (rev 7776)
+++ grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Block.py
2008-02-22 20:18:19 UTC (rev 7777)
@@ -39,8 +39,8 @@
"""
#grab the data
doc = Utils.exists_or_else(n, 'doc', '')
- deps = Utils.listify(n, 'dep')
- fcn = n['fcn']
+ imports = map(lambda i: i.strip(), Utils.listify(n, 'import'))
+ make = n['make']
callbacks = Utils.listify(n, 'callback')
#build the block
_Block.__init__(
@@ -49,8 +49,8 @@
n=n,
)
self._doc = doc
- self._deps = deps
- self._fcn = fcn
+ self._imports = imports
+ self._make = make
self._callbacks = callbacks
def validate(self):
@@ -91,30 +91,9 @@
def get_doc(self): return self._doc
- def get_deps(self): return self._deps
+ def get_imports(self): return self._imports
- def get_fcn(self): return self.resolve_dependencies(self._fcn,
to_code=True)
+ def get_make(self): return self.resolve_dependencies(self._make,
to_code=True)
def get_callbacks(self): return self._callbacks
- ##############################################
- ## Static Make Methods
- ##############################################
- def make_block_from_n():
-
- return Block(
- flow_graph=flow_graph,
- doc=doc,
- name=name,
- key=key,
- cat=cat,
- deps=deps,
- fcn=fcn,
- callbacks=callbacks,
- params=params,
- checks=checks,
- sources=sources,
- sinks=sinks,
- )
- make_block_from_n = staticmethod(make_block_from_n)
-
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/FlowGraph.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/FlowGraph.py
2008-02-22 19:40:19 UTC (rev 7776)
+++ grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/FlowGraph.py
2008-02-22 20:18:19 UTC (rev 7777)
@@ -49,7 +49,7 @@
#load variables
for block in filter(lambda b:
b.get_key().startswith('variable'), self.get_blocks()):
try:
- e = eval(block.get_fcn(), {}, {})
+ e = eval(block.get_make(), {}, {})
namespace[block.get_id()] = e
except: pass
e = eval(expr, namespace, {})
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
2008-02-22 19:40:19 UTC (rev 7776)
+++ grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Generator.py
2008-02-22 20:18:19 UTC (rev 7777)
@@ -40,7 +40,7 @@
all_blocks = self._flow_graph.get_blocks()
#get imports
imports = ['from gnuradio import gr']
- for block in all_blocks: imports.extend(block.get_deps())
+ for block in all_blocks: imports.extend(block.get_imports())
imports = set(imports) #all entries unique
#separate variables
variables = filter(lambda b:
b.get_key().startswith('variable'), all_blocks)
Modified: grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Param.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Param.py
2008-02-22 19:40:19 UTC (rev 7776)
+++ grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Param.py
2008-02-22 20:18:19 UTC (rev 7777)
@@ -186,7 +186,7 @@
t = self.get_type()
if t in ('string', 'file_open', 'file_save'):
if self._stringify_flag:
- return '"%s"'%v
+ return '"%s"'%v.replace('"', '\"')
else:
return v
elif t in ('complex_vector', 'real_vector', 'int_vector'):
Modified: grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Port.py
===================================================================
--- grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Port.py
2008-02-22 19:40:19 UTC (rev 7776)
+++ grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/Port.py
2008-02-22 20:18:19 UTC (rev 7777)
@@ -22,6 +22,7 @@
from grc.elements.Port import Port as _Port
from grc import Utils
+from grc.Constants import MAX_NUM_PORTS
class Port(_Port):
@@ -80,7 +81,7 @@
if not nports: return ''
try:
nports =
int(self.get_parent().get_parent().evaluate(nports))
- assert(nports > 0)
+ assert(0 < nports <= MAX_NUM_PORTS)
return nports
except: return 1
@@ -92,21 +93,23 @@
Codes differ for ports where the vec length is 1 or greater
than 1.
@return a hex color code.
"""
- if self.get_vlen() == 1:
- return {#vlen is 1
- 'complex': '#3399FF',
- 'float': '#FF8C69',
- 'int': '#00FF99',
- 'short': '#FFFF66',
- 'byte': '#FF66FF',
- }[self.get_type()]
- return {#vlen is non 1
- 'complex': '#3399AA',
- 'float': '#CC8C69',
- 'int': '#00CC99',
- 'short': '#CCCC33',
- 'byte': '#CC66CC',
- }[self.get_type()]
+ try:
+ if self.get_vlen() == 1:
+ return {#vlen is 1
+ 'complex': '#3399FF',
+ 'float': '#FF8C69',
+ 'int': '#00FF99',
+ 'short': '#FFFF66',
+ 'byte': '#FF66FF',
+ }[self.get_type()]
+ return {#vlen is non 1
+ 'complex': '#3399AA',
+ 'float': '#CC8C69',
+ 'int': '#00CC99',
+ 'short': '#CCCC33',
+ 'byte': '#CC66CC',
+ }[self.get_type()]
+ except: return _Port.get_color(self)
def is_empty(self):
"""!
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/block.dtd
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/block.dtd
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/block.dtd
2008-02-22 20:18:19 UTC (rev 7777)
@@ -26,7 +26,7 @@
Top level element.
A block contains a name, ...parameters list, and list of IO ports.
-->
-<!ELEMENT block (name, key, dep*, fcn, callback*, param*, check*, sink*,
source*, doc?)>
+<!ELEMENT block (name, key, import*, make, callback*, param*, check*, sink*,
source*, doc?)>
<!--
Sub level elements.
-->
@@ -38,7 +38,7 @@
Bottom level elements.
Character data only.
-->
-<!ELEMENT dep (#PCDATA)>
+<!ELEMENT import (#PCDATA)>
<!ELEMENT doc (#PCDATA)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT key (#PCDATA)>
@@ -47,7 +47,7 @@
<!ELEMENT type (#PCDATA)>
<!ELEMENT vlen (#PCDATA)>
<!ELEMENT nports (#PCDATA)>
-<!ELEMENT fcn (#PCDATA)>
+<!ELEMENT make (#PCDATA)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT callback (#PCDATA)>
<!ELEMENT optional (#PCDATA)>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_const_vxx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_const_vxx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_const_vxx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -9,8 +9,8 @@
<block>
<name>Add Const</name>
<key>gr_add_const_vxx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn($const)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn($const)</make>
<callback>set_k($const)</callback>
<param>
<name>Constant</name>
@@ -26,28 +26,24 @@
<name>Complex</name>
<key>complex</key>
<opt>const_type:complex_vector</opt>
- <opt>type:complex</opt>
<opt>fcn:gr.add_const_vcc</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
<opt>const_type:real_vector</opt>
- <opt>type:float</opt>
<opt>fcn:gr.add_const_vff</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
<opt>const_type:int_vector</opt>
- <opt>type:int</opt>
<opt>fcn:gr.add_const_vii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
<opt>const_type:int_vector</opt>
- <opt>type:short</opt>
<opt>fcn:gr.add_const_vss</opt>
</option>
</param>
@@ -61,12 +57,12 @@
<check>$vec_len >= 1</check>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vec_len</vlen>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vec_len</vlen>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_vxx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_vxx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_add_vxx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -9,8 +9,8 @@
<block>
<name>Add</name>
<key>gr_add_vxx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn($vlen)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn($vlen)</make>
<param>
<name>Num Inputs</name>
<key>num_inputs</key>
@@ -24,25 +24,21 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>type:complex</opt>
<opt>fcn:gr.add_vcc</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>type:float</opt>
<opt>fcn:gr.add_vff</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>fcn:gr.add_vii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>fcn:gr.add_vss</opt>
</option>
</param>
@@ -56,13 +52,13 @@
<check>$vlen >= 1</check>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
<nports>$num_inputs</nports>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_and_xx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_and_xx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_and_xx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>And</name>
<key>gr_and_xx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn()</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn()</make>
<param>
<name>IO Type</name>
<key>type</key>
@@ -17,28 +17,25 @@
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>fcn:gr.and_ii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>fcn:gr.and_ss</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>fcn:gr.and_bb</opt>
</option>
</param>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_const_vxx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_const_vxx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_const_vxx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -9,8 +9,8 @@
<block>
<name>Multiply Const</name>
<key>gr_multiply_const_vxx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn($const)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn($const)</make>
<callback>set_k($const)</callback>
<param>
<name>Constant</name>
@@ -26,28 +26,24 @@
<name>Complex</name>
<key>complex</key>
<opt>const_type:complex_vector</opt>
- <opt>type:complex</opt>
<opt>fcn:gr.multiply_const_vcc</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
<opt>const_type:real_vector</opt>
- <opt>type:float</opt>
<opt>fcn:gr.multiply_const_vff</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
<opt>const_type:int_vector</opt>
- <opt>type:int</opt>
<opt>fcn:gr.multiply_const_vii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
<opt>const_type:int_vector</opt>
- <opt>type:short</opt>
<opt>fcn:gr.multiply_const_vss</opt>
</option>
</param>
@@ -61,12 +57,12 @@
<check>$vec_len >= 1</check>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vec_len</vlen>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vec_len</vlen>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_vxx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_vxx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_multiply_vxx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -9,8 +9,8 @@
<block>
<name>Multiply</name>
<key>gr_multiply_vxx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn($vlen)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn($vlen)</make>
<param>
<name>Num Inputs</name>
<key>num_inputs</key>
@@ -24,25 +24,21 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>type:complex</opt>
<opt>fcn:gr.multiply_vcc</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>type:float</opt>
<opt>fcn:gr.multiply_vff</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>fcn:gr.multiply_vii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>fcn:gr.multiply_vss</opt>
</option>
</param>
@@ -56,13 +52,13 @@
<check>$vlen >= 1</check>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
<nports>$num_inputs</nports>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_not_xx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_not_xx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_not_xx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Not</name>
<key>gr_not_xx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn()</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn()</make>
<param>
<name>IO Type</name>
<key>type</key>
@@ -17,28 +17,25 @@
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>fcn:gr.not_ii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>fcn:gr.not_ss</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>fcn:gr.not_bb</opt>
</option>
</param>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_or_xx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_or_xx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_or_xx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Or</name>
<key>gr_or_xx</key>
- <dep>from gnuradio import gr</dep>
- <fcn>$type:fcn()</fcn>
+ <import>from gnuradio import gr</import>
+ <make>$type:fcn()</make>
<param>
<name>IO Type</name>
<key>type</key>
@@ -17,28 +17,25 @@
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>fcn:gr.or_ii</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>fcn:gr.or_ss</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>fcn:gr.or_bb</opt>
</option>
</param>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_xor_xx.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_xor_xx.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/operators/gr_xor_xx.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Xor</name>
<key>gr_xor_xx</key>
- <dep>from gnuradio impxort gr</dep>
- <fcn>$type:fcn()</fcn>
+ <import>from gnuradio impxort gr</import>
+ <make>$type:fcn()</make>
<param>
<name>IO Type</name>
<key>type</key>
@@ -17,28 +17,25 @@
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>fcn:gr.xor_ii</opt>
</option>
<option>
<name>Shxort</name>
- <key>shxort</key>
- <opt>type:shxort</opt>
+ <key>short</key>
<opt>fcn:gr.xor_ss</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>fcn:gr.xor_bb</opt>
</option>
</param>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
</sink>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
</source>
</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/options.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/options.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/options.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -10,7 +10,7 @@
<block>
<name>Options</name>
<key>options</key>
- <fcn />
+ <make></make>
<param>
<name>Name</name>
<key>name</key>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/preferences.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/preferences.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/preferences.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -9,7 +9,7 @@
<block>
<name>Preferences</name>
<key>preferences</key>
- <fcn></fcn>
+ <make></make>
<!-- Hidden Prefs -->
<param>
<name>Files Open</name>
Added:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/audio_sink.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/audio_sink.xml
(rev 0)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/audio_sink.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!DOCTYPE block SYSTEM "../block.dtd">
+<!--
+###################################################
+##Audio Sink
+###################################################
+ -->
+<block>
+ <name>Audio Sink</name>
+ <key>audio_sink</key>
+ <import>from gnuradio import audio</import>
+ <make>audio.sink($samp_rate, $device_name, $ok_to_block)</make>
+ <param>
+ <name>Sample Rate</name>
+ <key>samp_rate</key>
+ <value>32000</value>
+ <type>enum</type>
+ <option>
+ <name>16KHz</name>
+ <key>16000</key>
+ </option>
+ <option>
+ <name>22.05KHz</name>
+ <key>22050</key>
+ </option>
+ <option>
+ <name>24KHz</name>
+ <key>24000</key>
+ </option>
+ <option>
+ <name>32KHz</name>
+ <key>32000</key>
+ </option>
+ <option>
+ <name>44.1KHz</name>
+ <key>44100</key>
+ </option>
+ <option>
+ <name>48KHz</name>
+ <key>48000</key>
+ </option>
+ </param>
+ <param>
+ <name>Device Name</name>
+ <key>device_name</key>
+ <value></value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>OK to Block</name>
+ <key>ok_to_block</key>
+ <value>True</value>
+ <type>enum</type>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Num Inputs</name>
+ <key>num_inputs</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>0 < $num_inputs</check>
+ <sink>
+ <name>in</name>
+ <type>float</type>
+ <nports>$num_inputs</nports>
+ </sink>
+ <doc>
+Not all sampling rates will be supported by your hardware.
+
+Leave the device name blank to choose deafult audio device.
+Audio device names may look like hw:0,0
+
+The audio sink can have multiple inputs depending upon your hardware.
+For example, set the inputs to 2 for stereo audio.
+ </doc>
+</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_file_sink.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_file_sink.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_file_sink.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>File Sink</name>
<key>gr_file_sink</key>
- <dep>from gnuradio import gr</dep>
- <fcn>gr.file_sink($type:size*$vlen, $file)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>gr.file_sink($type:size*$vlen, $file)</make>
<param>
<name>File</name>
<key>file</key>
@@ -23,31 +23,26 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>type:complex</opt>
<opt>size:gr.sizeof_gr_complex</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>type:float</opt>
<opt>size:gr.sizeof_float</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>size:gr.sizeof_int</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>size:gr.sizeof_short</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>size:gr.sizeof_char</opt>
</option>
</param>
@@ -60,7 +55,7 @@
<check>$vlen >= 1</check>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
</sink>
<doc>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_null_sink.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_null_sink.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_null_sink.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Null Sink</name>
<key>gr_null_sink</key>
- <dep>from gnuradio import gr</dep>
- <fcn>gr.null_sink($type:size*$vlen)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>gr.null_sink($type:size*$vlen)</make>
<param>
<name>Input Type</name>
<key>type</key>
@@ -17,31 +17,26 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>type:complex</opt>
<opt>size:gr.sizeof_gr_complex</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>type:float</opt>
<opt>size:gr.sizeof_float</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>size:gr.sizeof_int</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>size:gr.sizeof_short</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>size:gr.sizeof_char</opt>
</option>
</param>
@@ -54,7 +49,7 @@
<check>$vlen >= 1</check>
<sink>
<name>in</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
</sink>
<doc>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_wavfile_sink.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_wavfile_sink.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sinks/gr_wavfile_sink.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Wav File Sink</name>
<key>gr_wavfile_sink</key>
- <dep>from gnuradio import gr</dep>
- <fcn>gr.wavfile_sink($file, $nchan, $samp_rate, $bits_per_sample)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>gr.wavfile_sink($file, $nchan, $samp_rate,
$bits_per_sample)</make>
<param>
<name>File</name>
<key>file</key>
Added:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/audio_source.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/audio_source.xml
(rev 0)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/audio_source.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+<!DOCTYPE block SYSTEM "../block.dtd">
+<!--
+###################################################
+##Audio Source
+###################################################
+ -->
+<block>
+ <name>Audio Source</name>
+ <key>audio_source</key>
+ <import>from gnuradio import audio</import>
+ <make>audio.source($samp_rate, $device_name, $ok_to_block)</make>
+ <param>
+ <name>Sample Rate</name>
+ <key>samp_rate</key>
+ <value>32000</value>
+ <type>enum</type>
+ <option>
+ <name>16KHz</name>
+ <key>16000</key>
+ </option>
+ <option>
+ <name>22.05KHz</name>
+ <key>22050</key>
+ </option>
+ <option>
+ <name>24KHz</name>
+ <key>24000</key>
+ </option>
+ <option>
+ <name>32KHz</name>
+ <key>32000</key>
+ </option>
+ <option>
+ <name>44.1KHz</name>
+ <key>44100</key>
+ </option>
+ <option>
+ <name>48KHz</name>
+ <key>48000</key>
+ </option>
+ </param>
+ <param>
+ <name>Device Name</name>
+ <key>device_name</key>
+ <value></value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>OK to Block</name>
+ <key>ok_to_block</key>
+ <value>True</value>
+ <type>enum</type>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+ <param>
+ <name>Num Outputs</name>
+ <key>num_outputs</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <check>0 < $num_outputs</check>
+ <source>
+ <name>out</name>
+ <type>float</type>
+ <nports>$num_outputs</nports>
+ </source>
+ <doc>
+Not all sampling rates will be supported by your hardware.
+
+Leave the device name blank to choose deafult audio device.
+Audio device names may look like hw:0,0
+
+The audio source can have multiple outputs depending upon your hardware.
+For example, set the outputs to 2 for stereo audio.
+ </doc>
+</block>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_file_source.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_file_source.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_file_source.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>File Source</name>
<key>gr_file_source</key>
- <dep>from gnuradio import gr</dep>
- <fcn>gr.file_source($type:size*$vlen, $file, $repeat)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>gr.file_source($type:size*$vlen, $file, $repeat)</make>
<param>
<name>File</name>
<key>file</key>
@@ -23,31 +23,26 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>type:complex</opt>
<opt>size:gr.sizeof_gr_complex</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>type:float</opt>
<opt>size:gr.sizeof_float</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>size:gr.sizeof_int</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>size:gr.sizeof_short</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>size:gr.sizeof_char</opt>
</option>
</param>
@@ -74,7 +69,7 @@
<check>$vlen >= 1</check>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
</source>
<doc>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_null_source.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_null_source.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_null_source.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Null Source</name>
<key>gr_null_source</key>
- <dep>from gnuradio import gr</dep>
- <fcn>gr.null_source($type:size*$vlen)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>gr.null_source($type:size*$vlen)</make>
<param>
<name>Output Type</name>
<key>type</key>
@@ -17,31 +17,26 @@
<option>
<name>Complex</name>
<key>complex</key>
- <opt>type:complex</opt>
<opt>size:gr.sizeof_gr_complex</opt>
</option>
<option>
<name>Float</name>
<key>float</key>
- <opt>type:float</opt>
<opt>size:gr.sizeof_float</opt>
</option>
<option>
<name>Int</name>
<key>int</key>
- <opt>type:int</opt>
<opt>size:gr.sizeof_int</opt>
</option>
<option>
<name>Short</name>
<key>short</key>
- <opt>type:short</opt>
<opt>size:gr.sizeof_short</opt>
</option>
<option>
<name>Byte</name>
<key>byte</key>
- <opt>type:byte</opt>
<opt>size:gr.sizeof_char</opt>
</option>
</param>
@@ -54,7 +49,7 @@
<check>$vlen >= 1</check>
<source>
<name>out</name>
- <type>$type:type</type>
+ <type>$type</type>
<vlen>$vlen</vlen>
</source>
<doc>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_wavfile_source.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_wavfile_source.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/sources/gr_wavfile_source.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,8 +8,8 @@
<block>
<name>Wav File Source</name>
<key>gr_wavfile_source</key>
- <dep>from gnuradio import gr</dep>
- <fcn>gr.wavfile_source($file, $repeat)</fcn>
+ <import>from gnuradio import gr</import>
+ <make>gr.wavfile_source($file, $repeat)</make>
<param>
<name>File</name>
<key>file</key>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,7 +8,7 @@
<block>
<name>Variable</name>
<key>variable</key>
- <fcn>$value</fcn>
+ <make>$value</make>
<param>
<name>Value</name>
<key>value</key>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_button.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_button.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_button.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,7 +8,7 @@
<block>
<name>Variable Button</name>
<key>variable_button</key>
- <fcn>($off_value, $on_value)[$value_index:i]</fcn>
+ <make>($off_value, $on_value)[$value_index:i]</make>
<param>
<name>Default Value</name>
<key>value_index</key>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_drop_down.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_drop_down.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_drop_down.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,7 +8,7 @@
<block>
<name>Variable Drop Down</name>
<key>variable_drop_down</key>
- <fcn>$choices[$value_index]</fcn>
+ <make>$choices[$value_index]</make>
<param>
<name>Value Index</name>
<key>value_index</key>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_slider.xml
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_slider.xml
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/blocks/variables/variable_slider.xml
2008-02-22 20:18:19 UTC (rev 7777)
@@ -8,7 +8,7 @@
<block>
<name>Variable Slider</name>
<key>variable_slider</key>
- <fcn>$value</fcn>
+ <make>$value</make>
<param>
<name>Default Value</name>
<key>value</key>
Modified:
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/no_gui.tmpl
===================================================================
---
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/no_gui.tmpl
2008-02-22 19:40:19 UTC (rev 7776)
+++
grc/branches/grc_reloaded/src/grc/platforms/gnuradio_python/data/no_gui.tmpl
2008-02-22 20:18:19 UTC (rev 7777)
@@ -23,11 +23,11 @@
#end for
#for $var in $variables
-$("%s = %s"%($var.get_id(), $var.get_fcn()))
+$("%s = %s"%($var.get_id(), $var.get_make()))
#end for
#for $blk in $blocks
-$("%s = %s"%($blk.get_id(), $blk.get_fcn()))
+$("%s = %s"%($blk.get_id(), $blk.get_make()))
#end for
tb = gr.top_block()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7777 - in grc/branches/grc_reloaded: notes src/grc/elements src/grc/platforms/gnuradio_python src/grc/platforms/gnuradio_python/blocks src/grc/platforms/gnuradio_python/blocks/operators src/grc/platforms/gnuradio_python/blocks/sinks src/grc/platforms/gnuradio_python/blocks/sources src/grc/platforms/gnuradio_python/blocks/variables src/grc/platforms/gnuradio_python/data,
jblum <=