Difference between revisions of "Add Const"

From GNU Radio
Jump to: navigation, 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...")
 
(revised flowgraph)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Block Docs]]
 
[[Category:Block Docs]]
[[Category:Stub Docs]]
+
Adds a constant value to each item that passes thoughoutput[m] = input[m] + constant vector.
This is the template for the [[:Category:Block_Docs|"Page-per-block Docs"]].  This first section should describe what the block does and how to use it, using however many paragraphs necessary.  Note that the title of the wiki page should match the block's name in GRC, i.e. the one defined in the block's .grc fileLook at the [[FFT]] Block for a good example.
 
 
 
As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.
 
  
 
== 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>
  
; Param 1 (''R'')
+
; Constant (''R'')
: Description of parameter, provide any tips or recommended values.  Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).
+
: The entered value must be of the same type as the input / output ports (i.e. complex, float, etc.).
 +
 
 +
== Example Flowgraph ==
  
; Param 2
+
This flowgraph shows the Add Const and Multiply blocks to create an amplitude modulated signal.
: blah blah blah
 
  
== Example Flowgraph ==
+
[[File:Multiply_block_fg.png|800px]]
  
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.
+
[[File:Multiply_Block_out.png|800px]]
  
 
== Source Files ==
 
== Source Files ==
  
 
; C++ files
 
; C++ files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_bb_impl.cc Byte I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_cc_impl.cc Complex I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_ff_impl.cc Float I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_ii_impl.cc Int I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_ss_impl.cc Short I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_v_impl.cc Vector I/O]
  
 
; Header files
 
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_bb_impl.h Byte I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_cc_impl.h Complex I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_ff_impl.h Float I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_ii_impl.h Int I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_ss_impl.h Short I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/lib/add_const_v_impl.h Vector I/O]
  
 
; Public header files
 
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_const_bb.h Byte I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_const_cc.h Complex I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_const_ff.h Float I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_const_ii.h Int I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_const_ss.h Short I/O]
 +
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/include/gnuradio/blocks/add_const_v.h Vector I/O]
  
 
; Block definition
 
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
+
: [https://github.com/gnuradio/gnuradio/blob/master/gr-blocks/grc/blocks_add_const_vxx.block.yml]

Latest revision as of 00:26, 30 October 2019

Adds a constant value to each item that passes though. output[m] = input[m] + constant vector.

Parameters[edit]

(R): Run-time adjustable

Constant (R)
The entered value must be of the same type as the input / output ports (i.e. complex, float, etc.).

Example Flowgraph[edit]

This flowgraph shows the Add Const and Multiply blocks to create an amplitude modulated signal.

Multiply block fg.png

Multiply Block out.png

Source Files[edit]

C++ files
Byte I/O
Complex I/O
Float I/O
Int I/O
Short I/O
Vector I/O
Header files
Byte I/O
Complex I/O
Float I/O
Int I/O
Short I/O
Vector I/O
Public header files
Byte I/O
Complex I/O
Float I/O
Int I/O
Short I/O
Vector I/O
Block definition
[1]