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 />

also needed should be identified during this proc<strong>es</strong>s, too. Figure 8.2 is a UML class diagram<br />

with an overview of the structural d<strong>es</strong>ign of the openETCS domain framework. Although<br />

the diagram already holds several class<strong>es</strong>, the openETCS domain framework consists of more.<br />

Therefore, Figure 8.2 provid<strong>es</strong> only an initial overview about the central class structur<strong>es</strong>. Details<br />

of further class<strong>es</strong> are introduced later in this section by further UML class diagrams. The<br />

following overview is discussed in groups according to the openETCS meta model structure.<br />

EVC State Machine The EVC state machine is the basis in all openETCS implementations 1 .<br />

Thus, exact one object of CEVCStateMachine is used for building an EVC. Since the EVC<br />

is a state machine or rather an ETCS Mode machine, a general state d<strong>es</strong>ign pattern [32,<br />

pp. 305-313] was specialised for openETCS: CEVCState is the only class repr<strong>es</strong>enting ETCS<br />

Mod<strong>es</strong>, accordingly no base class for stat<strong>es</strong> is provided. Furthermore, CEVCState is n<strong>es</strong>ted [79]<br />

in CEVCStateMachine to provide its instanc<strong>es</strong> direct acc<strong>es</strong>s to its parent object via the<br />

m_pParent aggregation [64]. The current active state is indicated by the m_pCurrentState<br />

aggregation end in CEVCStateMachine. Additionally, it holds all available stat<strong>es</strong> in the<br />

m_AvailbleStat<strong>es</strong> composition [64]. The current ETCS Application Level is stored in a string<br />

as a m_CurrentApplicationLevel composition.<br />

The CEVCTransition class can be interpreted as the Transition relationship in the meta model.<br />

Each of its object is associated with a start state m_pStartState, a target state m_pTargetState,<br />

and a condition m_pCondition, which it is activated in. The m_TransitionStack aggregation<br />

stor<strong>es</strong> enabled transition as a stack to support situations, which more than one transition is<br />

enabled in. In such cas<strong>es</strong>, the transition to be executed should be selected by the high<strong>es</strong>t<br />

priority.<br />

The CEVCCondition class is part of data flows and therefore inherits from CFunctionBlock<br />

and only tak<strong>es</strong> a Boolean input as condition for the corr<strong>es</strong>ponding CEVCTransition object.<br />

CLevelCondition objects are used similarly to switch to a new Application Level depending on<br />

their m_TargetApplicationLevel composition.<br />

Data Flows For each available ETCS Application Level in CEVCState, at least one CDataFlow<br />

object must be available. Those are combined in the m_DataFlows composition of CEVCState<br />

while the currently executed data flows are indicated by the m_CurrentDataFlow aggregation.<br />

If more than one CDataFlow object is used in a certain CEVCState and a certain Application<br />

Level m_CurrentApplicationLevel, this means that those data flows are independent and can<br />

be executed in parallel to gain performance on multi-core systems. Anyway, how independent<br />

data flows are identified is an issue of the code generator and will be discussed in Chapter 9.<br />

Each CDataFlow object holds an aggregation m_pParent to its parent CEVCState object.<br />

Again, to provide direct acc<strong>es</strong>s to members in CEVCState and CEVCStateMachine, CDataFlow<br />

is n<strong>es</strong>ted in the state class.<br />

A CDataFlow object holds a set of CFunctionBlock objects in the m_FunctionBlocks<br />

aggregation, which are executed in the or<strong>der</strong> as they are stored in the aggregation. The cyclic<br />

execution d<strong>es</strong>cribed in Section 7.6 is actually implemented in the CEVCState class, which<br />

starts the execution of m_CurrentDataFlow with a fixed sample time.<br />

1 in the meaning of the generated code<br />

126

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

Saved successfully!

Ooh no, something went wrong!