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

Figure 8.5.: Class diagram of the DMI class<strong>es</strong><br />

able to inform any observer about a changed subject. On the other hand, each observer only<br />

holds a pointer to one CEVCStateMachine object that it observ<strong>es</strong>. Via this m_pStateMachine<br />

aggregation, an observer can acc<strong>es</strong>s the currently active CDMISubject object to read data from<br />

the EVC to the driver or set data entered in the observer by the driver.<br />

CDMIQWidget is a concrete observer implementation using the Qt 4 [59] framework. Qt 4<br />

was chosen because it provid<strong>es</strong> platform independent GUI development in the C++ programming<br />

language [79], which means in an object-oriented manner. This is required by Req.6 and Req.7.<br />

The concrete elements 6 for inputs and outputs are generated dynamically since those typically<br />

vary for different ETCS Mod<strong>es</strong> or rather CEVCState instanc<strong>es</strong>. The input and output elements<br />

are stored in the m_OutputWidgets and m_InputWidgets compositions. For those, a pointer<br />

to the QWidget [59] class is used as data type. A QWidget is the very basic type of all class<strong>es</strong><br />

in Qt 4 repr<strong>es</strong>enting graphical elements. Which concrete, <strong>der</strong>ived class<strong>es</strong> are used, depends on<br />

the CDMIInput and CDMIOuput objects in the current CDMISubject. Since this is of low<br />

relevance, those certain typ<strong>es</strong> will be not discussed here. The CDMIQWidget observer class<br />

itself is also a QWidget, which mainly has the advantage that it can be used as standalone<br />

dialogue but also can be integrated or combined with other Qt 4 elements if required. The<br />

inputs and outputs of the subject are aligned in a grid r<strong>es</strong>pectively in two columns: Outputs<br />

on the left side, inputs on the right side. The corr<strong>es</strong>ponding graphical arrangement is provided<br />

by the m_Layout composition to the QGridLayout [59] class. For the graphical definition of the<br />

meaning of each input or output element in CDMIQWidget, labels are used, which are located<br />

on the left side of each graphical element. Those corr<strong>es</strong>pond to the m_Labels composition to<br />

6 widgets in terms of Qt<br />

132

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

Saved successfully!

Ooh no, something went wrong!