The message_strobe block can generate any PMT, including PDUs.
I think a point of confusion might be that pmt.pmt_cons() does not construct a
PMT, it constructs a PMT pair. Many pmt.pmt_xxx() functions return pmt_t (PMT
type) objects. For example, if you want to receive PDUs and republish just t
Hi Jacob,
I'm trying to get the same PMT form as output from a Message_Strobe, i.e. not a
pair. See below for what I am expecting.
Thanks :)
---
Barry Duggan
On Thu, 06 Jul 2023 10:43:39 -0500 jacob
wrote ---
Hey Barry,
PDUs are a specific type of PMT object, PDUs ar
Hey Barry,
PDUs are a specific type of PMT object, PDUs are defined to be a PMT pair of a
PMT dictionary and PMT uniform vector.
> pmt.cons(pmt.PMT_NIL,pmt.to_pmt(buff)))
The above object generates a PMT pair type object of an empty dictionary
(PMT_NIL) and what is hopefully a uniform vector.
Jeff,
Thank you for your corrections. However, based on my debug information, a PMT
message as output from a Message_Strobe is:
PST_SYMBOL = 0x02
UVI_U8 = 0x00
length of symbols
symbol vector
whereas a PDU has a form:
PST_PAIR
PST_NULL
PST_UNIFORM_VECTOR
b_len is defined in the try block, and is out of scope by the time it is
checked below.
This code should work. The routine returns in the except clause and b_len
is set after the try/except.
import numpy as np
from gnuradio import gr
import pmt
import array
class blk(gr.sync_block):
def __in