[Top][All Lists]

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

Re: [Discuss-gnuradio] Creating a custom vector source

From: Trond Danielsen
Subject: Re: [Discuss-gnuradio] Creating a custom vector source
Date: Thu, 25 Jan 2007 12:51:13 +0100

2007/1/24, Eric Blossom <address@hidden>:
On Wed, Jan 24, 2007 at 03:26:51PM +0100, Trond Danielsen wrote:
> Hi everyone,
> hope this is not a silly question: Is it possible to subclass
> gr_vector_source to create a custom vector source? I already have the
> C code to create my vector.
> --
> Trond Danielsen

Although this is possible, I don't think it's what you want.  For
example, the vector source has an instance variable that is of the
type of the vector.  I suspect that your derived class would ignore
that and add another instance variable.

It's probably simpler just to inherit from gr_sync_block.

In truth, with regard to gr_vector_source_* we use an ad hoc code
generation system to generate all of these.   We'd use C++ templates,
but that wouldn't help us with the .i file.


Thanks for your reply. I will look into it a bit further, maybe I will
just convert the code generator code to python or copy some of the
code from gr_vector_source.
Trond Danielsen

reply via email to

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