Sine
- Signal source block ▶️ complex signal creation
- QT GUI freq sink ▶️ display magnitude of the freq spectrum
- QT GUI time ▶️ display time domain
- Throttle ▶️ flow control in the absence of radio h/w
Variables
-
python data types for vars
floatNumber=0.1 intnumber=2 floatnumber=float(2) intNumber=int(0.1)
-
Use
variable blocks
-
Same for strings, Lists and tuples
-
List comprehension
- functions can be written in variables too
listvar=[0,1,2,3] listcomp=[(i+1)*2 for i in listvar]
- functions can be written in variables too
-
the blocks are implemented as functions
-
parameters modify the behavior
-
variables can be dependent on other vars
freq=30000 sample_rate=freq*2
- here, variable names are treated as
ID
and values asValue
in GNURadio
- here, variable names are treated as
-
Runtime updating variables
-
QT GUI Range
- works as variable block
- needs default parameters
-
QT GUI Chooser
- drop down list options
-
Signal data types
- complex
- uses pair of 32-bit float to represent the real and imaginary portions
Signal 1
andSingnal 2
are real and imaginary components, simultaneously (see output of the diagram).
- type can be changed to have a single
signal
“source”. - to convert data-types use block provided, note the conversion feasibility.
Packing bits
-
packing bits generated by a random source to byte.
Unpacking bits
-
unpacking packed bits.
- unpacks from LSB to MSB
- perfectly reverses the packing
-
vis
- perfect rev (sig1 and sig2 perfect overlapping)
Streams and Vectors
-
Streams
- carries 1 sample per time instance
- serialized data
- scalar at each time instance
-
Vectors
- multiple sample per time instance
- represent data in parallel
- array at each time instance
-
Streams to vector flowgraph
-
Vectors to stream flowgraph
Hier blocks(hierarchical) and Parameters
- wrapper to simplify multiple GNU radio blocks into a single block
- var vs parameter
- parameter creates an interface for the hier block to accept a value from an external source.
- variable exists only internally to a block. (block here might be the hier block)
- Pads source and pad sink represents the connection points (input and output) to the hier block in reference to the main flowgraph.
- Hier block
- Hier block used as one of the core blocks
Refs
see ASK