id: digital_additive_scrambler_xx
label: Additive Scrambler
flags: [ python, cpp ]

parameters:
-   id: type
    label: IO Type
    dtype: enum
    options: [complex, float, int, short, byte]
    default: 'byte'
    option_attributes:
        fcn: [cc, ff, ii, ss, bb]
    hide: part
-   id: mask
    label: Mask
    dtype: hex
    default: '0x8A'
-   id: seed
    label: Seed
    dtype: hex
    default: '0x7F'
-   id: len
    label: Length
    dtype: int
    default: '7'
-   id: count
    label: Count
    dtype: int
    default: '0'
-   id: bits_per_byte
    label: Bits per byte
    dtype: int
    default: '1'
-   id: reset_tag_key
    label: Reset tag key
    dtype: string
    default: '""'

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

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

templates:
    imports: from gnuradio import digital
    make: digital.additive_scrambler_${type.fcn}(${mask}, ${seed}, ${len}, count=${count},
        bits_per_byte=${bits_per_byte}, reset_tag_key=${reset_tag_key})

cpp_templates:
    includes: ['#include <gnuradio/digital/additive_scrambler.h>']
    declarations: 'digital::additive_scrambler_${type.fcn}::sptr ${id};'
    make: |-
        this->${id} = digital::additive_scrambler_${type.fcn}::make(
            ${mask},
            ${seed},
            ${len},
            count=${count},
            bits_per_byte=${bits_per_byte},
            reset_tag_key=${reset_tag_key});
    link: ['gnuradio::gnuradio-digital']

file_format: 1
