Difference between revisions of "JSON Config"

From GNU Radio
Jump to navigation Jump to search
Line 14: Line 14:
== Example Flowgraph ==
== Example Flowgraph ==


# Make a new file called <code>example.json</code> with the contents:
* Make a new file called <code>example.json</code> with the contents:
<pre>
<pre>
  {
  {
Line 20: Line 20:
  }
  }
</pre>
</pre>
# Add the JSON Config block and point Config File to that file
* Add the JSON Config block and point Config File to that file
# Make a signal source, and for Amplitude enter the value json_config_0[ 'amplitude']
* Make a signal source, and for Amplitude enter the value json_config_0[ 'amplitude']
# Connect it to a Time Sink through a Throttle and you'll see the amplitude show up as 0.1
* Connect it to a Time Sink through a Throttle and you'll see the amplitude show up as 0.1


[[File:Screenshot from 2022-02-26 15-05-23.png]]
[[File:Screenshot from 2022-02-26 15-05-23.png]]

Revision as of 20:08, 26 February 2022

This block...

Parameters

Config File
asdasdasd
Config Schema
(Optional) asdasd


Example Flowgraph

  • Make a new file called example.json with the contents:
 {
 "amplitude": 0.1
 }
  • Add the JSON Config block and point Config File to that file
  • Make a signal source, and for Amplitude enter the value json_config_0[ 'amplitude']
  • Connect it to a Time Sink through a Throttle and you'll see the amplitude show up as 0.1

Screenshot from 2022-02-26 15-05-23.png

Screenshot from 2022-02-26 15-05-28.png


Screenshot from 2022-02-26 15-05-37.png

Source Files

REPLACE WITH ACTUAL FILES ONCE ITS MERGED

C++ files
Complex input
Real input
Core algorithms
Header files
Complex input
Real input
Public header files
Complex input
Real input
Block definition
GRC yaml