Sunteți pe pagina 1din 14

UML Timing Diagrams

Introduction
The UML timing diagrams focus on the specific timing in which
the messages are sent from one object to another and on the
specific timing in which objects change their state.

Timing diagrams are common when dealing with real time


systems.

08/09/10 © Abelski eLearning 2


Simple Timing Diagram

Data & Voice


Transmitting/Receiving
:MobileTelephone

Data
Transmitting/Receiving
Receive / Initiate Call

No Transmitting/Receiving
Turn on

01 2 3 t
08/09/10 © Abelski eLearning 3
More Than One Object
It is possible to stack several life lines of different objects in the
same timing diagram. One life line above the other.

Messages sent from one object to another can be depicted using


simple arrows. The start and the end points of each arrow
indicate when each message was sent... and when it was
received.

08/09/10 © Abelski eLearning 4


Timing Diagram Of Two Objects
:MobileTelephone A

Data & Voice Transmitting/Receiving

Receive Call
Data Transmitting/Receiving

No Transmitting/Receiving
:MobileTelephone B

Data & Voice Transmitting/Receiving

Initiate Call
Data Transmitting/Receiving

No Transmitting/Receiving Turn on

0 1 2 3 t
08/09/10 © Abelski eLearning 5
Alternative Time Line Notation
Showing the state of the object between two horizontal lines that
cross with each other each time the state changes is an
alternative possibility UML allows.

Idel
X X
Authenticated Sending Data
X Waiting
X
2 5 9 11 14

Using this alternative time line notation it is impossible to present


the messages that trigger the transition from one state to another.

08/09/10 © Abelski eLearning 6


Alternative Time Line Notation

Telephone A Off
X Idle
X Receiving Call
X Idle
X
0 4 t1 t1+t2

Telephone B Off
X Idle
X Initiate Call
X Idle
X

08/09/10 © Abelski eLearning 7


© Zindell Technologies, Ltd. 08/09/10

UML Timing Diagrams

08/09/10 © Abelski eLearning 1

© Abelski eLearning 1
© Zindell Technologies, Ltd. 08/09/10

Introduction
The UML timing diagrams focus on the specific timing in which
the messages are sent from one object to another and on the
specific timing in which objects change their state.

Timing diagrams are common when dealing with real time


systems.

08/09/10 © Abelski eLearning 2

© Abelski eLearning 2
© Zindell Technologies, Ltd. 08/09/10

Simple Timing Diagram

Data & Voice


Transmitting/Receiving
:MobileTelephone

Data
Transmitting/Receiving
Receive / Initiate Call

No Transmitting/Receiving
Turn on

01 2 3 t
08/09/10 © Abelski eLearning 3

Using a changed length of time line it is possible to inidicate


how long the object remains in each one of the states (listed on
the left side of the diagram).

© Abelski eLearning 3
© Zindell Technologies, Ltd. 08/09/10

More Than One Object


It is possible to stack several life lines of different objects in the
same timing diagram. One life line above the other.

Messages sent from one object to another can be depicted using


simple arrows. The start and the end points of each arrow
indicate when each message was sent... and when it was
received.

08/09/10 © Abelski eLearning 4

© Abelski eLearning 4
© Zindell Technologies, Ltd. 08/09/10

Timing Diagram Of Two Objects

:MobileTelephone A
Data & Voice Transmitting/Receiving

Receive Call
Data Transmitting/Receiving

No Transmitting/Receiving
:MobileTelephone B

Data & Voice Transmitting/Receiving

Initiate Call
Data Transmitting/Receiving

No Transmitting/Receiving Turn on

0 1 2 3 t
08/09/10 © Abelski eLearning 5

© Abelski eLearning 5
© Zindell Technologies, Ltd. 08/09/10

Alternative Time Line Notation


Showing the state of the object between two horizontal lines that
cross with each other each time the state changes is an
alternative possibility UML allows.

Idel
X X
Authenticated Sending Data
X Waiting
X
2 5 9 11 14

Using this alternative time line notation it is impossible to present


the messages that trigger the transition from one state to another.

08/09/10 © Abelski eLearning 6

© Abelski eLearning 6
© Zindell Technologies, Ltd. 08/09/10

Alternative Time Line Notation

Telephone A Off
X Idle
X Receiving Call
X Idle
X
0 4 t1 t1+t2

Telephone B Off
X Idle
X Initiate Call
X Idle
X

08/09/10 © Abelski eLearning 7

© Abelski eLearning 7

S-ar putea să vă placă și