[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Making a new packet_sink
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Making a new packet_sink |
Date: |
Thu, 15 Dec 2005 13:11:36 -0800 |
User-agent: |
Mutt/1.5.6i |
On Thu, Dec 15, 2005 at 11:50:14AM -0500, address@hidden wrote:
> I am attempting to make a new version of packet_sink that uses a smaller
> sync header and fix payload size to save some data bandwidth (remember my
> low carrier frequency). I am attempting to generate a new block use the
> gr-howto-write-a-block to make it cleaner and not change the original
> packet_sink.
Good plan.
First off, did you ever get the existing howto code to import successfully?
As I asked earlier, does the import work if the current directory is /tmp?
$ cd /tmp
$ python
>>> from gnuradio import howto
> Note that I am using mr rather then howto. In the file mr.py, generated by
> swig, it imports _mr. I did this manually and there is no _mr.packet_sink.
> There is a mr.packet_sink in the mr package that was generated.
Therefore, either:
(1) Your current directory is located somewhere under a path listed
in PYTHONPATH or the system default path.
>>> import sys
>>> sys.path
(2) Your PYTHONPATH is hosed
(3) The compilation of mr was not successful
(4) You didn't do a "make install" in your mr directory
Starting with the unmodified gr-howto-write-a-block tarball or CVS
checkout, compile and install using the normal sequence:
./bootstrap # only if building from CVS
./configure
make
make check
sudo make install
After you build gr-howto-write-a-block, cd to src/lib
In there you will find half of the glue: howto.py
>From there cd to .libs (note the leading .)
In there you will find the second half of the glue: _howto.so
After you "make install", both parts are copied to
${prefix}/lib/python<ver>/site-packages/gnuradio
E.g.,
-rwxr-xr-x 1 eb eb 925 2005-12-09 18:18 _howto.la
-rw-r--r-- 1 eb eb 7869 2005-12-09 18:18 howto.py
-rw-r--r-- 1 eb eb 11052 2005-12-09 18:18 howto.pyc
-rw-r--r-- 1 eb eb 11052 2005-12-09 18:18 howto.pyo
-rwxr-xr-x 1 eb eb 546001 2005-12-09 18:18 _howto.so
Once installed they may be succesfully imported subject to the four
conditions listed above.
After you sort out gr-howto-write-a-block, I expect your mr project
will work too.
Eric