-
Notifications
You must be signed in to change notification settings - Fork 4
/
iqtlabs_vector_to_json.block.yml
54 lines (43 loc) · 1.21 KB
/
iqtlabs_vector_to_json.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
---
id: iqtlabs_vector_to_json
label: vector_to_json
category: '[iqtlabs]'
flags: [python, cpp]
documentation: |-
This block writes vectors as JSON arrays with
accompanying tags (vectors without tags are skipped).
input:
vector of complex, float, int or short.
parameters:
vlen: length of sample vector.
output is of the form, line JSON object per line (describing one vector):
{"tags": {"tag1": "value1"...}, "values": [ val, val... ]}
templates:
imports: from gnuradio import iqtlabs
make: 'iqtlabs.vector_to_json_${type.fcn}(${vlen})'
cpp_templates:
includes: ['#include <gnuradio/iqtlabs/write_freq_samples.h>']
declarations: 'gr::iqtlabs::vector_to_json_${type.fcn}::sptr ${id};'
make: 'this->${id} = gr::iqtlabs::vector_to_json_${type.fcn}::make(${vlen});'
link: ['libgnuradio-iqtlabs.so']
parameters:
- id: vlen
dtype: int
- id: type
label: IO Type
dtype: enum
options: [complex, float, int, short]
option_attributes:
fcn: [cc, ff, ii, ss]
const_type: [complex, float, int, int]
hide: part
inputs:
- domain: stream
dtype: ${ type }
vlen: ${ vlen }
outputs:
- label: output
domain: stream
dtype: byte
vlen: 1
file_format: 1