id: satellites_viterbi_decoder
label: Viterbi Decoder
category: '[Satellites]/FEC'

parameters:
-   id: constraint
    label: Constraint length
    dtype: int
    default: 7
-   id: polynomials
    label: Polynomials
    dtype: int_vector
    default: [79, 109]

inputs:
-   domain: message
    id: in

outputs:
-   domain: message
    id: out

templates:
    imports: import satellites
    make: satellites.viterbi_decoder(${constraint}, ${polynomials})

documentation: |-
    Generic Viterbi decoder

    This decoder can use any constraint length and polynomials.
    The input should be a PDU containing the bits to be decoded (unpacked)

    Output:
        A PDU with the decoded bits (unpacked)

    Parameters:
        Contraint length: Constraint length (k) of the code
        Polynomials: Polynomials defining the convolutional encoder

file_format: 1
