discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Message debug block


From: Marcin Puchlik
Subject: Re: Message debug block
Date: Fri, 19 Nov 2021 23:50:31 +0100

Dear Vasil, Jacob
Very thank you for your clarification. In my opinion there are lacks in the documentation so I will add a few more sentences about the PDUs and what it means exactly and how to interpret it compared to the standard messages in GNU Radio. In the issue 4191 provided by Vasil, it is explained beautifully what are the differences. In my opinion, Jacob's explanation should be copied and pasted somewhere in the wiki because it's simple and easy. 
Best regards,
Marcin

pt., 19 lis 2021 o 15:58 jacob <jacobgilbert@protonmail.com> napisał(a):
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]