summaryrefslogtreecommitdiff
path: root/grc/data/platforms/python/blocks/parameter.xml
blob: de2085011bbab1961d0553168b6ac34b6f1ae55e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>
<!--
###################################################
##Parameter block: a grc variable with key, value
###################################################
 -->
<block>
	<name>Parameter</name>
	<key>parameter</key>
	<import>from optparse import OptionParser</import>
	<make>$value</make>
	<param>
		<name>Label</name>
		<key>label</key>
		<value></value>
		<type>string</type>
	</param>
	<param>
		<name>Value</name>
		<key>value</key>
		<value>0</value>
		<type>$type.type</type>
	</param>
	<param>
		<name>Type</name>
		<key>type</key>
		<value></value>
		<type>enum</type>
		<hide>$type.hide</hide>
		<option>
			<name>None</name>
			<key></key>
			<opt>type:raw</opt>
			<opt>hide:part</opt>
		</option>
		<option>
			<name>Complex</name>
			<key>complex</key>
			<opt>type:complex</opt>
			<opt>hide:none</opt>
		</option>
		<option>
			<name>Float</name>
			<key>float</key>
			<opt>type:real</opt>
			<opt>hide:none</opt>
		</option>
		<option>
			<name>Int</name>
			<key>int</key>
			<opt>type:int</opt>
			<opt>hide:none</opt>
		</option>
		<option>
			<name>Long</name>
			<key>long</key>
			<opt>type:int</opt>
			<opt>hide:none</opt>
		</option>
		<option>
			<name>String</name>
			<key>string</key>
			<opt>type:string</opt>
			<opt>hide:none</opt>
		</option>
	</param>
	<doc>
This block represents a parameter to the flow graph, \
used when the flow graph is instantiated as a hier block.

The paramater value cannot depend on any variables.

Leave the label blank to use the parameter id as the label.

When type is not None, this parameter also becomes a command line option of the form --[id] [value].
	</doc>
</block>