-
Notifications
You must be signed in to change notification settings - Fork 4
/
iqtlabs_write_freq_samples.block.yml
94 lines (87 loc) · 2.65 KB
/
iqtlabs_write_freq_samples.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
86
87
88
89
90
91
92
93
94
---
id: iqtlabs_write_freq_samples
label: write_freq_samples
category: '[iqtlabs]'
flags: [python, cpp]
documentation: |-
This block writes N vectors of complex samples from a source to disk
(optionally, as a zst) after receiving an rx_freq tag.
input:
vector of gr_complex, samples.
parameters:
tag: expected PMT tag containing center frequency
(generally "rx_freq" for Soapy or UHD sources).
itemsize: length of samples.
vlen: length of sample vector.
sdir: directory to write samples to.
prefix: prefix for samples file.
write_step_samples: number of vectors to write after receiving a new tag.
skip_tune_step_samples: skip N vectors after first receiving a new tag.
rotate_secs: if > 0, use a new epoch timestamped directory every N seconds.
gain: SDR gain in dB.
sigmf: if True, write a sigmf file.
zstd: if True, use zstd comporession.
rotate: If True, rotate file on tag.
description: If set, what text description to include in sigmf file.
templates:
imports: from gnuradio import iqtlabs
make: >
iqtlabs.write_freq_samples(${tag}, ${type.size},
"${type.datatype}", ${vlen}, ${sdir}, ${prefix}, ${write_step_samples},
${skip_tune_step_samples}, ${samp_rate}, ${rotate_secs}, ${gain},
${sigmf}, ${zstd}, ${rotate}, ${description})
cpp_templates:
includes: ['#include <gnuradio/iqtlabs/write_freq_samples.h>']
declarations: 'gr::iqtlabs::write_freq_samples::sptr ${id};'
make: >
this->${id} = gr::iqtlabs::write_freq_samples::make(${tag}, ${type.size},
"${type.datatype}", ${vlen}, ${sdir}, ${prefix}, ${write_step_samples},
${skip_tune_step_samples}, ${samp_rate}, ${rotate_secs}, ${gain},
${sigmf}, ${zstd}, ${rotate}, ${description});
link: ['libgnuradio-iqtlabs.so']
parameters:
- id: tag
dtype: string
default: 'rx_freq'
- id: type
label: IO Type
dtype: enum
options: [complex, float, int, short, byte]
option_attributes:
datatype: [cf32, f32, i32, i16, c8]
size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int,
gr.sizeof_short, gr.sizeof_char]
hide: part
- id: vlen
dtype: int
- id: sdir
dtype: string
- id: prefix
dtype: string
- id: write_step_samples
dtype: int
- id: skip_tune_step_samples
dtype: int
- id: samp_rate
dtype: int
- id: rotate_secs
dtype: int
- id: gain
dtype: float
- id: sigmf
dtype: bool
- id: zstd
dtype: bool
- id: rotate
dtype: bool
- id: description
dtype: string
inputs:
- label: input
domain: stream
dtype: ${ type }
vlen: ${ vlen }
- id: inference
domain: message
optional: 1
file_format: 1