id: satellites_ngham_deframer
label: NGHam Deframer
category: '[Satellites]/Deframers'

parameters:
-   id: decode_rs
    label: Use Reed-Solomon
    dtype: bool
    default: 'False'
    options: ['True', 'False']
-   id: threshold
    label: Syncword threshold
    dtype: int
    default: 0
-   id: options
    label: Command line options
    dtype: string
    default: '""'
    hide: part

inputs:
-   domain: stream
    dtype: float

outputs:
-   domain: message
    id: out

templates:
    imports: import satellites.components.deframers
    make: satellites.components.deframers.ngham_deframer(decode_rs = ${decode_rs}, syncword_threshold = ${threshold}, options=${options})

documentation: |-
    Deframes NGHam packets

    The NGHam protocol is described in https://github.com/skagmo/ngham

    Input:
        A stream of soft symbols containing NGHam packets

    Output:
        PDUs with the deframed NGHam packets

    Parameters:
        Syncword threshold: number of bit errors to allow in syncword detection
        Use Reed-Solomon: enable or disable Reed-Solomon decoding
        Command line options: options to pass down to the block, following the syntax of the gr_satellites command line tool

file_format: 1
