id: blocks_tag_share
label: Tag Share
flags: [ python, cpp ]

parameters:
-   id: io_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: share_type
    label: Share 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: vlen
    label: Vector Length
    dtype: int
    default: '1'
    hide: part

inputs:
-   domain: stream
    dtype: ${ io_type }
    vlen: ${ vlen }
-   label: share
    domain: stream
    dtype: ${ share_type }
    vlen: ${ vlen }

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

asserts:
- ${ vlen > 0 }

templates:
    imports: from gnuradio import blocks
    make: blocks.tag_share(${io_type.size}, ${share_type.size}, ${vlen})

cpp_templates:
    includes: ['#include <gnuradio/blocks/tag_share.h>']
    declarations: 'blocks::tag_share::sptr ${id};'
    make: 'this->${id} = blocks::tag_share::make(${io_type.size}, ${share_type.size}, ${vlen});'

file_format: 1
