Emergency Event

The application can focus on the detection of the system situations, which shall rise an emergency event. For setting and clearing the emergency #0 on a application specific emergency condition, the typical sequence is:


if (DemoEmcyCondition == TRUE) {
    COEmcySet  (&demo.Emcy, 0, &DemoEmcyUsr);
} else {
    COEmcyClear(&demo.Emcy, 0);
}


The setting and clearing functions are very similar. Therefore the following diagram shows the internal behavior of the service for setting an emergency error:


Figure - Emergency Set