RE: Problems with How to Write a Signal ProcessingBlock


#1

As a test, I went into the howto_square_ff.cc file and changed it so
that it adds instead of multiplies (so doubles instead of squares). The
make check still passed without problems. If I introduced a syntax
error, then it fails - so I am definitely changing the file being used
in the make process.

This implies that the make check process is not actually invoking the
qa_howto.py program. That being the case, upon what basis does the
article claim that the new block works?

Everything worked - better than it was supposed to. When I got to the
first time I was supposed to run “make check” and it was supposed to
fail, it passed. I’m assuming that this is because the tarball
included

I tracked down the howto.py file (located in the lib directory) and
copied it to the python site-packages directory.

Now I get the error message:

ImportError: No module named _howto

The only file I can find by that name is _howto.la (again, in the lib
directory). I copied it over to the site-packages directory, but got
the


#2

On Tue, Jan 30, 2007 at 04:33:53PM -0700, Bahn William L Civ USAFA/DFCS
wrote:

As a test, I went into the howto_square_ff.cc file and changed it so
that it adds instead of multiplies (so doubles instead of squares). The
make check still passed without problems. If I introduced a syntax
error, then it fails - so I am definitely changing the file being used
in the make process.

This implies that the make check process is not actually invoking the
qa_howto.py program. That being the case, upon what basis does the
article claim that the new block works?

OK, I just tried this (including changing * to +).
It worked as expected for me.

This is what I did.

Downloaded
ftp://ftp.gnu.org/gnu/gnuradio/gr-howto-write-a-block-3.0.2.tar.gz to
~/dl

$ mkdir /tmp/test
$ cd /tmp/test
$ tar xzvf ~/dl/gr-howto-write-a-block-3.0.2.tar.gz
$ cd gr-howto-write-a-block-3.0.2
$ ./configure
$ make
$ make check

This worked fine.

Then I edited
/tmp/test/gr-howto-write-a-block-3.0.2/src/lib/howto_square_ff.c
and changed the * to a + in line 88.

The, with my current directory set to
/tmp/test/gr-howto-write-a-block-3.0.2

$ make
$ make check

And I get output like this (truncated)

Making check in python
make[2]: Entering directory
/tmp/test/gr-howto-write-a-block-3.0.2/src/python' make check-TESTS make[3]: Entering directory/tmp/test/gr-howto-write-a-block-3.0.2/src/python’
F.

FAIL: test_001_square_ff (main.qa_howto)

Traceback (most recent call last):
File “./qa_howto.py”, line 44, in test_001_square_ff
self.assertFloatTuplesAlmostEqual (expected_result, result_data, 6)
File
“/usr/local/lib64/python2.4/site-packages/gnuradio/gr_unittest.py”, line
86, in assertFloatTuplesAlmostEqual
self.assertAlmostEqual (a[i], b[i], places, msg)
AssertionError: 9 != -6.0 within 6 places


Ran 2 tests in 0.014s

FAILED (failures=1)
FAIL: run_tests

1 of 1 tests failed

make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory
/tmp/test/gr-howto-write-a-block-3.0.2/src/python' make[2]: *** [check-am] Error 2 make[2]: Leaving directory/tmp/test/gr-howto-write-a-block-3.0.2/src/python’
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/tmp/test/gr-howto-write-a-block-3.0.2/src’
make: *** [check-recursive] Error 1

Looks good to me.

Eric