Download presentation
Presentation is loading. Please wait.
Published byRalf Hall Modified over 9 years ago
1
Real Time Systems Modeling Structure in UML (Part I)
2
Structure (part1) - 2 Outline Quick Review of UML Modeling real-time systems with UML Basic Structural Elements Capsules Ports Protocols The Capsule Structure Diagram
3
Structure (part1) - 3 Quick Review of UML logical view diagrams class diagram collaboration diagram sequence charts state diagrams logical view modeling elements classes relationships packages
4
Structure (part1) - 4 Quick Review of UML (cont’d) other views use-case view implementation (component) view deployment view concept of stereotyping allows for domain specific semantics without “bastardizing” UML > ClassA or
5
Structure (part1) - 5 Modeling RTS in UML - Overview A system will be modeled as multiple communicating active objects (capsules) system behavior will be modeled through the state machines of the capsules capsules can only communicate by sending messages through their ports communication between ports is defined by a protocol messages control (trigger) the transitions in the receiving capsule’s state machine
6
Structure (part1) - 6 Capsule based upon a common pattern found in RTS: active object ultra light weight concurrency run to completion executable fundamental modeling element a stereotype of a UML class has attributes has operations has a state machine has ports > CapsuleA > CapsuleA
7
Structure (part1) - 7 Capsule contain only protected or private operations and attributes ClassA CapsuleA Capsule vs Class (1) “strong encapsulation” Class contain public, protected or private attributes and operations
8
Structure (part1) - 8 Capsule communicate by sending messages (signals) through contained ports ClassA CapsuleA Capsule vs Class (2) Class communicate by calling operations on other classes PortA
9
Structure (part1) - 9 Capsule elemental behavior is specified by a capsule’s state machine ClassA doThisMethod( ) CapsuleA Capsule vs Class (3) Class elemental behavior is specified by operations S1 S2
10
Class system behavior is expressed as a group of collaborating objects 2: howHigh():int Structure (part1) - 10 Capsule system behavior is expressed as a sequence of inter-capsule messages Capsule vs Class (4) A:CapsuleAB:CapsuleB how high jump number A:ClassA B:ClassB 1: jump( )
11
Structure (part1) - 11 Capsule Role An instance of a capsule class changes to the role only affect the role not the class has cardinality strongly owned by the containing capsule composition - fixed role (norm) aggregation - optional or plug-in CapsuleACapsuleBCapsuleC roleCroleB
12
Structure (part1) - 12 Port (1) isolates a capsule’s implementation the means by which capsules communicate send and receive messages are owned by the capsule instance created and destroyed with the capsule CapsuleACapsuleB > ProtocolP
13
Structure (part1) - 13 Port (2) defines a capsule interface is a protocol role an instance of a protocol only compatible ports may communicate all ports have a “send” operation port1.myMessage().send() CapsuleACapsuleB > ProtocolP myMessage()
14
Structure (part1) - 14 Protocol (1) contract between capsules a specification of a set of messages received (in) and sent (out) from the port defines the port type recall port compatibility a stereotype of a UML collaboration ProtocolP CapsuleACapsuleB how high jump OK number messageOut( ) messageIn( )
15
Structure (part1) - 15 Protocol (2) Each capsule role typically has an associated protocol for every other capsule role with which it associates defines the services one capsule role provides another a set of signals (and associated data) required to perform the capsule role’s job CapsuleBCapsuleC > ProtocolP CapsuleA
16
Structure (part1) - 16 Capsule Structure Diagrams visually defines the structure of a capsule internal structure specified by capsule roles capsule roles communicate via ports stereotype of a UML collaboration diagram protocols not visible (only their instances - ports) provides the support necessary to add “code generation” Containing capsule
17
Structure (part1) - 17 Summary Overview of real-time UML modeling A system will be modeled as multiple communicating capsules system behavior will be modeled through the state machines of the capsules capsules can only communicate by sending messages through their ports communication between ports is defined by a protocol messages control (trigger) the transitions in the receiving capsule’s state machine
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.