id: satellites_lilacsat_1_deframer
label: LilacSat-1 Deframer
category: '[Satellites]/Deframers'

parameters:
-   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
    optional: true
-   domain: message
    id: codec2
    optional: true

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

documentation: |-
    Deframes LilacSat-1 packets

    The frames use CCSDS Viterbi and synchronous scrambling and have Codec2 digital
    voice frames interleaved with a KISS stream that contains telemetry packets

    Input:
        A stream of soft symbols containing LilacSat-1 frames

    Output:
        out port: PDUs with chunks of a KISS stream
        codec2 port: Codec2 digital voice frames

    Parameters:
        Syncword threshold: number of bit errors to allow in syncword detection
        Command line options: options to pass down to the block, following the syntax of the gr_satellites command line tool

file_format: 1
