Forum: GNU Radio expanding sig source

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Josh B. (Guest)
on 2007-02-13 01:57
(Received via mailing list)
Is there a square wave source? And can sig_source_* be expanded to
produce
square waves, triangle, sawtooth..?

-Josh
Patrick S. (Guest)
on 2007-02-13 02:27
(Received via mailing list)
Josh B. wrote on 2007-02-13 00:56:
> Is there a square wave source? And can sig_source_* be expanded to
> produce square waves, triangle, sawtooth..?

There is a simple switch on the waveform in the code[0], with some code
for each case to create the waveform. Should be no problem at all.

What I have not figured out is how to get a compact overview of the
waveform constants. In Python this gets gr.GR_SIN_WAVE and siblings, and
for the noise sources you have gr.GR_UNIFORM and fiends. Is there any
way to get an collection you can scan to get all wave forms?

Patrick

[0] gnuradio-core/src/lib/general/gr_sig_source_X.cc.t

ps: grc rocks!
--
Engineers motto: cheap, good, fast: choose any two
Patrick S. <patrick dot strasser at  tugraz dot at>
Student of Telematik, Techn. University Graz, Austria
Eric B. (Guest)
on 2007-02-13 04:16
(Received via mailing list)
On Mon, Feb 12, 2007 at 06:56:28PM -0500, Josh B. wrote:
> Is there a square wave source? And can sig_source_* be expanded to produce
> square waves, triangle, sawtooth..?
>
> -Josh

You can generate a lot of this stuff with gr.vector_source_f((...),
True)

We'd welcome a patch to sig_source_* that added the ones you want ;)

Thanks,
Eric
Josh B. (Guest)
on 2007-02-13 19:48
(Received via mailing list)
Ok, I attached the waveform.h file with the new enum types and the
sig_source_X with square, triangle, and sawtooth waves. -Josh
This topic is locked and can not be replied to.