Event Recorder and Component Viewer  Version 1.5.1
MDK Debugger Views for Status and Event Information
/component_viewer/objects/object/.../calc

Execute calculations using Expressions.

Parent Element Element Chain
object /component_viewer/objects/object
list /component_viewer/objects/object/.../list
Attributes Description Type Use
cond Conditional execution: element is executed when expression result is not 0. Default value is 1. xs:string optional
Body Description Type Use
text Expressions that are calculated. No XML-comments are allowed in this section. xs:string optional

Example:

<object name="MyCalculations">
<var name="y" type="int32_t" value="0" />
<var name="z" type="int32_t" value="0" />
<calc>
y = 1;
z = 1;
</calc>
<calc cond="z != 0" >
z = (z == 1) ? 100 : 200;
y = z / 4;
</calc>
<object>