Designing Your Model: Model-Code Correspondence : Flowcharts : Functions Generated for Flowcharts

Functions Generated for Flowcharts

For a control activity, A12_CTRL, the following two C functions will be generated:

void cgActivity_A12_CTRLcnt1(void)
void cgDo_A12_CTRLcnt1(void)

The body of these functions will resemble the following:

void
cgDo_A12_CTRLcnt1(void)
{

… The flowchart logic

}

void
cgActivity_A12_CTRLcnt1(void)
{

cgDo_A12_CTRLcnt1();

}

The function cgActivity_A12_CTRLcnt1 simply calls cgDo_A12_CTRLcnt1.