summaryrefslogtreecommitdiff
path: root/gr-blocks/grc/blocks_vector_insert_x.block.yml
blob: 807357a42dc177932e38e75e0e5898afe554ffa1 (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
id: blocks_vector_insert_x
label: Vector Insert
flags: [ python, cpp ]

parameters:
-   id: type
    label: Output Type
    dtype: enum
    options: [byte, complex, float, int, short]
    option_attributes:
        fcn: [b, c, f, i, s]
        vec_type: [int_vector, complex_vector, real_vector, int_vector, int_vector]
    hide: part
-   id: vector
    label: Vector
    dtype: ${ type.vec_type }
    default: 0, 0, 0
-   id: period
    label: Periodicity
    dtype: int
    default: '100'
-   id: offset
    label: Offset
    dtype: int
    default: '0'

inputs:
-   domain: stream
    dtype: ${ type }

outputs:
-   domain: stream
    dtype: ${ type }

templates:
    imports: from gnuradio import blocks
    make: blocks.vector_insert_${type.fcn}(${vector}, ${period}, ${offset})

cpp_templates:
    includes: ['#include <gnuradio/blocks/vector_insert.h>']
    declarations: 'blocks::vector_insert_${type.fcn}::sptr ${id};'
    make: 'this->${id} = blocks::vector_insert_${type.fcn}::make(${vector}, ${period}, ${offset});'

documentation: |-
    Periodicity, the length of the periodicity at which the vector should be inserted at the output.
            (i.e. one vector for every N output items)

            Offset specifies where in the cycle period we should begin at.

file_format: 1