Expanding sig source

Is there a square wave source? And can sig_source_* be expanded to
produce
square waves, triangle, sawtooth…?

-Josh

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.
Student of Telematik, Techn. University Graz, Austria

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 :wink:

Thanks,
Eric

Ok, I attached the waveform.h file with the new enum types and the
sig_source_X with square, triangle, and sawtooth waves. -Josh