forked from gnuradio/gnuradio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoapy_rtlsdr_source.block.yml
85 lines (73 loc) · 1.87 KB
/
soapy_rtlsdr_source.block.yml
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
id: soapy_rtlsdr_source
label: Soapy RTLSDR Source
flags: [python, throttle]
parameters:
- id: type
label: Output Type
dtype: enum
options: [fc32, sc16, sc8]
option_labels: [Complex Float32, Complex Int16, Complex Byte]
option_attributes:
type: [fc32, sc16, sc8]
hide: part
- id: dev_args
label: Device arguments
dtype: string
hide: ${'part' if not dev_args else 'none'}
- id: samp_rate
label: Sample Rate
dtype: float
default: 'samp_rate'
- id: center_freq
label: 'Center Freq (Hz)'
category: RF Options
dtype: real
default: 'freq'
- id: freq_correction
label: 'Frequency Correction (PPM)'
category: RF Options
dtype: real
default: '0'
hide: 'part'
- id: agc
label: 'AGC'
category: RF Options
dtype: bool
default: 'False'
hide: 'part'
- id: gain
label: 'RF Gain'
category: RF Options
dtype: real
default: '20'
hide: ${'all' if agc else 'part'}
inputs:
- domain: message
id: cmd
optional: true
outputs:
- domain: stream
dtype: ${ type.type }
multiplicity: 1
templates:
imports: from gnuradio import soapy
make: |
None
dev = 'driver=rtlsdr'
stream_args = ''
tune_args = ['']
settings = ['']
self.${id} = soapy.source(dev, "${type}", 1, ${dev_args},
stream_args, tune_args, settings)
self.${id}.set_sample_rate(0, ${samp_rate})
self.${id}.set_gain_mode(0, ${agc})
self.${id}.set_frequency(0, ${center_freq})
self.${id}.set_frequency_correction(0, ${freq_correction})
self.${id}.set_gain(0, 'TUNER', ${gain})
callbacks:
- set_sample_rate(0, ${samp_rate})
- set_gain_mode(0, ${agc})
- set_frequency(0, ${center_freq})
- set_frequency_correction(0, ${freq_correction})
- set_gain(0, 'TUNER', ${gain})
file_format: 1