discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Message debug block


From: jacob
Subject: Re: Message debug block
Date: Fri, 19 Nov 2021 14:58:17 +0000

In this case, there is an extra bit of confusion because an empty PMT 
dictionary `pmt.make_dict()` is represented by (and the same as) `pmt.PMT_NIL`. 
An interned string, as in your first example, is not a dictionary type object 
and thus you get the warning message.

Jacob

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, November 19th, 2021 at 3:30 AM, Vasil Velichkov 
<vvvelichkov@gmail.com> wrote:

> Hi Marcin,
>
> On 18/11/2021 15.23, Marcin Puchlik wrote:
>
> > *pmt.cons(pmt.intern(""), pmt.make_u8vector(16, 0xFF)) - *where Debug
> >
> > block cannot extract the PDU - gr::log :WARN: message_debug0 - Non PDU type
> >
> > message received. Dropping.
>
> Not every message is a PDU [1]. Have a look at is_pdu() in pmt.h [2] and read 
> the discussion in issue #4191 [3].
>
> /*!
>
> -   Returns true if the object is a PDU meaning:
> -   the object is a pair
> -   the car is a dictionary type object (including an empty dict)
> -   the cdr is a uniform vector of any type
>
>     */
>
>     PMT_API bool is_pdu(const pmt_t& obj);
>
>     [1] https://wiki.gnuradio.org/index.php/Message_Passing#PDUs
>
>     [2] 
> https://github.com/gnuradio/gnuradio/blob/maint-3.9/gnuradio-runtime/include/pmt/pmt.h#L707-L713
>
>     [3] https://github.com/gnuradio/gnuradio/issues/4191



reply via email to

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