Professional Documents
Culture Documents
Sistem Embedded
* *
System Model View
Described by Depicted by
• Examples:
System: Aircraft
Models: Flight simulator, scale model
Views: All blueprints, electrical wiring, fuel system
Systems, Models and Views
Flightsimulator
Blueprints
Aircraft
Model 2
View 2
View 1
System
View 3
Model 1
Electrical
Wiring
Scale Model
What is UML?
UML (Unified Modeling Language)
An emerging standard for modeling object-oriented software.
Reference: “The Unified Modeling Language User Guide”, Addison Wesley,
1999.
i.e:
Use case Diagrams
Describe the functional behavior of the system as seen by the user.
Sequence diagrams
Describe the dynamic behavior between actors and the system and between objects of
the system
Statechart diagrams
Describe the dynamic behavior of an individual object (essentially a finite state
automaton)
Pada UML 2.3 terdiri dari 13 macam diagram yang dikelompokkan dalam 3
kategori UML 2.3
Diagram
Communication
Object Diagram Activity Diagram
Diagram
Composite Interaction
Structure Overview
Diagram Diagram
Package
Diagram
Deployment
Diagram
Actor
ReadTime
SetTime
WatchUser WatchRepairPerson
ChangeBattery
pressButton1() blinkHours()
pressButton1() blinkMinutes()
Activation
Lifeline
© Oscar Nierstrasz
Sequence Diagram : Change Audio Volume
© Thiele, ETHZ
Statechart
Features
State-transition diagrams
Hierarchy, concurrency and communication
Uses area and location of graphical objects
Statecharts = state diagrams + depth + orthogonality + broadcast-
communication
Example: Basic states
State changes from A to B when event b occurs and the condition P is true;
the output is c
Definitions:
States comprising other states are called super-states.
States included in super-states are called sub-states of the super-states.
Definitions:
Each state which is not composed of other
states is called a basic state.
superstate
substates
Default state mechanism
Default state
Filled circle
indicates sub-state entered
whenever super-state is
entered.
Not a state by itself!
History State
Can use a history entrance (H).
The state entered is the last state the level was in when it existed.
The H entrance overrides a default state
.
When to develop a state chart?
• Model objects that have change state in interesting ways:
• Devices (microwave oven, Ipod)
• Complex user interfaces (e.g., menus)
• Transactions (databases, banks, etc.)
• Stateful sessions (server-side objects)
• Controllers for other objects
• Etc.
Example: behavior of an alarm
We can start with setting the
current time.
• Need to set hours, minutes,
seconds
• Need to decide which
buttons (one, both together)
do what
9/18/2019 36
Next:
Interfacing dengan Environment