67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
# auto-generated by grc.converter
|
|
|
|
id: foo_selector
|
|
label: Selector
|
|
category: '[Foo]'
|
|
|
|
parameters:
|
|
- id: type
|
|
label: Type
|
|
dtype: enum
|
|
options: [complex, float, int, short, byte]
|
|
option_attributes:
|
|
size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short,
|
|
gr.sizeof_char]
|
|
hide: part
|
|
- id: num_inputs
|
|
label: Num Inputs
|
|
dtype: int
|
|
default: '2'
|
|
hide: part
|
|
- id: num_outputs
|
|
label: Num Outputs
|
|
dtype: int
|
|
default: '2'
|
|
hide: part
|
|
- id: input_index
|
|
label: Input Index
|
|
dtype: int
|
|
default: '0'
|
|
- id: output_index
|
|
label: Output Index
|
|
dtype: int
|
|
default: '0'
|
|
- id: vlen
|
|
label: Vec Length
|
|
dtype: int
|
|
default: '1'
|
|
hide: ${ 'part' if vlen == 1 else 'none' }
|
|
|
|
inputs:
|
|
- domain: stream
|
|
dtype: ${ type }
|
|
vlen: ${ vlen }
|
|
multiplicity: ${ num_inputs }
|
|
|
|
outputs:
|
|
- domain: stream
|
|
dtype: ${ type }
|
|
vlen: ${ vlen }
|
|
multiplicity: ${ num_outputs }
|
|
asserts:
|
|
- ${ vlen > 0 }
|
|
|
|
templates:
|
|
imports: import foo
|
|
make: "foo.selector(\n\titem_size=${type.size}*${vlen},\n\tnum_inputs=${num_inputs},\n\
|
|
\tnum_outputs=${num_outputs},\n\tinput_index=${input_index},\n\toutput_index=${output_index},\n\
|
|
)"
|
|
callbacks:
|
|
- set_input_index(int(${input_index}))
|
|
- set_output_index(int(${output_index}))
|
|
|
|
documentation: |-
|
|
Connect the sink at input index to the source at output index. Leave all other ports disconnected.
|
|
|
|
file_format: 1
|