Threshold: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Block Docs Category:Stub Docs This is the template for the "Page-per-block Docs". This first section should describe what the block...") |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Block Docs]] | [[Category:Block Docs]] | ||
Output a 1 or zero based on a threshold value. | |||
Test the incoming signal against a threshold. If the signal | |||
excedes the High value, it will change its output to 1, and if the signal | |||
falls below the Low value, it will change its output to 0. | |||
== Parameters == | == Parameters == | ||
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span> | (''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span> | ||
; | ; Low (''R'') | ||
: | : Low threshold. Outputs 0 if input goes below it | ||
; | ; High (''R'') | ||
: | : Low threshold. Outputs 1 if input goes above it | ||
; Initial value | |||
: Value to output before the input reach one of the thresholds. Can be any value, not just 0 or 1. | |||
== Example Flowgraph == | == Example Flowgraph == | ||
Line 21: | Line 25: | ||
; C++ files | ; C++ files | ||
: [https://github.com/gnuradio/gnuradio | : [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/threshold_ff_impl.cc Here] | ||
; Header files | ; Header files | ||
: [https://github.com/gnuradio/gnuradio | : [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/threshold_ff_impl.h Here] | ||
; Public header files | ; Public header files | ||
: [https://github.com/gnuradio/gnuradio | : [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/threshold_ff.h Here] | ||
; Block definition | ; Block definition | ||
: [https://github.com/gnuradio/gnuradio | : [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_threshold_ff.block.yml Yaml] |
Revision as of 15:42, 22 July 2019
Output a 1 or zero based on a threshold value.
Test the incoming signal against a threshold. If the signal excedes the High value, it will change its output to 1, and if the signal falls below the Low value, it will change its output to 0.
Parameters
(R): Run-time adjustable
- Low (R)
- Low threshold. Outputs 0 if input goes below it
- High (R)
- Low threshold. Outputs 1 if input goes above it
- Initial value
- Value to output before the input reach one of the thresholds. Can be any value, not just 0 or 1.
Example Flowgraph
Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI. Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately. The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.
Source Files
- C++ files
- Here
- Header files
- Here
- Public header files
- Here
- Block definition
- Yaml