Basic activities can be defined in one of three activation modes:
For reactive controlled and reactive self modes, the code for the basic activity will resemble the following:
For the procedure-like mode, the code for the basic activity will resemble the following:
if ((cgActiveActivities1 & BITAC_A112) != 0) {
Adding a controller A11_CTRL to A11 will make the code look like:
with the controller function, cgActivity_A11_CTRLcnt1(), looking like:
The implementation of cgDo_A11_CTRLcnt1() depends on whether A11_CTRL is implemented as a statechart or as a flowchart.
For a statechart implementation:
StateInfo_A11_CTRLcnt1 nextState_A11_CTRLcnt1 = 0;
if (currentState_A11_CTRLcnt1 == 0) {
nextState_A11_CTRLcnt1 = FS_A11_CTRLst2;
… Rest of the Statechart logic
if (nextState_A11_CTRLcnt1 != 0) {
if (currentState_A11_CTRLcnt1 !=
cgGlobalFlags |= BITSUPERSTEP_TASK1;