id: fec_generic_encoder
label: FEC Encoder

parameters:
-   id: encoder
    label: Constituent Encoder
    dtype: raw
    default: encoder_variable
-   id: itype
    label: Input 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: otype
    label: Output 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

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

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

templates:
    imports: from gnuradio import fec
    make: fec.encoder(${encoder}, ${itype.size}, ${otype.size})

documentation: |-
    This is a GNU Radio adaptor for any FEC encoder following the generic_encoder API in the fec module. Input and output are flexible to accomodate encoders that, say, modulate their encoded results into complex or float types.

file_format: 1