discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] error when calling method of base class block


From: Nemanja Savic
Subject: Re: [Discuss-gnuradio] error when calling method of base class block
Date: Tue, 5 May 2015 11:28:45 +0200

Hello,

well after a lot of digging in the mailing list I added this into my swig.i file:

%include "gnuradio/blocks/file_sink_base.h"

and I also added this into my CMakeLists.txt:

set(GR_REQUIRED_COMPONENTS BLOCKS)

It turned out that only first change is required.

Best and hope that this will help somebody in the future.

Nemanja


On Mon, May 4, 2015 at 6:41 PM, Martin Braun <address@hidden> wrote:
What do your swig file changes look like?

M

On 04.05.2015 05:13, Nemanja Savic wrote:
> Hi all guys,
>
> I am making a file sink block with limited number of elements allowed to
> be written in a file. I coded my block in the same way as it was done in
> file_sink block found in blocks module. Namely, I derived my block from
> file_sink_base and gr_sync_block, and so on, the rest is copied from the
> existing block and finally the work function is slightly changed.
> Unfortunately I am not able to call methods inherited from
> file_sink_base class. I believe it is swig issue but don't know how to
> make it. The error that I get when calling close() method inside my test:
>
> 1: Test timeout computed to be: 9.99988e+06
> 1: thread[thread-per-block[1]: <gr_block file_sink_lim_b (2)>]:
> gr_block_detail::n_output_items
> 1: thread[thread-per-block[1]: <gr_block file_sink_lim_b (5)>]:
> gr_block_detail::n_output_items
> 1: E
> 1: ======================================================================
> 1: ERROR: test_001_t (__main__.qa_file_sink_lim_b)
> 1: ----------------------------------------------------------------------
> 1: Traceback (most recent call last):
> 1:   File
> "/home/savi_ne/work/gnuradio/gr-TPMS/python/qa_file_sink_lim_b.py", line
> 44, in test_001_t
> 1:     self.dst.close()
> 1: AttributeError: 'file_sink_lim_b_sptr' object has no attribute 'close'
> 1:
>
> I use gnuradio 3.6.5.1 version.
>
> --
> Nemanja Savić
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



--
Nemanja Savić

reply via email to

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