User Tools

Site Tools


tools:cplusplus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tools:cplusplus [2017/09/24 15:31] – external edit 127.0.0.1tools:cplusplus [2021/05/19 15:31] – [Lambda Functions] ursgraf
Line 49: Line 49:
 The square brackets - even if left empty - are necessary, because a ''Constant'' block requires a signal type for its output. The block is instantiated per default with a value of type ''double''. The second declaration chooses a different type. The third declaration uses a type different from an arithmetic type. The type ''Matrix'' is a built-in type which itself can be parametrized with its dimensions. \\ The square brackets - even if left empty - are necessary, because a ''Constant'' block requires a signal type for its output. The block is instantiated per default with a value of type ''double''. The second declaration chooses a different type. The third declaration uses a type different from an arithmetic type. The type ''Matrix'' is a built-in type which itself can be parametrized with its dimensions. \\
 Do not forget to call the method ''run''. Without this value of the block is not written to its output signal.  Do not forget to call the method ''run''. Without this value of the block is not written to its output signal. 
 +
 +===== Lambda Functions =====
 +A lambda is an anonymous function which can be passed as a parameter. While using EEROS lambda functions are useful for several cases. 
 +  * Safety system: see [[eeros_architecture:safety_system:properties#level_actions|Level Actions]].
 +  * Function used by periodic: see [[tools:logger_cs:start|]]
 +  * Generic block: To be done
 +
 +A lambda function can be defined as follows
 + 
 +
tools/cplusplus.txt · Last modified: 2021/07/08 19:31 by ursgraf