Methods and Processes
For each method or process a C function is generated. The function head is generated automatically, the C code is only used in the function body itself.
The body of the method calc () reads as follows:
a = b + d;
c = a * c;
This could result in the following generated code (including function head), depending on the software architecture required for the experimental target:
void _040VS00C00013Q870ODG52RRJ8T00_calc(struct _040VS00C00013Q870ODG52RRJ8T00_Obj *self)
{
{
/* calc 1 */ self->a->val = self->b->val + self->d->val ;
/* calc 2 */
/* calc 3 */ self->c->val = self->a->val * self->c->val ;
/* calc 4 */
}
}
The names of the functions generated for the methods and processes of components depend on the code expander and the software architecture of the generated code. The user has no influence on these names. Depending on the code expander a unique name space is achieved, i.e. methods at different classes can have the same name without any naming conflicts. In the above example the identity tag for the component is used to generate the unique name _040VS00C00013Q870ODG52RRJ8T00_calc for the method calc.
See also
Variables and Function Parameters