UML for Realtime Modeling Constructs and Notation PowerPoint PPT Presentation

presentation player overlay
1 / 35
About This Presentation
Transcript and Presenter's Notes

Title: UML for Realtime Modeling Constructs and Notation


1
UML for Real-time Modeling Constructs and Notation
  • Judy Dizon

2
Presentation Outline
  • Modeling Structure
  • Capsules
  • Ports
  • Connectors
  • Modeling Behavior
  • Protocols
  • State Machines
  • States
  • Transitions
  • Time Service
  • Application Example
  • Air Condition (Heating System)
  • References

3
Capsules UML Modeling
  • Stereotype of Class concept capsule with
    specialized (executable) semantics
  • represent independent flow of control (active
    classes)
  • used to represent the architecture of a system
  • Class diagram representation

4
Capsules Composition
Relay port
FaxCall
  • Alternative representation more abstract

5
Capsules Notation
Since a capsule is a stereotype of a class, the
stereotype icon appears in the name compartment
of the class rectangle.
Class diagram view
6
Capsules Communication
  • Capsules receive messages through public ports
    which understand protocols.

7
Capsules Attributes
  • Capsules only have private attributes to enforce
    encapsulation.

8
Capsules Behavior
  • Optional hierarchical state machine
  • Defined by state machines which run in response
    to the arrival of signals.

transitionS1toS2 port2.send(m1)
port3.send(m2)
message arrival on port1 triggers transition S1
to S2
S1
S1
S1
S2
S3
S2
9
Ports UML Modeling
  • Stereotype of Class concept ltltportgtgt
  • Boundary objects for a capsule instance.
  • Unlike an interface (which is a behavioral
    thing), a port includes both structure and
    behavior.
  • Each port plays a specific role in a protocol.
  • The protocol defines the valid flow of
    information (signals) between connected ports of
    capsules.

10
Ports Types
  • Viewed from the outside, ports present the same
    object interface, and they cannot be
    distinguished except by their identity and
    protocol role.
  • Viewed from inside the capsule, they can be one
    of two kinds
  • relay ports - connected to sub-capsules
  • end ports directly connected to the capsules
    state machine

11
Ports Boundary Objects
  • Fully isolate a capsules implementation from its
    environment (in both directions)

Ports are created and destroyed along with their
capsule
12
Ports Notation
b) Capsule role view (only public ports are
shown)
a) Class diagram
Note. All the ports shown here implement the base
role of their protocol.
c) Capsule structure diagram (all ports are shown)
13
Connectors
  • Modeled by an association that exist between 2 or
    more ports of the corresponding capsule classes
  • No required UML extensions exist to represent it
  • No notational extensions are present because it
    does not entail any special stereotype

14
Protocols
  • A protocol is a specification of desired behavior
    to take place over a connector.
  • It is pure behavior and does not specify any
    structural properties.

15
Protocols UML Modeling
  • Collaboration stereotype protocol
  • Classifier Role stereotype protocolRole

protocolRolecaller
protocolOperatorAssistedCall
protocolRolecallee
protocolRoleoperator
16
Protocols Binary Protocols
  • Binary protocols, involving only two
    participants, are the most common.
  • For binary protocols, only one role, called the
    base role, needs to be specified.
  • The conjugate role can be derived from the base
    role by transposing incoming and outgoing signal
    sets

17
Protocol
ltltprotocolgtgt BinaryProtocolA
Incoming
signal1 signal2 signal3
Outgoing
signal1 signal4 signal5
18
State Machines States
  • A state machine is a graph of states and
    transitions that describes the response of an
    object of a given class to the receipt of outside
    stimuli.
  • The states are represented by state symbols and
    the transitions are represented by arrows
    connecting the state symbols.
  • States may also contain sub-diagrams, or other
    state machines which represent different
    hierarchical state levels.

19
States external and internal view
20
State actions entry and exit actions
21
Junction Points
22
State Machines Transitions
23
Initial Point and Initial Transition
Initial transition (connects initial point with
start state)
Initial point (one per state machine)
24
State machine without initial transition
25
Time Service
  • Can be accessed through a standard port (service
    access point)
  • Converts time into events that can be handled in
    the same way as other signal-based events

26
Time Service
  • No UML extensions or special notations designed
  • Service access points for accessing timing
    service are indicated by protected end ports
    whose type is defined as TimeServiceSAP (a
    system defined protocol)

27
Application Example Heating System
  • Consists of 2 heating subsystems and 2 heating
    levels
  • Level1 only standard heating system is active
  • Level2 additional heating system is active
  • Motor is cold in the start phase additional
    heating system needs to be on (if user selects
    higher temp that actual temp)
  • Then can it only be that the standard heating is
    sufficient (it must be on only)

28
Heating System (2)
  • An incoming temp event changes the heating
    systems status from off to level1 and from start
    to level2
  • Heating system automatically changes its status
    from start to off after 10 minutes (after the
    standard heating system delivers enough heat)
  • Low/high voltage, cold ignition key status
    cause temporary deactivations of the heating
    system

29
Heating System (3)
  • As soon as there are no more exceptions, the
    heating system should continue operating on the
    selected level
  • The heating system is switched off if the
    ignition key status is cold for more than 5
    minutes or if it is removed

30
Heating System UML RT Model
  • Structure diagram for Air Condition Control

31
Heating System UML RT Model (2)
  • Structure Diagram for heating system control

32
Heating System UML RT Model (3)
  • State diagram for basic heating controller

33
Heating System UML RT Model (4)
  • Class diagram of heating controller

34
References
  • Neilsen, M., CIS 721 Lecture Slides. Spring 2005.
  • A UML Profile for Modeling Complex Real-Time
    Architectures. Database on-line. Available from
    www.omg.org/news/meetings/workshops/presentations/
    realtime 2001/6-3_Selic.presentation.pdf.
    Accessed on 26 April 2005. 
  • Formal Verification of UML Statecharts with
    Real-Time Extensions. Database on-line. Available
    from www.brics.dk/omoeller/papers/fase02.pdf.
    Accessed on 26 April 2005.
  • Unified Modeling of Real-Time Control Systems and
    their Physical Environments Using UML. Database
    on-line. Available from www.ida.liu.se/jakax/Publ
    ications/ ecbs01.pdf. Accessed on 26 April 2005.
  • UML for Real-Time Overview. Database on-line.
    Available from www.uml.org.cn/UMLApplication/pdf/u
    mlrt_overview.pdf. Accessed on 19 April 2005.

35
References (2)
  • Using UML for Modeling Complex Real-Time Systems.
    Database on-line. Available from
    www-28.ibm.com/developerworks/rational/library/con
    tent/03July/1000/1155/1155_umlmodeling.pdf.
    Accessed on 19 April 2005.
  • Embedded UML A Merger of Real-Time UML and
    Co-Design. Database on-line. Available from
    www.gigascale.org/pubs/101/EmbeddedUML.whitepaper.
    v7. External.pdf. Accessed on 26 April 2005.
  •  
  • A Survey of Real-Time Management in Common
    Object-Oriented Methods. Database on-line.
    Available from www.irisa.fr/Convergence/LivrablesP
    ublics/ D13_Irisa.doc. Accessed on 26 April 2005.
  • Integrating Data Flow Equations with UML /
    Real-Time. Database on-line. Available from
    www.es.tu-darmstadt.de/english/research/publicatio
    ns/download/ BichlerRadermacherSchuerr-rtj.pdf.
    Accessed on 19 April 2005.
Write a Comment
User Comments (0)
About PowerShow.com