id: dtv_dvbt_reed_solomon_enc
label: Reed-Solomon Encoder
flags: [ python, cpp ]

parameters:
-   id: p
    label: p
    dtype: int
    default: '2'
-   id: m
    label: m
    dtype: int
    default: '8'
-   id: gfpoly
    label: GF polynomial
    dtype: raw
    default: '0x11d'
-   id: n
    label: N
    dtype: int
    default: '255'
-   id: k
    label: K
    dtype: int
    default: '239'
-   id: t
    label: t
    dtype: int
    default: '8'
-   id: s
    label: Shortening size
    dtype: int
    default: '51'
-   id: blocks
    label: Blocks
    dtype: int
    default: '8'

inputs:
-   domain: stream
    dtype: byte
    vlen: ${ blocks*(k-s) }

outputs:
-   domain: stream
    dtype: byte
    vlen: ${ blocks*(n-s) }

templates:
    imports: from gnuradio import dtv
    make: dtv.dvbt_reed_solomon_enc(${p}, ${m}, ${gfpoly}, ${n}, ${k}, ${t}, ${s},
        ${blocks})

cpp_templates:
    includes: ['#include <gnuradio/dtv/dvbt_reed_solomon_enc.h>']
    declarations: 'dtv::dvbt_reed_solomon_enc::sptr ${id};'
    make: |-
        this->${id} = dtv::dvbt_reed_solomon_enc::make(
            ${p},
            ${m},
            ${gfpoly},
            ${n},
            ${k},
            ${t},
            ${s},
            ${blocks});
    link: ['gnuradio::gnuradio-dtv']

file_format: 1
