Code is generated for local termination of Or states with the flat statechart implementation as follows:
inline OMBoolean
class_0::OrState_isCompleted() {
return (FinalA_IN() || FinalB_IN());
}
&& IS_COMPLETED(state)
Code is generated for local termination of And states with the flat statechart implementation as follows:
&& IS_COMPLETED(AndState)
In this case, the isCompleted() function of the AndState framework class is called:
OMBoolean class_0::AndState_isCompleted()
{
if(IS_COMPLETED(Component1) == FALSE)
return FALSE;
if(IS_COMPLETED(Component2) == FALSE)
return FALSE;
return TRUE;
}