summaryrefslogtreecommitdiff
path: root/gr-blocks/grc/blocks_multiply_matrix_xx.block.yml
blob: 21a66b4f8ec8a9d237e4c6163f2076f55bbdb053 (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
id: blocks_multiply_matrix_xx
label: Multiply by Matrix

parameters:
-   id: type
    label: IO Type
    dtype: enum
    options: [float, complex]
    option_attributes:
        fcn: [ff, cc]
    hide: part
-   id: A
    label: Matrix A
    dtype: raw
    default: ((1, 0), (0, 1))
    hide: part
-   id: tag_propagation_policy
    label: TPP
    dtype: enum
    options: [gr.TPP_ALL_TO_ALL, gr.TPP_ONE_TO_ONE, gr.TPP_DONT, gr.TPP_CUSTOM]
    option_labels: [All to All, One to One, No Propagation, Matrix-Defined]

inputs:
-   domain: stream
    dtype: ${ type }
    multiplicity: ${ len(A[0]) }
-   domain: message
    id: set_A
    optional: true

outputs:
-   domain: stream
    dtype: ${ type }
    multiplicity: ${ len(A) }

asserts:
- ${ len(A) > 0 }
- ${ len(A[0]) > 0 }
- ${ tag_propagation_policy != gr.TPP_ONE_TO_ONE or (len(A) == len(A[0])) }

templates:
    imports: from gnuradio import blocks
    make: blocks.multiply_matrix_${type.fcn}(${A}, ${tag_propagation_policy})
    callbacks:
    - set_A(${A})

file_format: 1