summaryrefslogtreecommitdiff
path: root/gr-digital/grc/digital_glfsr_source_x.block.yml
blob: f5646f9718df9ced53210bd6013f39e7743a218e (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
51
52
id: digital_glfsr_source_x
label: GLFSR Source
flags: [ python, cpp ]

parameters:
-   id: type
    label: Type
    dtype: enum
    options: [float, byte]
    option_attributes:
        fcn: [f, b]
    hide: part
-   id: degree
    label: Degree
    dtype: int
-   id: repeat
    label: Repeat
    dtype: enum
    options: ['True', 'False']
    option_labels: ['Yes', 'No']
-   id: mask
    label: Mask
    dtype: int
    default: '0'
-   id: seed
    label: Seed
    dtype: int
    default: '1'

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

templates:
    imports: from gnuradio import digital
    make: digital.glfsr_source_${type.fcn}(${degree}, ${repeat}, ${mask}, ${seed})

cpp_templates:
    includes: ['#include <gnuradio/digital/glfsr_source_${type.fcn}.h>']
    declarations: 'digital::glfsr_source_${type.fcn}::sptr ${id};'
    make: |-
        this->${id} = digital::glfsr_source_${type.fcn}::make(
            ${degree},
            ${repeat},
            ${mask},
            ${seed});
    link: ['gnuradio::gnuradio-digital']
    translations:
        'True': 'true'
        'False': 'false'

file_format: 1