31.01.2014 Views

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

Ph.D. - geht es zur Homepage der Informatik des Fachbereiches 3 ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.4. Behavioural D<strong>es</strong>ign<br />

execution (see Figure 8.7) of “Starting” finally activat<strong>es</strong> the “Start->Running” condition, which<br />

caus<strong>es</strong> in Figure 8.9 that the reference of the related CTransition “TransSleepingRunning” is<br />

placed on the m_TransitionStack of “Parent” by the push_back() m<strong>es</strong>sage. After the parent<br />

control flow noticed that the transition stack is not empty (r<strong>es</strong>ult of size), it gets the priority<br />

by GetPriority() and the reference to the target state by GetTargetState(). The priority<br />

is used to determine, which new state is switched to in the case if the stack would hold more<br />

than one transition object. Finally, in the current execution step “Parent” sets internally its<br />

m_pCurrentState aggregation to the reference of “Running”. Therefore, in the next execution<br />

step “Parent” sends the Execute() to “Running” to execute its data flow and so on.<br />

EVC State Machine Example Although the EVC state machine graph type gEVCStateMachine<br />

also defin<strong>es</strong> a control flow, it differs a little bit from the gEmbeddedStateMachine graph<br />

type in the behaviour because it d<strong>es</strong>crib<strong>es</strong> two n<strong>es</strong>ted state machin<strong>es</strong>. The superior one is for<br />

the EVC Mod<strong>es</strong> (CEVCState class) while the switching of ETCS Application Levels is n<strong>es</strong>ted<br />

within. Because the switching of the Application Level only means a context switch of the<br />

current CEVCState object m_pCurrentState, the levels are simply distinguished by a string<br />

stored in m_CurrentApplicationLevel. A certain class for Application Level switching, like<br />

CTransition, is accordingly not required because the condition objects of class CLevelCondition,<br />

which corr<strong>es</strong>ponds to oApplicationLevelType in the meta model, can directly write their level<br />

in the parent CEVCCondition object if they are activated by a Boolean data flow.<br />

Thus, the preceding example for a control flow do<strong>es</strong> not cover this speciality, and an<br />

additional example for an EVC is discussed. Figure 8.10 repr<strong>es</strong>ents the transition matrix (of an<br />

gEVCStateMachine graph) of a strongly simplified EVC state machine. It only consists of the<br />

Starting (INITIAL)<br />

Running<br />

Starting (INITIAL) Running<br />

c1-p0<br />

Figure 8.10.: Transition matrix for an simple EVC example<br />

stat<strong>es</strong> “Starting”, which is the initial one, and “Running”. From “Starting” to “Running” exists<br />

exact one transition un<strong>der</strong> the condition “c1” with the priority 0. It is obvious that this example<br />

do<strong>es</strong> not corr<strong>es</strong>pond to any Mod<strong>es</strong> or parts of the ETCS SRS and is only used to exemplary<br />

demonstrate the behavioural d<strong>es</strong>ign of the EVC state machine. “Running” is available in<br />

Application Level 0 and 1, which means the oEVCState object must have two explosions: One<br />

for each Level. Figure 8.11 shows the gMainFunctionBlock graph for Application Level 0 and<br />

Figure 8.12 for Level 1. “Running” is only available in Application Level 1, but its explosion<br />

is not relevant for this example and accordingly omitted.<br />

Both data flows of “Starting” use the already introduced and d<strong>es</strong>cribed counter construct. In<br />

Level 0, after one calculation step, the oApplicationLevelType object for Level 1 is activated<br />

by a true Boolean data flow, which means a context switch to Level 1 is then initiated. In<br />

Level 1, the counter has the limit 2. If it is reached, the condition “c1” is activated, with means<br />

a transition to the state “Running”. The UML interaction diagram with the primary objects<br />

137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!