# auto-generated by grc.converter

id: satellites_telemetry_primaryheader_adder
label: Telemetry Primary Header Adder
category: '[Satellites]/CCSDS'

parameters:
-   id: coding
    label: Coding
    dtype: enum
    default: drop_down
    options: ['1', '2', '3', '4', '5', '6', '7']
    option_labels: [Uncoded, Convolutional, Reed Solomon, Concatenated, Turbo, LDPC
            on a Transfer Frame, LDPC on a Stream of SMTFS]
    hide: none
-   id: reed_solomon_concat
    label: Reed Solomon or Concatenated
    dtype: enum
    default: drop_down
    options: ['0', '1']
    option_labels: [32-bit Compatibility, Octet Compatibility]
    hide: ${ ('none' if coding == '3' or coding == '4' else 'all') }
-   id: e
    label: Error Correction Capability
    dtype: raw
    default: '0'
    hide: ${ ('none' if coding == '3' or coding == '4' else 'all') }
-   id: q
    label: Number of Virtuall Fill Symbols
    dtype: raw
    default: '0'
    hide: ${ ('none' if coding == '3' or coding == '4' else 'all') }
-   id: I
    label: Interleaving Depth
    dtype: raw
    default: '0'
    hide: ${ ('none' if coding == '3' or coding == '4' else 'all') }
-   id: turbo
    label: Turbo
    dtype: enum
    default: drop_down
    options: ['223', '446', '892', '1115']
    hide: ${ ('none' if coding == '5' else 'all') }
-   id: ldpc_tf
    label: LDPC applied to TF
    dtype: enum
    default: drop_down
    options: ['0', '1', '2', '3']
    option_labels: [rate-1/2, rate-2/3, rate-4/5, rate-7/8]
    hide: ${ ('none' if coding == '6' else 'all') }
-   id: ldpc_tf_size
    label: LDPC Size
    dtype: enum
    default: drop_down
    options: ['128', '512', '2048']
    hide: ${ ('none' if coding == '6' and ldpc_tf < '3' else 'all') }
-   id: size
    label: Size
    dtype: raw
    default: '0'
    hide: ${ ('none' if coding == '1' or coding == '2' or coding == '7' else 'all')
        }
-   id: transfer_frame_version_number
    label: Transfer Frame Version Number
    dtype: raw
    default: '0'
    hide: all
-   id: spacecraft_id
    label: Spacecraft ID
    dtype: raw
    default: '0'
    hide: none
-   id: virtual_channel_id
    label: Virtual Channel ID
    dtype: raw
    default: '0'
    hide: none
-   id: ocf_flag
    label: OCF Flag
    dtype: enum
    default: drop_down
    options: ['1', '0']
    option_labels: ['Yes', 'No']
    hide: none
-   id: master_channel_frame_count
    label: Master Channel Frame Count
    dtype: raw
    default: '0'
    hide: none
-   id: virtual_channel_frame_count
    label: Virtual Channel Frame Count
    dtype: raw
    default: '0'
    hide: none
-   id: transfer_frame_secondary_header_flag
    label: Transfer Frame Secondary Header Flag
    dtype: enum
    default: drop_down
    options: ['1', '0']
    option_labels: ['Yes', 'No']
    hide: none
-   id: synch_flag
    label: Synch Flag
    dtype: enum
    default: drop_down
    options: ['1', '0']
    option_labels: ['Yes', 'No']
    hide: none
-   id: packet_order_flag
    label: Packet Order Flag
    dtype: enum
    default: drop_down
    options: ['1', '0']
    option_labels: ['Yes', 'No']
    hide: none
-   id: segment_length_id
    label: Segment Length ID
    dtype: raw
    default: '0'
    hide: none
-   id: first_header_pointer
    label: First Header Pointer
    dtype: raw
    default: '0'
    hide: all

inputs:
-   domain: message
    id: in

outputs:
-   domain: message
    id: out

templates:
    imports: import satellites.ccsds
    make: satellites.ccsds.telemetry_primaryheader_adder(${transfer_frame_version_number},
        ${spacecraft_id}, ${virtual_channel_id}, ${ocf_flag}, ${master_channel_frame_count},
        ${virtual_channel_frame_count}, ${transfer_frame_secondary_header_flag}, ${synch_flag},
        ${packet_order_flag}, ${segment_length_id}, ${first_header_pointer}, ${coding},
        ${reed_solomon_concat}, ${e}, ${q}, ${I}, ${turbo}, ${ldpc_tf}, ${ldpc_tf_size},
        ${size})

file_format: 1
