[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Creating a custom vector source
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Creating a custom vector source |
Date: |
Wed, 24 Jan 2007 07:39:15 -0800 |
User-agent: |
Mutt/1.5.9i |
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