id: blocks_tag_debug
label: Tag Debug
flags: [ python, cpp ]

parameters:
-   id: type
    label: Input Type
    dtype: enum
    options: [complex, float, int, short, byte]
    option_attributes:
        size: [gr.sizeof_gr_complex, gr.sizeof_float, gr.sizeof_int, gr.sizeof_short,
            gr.sizeof_char]
    hide: part
-   id: name
    label: Name
    dtype: string
-   id: filter
    label: Key Filter
    dtype: string
    default: '""'
-   id: num_inputs
    label: Num Inputs
    dtype: int
    default: '1'
    hide: part
-   id: vlen
    label: Vector Length
    dtype: int
    default: '1'
    hide: ${ 'part' if vlen == 1 else 'none' }
-   id: display
    label: Display
    dtype: bool
    default: 'True'
    options: ['True', 'False']
    option_labels: ['On', 'Off']

inputs:
-   domain: stream
    dtype: ${ type }
    vlen: ${ vlen }
    multiplicity: ${ num_inputs }

asserts:
- ${ num_inputs >= 1 }
- ${ vlen > 0 }

templates:
    imports: from gnuradio import blocks
    make: |-
        blocks.tag_debug(${type.size}*${vlen}, ${name}, ${filter})
        self.${id}.set_display(${display})
    callbacks:
    - set_display(${display})

cpp_templates:
    includes: ['#include <gnuradio/blocks/tag_debug.h>']
    declarations: 'blocks::tag_debug::sptr ${id};'
    make: |-
        this->${id} = blocks::tag_debug::make(${type.size}*${vlen}, ${name}, ${filter});
        this->${id}.set_display(${display});
    callbacks:
    - set_display(${display})

file_format: 1
