GNU Radio World

Burst Shaping and PDU Extraction

Adapted from GNU Radio's own example (gr-digital/examples/burst_shaper.grc). The packet_len tag comes from Stream to Tagged Stream instead of gr.python_to_tag(), and the shaping window is inlined.

Press Load to open this flowgraph in an editor embedded above, then ▶ to run it. Nothing is downloaded until you do.

Open in the full editor ▶ Download the .grc

Blocks used

BlockModuleUsed
Burst ShaperGNU Radio2
Message DebugGNU Radio2
Stream to Tagged StreamGNU Radio2
Tag DebugGNU Radio2
Tagged Stream to PDUGNU Radio2
ThrottleGNU Radio2
Vector SourceGNU Radio2
VariableGNU Radio1

Flowgraph source

digital/burst_shaper.grc
options:
    parameters:
        author: ''
        copyright: ''
        description: Adapted from GNU Radio's own example (gr-digital/examples/burst_shaper.grc). The packet_len tag comes from Stream to Tagged Stream instead of gr.python_to_tag(), and the shaping window is inlined.
        generate_options: qt_gui
        id: Burst_Shaping_and_PDU_Extraction
        title: Burst Shaping and PDU Extraction
    states:
        coordinate: [10, 10]
        rotation: 0
        state: enabled
blocks:
-   name: samp_rate
    id: variable
    parameters:
        comment: ''
        value: '32000'
    states:
        coordinate: [590, 10]
        rotation: 0
        state: enabled
-   name: blocks_message_debug_0
    id: blocks_message_debug
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        en_uvec: 'True'
        log_level: info
    states:
        coordinate: [510, 310]
        rotation: 0
        state: enabled
-   name: blocks_message_debug_0_0
    id: blocks_message_debug
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        en_uvec: 'True'
        log_level: info
    states:
        coordinate: [510, 760]
        rotation: 0
        state: enabled
-   name: blocks_tag_debug_0
    id: blocks_tag_debug
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        display: 'True'
        filter: '"packet_len"'
        name: Float
        num_inputs: '1'
        type: float
        vlen: '1'
    states:
        coordinate: [80, 440]
        rotation: 0
        state: enabled
-   name: blocks_tag_debug_0_0
    id: blocks_tag_debug
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        display: 'True'
        filter: '"packet_len"'
        name: Complex
        num_inputs: '1'
        type: complex
        vlen: '1'
    states:
        coordinate: [80, 890]
        rotation: 0
        state: enabled
-   name: blocks_throttle2_0
    id: blocks_throttle2
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        ignoretag: 'False'
        limit: time
        maximum: '0.1'
        maxoutbuf: '0'
        minoutbuf: '0'
        samples_per_second: samp_rate
        type: float
        vlen: '1'
    states:
        coordinate: [1080, 140]
        rotation: 0
        state: enabled
-   name: blocks_throttle2_0_0
    id: blocks_throttle2
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        ignoretag: 'False'
        limit: time
        maximum: '0.1'
        maxoutbuf: '0'
        minoutbuf: '0'
        samples_per_second: samp_rate
        type: complex
        vlen: '1'
    states:
        coordinate: [1140, 590]
        rotation: 0
        state: enabled
-   name: blocks_vector_source_x_0
    id: blocks_vector_source_x
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        maxoutbuf: '0'
        minoutbuf: '0'
        repeat: 'True'
        tags: '[]'
        type: complex
        vector: '[complex(1.0), complex(-1.0)]*15'
        vlen: '1'
    states:
        coordinate: [10, 600]
        rotation: 0
        state: enabled
-   name: blocks_vector_source_x_0_0
    id: blocks_vector_source_x
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        maxoutbuf: '0'
        minoutbuf: '0'
        repeat: 'True'
        tags: '[]'
        type: float
        vector: '[1.0, -1.0]*15'
        vlen: '1'
    states:
        coordinate: [10, 150]
        rotation: 0
        state: enabled
-   name: digital_burst_shaper_xx_0
    id: digital_burst_shaper_xx
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        insert_phasing: 'False'
        length_tag_name: '"packet_len"'
        maxoutbuf: '0'
        minoutbuf: '0'
        post_padding: '5'
        pre_padding: '5'
        type: float
        window: '[0.0, 0.116978, 0.413176, 0.75, 0.969846, 0.969846, 0.75, 0.413176, 0.116978, 0.0]'
    states:
        coordinate: [690, 130]
        rotation: 0
        state: enabled
-   name: digital_burst_shaper_xx_0_0
    id: digital_burst_shaper_xx
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        insert_phasing: 'False'
        length_tag_name: '"packet_len"'
        maxoutbuf: '0'
        minoutbuf: '0'
        post_padding: '5'
        pre_padding: '5'
        type: complex
        window: '[0.0, 0.116978, 0.413176, 0.75, 0.969846, 0.969846, 0.75, 0.413176, 0.116978, 0.0]'
    states:
        coordinate: [750, 580]
        rotation: 0
        state: enabled
-   name: pdu_tagged_stream_to_pdu_0
    id: pdu_tagged_stream_to_pdu
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        maxoutbuf: '0'
        minoutbuf: '0'
        tag: packet_len
        type: float
    states:
        coordinate: [80, 340]
        rotation: 0
        state: enabled
-   name: pdu_tagged_stream_to_pdu_1
    id: pdu_tagged_stream_to_pdu
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        maxoutbuf: '0'
        minoutbuf: '0'
        tag: packet_len
        type: complex
    states:
        coordinate: [80, 790]
        rotation: 0
        state: enabled
-   name: tagger_c
    id: blocks_stream_to_tagged_stream
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        len_tag_key: '"packet_len"'
        maxoutbuf: '0'
        minoutbuf: '0'
        packet_len: '30'
        type: complex
        vlen: '1'
    states:
        coordinate: [370, 610]
        rotation: 0
        state: enabled
-   name: tagger_f
    id: blocks_stream_to_tagged_stream
    parameters:
        affinity: ''
        alias: ''
        comment: ''
        len_tag_key: '"packet_len"'
        maxoutbuf: '0'
        minoutbuf: '0'
        packet_len: '30'
        type: float
        vlen: '1'
    states:
        coordinate: [310, 160]
        rotation: 0
        state: enabled
connections:
- [blocks_throttle2_0, '0', blocks_tag_debug_0, '0']
- [blocks_throttle2_0, '0', pdu_tagged_stream_to_pdu_0, '0']
- [blocks_throttle2_0_0, '0', blocks_tag_debug_0_0, '0']
- [blocks_throttle2_0_0, '0', pdu_tagged_stream_to_pdu_1, '0']
- [blocks_vector_source_x_0, '0', tagger_c, '0']
- [blocks_vector_source_x_0_0, '0', tagger_f, '0']
- [digital_burst_shaper_xx_0, '0', blocks_throttle2_0, '0']
- [digital_burst_shaper_xx_0_0, '0', blocks_throttle2_0_0, '0']
-   src_blk_id: pdu_tagged_stream_to_pdu_0
    src_port_id: pdus
    snk_blk_id: blocks_message_debug_0
    snk_port_id: print
-   src_blk_id: pdu_tagged_stream_to_pdu_1
    src_port_id: pdus
    snk_blk_id: blocks_message_debug_0_0
    snk_port_id: print
- [tagger_c, '0', digital_burst_shaper_xx_0_0, '0']
- [tagger_f, '0', digital_burst_shaper_xx_0, '0']
metadata:
    file_format: 2
    grc_version: 3.11.0.0