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 ...
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 />
and m_Outputs aggregation while it is owned by a CDataFlow instance through the m_pDMI<br />
composition. CDMIInput and CDMIOutput are both, according to the meta model, data flow<br />
elements and therefore inherit from CFunctionBlock.<br />
The current active subject depending on the currently executed data flow can be acc<strong>es</strong>sed<br />
by the parent CEVCStateMachine instance via the executed CEVCState instance and its<br />
m_pCurrentState composition.<br />
To not directly bind the concrete implementation of the graphical user interface (GUI) to<br />
the openETCS domain framework, a modified observer d<strong>es</strong>ign pattern [32, pp. 293-303] is used.<br />
The CDMIWidget class (not shown in Figure 8.2) is a concrete implementation of an observer,<br />
which means the GUI repr<strong>es</strong>entation of the DMI. An abstract subject [32, pp. 293-303] is not<br />
needed here because exact one data basis, the DMI, exists.<br />
8.3.1. Data Flow Details<br />
Due to the fact that the data flow is the central part of the openETCS meta model, also the<br />
domain framework reflects this. All object typ<strong>es</strong> in the meta model (Subsection 7.3.2) with<br />
inputs or/and outputs have a corr<strong>es</strong>ponding class in the domain framework. Figure 8.3 shows<br />
all special data flow class<strong>es</strong>. Since all class nam<strong>es</strong> only differ from the meta model object type<br />
nam<strong>es</strong> in the prefix (“o” → “C”), the d<strong>es</strong>cription of their functionality will be not repeated here<br />
but can be found in Subsection 7.3.2.<br />
The openETCS meta model defin<strong>es</strong> in graph typ<strong>es</strong> related to data flows the connection<br />
between outputs and inputs of objects by ports in an interfacing concept. Therefore, the<br />
transfer of this port or rather interfacing concept to the domain framework is an important part.<br />
A possible solution is provided by the chain of r<strong>es</strong>ponsibility d<strong>es</strong>ign pattern [32, pp. 223-232],<br />
which is used to connect objects 3 in a chain that pass<strong>es</strong> a requ<strong>es</strong>t after handling it to the<br />
next instance in the chain. This pattern would have to be adapted to support different<br />
requ<strong>es</strong>ts in form of different data flow typ<strong>es</strong> and multiple inputs and outputs for different<br />
function block class<strong>es</strong>. Also, the support of closed loops would have to be added. On the<br />
other hand, the instantiation and parametrisation of the domain framework class<strong>es</strong> is done<br />
by source code created from a code generator. This code generator has acc<strong>es</strong>s to the model<br />
instance and therefore has certain knowledge about the data flow structure. Thus, it can<br />
generate the instantiations in an appropriate way that ren<strong>der</strong>s a complex d<strong>es</strong>ign pattern for<br />
this issue unnec<strong>es</strong>sary. As a consequence, inputs can be easily defined by class properti<strong>es</strong> of<br />
the corr<strong>es</strong>ponding data type, which can directly store the current value. Outputs are class<br />
properti<strong>es</strong> as referenc<strong>es</strong> or rather pointers [79] to the data typ<strong>es</strong> and can be connected to inputs<br />
by storing their reference / addr<strong>es</strong>s. Furthermore, outputs can be connected with more than<br />
one input and therefore the class properti<strong>es</strong> must be sequenc<strong>es</strong> [63] of referenc<strong>es</strong> / pointers.<br />
Unfortunately, a certain problem aris<strong>es</strong> with this d<strong>es</strong>ign: Since all data flow class objects are<br />
globally available for an EVC implementation, as they are in a model instance, their inputs and<br />
outputs can be used in several data flows or rather gMainFunctionBlock and gSubFunctionBlock<br />
graphs. The concrete problem is that a certain CFunctionBlock object, after its execution, sets<br />
all inputs of other objects referenced in its output properti<strong>es</strong>. This might include inputs of<br />
3 called handler in the pattern<br />
128