Ada Code Generation : Package Body : State Enter/Exit Procedures

State Enter/Exit Procedures

Depending on modularity style, the enter/exit (including history enter) sequences are grouped into procedures:

procedure entdef_OPEN is
begin
NORMAL_isin := OPEN;
gen(ACK_BAR_UP’address);
end entdef_OPEN ;

 

 

This example shows the default entering sequence (i.e. entering via a transition that goes to the edge of the state) for the OPEN state:

Change parent status variable to OPEN
Generate event ACK_BAR_UP; this reflects the static reaction
Define in the model for state OPEN

entering/ACK_BAR_UP