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
|
id: blocks_file_meta_sink
label: File Meta Sink
parameters:
- id: file
label: File
dtype: file_save
- id: type
label: Input Type
dtype: enum
options: [complex, float, int, short, byte]
option_attributes:
cplx: ['True', 'False', 'False', 'False', 'False']
dtype: [blocks.GR_FILE_FLOAT, blocks.GR_FILE_FLOAT, blocks.GR_FILE_INT, blocks.GR_FILE_SHORT,
blocks.GR_FILE_BYTE]
size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short,
gr.sizeof_char]
hide: part
- id: samp_rate
label: Sample Rate
dtype: real
default: samp_rate
- id: rel_rate
label: Relative Rate Change
dtype: real
default: '1'
- id: vlen
label: Vec Length
dtype: int
default: '1'
hide: ${ 'part' if vlen == 1 else 'none' }
- id: max_seg_size
label: Max Seg. Size
dtype: int
default: '1000000'
- id: extra_dict
label: Extra Dict.
dtype: string
default: '""'
- id: detached
label: Detached
dtype: bool
default: 'False'
options: ['False', 'True']
option_labels: ['Off', 'On']
- id: unbuffered
label: Unbuffered
dtype: bool
default: 'False'
options: ['False', 'True']
option_labels: ['Off', 'On']
inputs:
- domain: stream
dtype: ${ type }
vlen: ${ vlen }
asserts:
- ${ vlen > 0 }
templates:
imports: from gnuradio import gr, blocks
make: |-
blocks.file_meta_sink(${type.size}*${vlen}, ${file}, ${samp_rate}, ${rel_rate}, ${type.dtype}, ${type.cplx}, ${max_seg_size}, ${extra_dict}, ${detached})
self.${id}.set_unbuffered(${unbuffered})
callbacks:
- set_unbuffered(${unbuffered})
- open(${file})
file_format: 1
|