Lecture 3: Use Case Modeling for Real-Time Embedded Systems

Similar documents
SWE 760 Real-Time Software Design. Lecture 6 Dynamic Interaction Modeling for Real-Time Embedded Systems

SWE 760. Lecture 7: Software Architecture for Real-Time Embedded Systems

COMET BASED ELEVATOR CONTROLLER SYSTEM CASE STUDY

Product Requirements Documentation: Use Cases

Chapter 1 Quality Alert System (QAS) Overview

Lecture 7. Safety Analysis: Failure Modes and Effect Analysis (FMEA) Functional Hazard Assessment (FHA)

Software Requirements Specification (SRS) Project Lane Management System

Hy-Rail Limits Compliance. Functional Description. And. Human / Machine Interface

Shipping Contents. Scanco Support - Scanco Support Phone number Opt Version

Version 4 Reference Guide. Mobile Inspections. January 2013

iphone/ipad User Guide

ITracker v1.0 Timesheet User Guide. itracker Timesheet User Guide

Requirements Analysis

Alien RTU Guide Version 3.9

Requirements Analysis. Requirements Analysis is Hard

Belgacom IDS 310. Reception Terminal Manual. Forum IS16/48/80/160

Dimov Stojče Ilčev. CNS Systems

What s New in WashConnect? System Requirement. New Benefits, Features, and Enhancements. WashConnect Version

What s New in WashConnect? System Requirement. New Benefits, Features, and Enhancements. WashConnect Version

What s New in WashConnect? System Requirement. New Benefits, Features, and Enhancements. WashConnect Version

Elk Grove Police Department Policy Manual

Super Schlumberger Scheduler

Chapter 7. Process Analysis and Diagramming

Galaxy 300 and Galaxy 300i

Software Requirements Specification (SRS) Automated Pedestrian Collision Avoidance System (APCA)

Another Elevator System in Volere Pattern

Business Requirements for for Change of Supplier

Deltek Touch Time & Expense for GovCon 1.2. User Guide

Business Portal for Microsoft Dynamics GP. Requisition Management Administrator s Guide Release 10.0

RFID & Fingerprint Based Vehicle Security System with GSM & GPS Technology

Application Performance Monitoring Dashboard 7.2

QuickBill for Dentrix

2005 National Information Services - QuickBill for Easy Dental version 3.0. QuickBill. for Easy Dental. Version 3.0

SAP Business One Financial Consolidation

Chapter 2.04: Deposit and Empty Container Tracking

1 Descriptions of Function

TABLE OF CONTENTS AUTO ATTENDANT AND UNIFORM CALL DISTRIBUTION ADMINISTRATION GUIDE. idcs 500 Release 2 / OfficeServ. March 2004 OVERVIEW...

ReadyResults.net. Entering Scores and Reporting for Stanford English Language Proficiency (SELP) Stanford Spanish Language Proficiency (SSLP) Tests

Requirement Analysis Document

Loops and Counters. If Statement: Ladder Logic Code:

Low Cost RFID-Based Race Timer for Smaller Events

Cafeteria Ordering System, Release 1.0

NetSuite OpenAir Mobile for iphone User Guide Version 2.2

Part II AUTOMATION AND CONTROL TECHNOLOGIES

RT LOCATOR Radio Tracking Warehouse Management System (WMS) Designed for Tire Distributors

Expense Report Module v4.11.1

Running Trains with JMRI s Dispatcher

Shipping. Contents. 1 Version KRC

IBM Maximo Mobile Suite Version 7 Release 5.1. User Guide

LIFT CONTROL WITH HIGH LEVEL INTERFACE (V3 OR LATER)

Avancier Methods (AM) Scope the endeavour

Oracle Utilities Customer Care and Billing Release Utility Reference Model a Read Meter

Advanced Metering Infrastructure (AMI) Program C3 - Customer Prepays for Services

1 Descriptions of Function

Payroll Guide Guru Guide Version

Requirements Analysis. Overview

Controls Section III: Electro-Mechanical Controls in Onsite Systems

Mobile for Android User Guide

1 Descriptions of Function

Minor ITS FORM

SmartCard Reader Error Codes

TEC Controller Constant Volume - Cooling Only, Application Application Note Building Technologies

This documentation or excerpts there from may not be reproduced or disclosed to third parties without the express permission of the publisher.

Setup & Usage - CanadaPost for Small Business App

The Timing Model TIMMO Methodology Guest Lecture at Chalmers University

Secure Access Solutions using Passive Radio Frequency Identification Technology

OAT Asset Tracking. Installation and Configuration Guide. Document Number: OAT_AT_ICG_51

OSPF Link-State Advertisement Throttling

Unit 1, 176 Forest Rd, Hurstville NSW USB Logger User Guide

Employee Process: Entering, Adjusting & Viewing Timesheets

Classes, Attributes and Relationships. Model Specification - Structure + Behavior

1.0 Background and Purpose

Deltek Touch Time & Expense for Vision. User Guide

AIMS Airport Integrated Management System. FACT SHEET GTP Tecnologia

Tonight s Agenda 2/22/2017 CSC40232: SOFTWARE ENGINEERING. The Agile Process About 30 minutes. Midterm exam

Tel (+49) , Fax (+49) ,

Large Scale Systems Design G52LSS

Acumatica Warehouse USER GUIDE FOR HANDHELD & MOBILE DEVICES V

Equipment Tracking in Eclipse for Preventative Maintenance

Galaxy 300. Operation 05/

Our parking management solutions that include:

Business Portal for Microsoft Dynamics GP. Human Resources Management Self Service Suite Administrator s Guide Release 10.0

Collision with air bridge, Airbus A , G-JOEM

OSPF Link-State Advertisement Throttling

Comp435 Object-Oriented Design. Requirements and Use Cases. Requirements Analysis. Outline. Requirements Analysis. Requirements change

Special edition paper Development of a Total Operation Management System

iphone/ipad User Guide

FACULTY OF ENGINEERING SKEE/SKEM/SKEL 3742 SCHOOL OF ELECTRICAL ENGINEERING UNIVERSITI TEKNOLOGI MALAYSIA SKUDAI CAMPUS JOHOR

iq 5 Calibration: Contents.

OSPF Link-State Advertisement Throttling

The Use of E-ATC as a PTC System By

Proposed Solution for Implementation, Monitoring and Maintaining Vehicle Tracking System for vehicles of Solid Waste Management

IBM Cognos 8 IBM COGNOS CONFIGURATION USER GUIDE

Gate Innovations & Technologies for Improving Throughput, Efficiency and Security. AAPA Annual Convention 2009 Information Technology Award

Version /2/2017. Offline User Guide

TMW Systems, Inc. TMW 3GTMS Integration Service Installation Guide

Page 1 of 5 Copyright 2017 Platformatics, Inc. CA-MRCS-DS MSML

Wave and Order Picking

Reverse Logistics Tool. User Guide - v1.2

V9 Jobs and Workflow Administrators Guide DOCUMENTATION. Phone: Fax:

Transcription:

SWE 760 Lecture 3: Use Case Modeling for Real-Time Embedded Systems Hassan Gomaa Department of Computer Science George Mason University Email: hgomaa@gmu.edu References: H. Gomaa, Chapter 6 - Real-Time Software Design for Embedded Systems, Cambridge University Press, 2016 Copyright 2016 Hassan Gomaa All rights reserved. No part of this document may be reproduced in any form or by any means, without the prior written permission of the author. 1 Figure 4.1 COMET/RTE life cycle model User System Structural Modeling Requirements Modeling Analysis Modeling Design Modeling Incremental Software Construction Incremental Software Integration Incremental Prototyping System Testing Customer Copyright 2016 Hassan Gomaa 2 A-1

Requirements Modeling in COMET/RTE Develop use case model Define system functional requirements in terms of actors and use cases Two different perspectives for RTE use case model Systems Engineering perspective Software Engineering perspective Develop non-functional requirements A.k.a. quality requirements 3 Use Case Modeling Define system functional requirements in terms of Actors and Use Cases Each use case defined in terms of sequence of interactions between Actor and System Narrative description Use case is a complete sequence of interactions initiated by an actor Use case starts with input from an actor Describes interactions between actor and system Provides value to actor Basic path Most common sequence Alternative branches Variations of basic path E.g., for error handling 4 A-2

Example of actor and use case (Fig. 6.1) 5 Actors Actor models external entities of system Actor initiates use case Actor interacts with the system By providing inputs to the system By responding to outputs from the system Actor must affect sequence of events in use case For real-time embedded systems All external entities are actors 6 A-3

Actors and Use Cases Primary Actor Starts the use case by providing input to the system Secondary Actor(s) Participates in use case Can be Primary Actor of a different use case Identifying use cases from actors Consider each major function an actor needs to perform Provides value to actor 7 Example of primary and secondary actors (Fig. 6.2) 8 A-4

Use Cases for Systems Engineering and Software Engineering Systems Engineering and Software Engineering perspectives on use cases Little or no difference for information or web-based systems Actors are mainly human users, possibly external systems No difference between system and software context diagrams RT embedded systems Big difference in Systems and Software Engineering perspectives on use cases Many actors are non-human 9 Modeling Actors from a Systems Engineering Perspective Actors in Systems Engineering use cases Human user e.g., Microwave User External system E.g., Factory Robot Physical entity E.g., Train, Vehicle 10 A-5

Systems Engineering Perspective - Human User as Actor (Fig. 6.3) «human actor» Cook Food User 11 Systems Engineering Perspective - External system as actor (Fig. 6.2) 12 A-6

Systems Engineering Perspective - Physical entity as Actor Figure 6.4 Example of physical entity actor «physical entity actor» Arrive at Railroad Crossing Train Depart from Railroad Crossing 13 Actors in RT Embedded Systems Many non-human actors E.g., Vehicle arrival and departure detected by System Systems engineering perspective Vehicle is an actor External to the system Software engineering perspective Vehicle does not interact directly with the system Vehicle arrival and departure detected by sensors Arrival and departure sensors Internal to total hardware/software system External to software system Arrival and departure sensors are actors 14 A-7

Modeling Actors from a Software Engineering Perspective Actors in Software Engineering use cases Same actors as in Systems Engineering use cases Human user External system Actors ONLY in Software Engineering use cases Actors that represent objects that are Part of total hardware/software system External to software system Input device Output device I/O device Timer 15 Software Engineering Perspective Example of input device actors (Fig. 6.5) «input device actor» Arrival Sensor Arrive at Railroad Crossing «input device actor» Departure Sensor Depart from Railroad Crossing 16 A-8

Software Engineering Perspective Example of timer actor (Fig. 6.6) Display Time of Day Timer (Primary actor) User (Secondary actor) 17 Non-functional Requirements Quality of service goal that system must fulfill Also called Quality Attribute E.g. of non-functional requirements: Performance requirement: System shall respond to timer inputs within 100 milliseconds. Safety requirement: System shall switch off the microwave oven if temperature exceeds a pre-specified hazard level. Availability requirement: System shall be operational 99.9% of required time. Security requirement: System shall encrypt operator id and password. 18 A-9

Documenting Use Cases Name Summary - Short description of use case Dependency (on other use cases) Actors primary, secondary Preconditions Conditions that are true at start of use case Description of main sequence Narrative and textual description Description of alternative sequences Textual description of alternative branches Nonfunctional requirements E.g., performance and security requirements Postcondition Condition that is true at end of use case 19 System Context Diagram for Microwave Oven System SysML Block Definition Diagram 20 A-10

Systems Engineering Perspective Use Case Model for Microwave Oven System (Fig. 6.8) 21 Systems Engineering Perspective Use Case Model for Microwave Oven System Use case name: Cook Food. Summary: User puts food in oven, and microwave oven cooks food. Actors: User Precondition: Microwave oven is idle. Main Sequence: 1. User opens the door 2. System switches the oven light on. 3. User puts food in the oven and closes the door. 4. System switches the oven light off. 5. User presses the Cooking Time button. 6. System prompts for cooking time. 7. User enters cooking time on the numeric keypad and presses Start. 8. System starts cooking the food and switches the oven light on. 9. System continually displays the cooking time remaining. 22 A-11

Systems Engineering Perspective Use Case Model for Microwave Oven System 10. System timer detects that the cooking time has elapsed. 11. System stops cooking the food, switches off the light, stops the turntable, sounds the beeper, and displays the end message. 12. User opens the door. 13. System switches on the oven light. 14. User removes the food from the oven and closes the door. 15. System switches off the oven light and clears the display. Configuration requirement: Name: Display Language. Description: There is a choice of language for displaying messages, which is set during system configuration. Default language is English. Postcondition: Microwave oven has cooked the food. 23 Fig. 5.10: Software System Context Diagram for Railroad Crossing Control System A-12

Actors in Railroad Crossing Embedded System Systems engineering perspective Train is an actor External to the system Software engineering perspective Train does not interact directly with the system Train arrival and departure detected by sensors Arrival and departure sensors Internal to total hardware/software system External to software system Arrival Sensor and Departure Sensors are actors 25 Example of Use Case Model - Software Engineering Perspective 26 A-13

Use Cases - Railroad Crossing Control System Use case name: Arrive at Railroad Crossing Summary: Train approaches railroad crossing. The system lowers the barrier, switches on the warning lights, and switches on the audio warning alarm. Actors: o o Primary actor: Arrival Sensor Secondary actors: Barrier Detection Sensor, Barrier Actuator, Warning Light Actuator, Warning Audio Actuator, Rail Operations Service, Barrier Timer. Precondition: The system is operational and there is either no train or one train in the railroad crossing. Main Sequence: 1. Arrival Sensor detects the train arrival and informs the system. 2. System commands each Barrier Actuator to lower a barrier, each Warning Light Actuator to switch on the flashing lights, and each Warning Audio Actuator to switch on the audio warning. 3. Barrier Detection Sensor detects that a barrier has been lowered and informs the system. 4. System sends a train arrival message to Rail Operations Service. Alternative Sequences: Step 2: If there is another train already at the railroad crossing, skip steps 2 and 3. Step 3: If Barrier Timer notifies the system that the lowering timer has timed out, the system sends a safety warning message to the Rail Operations Service. 27 Use Cases - Railroad Crossing Control System Non-functional Requirements: a) Safety requirements: o Barrier lowering time shall not exceed a pre-specified time. If timer times out, the system shall notify Rail Operations Service. o System shall keep track of the number of trains at the railroad crossing, such that the barrier is lowered when the first train arrives and only raised after the last train departs. b) Performance requirement: o The elapsed time from the detection of train arrival to sending the command to the barrier actuator shall not exceed a pre-specified response time. Postcondition: The barrier has been closed, the warning lights are flashing and the audio warning is sounding. 28 A-14

Use Case Relationships Include relationship Identify common sequences of interactions in several use cases Extract common sequence into inclusion use case Base use cases includes inclusion use case Example Suspend Train use case includes Arrive at Station use case 29 Example of inclusion use cases and include relationship (Fig. 6.10) 30 A-15

Example of inclusion use cases and include relationship Use case: Control Train at Station. Actors: Door Sensor primary, Door Actuator. Precondition: Train is stopped at station with doors opening. Main sequence: 1 Door Sensor sends Doors Opened message. 2 After time interval, System sends Close Doors command to the Door Actuator. Postcondition: Train is stopped at station with doors closing. Use case: Arrive at Station. Actors: Approaching Sensor primary, Arrival Sensor, Motor, Door Actuator. Precondition: Train is moving toward next station. Main sequence: 1 Approaching Sensor signals that train is approaching station 2 System sends Decelerate command to Motor. 3 Arrival Sensor signals that train is entering station 4 System sends Stop Motor command to Motor. 5 Motor responds that train has stopped. 6 System sends Open Doors command to the Door Actuator. Postcondition: Train has stopped at station with doors opening. 31 Example of base use case and include relationship Use case: Suspend Train. Actor: Rail Operator primary, Door Sensor. Dependency: Includes Arrive at Station, Control Train at Station use cases. Precondition: Train is operational and moving toward next station. Main sequence: 1 Rail Operator sends suspend train operation command to System. 2 Include Arrive at Station use case. 3 Include Control Train at Station use case. 4 Door Sensor sends Doors Closed message to System. Postcondition: Train is stationary at station and out of service. 32 A-16

Use Case Relationships Extend relationship Use case A is an extension of use case B Under certain conditions use case B will be extended by description given in use case A Same use case can be extended in different ways When to use extend Show conditional parts of use case Model complex or alternative paths Example of extension use cases and Extend relationship Store Part, Retrieve Part Extend Flexibly Manufacture Part 33 Example of extension use case and Extend relationship (Fig. 6.11) «physical entity actor» Vehicle Enter Green Zone Unauthorized «extends» «external system actor» Process Unauthorized Vehicle DMV System «external system actor» Police Patrol Car 34 A-17

Example of base use case and Extend relationship Use case: Enter Green Zone. Summary: Vehicle enters restricted Green Zone; System starts tracking the vehicle. Actor: Vehicle. Precondition: Green Zone entry point is clear. Main Sequence: 1. Vehicle approaches green zone entry point. 2. System detects vehicle entering the green zone. 3. System reads vehicle permit number RFID. 4. System checks that permit number is valid. 5. System stores the following information: permit number, entry time/date, entry location. Alternative Sequence: Step 4: Unauthorized i.e., unrecognized or missing permit number : Extend with Process Unauthorized Vehicle use case. Postcondition: Vehicle has entered green zone. 35 Example of extension use case and Extend relationship Use case: Process Unauthorized Vehicle. Summary: The license number of the unauthorized vehicle is detected, decoded, and sent to the police. Actor: Vehicle primary, Police Patrol Car secondary, DMV System secondary. Dependency: Extends Enter Green Zone use case. Precondition: Vehicle has an invalid or nonexistent permit number. Description of insertion segment: 1. System takes photograph of vehicle license plate. 2. System uses an image processing algorithm to analyze the photograph and extract the state name and vehicle license number. 3. System sends a message to the DMV system of the vehicle s state containing the vehicle license number and requesting owner name and address. 4. The DMV system sends a message to the system containing the name and address of the vehicle owner. 5. The system issues and prints a fine to be sent by mail to the vehicle owner. Postcondition: The unauthorized vehicle has been detected and a fine has been issued. Alternative sequence: Step 2: License plate cannot be decoded because of bad photograph, bad weather, covered license plate ; System sends alert message to the Police Patrol Car. 36 A-18

Figure 4.1 COMET/RTE life cycle model User System Structural Modeling Requirements Modeling Analysis Modeling Design Modeling Incremental Software Construction Incremental Software Integration Incremental Prototyping System Testing Customer Copyright 2016 Hassan Gomaa 37 A-19