discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] write a new block to split existing functionality


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] write a new block to split existing functionality
Date: Fri, 24 May 2013 11:19:12 -0400

On Wed, May 22, 2013 at 10:27 AM, Matt D <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello everybody,
>
> I want to create a block that displays some data made available by the
> decoder block OP25..  OP25 was authored in the olden days before GRC.
>  Then the program would display some traffic identification data on a
> tab but now that OP25 has been adapted for GRC, this tab has been lost
> and I want to bring it back.  So the task now is to split the existing
> functionality into a separate block to make it GRC friendly.  Talking
> about the C++ code in OP25 the author wrote:
>
> we have “data_unit objects that can be asked to take a snapshot of
> themselves creating a string describing their internal state that
> obeys the Python text serialization format. When Python decodes the
> pickle it gets a name/value map describing each of the fields.
> Currently we have the snapshot_du_handler send the pickle as a message
> and this may/may not be the appropriate mechanism for GRC.”
>
> The fist question I have do we need a different message-passing
> construct?
>
> Second question is what kind of block needs to be written? I thought
> maybe a sink, or probably better, a block with no inputs that just
> waits on messages.  But I don't want to haul off doing this and find
> out later it was the incorrect way to go.
>
> Thanks a bunch
> - --
> Matt D

If you can update to using the next branch (3.7), I would recommend
using ControlPort for this kind of feature.

There's some information on ControlPort on my website:
http://www.trondeau.com/home/2013/2/19/configuring-controlport.html

But we need to better document its use and how to set it up. Best to
just look at the examples (gr-blocks/examples/ctrlport) and tools
already available (gnuradio-runtime/python/gnuradio/ctrlport).

Also, I would suggest using PMTs
(http://gnuradio.org/doc/doxygen/page_pmt.html) instead of pickling
the data.

Tom



> - ------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with undefined - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJRnNW8AAoJEIC13XTKWhPP/74H/iOboSO71/XgiE6Ftg4FmYkf
> haHR4k/ZAlbuL/PKAGuM5wkGCUOZGBCx1OLfjsaVttt9jAEZcaSNzP1X82unkX7r
> KU+d8Jq8T6HERuoA0x4oVipk9jiYgwAzbAAjmDGxe43ljvXk8gyBd01VG526XMdh
> xuZydX6cs5x40QUErikzy8I02XCb1j01qhX0VzPVC5P9vcDuKYLhlbSpnjLRPZHe
> Db8RGIS0eloy9WoTwCUw4PomGWop3kkMRSmn/jzGMZBjxivgLmoC+ctTpqRaAp9S
> Zyv4CUl6cIJEDi4e8doWw/SN+bkYGMjIy04E78xpvxD847C2HRUSkRL+FoXAaVk=
> =8U4r
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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