summaryrefslogtreecommitdiff
path: root/grc/blocks/gr_sig_source_x.xml
blob: c329dba67fb0e34790fcc0fe93f44c4c5717f089 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?xml version="1.0"?>
<!--
###################################################
##Signal Source
###################################################
 -->
<block>
	<name>Signal Source</name>
	<key>gr_sig_source_x</key>
	<import>from gnuradio import gr</import>
	<make>gr.sig_source_$(type.fcn)($samp_rate, $waveform, $freq, $amp, $offset)</make>
	<callback>set_sampling_freq($samp_rate)</callback>
	<callback>set_waveform($waveform)</callback>
	<callback>set_frequency($freq)</callback>
	<callback>set_amplitude($amp)</callback>
	<callback>set_offset($offset)</callback>
	<param>
		<name>Output Type</name>
		<key>type</key>
		<type>enum</type>
		<option>
			<name>Complex</name>
			<key>complex</key>
			<opt>fcn:c</opt>
			<opt>offset_type:complex</opt>
		</option>
		<option>
			<name>Float</name>
			<key>float</key>
			<opt>fcn:f</opt>
			<opt>offset_type:real</opt>
		</option>
		<option>
			<name>Int</name>
			<key>int</key>
			<opt>fcn:i</opt>
			<opt>offset_type:int</opt>
		</option>
		<option>
			<name>Short</name>
			<key>short</key>
			<opt>fcn:s</opt>
			<opt>offset_type:int</opt>
		</option>
	</param>
	<param>
		<name>Sample Rate</name>
		<key>samp_rate</key>
		<value>samp_rate</value>
		<type>real</type>
	</param>
	<param>
		<name>Waveform</name>
		<key>waveform</key>
		<value>gr.GR_COS_WAVE</value>
		<type>raw</type>
		<option>
			<name>Constant</name>
			<key>gr.GR_CONST_WAVE</key>
		</option>
		<option>
			<name>Sine</name>
			<key>gr.GR_SIN_WAVE</key>
		</option>
		<option>
			<name>Cosine</name>
			<key>gr.GR_COS_WAVE</key>
		</option>
		<option>
			<name>Square</name>
			<key>gr.GR_SQR_WAVE</key>
		</option>
		<option>
			<name>Triangle</name>
			<key>gr.GR_TRI_WAVE</key>
		</option>
		<option>
			<name>Saw Tooth</name>
			<key>gr.GR_SAW_WAVE</key>
		</option>
	</param>
	<param>
		<name>Frequency</name>
		<key>freq</key>
		<value>1000</value>
		<type>real</type>
	</param>
	<param>
		<name>Amplitude</name>
		<key>amp</key>
		<value>1</value>
		<type>real</type>
	</param>
	<param>
		<name>Offset</name>
		<key>offset</key>
		<value>0</value>
		<type>$type.offset_type</type>
	</param>
	<source>
		<name>out</name>
		<type>$type</type>
	</source>
</block>