|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] how to use the gnuradio block with c programing |
Date: | Tue, 19 Apr 2016 17:51:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
As Tom said, it's almost certain that you shouldn't be calling a
block's work() or general_work() manually – that's a severe breach
of "contract", because you didn't call check_topology, start,
forecast etc before, and unless you know very well what you're
doing, you can't be sure none of this is relevant. Generally, if in doubt, there's the good ol' approach of just putting your "core" algorithm into a function that gets called by work, and testing that function. For tests of whether work() or general_work() work correctly, the best way definitely is just to run a minimal flow graph; that's what you'll find in hundreds of unit tests (qa_something.py in the GNU Radio source tree): Vector source (with your desired input) -> Your block -> Vector Sink and after letting that flow graph run extracting and checking the .data() of the Vector sink. Best regards, Marcus On 04/19/2016 03:51 PM, Tom Rondeau
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |