Difference between revisions of "Signal Source"

From GNU Radio
Jump to: navigation, search
(add Example Output section)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Signal generator, generates a variety of signals.
+
[[Category:Block Docs]]
 +
Signal generator: generates a variety of waveforms.
  
 
Supports an output of type complex, float, int, and short
 
Supports an output of type complex, float, int, and short
  
Args:
+
== Parameters ==
* Sample Rate : Sampling rate of signal
+
<b>(''R''):</b> <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
* Waveform : waveform type
 
* Frequency : Frequency of waveform (relative to sampling_freq)
 
* Ampltiude : Signal amplitude
 
* Offset : offset of signal
 
  
Example Flowgraph:
+
; Sample Rate (''R'')
 +
: default: samp_rate
 +
 
 +
; Waveform (''R'')
 +
: options: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth]
 +
: For selection with a variable, the following values should be used:
 +
    constant = 100
 +
    sine = 101
 +
    cosine = 102
 +
    square = 103
 +
    triangle = 104
 +
    sawtooth = 105
 +
 
 +
; Frequency (''R'')
 +
: frequency of the waveform (default: 1000)
 +
 
 +
; Amplitude (''R'')
 +
: amplitude of the output (default: 1)
 +
 
 +
; Offset (''R'')
 +
: offset from zero (default: 0)
 +
 
 +
; Initial Phase (Radians) (''R'')
 +
: default: 0
 +
 
 +
== Messages ==
 +
 
 +
The 'freq' message port has been <code>deprecated in 3.9</code> in favor of the 'cmd' message port.
 +
 
 +
The 'cmd' message port accepts message pairs.
 +
* 'freq' . float value
 +
* 'ampl' . float value
 +
* 'phase' . float value
 +
* 'offset' . float value
 +
 
 +
== Example Flowgraph ==
  
 
[[File:Signal-source-ex.png]]
 
[[File:Signal-source-ex.png]]
 +
 +
== Example Output ==
 +
 +
Types of Waveforms:
 +
 +
Cosine (complex):
 +
 +
[[File:Signal-source-cosine.png|600px]]
 +
 +
Constant:
 +
 +
[[File:Signal-source-constant.png|600px]]
 +
 +
Square:
 +
 +
[[File:Signal-source-square.png|600px]]
 +
 +
Triangle:
 +
 +
[[File:Signal-source-triangle.png|600px]]
 +
 +
Sawtooth:
 +
 +
[[File:Signal-source-sawtooth.png|600px]]
 +
 +
== Source Files ==
 +
 +
; C++ files
 +
: [https://github.com/gnuradio/gnuradio TODO]
 +
 +
; Header files
 +
: [https://github.com/gnuradio/gnuradio TODO]
 +
 +
; Public header files
 +
: [https://github.com/gnuradio/gnuradio TODO]
 +
 +
; Block definition
 +
: [https://github.com/gnuradio/gnuradio TODO]

Latest revision as of 20:15, 2 February 2021

Signal generator: generates a variety of waveforms.

Supports an output of type complex, float, int, and short

Parameters[edit]

(R): Run-time adjustable

Sample Rate (R)
default: samp_rate
Waveform (R)
options: [Constant, Sine, Cosine, Square, Triangle, Saw Tooth]
For selection with a variable, the following values should be used:
   constant = 100
   sine = 101
   cosine = 102
   square = 103
   triangle = 104
   sawtooth = 105
Frequency (R)
frequency of the waveform (default: 1000)
Amplitude (R)
amplitude of the output (default: 1)
Offset (R)
offset from zero (default: 0)
Initial Phase (Radians) (R)
default: 0

Messages[edit]

The 'freq' message port has been deprecated in 3.9 in favor of the 'cmd' message port.

The 'cmd' message port accepts message pairs.

  • 'freq' . float value
  • 'ampl' . float value
  • 'phase' . float value
  • 'offset' . float value

Example Flowgraph[edit]

Signal-source-ex.png

Example Output[edit]

Types of Waveforms:

Cosine (complex):

Signal-source-cosine.png

Constant:

Signal-source-constant.png

Square:

Signal-source-square.png

Triangle:

Signal-source-triangle.png

Sawtooth:

Signal-source-sawtooth.png

Source Files[edit]

C++ files
TODO
Header files
TODO
Public header files
TODO
Block definition
TODO