eeros_architecture:control_system:custom_blocks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
eeros_architecture:control_system:custom_blocks [2018/11/13 10:59] – [What Kind of Signals?] graf | eeros_architecture:control_system:custom_blocks [2021/04/21 16:45] – [How Many Inputs and Outputs?] ursgraf | ||
---|---|---|---|
Line 7: | Line 7: | ||
For all other cases your block will have to define the necessary inputs and outputs as fields of your new block class. | For all other cases your block will have to define the necessary inputs and outputs as fields of your new block class. | ||
+ | As a example we take a block which is of type '' | ||
+ | <code cppp> | ||
+ | template < typename T = double > // make it available for many types | ||
+ | class MyBlock : public Block1i1o< | ||
+ | | ||
+ | MyBlock() { ... } // constructor | ||
+ | |||
+ | virtual void run() { ... } // do what must be done in this block | ||
+ | }; | ||
+ | </ | ||
==== What Kind of Signals? ==== | ==== What Kind of Signals? ==== | ||
Depending on the type of the signals you will design your class as a template class or you will define it with a given type. | Depending on the type of the signals you will design your class as a template class or you will define it with a given type. |
eeros_architecture/control_system/custom_blocks.txt · Last modified: 2021/07/08 19:37 by ursgraf