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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 7. openETCS Meta Model<br />

7.5.4. gCommunicationRea<strong>der</strong> and gCommunicationSen<strong>der</strong> Graph Type<br />

The communication graph type provid<strong>es</strong> a reduced set of possibiliti<strong>es</strong> for modelling data flows<br />

between oTelegram objects and oSen<strong>der</strong>Device or oRea<strong>der</strong>Device objects. As for the graph<br />

typ<strong>es</strong> for data flows, it also has to be ensured that each input port is only used once.<br />

1 context CProject<br />

2 inv : m_GraphSet−>s e l e c t (m_Type = ’ gCommunicationRea<strong>der</strong> ’ or m_Type =<br />

’ gCommunicationSen<strong>der</strong> ’ )−>f o r A l l (<br />

3 graph |<br />

4 graph . m_PortSet−>f o r A l l (<br />

5 port |<br />

6 graph . m_BindingSet−>s e l e c t ( m_Connection . m_Calls−>e x i s t s (<br />

7 m_pPort = port and m_pRole . m_Type = ’ DataInput ’<br />

8 ) )−>s i z e ( ) = 1<br />

9 )<br />

10 )<br />

Listing 7.20: Communication graph constraint 1<br />

The following two constraints are defined to guarantee that all modelled oPacket objects are<br />

graphically included by exact one oTelegram object and are also part of the decomposition<br />

graph (of type gTelegram) of this oTelegram object.<br />

1 context CProject<br />

2 inv : m_GraphSet−>s e l e c t (m_Type = ’ gCommunicationRea<strong>der</strong> ’ or m_Type =<br />

’ gCommunicationSen<strong>der</strong> ’ )−>f o r A l l (<br />

3 graph |<br />

4 graph . m_Containers−>s e l e c t ( m_pContainer . m_Type =<br />

’ oTelegram ’ ) . m_ContainedObjects−>s i z e ( ) =<br />

graph . m_Containers−>s e l e c t ( m_pContainer . m_Type =<br />

’ oTelegram ’ ) . m_ContainedObjects−>asSet−>s i z e ( )<br />

5 )<br />

Listing 7.21: Communication graph constraint 1<br />

1 context CProject<br />

2 inv : m_GraphSet−>s e l e c t (m_Type = ’ gCommunicationRea<strong>der</strong> ’ or m_Type =<br />

’ gCommunicationSen<strong>der</strong> ’ )−>f o r A l l (<br />

3 graph |<br />

4 graph . m_Containers−>s e l e c t ( m_pContainer . m_Type = ’ oTelegram ’ )−>f o r A l l (<br />

5 c o n t a i n e r |<br />

6 c o n t a i n e r . m_ContainedObjects−>s e l e c t (m_Type = ’ oPacket ’ )−>f o r A l l (<br />

7 packet |<br />

8 c o n t a i n e r . m_pContainer . m_pDecomposition . m_ObjectSet−>i n c l u d e s ( packet )<br />

9 )<br />

10 )<br />

11 )<br />

Listing 7.22: Communication graph constraint 2<br />

The same constraints are also needed for oVariableInstance objects that are graphically<br />

contained by oPacket objects.<br />

1 context CProject<br />

2 inv : m_GraphSet−>s e l e c t (m_Type = ’ gCommunicationRea<strong>der</strong> ’ or m_Type =<br />

’ gCommunicationSen<strong>der</strong> ’ )−>f o r A l l (<br />

3 graph |<br />

104

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

Saved successfully!

Ooh no, something went wrong!