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 ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
8.4. Behavioural D<strong>es</strong>ign<br />
for the first six calculation steps (k = 0, 1, . . . , 5) is sketched in Figure 8.13.<br />
Any execution is started by the external EVC actor via an asynchronous Start() m<strong>es</strong>sage to<br />
the “StateMachine” object. At first, “StateMachine” execut<strong>es</strong> the initial CEVCState “Running”<br />
(“Running” in Application Level 0) by a further Start() m<strong>es</strong>sage. A running CEVCState object<br />
always starts for each independent data flow object in m_CurrentDataFlow for the current active<br />
Application Level an own thread [77] by a DataFlowThread() m<strong>es</strong>sage to itself. In this example,<br />
only one CDataFlow object is defined. “Running” handl<strong>es</strong> the execution of the data flow by a<br />
Execute() to the current CDataFlow object that is here “SDL0” at equidistant time points<br />
(see Section 7.6). For each Execute() m<strong>es</strong>sage from the related EVC state object, the data<br />
flow object sends a Calculate() m<strong>es</strong>sage to all CFunctionBlock objects in m_FunctionBlocks.<br />
At the first execution step (k = 0), only the value of the counter storage “Value” in Figure 8.11<br />
is increased by one. At the second step (k = 1), the CLevelCondition object “L1” is activated<br />
by a Boolean true input. Therefore, it sends a m_CurrentApplicationLevel = "1" m<strong>es</strong>sage<br />
to the parent CEVCStateMachine object by its m_pParent aggregation. Furthermore, it<br />
informs the parent CDataFlow object about an upcoming switch of the EVC state or/and the<br />
ETCS Application Level by the m_bStateLevelSwitch = true m<strong>es</strong>sage. As a consequence,<br />
the execution of DataFlowThread(0) and Start() in “Running” is terminated and accordingly<br />
returned to the “EVC” object execution. This then directly starts the execution of the current<br />
active CEVCState object defined by m_pCurrentState, which is the same as before but now<br />
with the new Application Level 1 (m_CurrentApplicationLevel).<br />
Again, for each CDataFlow object (here only “SDL1”) in “Running” for the current Application<br />
Level, a separated thread is started by the DataFlowThread() m<strong>es</strong>sage that is for this example<br />
only one. This thread execut<strong>es</strong> the related CDataFlow object “SDL1” by the Execute()<br />
m<strong>es</strong>sage. For k = 2 and k = 3, only the value of “Value” is further increased. For k = 4,<br />
the output of the CSum object is 5, which caus<strong>es</strong> the activation of the CEVCCondition<br />
“c1”. Thus, it plac<strong>es</strong> a reference of the corr<strong>es</strong>ponding CEVCTransition object “Tc1” of the<br />
transition stack of “StateMachine” by the m_TransitionStack.push_back(&Tc1) m<strong>es</strong>sage.<br />
The m_bStateLevelSwitch = true is used to inform the “StateMachine” object about an<br />
upcoming transition to a another CEVCState object. Like in Application Level 0 before, then<br />
the execution of DataFlowThread() and Start() is terminated.<br />
The “StateMachine” gets the target state of the “Tc1” object on the transition stack by the<br />
GetTargetState() m<strong>es</strong>sage that is here the only CEVCTransition object on the stack. In the<br />
case of several objects, their priority property would be used to determine, which one is going<br />
to be executed. The target state m_pTargetState of “Tc1” is “Running”, which reference is<br />
then stored in m_pCurrentState.<br />
Since “StateMachine” is still started by the EVC, it starts the new state “Running” by a<br />
Start() m<strong>es</strong>sage. As for “Running”, a thread for the only data flow object “RDL1” in “Running”<br />
for Application Level 1 is started by Start(). This execut<strong>es</strong> “RDL1” via the Execute()<br />
m<strong>es</strong>sag<strong>es</strong> (k = 6, 7, . . . ). Further execution steps are not explained in this example.<br />
Finally, “StateMachine” is stopped by the EVC through a Stop() m<strong>es</strong>sage.<br />
139