Virtual Sinks and Sources: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
Line 20: Line 20:


There are now a couple errors in the flowgraph, highlighted by the red text in the blocks. There are two Virtual Sinks and neither named, therefore GRC does not know which connection to make for the two Virtual Sources. Does the top sink go to the top source? Or does the top sink go to the bottom source? To resolve the errors, names are given to the two sinks and two sources which clarify the connections. Open the two sinks and two sources and give each one the name ''signalSource'' or ''noiseSource'':
There are now a couple errors in the flowgraph, highlighted by the red text in the blocks. There are two Virtual Sinks and neither named, therefore GRC does not know which connection to make for the two Virtual Sources. Does the top sink go to the top source? Or does the top sink go to the bottom source? To resolve the errors, names are given to the two sinks and two sources which clarify the connections. Open the two sinks and two sources and give each one the name ''signalSource'' or ''noiseSource'':
[[File:Virtual_sink_source_properties_name.png]]
[[File:Virtual_sink_source_named_connections.png]]

Revision as of 22:09, 5 April 2024

A flowgraph with many blocks and connections can be come difficult to analyze visually. Virtual Sinks and Virtual Sources are blocks which can be used to simplify the look of a flowgraph.

Connecting Virtual Sinks and Sources

Initially when virtual sinks and sources are added to a flowgraph they are given a white color, which represents that they do not have a data type yet. The data type will be assumed when connected to a block.

Virtual sink source added blocks.png

Add a Signal Source and a QT GUI Time Sink block to the flowgraph, and connect them accordingly:

Virtual sink source complex connection.png

Note that the previously white connections are now blue due to the complex type of the Signal Source and QT GUI Time Sink blocks. Add the following blocks and connect them:

  • Noise Source
  • QT GUI Freq Sink
  • Virtual Sink
  • Virtual Source

Virtual sink source connection errors.png

There are now a couple errors in the flowgraph, highlighted by the red text in the blocks. There are two Virtual Sinks and neither named, therefore GRC does not know which connection to make for the two Virtual Sources. Does the top sink go to the top source? Or does the top sink go to the bottom source? To resolve the errors, names are given to the two sinks and two sources which clarify the connections. Open the two sinks and two sources and give each one the name signalSource or noiseSource:

Virtual sink source properties name.png

Virtual sink source named connections.png