id: variable_header_format_default
label: Default Header Format Obj.
flags: [ show_id, python, cpp ]

parameters:
-   id: access_code
    label: Access Code
    dtype: string
    default: '0'
-   id: threshold
    label: Threshold
    dtype: int
    default: 0
-   id: bps
    label: Payload Bits per Symbol
    dtype: int
    default: 1
value: ${ digital.header_format_default(access_code, threshold, bps) }

templates:
    imports: from gnuradio import digital
    var_make: |-
        % if int(eval(access_code))==0:
        self.${id} = ${id} = digital.header_format_default(digital.packet_utils.default_access_code,\
        ${threshold}, ${bps})
        % else:
        self.${id} = ${id} = digital.header_format_default(${access_code},\
        ${threshold}, ${bps})
        % endif

cpp_templates:
    includes: ['#include <gnuradio/digital/header_format_default.h>']
    declarations: 'digital::header_format_default::sptr ${id};'
    var_make: |-
        % if int(eval(access_code))==0:
        this->${id} = ${id} = digital::header_format_default(digital.packet_utils.default_access_code,\
        ${threshold}, ${bps});
        % else:
        this->${id} = ${id} = digital::header_format_default(${access_code},\
        ${threshold}, ${bps});
        % endif
    link: ['gnuradio::gnuradio-digital']

file_format: 1
