Architecture & Design of Embedded Real-Time Systems (TI-AREM)



Similar documents
Designing a Home Alarm using the UML. And implementing it using C++ and VxWorks

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

Software Development in the Large!

EMBEDDED SOFTWARE DEVELOPMENT: COMPONENTS AND CONTRACTS

Applying 4+1 View Architecture with UML 2. White Paper

Using UML Part One Structural Modeling Diagrams

Explicit Connectors in Component Based Software Engineering for Distributed Embedded Systems. Dietmar Schreiner and Karl M.

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Applying Use Cases to Microcontroller Code Development. Chris Gilbert Cypress Semiconductor

UML - Getting Started EA v4.0

Using UML to Construct a Model Driven Solution for Unified Access to Disparate Data

A hypervisor approach with real-time support to the MIPS M5150 processor

Business-Driven Software Engineering Lecture 3 Foundations of Processes

Conceptual Model for Enterprise Governance. Walter L Wilson

UML other structural. diagrams. (Implementation Diagrams UML 1.5) Università di Padova. Facoltà di Scienze MM.FF.NN. Informatica - anno

Design Specification for IEEE Std 1471 Recommended Practice for Architectural Description IEEE Architecture Working Group 0 Motivation

Automotive System and Software Architecture

Requirements engineering

IRA 423/08. Designing the SRT control software: Notes to the UML schemes. Andrea Orlati 1 Simona Righini 2

Chap 1. Introduction to Software Architecture

Software Architecture Document

Viewpoint Modeling. Agenda. 1. Viewpoint Modeling 2. ODS, Enterprise Architecture, Viewpoints, Models 3. Modeling approaches and standards

A Management Tool for Component-Based Real-Time Supervision and Control Systems

The Role of the Software Architect

Patterns in. Lecture 2 GoF Design Patterns Creational. Sharif University of Technology. Department of Computer Engineering

IBM Certified BPM Application Developer IBM Business Process Manager Express or Standard Edition V8.5.5

SysML Modelling Language explained

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Model Transformations and Code Generation

JOURNAL OF OBJECT TECHNOLOGY

An Architecture-Based Approach for Component-Oriented Development

Huawei Network Edge Security Solution

UNIFACE Component-based. Development Methodology UNIFACE V Revision 0 Dec 2000 UMET

Tool Support for Software Variability Management and Product Derivation in Software Product Lines

Component-Oriented Engineering

Model-Driven Software Development for Robotics: an overview

i. Node Y Represented by a block or part. SysML::Block,

SERVICE-ORIENTED MODELING FRAMEWORK (SOMF ) SERVICE-ORIENTED CONCEPTUALIZATION MODEL LANGUAGE SPECIFICATIONS

Designing Real-Time and Embedded Systems with the COMET/UML method

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

Developing SOA solutions using IBM SOA Foundation

F-16 Modular Mission Computer Application Software

Introduction to Simulink & Stateflow. Coorous Mohtadi

Standard Glossary of Terms Used in Software Testing. Version 3.01

Object-Oriented Systems Analysis and Design

Software Engineering/Courses Description Introduction to Software Engineering Credit Hours: 3 Prerequisite: (Computer Programming 2).

ATV Data Link Simulator: A Development based on a CCSDS Layers Framework

Protect Your Organization With the Certification That Maps to a Master s-level Education in Software Assurance

Development Process Automation Experiences in Japan

International Journal of Enterprise Computing and Business Systems ISSN (Online) :

Component-based Development Process and Component Lifecycle Ivica Crnkovic 1, Stig Larsson 2, Michel Chaudron 3

Introduction to software architecture

8. Master Test Plan (MTP)

Design principles in Test Suite Architecture

Resource Utilization of Middleware Components in Embedded Systems

TMT SOFTWARE REQUIREMENTS FOR LOW-LEVEL SUBSYSTEMS

IP Interface for the Somfy Digital Network (SDN) & RS485 URTSII

OPEN ESB 2.3 TUTORIAL. (Throttling in BPEL SE)

Unified Batch & Stream Processing Platform

Integration, testing and debugging of C code together with UML-generated sources

A Methodology for the Development of New Telecommunications Services

Construction Principles and Design Patterns. Flyweight, Bridge, Builder

In this Lecture you will Learn: Development Process. Unified Software Development Process. Best Practice

FIREWALL POLICY November 2006 TNS POL - 008

Enterprise Integration: operational models of business processes and workflow systems *

Incorporating Aspects into the UML

Proposal for a Vehicle Tracking System (VTS)

Price: see your VeriFone sales representative. Per student, Excluding VAT.

A Process Model for Software Architecture

Introduction to software architecture

SERVICE-ORIENTED MODELING FRAMEWORK (SOMF ) SERVICE-ORIENTED DISCOVERY AND ANALYSIS MODEL LANGUAGE SPECIFICATIONS

Source Code Translation

A methodology for secure software design

Requirements engineering and quality attributes

A SoC design flow based on UML 2.0 and SystemC

This article describes a detailed configuration example that demonstrates how to configure Cyberoam to provide the access of internal resources.

Using UML Part Two Behavioral Modeling Diagrams

What is a life cycle model?

Trends in Embedded Software Development in Europe. Dr. Dirk Muthig

Web Service Implementation Methodology

SERVICE-ORIENTED MODELING FRAMEWORK (SOMF ) SERVICE-ORIENTED BUSINESS INTEGRATION MODEL LANGUAGE SPECIFICATIONS

How To Understand The Dependency Inversion Principle (Dip)

The Concern-Oriented Software Architecture Analysis Method

LabVIEW Advanced Programming Techniques

Software Component Specification Using Design by Contract

A HW/SW Codesign Methodology based on UML

An Approach to Software Architecture Description Using UML

NETWORK ACCESS CONTROL AND CLOUD SECURITY. Tran Song Dat Phuc SeoulTech 2015

Verification and Validation of Software Components and Component Based Software Systems

Object Oriented Programming. Risk Management

Adding a PIB to the MIB Configuration and integration of advanced monitoring

Designing and Embodiment of Software that Creates Middle Ware for Resource Management in Embedded System

CS 589 Project Smart Home Hub, Phase I Due before 9am on October 21, 2015

Requirements Analysis Concepts & Principles. Instructor: Dr. Jerry Gao


Transcription:

Architecture & Design of Embedded Real-Time Systems (TI-AREM) Architectural Design Patterns 2. Components & Connectors and Component Architecture Patterns and UML 2.0 Ports (BPD. Chapter 4. p. 184-201) Version: 23-2-2014

Agenda Component Notation Component-based architecture Pattern Component & Connectors ROOM Pattern Design with UML 2.0 Ports Slide 2

UML Component Notation (1) MyInterface «component» Component requiredinterface Provided interface Required interface An interface: defines operation signatures (name, parameters and return type) NB! UML 2.0 Component notation and concepts Slide 3

UML Component Notation (2) OrderEntry «component» Order Person Compact view «Interface» OrderEntry +create() +validatedetails() +addorderline() Detailed view «component» Order «use» «Interface» Person +create() +findbyname() +getdeatils() Slide 4

UML Component Notation (3) Assembly Connector Slide 5

Component-Based Architecture A component in UML is a run-time artifact that forms the basic replaceable unit of software Component examples: static libraries, dynamic link libraries (DLLs), OCX and ActiveX components Slide 6

Component Based Pattern Structure Slide 7

Component Based Pattern Example Slide 8

Slide 9

Component & Connectors Existing research has focused on Component structure Component Interfaces Component functionality More focus needed on component interactions embodied in the notation of software connectors Slide 10

Connectors Connector definition: Connectors mediates interactions among components, that is, they establish the rules that govern component interaction and specify any auxiliary mechanism required Connectors should be first-class modeling constructs Ref. Article: Towards a Taxanomy of Software Connectors Slide 11

ROOM Pattern ROOM (Real-Time Object-Oriented Methodology). The ROOM Pattern is appropriate when the interaction of some large-scale objects is complex and requires special means to mediate and control. Slide 12

ROOM Pattern Structure Slide 13

ROOM Pattern Example Slide 14

ROOM Ports (~UML Ports) Master: Comm Object isender ireceiver Slave: Comm Object ROOM Ports => UML 2.x Ports Slide 15

ROOM Pattern Example State Chart Model Slide 16

UML 2.0 Ports Ports The Ports subpackage provides mechanisms for isolating a classifier from its environment. This is achieved by providing a point for conducting interactions between the internals of the classifier and its environment. This interaction point is referred to as a port. Multiple ports can be defined for a classifier, enabling different interactions to be distinguished based on the port through which they occur. By decoupling the internals of the classifier from its environment, ports allow a classifier to be defined independently of its environment, making that classifier reusable in any environment that conforms to the interaction constraints imposed by its ports. Ref. UML 2.0 Superstructure spec. Slide 17

New UML 2.0 Concepts for Classes A port groups interfaces belonging to a particular stakeholder. A port can have as well provided as required interfaces. Ref. Article Architecting Systems with UML 2.0, IEEE Software jul/aug. 2003. Slide 18

Example with Internal Structure Black Box View White Box View Structured Class Slide 19

Example with Behavioral Port Slide 20

Example: Home Alarm System version 1 home alarm detect intrusions <<extend>> occupation simulation «extend» intruder sound alarm arming and di sarming homeowner via keypad <<in clud e>> via remote code entry ch anging code <<inclu de>> Ref. Rhapsody 7.0 Slide 21

Home Alarm System version 1 Slide 22

Home Alarm System version 1 AlarmPkg «Facad e» AlarmController Without Using ports itsalarmcontroller 1 HardwarePkg thehardware 1 «Interface» IHardware Slide 23

AlarmController a Composite Class «Facade» AlarmController 1 t hekey pad:keypad 1 thelightcontroller:lightcontroller 1 1 thegreenled:led 1 theredled:led itsalarmcontroller thehardware 1 «Interf ace» IHardware setlight(alight:tlights,state:tonoff):void onarm():void ondisarm():void onkeyoff():void onkeyon():void onkey(n:int):void onmovement():void ondoor():void setled(ident:tled,state:tonoff):void setsiren(state:tonoff):void Slide 24

AlarmController State Diagram /init(); armed off evtemporise exiting active tm(exit_time) evarm detecting entering evdoor evdisarm evmovement tm(silence_time) evmovement tm(entry_time) intrusion tm(alarm_time) silence Slide 25

AlarmController Public Operations «Facade» AlarmController configure(ahardware:ihardware*):void AlarmController() flashgreenled():void onarm():void ondisarm():void ondoor():void onkey(n:int):void onkeyoff():void onkeyon():void onmovement():void evarm():void evmovement():void evdoor():void evtemporise():void evdisarm():void 1 itsalarmcontroller thehardware 1 «Interface» HardwarePkg::IHardware setlight(alight:tlights,state:t... onarm():void ondisarm():void onkeyoff():void onkeyon():void onkey(n:int):void onmovement():void ondoor():void setled(ident:tled,state:tono... setsiren(state:tonoff):void Slide 26

Possible Hardware Implementations AlarmHw 486Pkg Hw Poll Hw Irq AlarmHw 68kPkg SimulatedHw Pkg Hw guidlg «Interf ace» IHardw are onarm():void ondisarm():void onkeyoff() :void onkeyon():void onkey( n:int):void onmovement():void ondoor():void setled(ident:tled,state:to... setsiren(state:tonoff):void TestPkg Hw Slide 27

Home Alarm version 2 with Ports Ports are a new UML2.x modeling concept that allows strong encapsulation of classes from the environment. In this case, the Hardware and Alarm Controller are decoupled by specifying ports as their boundary interaction points. Slide 28

Package Diagram PORT: hwobserver With 3 provided interface AlarmPkg hwobserver IDoorListener,IKey Listener,IMov ementlistener HardwarePkg AbstractHW AbsHardware «F acade» AlarmController IKey Listener,I Mov ementlist ener, IDoorListener ctrl hwctrl ILedCtrl,ILightCtrl,ISirenCtrl PORT: ctrl PORT: hwctrl With 3 required interface ILedCt rl,ilight Ct rl,isirenctrl SimulatedHwPkg HwTestPkg guidlg Hw Slide 29

Home Alarm version 2 with Ports PORT: hwobserver hwobserver 1 «F acade» Alarm Controller thekeypad:keyp ad IDoorListener,IKey Listener,IMov ementlistener hw 1 thesiren:siren Co ntroll er ISirenCtrl PORT: hwctrl hw ILightC trl 1 th el igh tcontroller:lightc on trol ler hwc trl ILedC trl,ilightctrl,isirenc trl hw 1 thegreenled:led ILedCtrl hw 1 theredled:le d ILedC trl Slide 30

Classes: KeyPad, SirenController, Led newcode:int count:int oldcode:int Keypad Keypad() iscodecorrect():omboolean iscodeentered():omboolean changecode():void evkeyoff():void evkey():void evkeyon():void hw ISirenCtrl hw ILedCtrl SirenController setsirenon():void setsirenoff():void Led Led() evtoggle():void evflash():void evon():void evoff():void Slide 31

KeyPad State Diagram active armingdisarmingreprogr amming evkeyoff [IS_IN(cor rect)]/ itscontroller- >GEN(evDisarm) ; idle evkey/ codeentry newcode = (10 * new Code ) + params ->n; c ount++; evkey/ new Code = params->n; tm(5000) count=1; enteringcode ev KeyOff evkeyon [IS_IN(cor rect)]/ itscontroller- >GEN(evTemporise); [iscodeenter ed() ] evkeyon[is_in(different) ]/ changecode(); [IS_IN(notEntered) ] reprogramming [else] [is CodeCorrect()] waitoldcode currentcode evkey On [else] dif ferent correct evkeyoff [IS_IN(c orrect)] waitnew Code tm(3000) notentered tm(3000) tm(10000) 2 AND states Slide 32

Test Configuration hwobserver 1 «Facade» thealarm Ctrl:AlarmController IDoorListener,IKeyLis tener,imovementlistener IKeyListener,IMovem entlistene r,idoorlistener ILedC trl,ilightctrl,isirenctrl ctrl 1 thehw:hw hwctrl ILedCtrl,ILightCtrl,ISi renc trl Slide 33

Rhapsody Implementation of a Port (1) PORT: hwobserver AlarmController IDoorListener, IKeyListener, IMovementListener «Interface» IDoorListener «Interface» IKeyListener «Interface» IMovementListener ondoor():void onkey(n:int):void onkeyoff():void onkeyon():void onarm():void ondisarm():void onmovement():void Auto generated Port Class AlarmController hwobserver_c::inbound_c Slide 34

Rhapsody Implementation of a Port (2) AlarmController PORT: hwctrl ILedCtrl, ILIghtCtrl, ISirenCtrl «Interface» ILedCtrl «Interface» ILightCtrl «Interface» ISirenCtrl setled(ident:tled,state:tonoff)... setlight(alight:tlights,stat... setsiren(state:tonoff):void hwctrl_c::outbound_c Auto generated Port Class Slide 35

Rhapsody Implementation of a Port (3) PORT: hwobserver AlarmController PORT: hwctrl ILedCtrl, ILIghtCtrl, ISirenCtrl IDoorListener, IKeyListener, IMovementListener hwobserver_c hwctrl_c InBound_C x OutBound_C IDoorListener IKeyListener IMovementListener x InBound_C OutBound_C ISirenCtrl ILightCtrl ILedCtrl Slide 36

Rhapsody Implementation of a Port (4) thehw: Hw ctrl:ctrl_c OutBound: OutBound_C thealarmcrtl: AlarmController hwobserver: hwobserver_c InBound: InBound_C InBound: InBound_C hwctrl: hwctrl_c OutBound: OutBound_C Slide 37

AlarmController thealarmctrl; Hw thehw; Test Setup thehw.getctrl()->setitsikeylistener( thealarmctrl.gethwobserver()->getitsikeylistener()); thehw.getctrl()->setitsimovementlistener( thealarmctrl.gethwobserver()->getitsimovementlistener()); thehw.getctrl()->setitsidoorlistener( thealarmctrl.gethwobserver()->getitsidoorlistener()); thealarmctrl.gethwctrl()->setitsiledctrl(thehw.getctrl()->getitsiledctrl()); thealarmctrl.gethwctrl()->setitsilightctrl(thehw.getctrl()->getitsilightctrl()); thealarmctrl.gethwctrl()->setitsisirenctrl(thehw.getctrl()->getitsisirenctrl()); Slide 38

UML 2.0 Component Diagram «Executable» Gui <<Usage>> HWAbsLib AlarmCtrlLib <<Usage>> Slide 39 <<Callback>> (via ports)

Summary Component patterns and ports: Component-Based Architecture ROOM Pattern (=>UML 2.x Ports) Designing with Ports in UML 2.x Slide 40