discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDU - cdr format


From: jacob
Subject: Re: PDU - cdr format
Date: Thu, 03 Feb 2022 13:56:11 +0000

The message debug block will print the hex representation of the uniform vector data. If you want to print a string from this data you will need to do some translation. If you are on 3.10 you can use the now in-tree PDU Lambda block to do this with the following lambda function:

lambda x: print(str(print(''.join(chr(v) for v in x))))

image.png

Jacob

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, February 3rd, 2022 at 6:41 AM, Marcin Puchlik <m.puchlik@is-wireless.com> wrote:
Hi Jacob,
Assuming that data are encoded text values how to print it as a test using Message Debug block? My goal is to print the data in the console.

czw., 3 lut 2022 o 14:34 jacob <jacobgilbert@protonmail.com> napisał(a):
A PDU is a special type of PMT pair object that consists of a PMT Dictionary (of metadata) and a PMT Uniform Vector (of data). This is defined as such to make operating on PDU type data somewhat standardized.

Depending on what you are actually trying to do you have a few options. If the string is metadata you can add it to the PMT metadata dictionary; if the string _is_ the data, you can save the encoded text values as a U8 uniform vector.

Jacob

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, February 3rd, 2022 at 2:28 AM, Marcin Puchlik via "GNU Radio, the Free & Open-Source Toolkit for Software Radio" <discuss-gnuradio@gnu.org> wrote:

Hi Community,
Does the cdr part of the PDU has to be a PMT uniform vector? What if I want to fill the cdr with string type of data?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]