2007/1/24, Eric Blossom <[EMAIL PROTECTED]>:
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.

Eric


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


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

Reply via email to