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.

Chapter 8. openETCS Domain Framework<br />

changed by code generators if a statically typed programming language [79], as C++, is used.<br />

Neverthel<strong>es</strong>s, the behaviour depends heavily on the instantiation of objects, which means here<br />

on the generated code and accordingly on the openETCS model. The consequence is that this<br />

section can only show exampl<strong>es</strong> of models and their corr<strong>es</strong>ponding generated code by UML<br />

diagrams for clarification.<br />

Data Flow Example The data flow model in Figure 8.7 is used as example to d<strong>es</strong>cribe the<br />

corr<strong>es</strong>ponding behaviour, which is explained as follows. This example is very similar to the one<br />

Value<br />

double<br />

0<br />

double<br />

double<br />

(CONST) + ><br />

double<br />

1<br />

(CONST)<br />

Step 1<br />

(CONST)<br />

double<br />

bool<br />

Start->Running<br />

Figure 8.7.: Example of a gSubFunctionBlock graph with a simple data flow<br />

in Figure 7.15 that was used for the d<strong>es</strong>cription of the mathematical model of the dynamic<br />

semantics in Section 7.7. It is only extended about three objects on the right side. Those<br />

and the new data flows between them add the following functionality: If the incremented<br />

oVariableStorage object “Value” (initial value 0) is greater than 1, the oStateGuard object,<br />

“Start→Running” is activated. Furthermore, Figure 8.7 should be a decomposition of the<br />

“Starting” state in Figure 7.16.<br />

Figure 8.8 introduc<strong>es</strong> a UML interaction diagram [64] for two execution cycl<strong>es</strong> (k = 0, 1) of<br />

the example mapped / transformed to the domain framework. According to the d<strong>es</strong>cription in<br />

Subsection 8.3.1, all model objects are transformed to class instanc<strong>es</strong> of the openETCS domain<br />

framework. Those are referenced by the m_FunctionBlocks aggregation of the CDataFlow<br />

instance “DataFlow”. Due to the fact that an oStateGuard r<strong>es</strong>pectively CCondition object is<br />

used, “DataFlow” is part of the CControlFlow “Parent” (Figure 7.16). Figure 8.8 introduc<strong>es</strong> the<br />

corr<strong>es</strong>ponding UML interaction diagram [64] for two execution cycl<strong>es</strong>. Both execution steps k<br />

are started by the Execute() m<strong>es</strong>sage from the “Parent” control flow object to its CDataFlow<br />

instance. To be precise, the control flow object must be a part of a superior CDataFlow object<br />

that itself is part of a CEVCState instance starting the execution chain. For simplification<br />

reasons, this is omitted in Figure 8.8. Neither, the CState object owning “DataFlow” is not<br />

relevant for un<strong>der</strong>standing the data flow behaviour and is omitted, too.<br />

After the first Execute() m<strong>es</strong>sage “Value” holds the value 0, “Sum” has the output 1 and the<br />

“Greater” operator false. During the second Execute() m<strong>es</strong>sage the output of “Sum” reach<strong>es</strong><br />

2, which caus<strong>es</strong> that the “Greater” output switch<strong>es</strong> to true and, as a consequence, triggers<br />

the “Start->Running” condition. The triggered condition locat<strong>es</strong> the related CTransition<br />

object (not in the diagram) pRelatedTransition and plac<strong>es</strong> it on the the transition stack<br />

134

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

Saved successfully!

Ooh no, something went wrong!