id: blocks_sample_and_hold_xx
label: Sample and Hold
flags: [ python, cpp ]

parameters:
-   id: type
    label: Type
    dtype: enum
    options: [float, int, short, byte]
    option_attributes:
        fcn: [ff, ii, ss, bb]
    hide: part

inputs:
-   domain: stream
    dtype: ${ type }
-   label: ctrl
    domain: stream
    dtype: byte

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

templates:
    imports: from gnuradio import blocks
    make: blocks.sample_and_hold_${type.fcn}()

cpp_templates:
    includes: ['#include <gnuradio/blocks/sample_and_hold.h>']
    declarations: 'blocks::sample_and_hold_${type.fcn}::sptr ${id};'
    make: 'this->${id} = blocks::sample_and_hold_${type.fcn}::make();'

file_format: 1
