[Python] GNURadio Embedded Python Block input_items

Discussão em 'Python' iniciado por Stack, Junho 29, 2025.

  1. Stack

    Stack Membro Participativo

    So, I'm just getting started with GNU Radio and I'm trying to wrap my head around the way data seems to be getting passed into Embedded Python Blocks.

    I was toying with the idea of creating a bit stream synchronized by a square wave frequency source. I expected that input_items[0] would be either an individual sample, or symbol, or a consistently sized chunk of samples/symbols. Instead, it changes size at every time step; with lengths cycling through powers of 2 from 2^13 down to 2^0.

    If I just have the Python block output len(input_items[0]) I get:

    Executing: /usr/bin/python3 -u /home/jortiz/.gnuradio/bpsk_sandbox/lfsr_attempt_1.py

    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    8192
    4096
    2048
    1024
    512
    256
    128
    64
    32
    16
    8
    4
    2
    1
    8192
    4096
    2048
    1024
    512
    256
    128
    64
    32
    .
    .
    .


    And the data itself just looks like samples from the source chunked into constantly varying sized lists.

    I can figure out how to use it, I just don't understand why one would do that. However, I assume there must be a reason.

    So, why does GNU Radio structure the data this way and is there a way to change it or an intuitive way to think about it?

    Thanks

    Continue reading...

Compartilhe esta Página