id: blocks_tagged_stream_mux
label: Tagged Stream Mux
flags: [ python, cpp ]

parameters:
-   id: type
    label: IO 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: ninputs
    label: Number of inputs
    dtype: int
    hide: part
-   id: lengthtagname
    label: Length tag names
    dtype: string
-   id: vlen
    label: Vector Length
    dtype: int
    default: '1'
    hide: ${ 'part' if vlen == 1 else 'none' }
-   id: tag_preserve_head_pos
    label: 'Tags: Preserve head position on input'
    dtype: int
    default: '0'
    hide: part

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

outputs:
-   domain: stream
    dtype: ${ type }
    vlen: ${ vlen }

templates:
    imports: from gnuradio import blocks
    make: blocks.tagged_stream_mux(${type.size}*${vlen}, ${lengthtagname}, ${tag_preserve_head_pos})

cpp_templates:
    includes: ['#include <gnuradio/blocks/tagged_stream_mux.h>']
    declarations: 'blocks::tagged_stream_mux::sptr ${id};'
    make: 'this->${id} = blocks::tagged_stream_mux::make(${type.size}*${vlen}, ${lengthtagname}, ${tag_preserve_head_pos});'

file_format: 1
