id: variable_repetition_decoder_def
label: Repetition Decoder Definition
flags: [ show_id ]

parameters:
-   id: value
    label: Ignore Me
    dtype: raw
    default: '"ok"'
    hide: all
-   id: ndim
    label: Parallelism
    dtype: enum
    options: ['0', '1', '2']
-   id: dim1
    label: Dimension 1
    dtype: int
    default: '1'
    hide: ${ ('none' if (int(ndim) >= 1) else 'all') }
-   id: dim2
    label: Dimension 2
    dtype: int
    default: '1'
    hide: ${ ('none' if (int(ndim) >= 2) else 'all') }
-   id: framebits
    label: Frame Bits
    dtype: int
    default: '2048'
-   id: rep
    label: Repetitions
    dtype: int
    default: '3'
-   id: prob
    label: a prior prob
    dtype: float
    default: '0.5'
value: ${ fec.repetition_decoder.make(framebits, rep, prob) }

templates:
    imports: from gnuradio import fec
    var_make: |-
        % if int(ndim)==0:
        self.${id} = ${id} = fec.repetition_decoder.make(${framebits},\
        ${rep}, ${prob})
        % elif int(ndim)==1:
        self.${id} = ${id} = list(map( (lambda \
        a: fec.repetition_decoder.make(${framebits}, ${rep}, ${prob})), range(0,${dim1})))
        % else:
        self.${id} = ${id} = list(map( (lambda b: list( map( ( lambda a: fec.repetition_decoder.make(${framebits},\
        ${rep}, ${prob})), range(0,${dim2}) ) ) ), range(0,${dim1})))
        % endif

documentation: ""

file_format: 1
