id: digital_ofdm_carrier_allocator_cvc
label: OFDM Carrier Allocator
flags: [ python, cpp ]

parameters:
-   id: fft_len
    label: FFT length
    dtype: int
    default: fft_len
    hide: ${ 'part' if fft_len == 1 else 'none' }
-   id: occupied_carriers
    label: Occupied Carriers
    dtype: raw
-   id: pilot_carriers
    label: Pilot Carriers
    dtype: raw
    default: ((),)
-   id: pilot_symbols
    label: Pilot Symbols
    dtype: raw
    default: ((),)
-   id: sync_words
    label: Sync Words
    dtype: raw
    default: ((),)
-   id: len_tag_key
    label: Length tag key
    dtype: string
    default: '"packet_len"'
-   id: output_is_shifted
    label: Shift Output
    dtype: enum
    default: 'True'
    options: ['False', 'True']
    option_labels: ['No', 'Yes']

inputs:
-   domain: stream
    dtype: complex

outputs:
-   domain: stream
    dtype: complex
    vlen: ${ fft_len }

templates:
    imports: from gnuradio import digital
    make: digital.ofdm_carrier_allocator_cvc(
        ${fft_len}, ${occupied_carriers}, ${pilot_carriers},
        ${pilot_symbols}, ${sync_words}, ${len_tag_key}, ${output_is_shifted})

cpp_templates:
    includes: ['#include <gnuradio/digital/ofdm_carrier_allocator_cvc.h>']
    declarations: 'digital::ofdm_carrier_allocator_cvc::sptr ${id};'
    make: |-
        this->${id} = digital::ofdm_carrier_allocator_cvc::make(
            ${fft_len},
            ${occupied_carriers},
            ${pilot_carriers},
            ${pilot_symbols},
            ${sync_words},
            ${len_tag_key},
            ${output_is_shifted});
    link: ['gnuradio::gnuradio-digital']

file_format: 1
