id: pdu_random_pdu
label: Random PDU Generator
flags: [ python ]

parameters:
-   id: minsize
    label: Min Bytes
    dtype: int
    default: '50'
-   id: maxsize
    label: Max Bytes
    dtype: int
    default: '2000'
-   id: mask
    label: Byte Mask
    dtype: int
    default: '0xFF'
-   id: length_modulo
    label: Length Modulo
    dtype: int
    default: '2'

inputs:
-   domain: message
    id: generate
    optional: true

outputs:
-   domain: message
    id: pdus
    optional: true

templates:
    imports: |-
        from gnuradio import pdu
        import pmt
    make: pdu.random_pdu(${minsize}, ${maxsize}, ${mask}, ${length_modulo})

file_format: 1
