id: blocks_udp_sink
label: UDP Sink (Deprecated)
flags: [ python, cpp ]

parameters:
-   id: type
    label: Input 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: ipaddr
    label: Destination IP Address
    dtype: string
-   id: port
    label: Destination Port
    dtype: int
-   id: psize
    label: Payload Size
    dtype: int
    default: '1472'
-   id: eof
    label: Send Null Pkt as EOF
    dtype: bool
    default: 'True'
-   id: vlen
    label: Vec Length
    dtype: int
    default: '1'
    hide: ${ 'part' if vlen == 1 else 'none' }

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

asserts:
- ${ vlen > 0 }

templates:
    imports: from gnuradio import blocks
    make: blocks.udp_sink(${type.size}*${vlen}, ${ipaddr}, ${port}, ${psize}, ${eof})

cpp_templates:
    includes: ['#include <gnuradio/blocks/udp_sink.h>']
    declarations: 'blocks::udp_sink::sptr ${id};'
    make: 'this->${id} = blocks::udp_sink::make(${type.size}*${vlen}, ${ipaddr}, ${port}, ${psize}, ${eof});'
    translations:
        'True': 'true'
        'False': 'false'

documentation: |-
    This block has been deprecated and replaced with a more capable UDP sink block in Networking Tools.

file_format: 1
