Presentation is loading. Please wait.

Presentation is loading. Please wait.

OOD Design of Processes 1 Procedure Call Pattern ITV Modelbased Analysis and Design of Embedded Software Anders P. Ravn & Arne Skou Aalborg University.

Similar presentations


Presentation on theme: "OOD Design of Processes 1 Procedure Call Pattern ITV Modelbased Analysis and Design of Embedded Software Anders P. Ravn & Arne Skou Aalborg University."— Presentation transcript:

1 OOD Design of Processes 1 Procedure Call Pattern ITV Modelbased Analysis and Design of Embedded Software Anders P. Ravn & Arne Skou Aalborg University February 2011

2 Purpose Link Design to Platform Focus: Interfaces between Components Event handling Concurrency – Active Classes OAD Ch 11

3 Basis from Design Detailed Designs Architecture

4 Simple Generic Architecture OAD p.196 «component» Interface «component» Model «component» UserInterface «component» SubsystemInterface «component» Platform «component» OS «component» FileSystem «component» Function...

5 The Task to Solve Assume: Design is already mapped to Sequential Programs (Classes) «component» QQQQQQQQQ «component» MMMMMMMMM Provide: Architecture mapped to Concurrent Programs on a Platform «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Function «component» Platform «component» OS «component» FileSystem

6 Platform Characteristics onenone Ordinary c++, c threadsshared objects Java,CORBA, posix, SYMBION tasksasynch. message posix, RTOS ProcessesSynchronizationExample

7 Procedure call Pattern: Interface Component «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Platform «component» OS «component» FileSystem «component» Function «interface» Application read(Key) : ReadData update(UpdateData) compute(Mode) : Result attach(SignalHandler) Wrapper... read(Key k) : ReadData update(UpdateData u) compute(Mode m) : Result attach(SignalHandler sh) IFunction from Function implements IModel from Model

8 Procedure Call Pattern: Function Component «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Function «component» Platform «component» OS «component» FileSystem «interface» IFunction read(Key) : ReadData update(UpdateData) compute(Mode) : Result attach(SignalHandler) Administrator... read(Key k) : ReadData update(UpdatDatae u) compute(Mode m) : Result attach(SignalHandler s) IModel from Model implements

9 Procedure Call Pattern: Model Component «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Function «component» Platform «component» OS «component» FileSystem «interface» IModel read(Key) : Data update(Data) put(Data) attach(SignalHandler) Model... read(Key k) : Data update(Data d) put(Data d) attach(SignalHandler s) implements

10 Procedure Call Pattern a:Function::Administratorh: Interface::Wrapperm: Model::Model update(u) read(k) put(d) + efficient code + simple code -long response times - no concurrency OAD p.255-259

11 Creating an Instance «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Platform «component» OS «component» FileSystem «component» Function «interface» Application h: Wrapper IFunction from Function implements instance: CreateInstance h: Wrapper... getAPI(): Application

12 Observer Pattern OAD p.278 «interface» Subject attach(Observer) detach(Observer) notifyObservers() get(): Object ObservedObject State s get(): State «interface» Observer update(Subject) ObjectObserver State observation observers 1* subject

13 Observers across Subsystems «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Platform «component» OS «component» FileSystem «component» Function «component» Interface «component» UserInterface «component» SystemInterface «component» Model «component» Platform «component» OS «component» FileSystem «component» Function «subsystem» A«subsystem» B ObservedObject ObjectObserver

14 Exercises 1.Define an AP-Interface for your Model Component. 2.Outline an implementation in Procedure Call Pattern 3.How are signals from the Model Component handled? 4.How would you get an update from an external subsystem?


Download ppt "OOD Design of Processes 1 Procedure Call Pattern ITV Modelbased Analysis and Design of Embedded Software Anders P. Ravn & Arne Skou Aalborg University."

Similar presentations


Ads by Google