GUI for REMES

Design Description

Version 0.4


GUI for REMES / Version: 0.4
Design Description / Date: 2008-12-01

Revision History

Date / Version / Description / Author
2008-11-22 / 0.01 / Initial Draft / AS
2008-11-25 / 0.02 / Second Draft / AS,PI
2008-11-25 / 0.3 / Small formatting changes/corrected some errors / JM
2008-12-01 / 0.4 / Revised design document / JM

Table of Contents

Page 1
GUI for REMES / Version: 0.4
Design Description / Date: 2008-12-01

1. Introduction...... 4

1.1 Purpose of this document...... 4

1.2 Intended Audience...... 4

1.3 Scope...... 4

1.4 Definitions and acronyms...... 4

1.4.1 Definitions...... 4

1.4.2 Acronyms and abbreviations...... 4

1.5 References...... 4

2. External interfaces...... 4

2.1 Graphical User Interface...... 5

3. Software architecture...... 6

3.1 Conceptual design...... 6

3.2 System specification...... 6

3.3 Error handling...... 7

4. Detailed software design...... 7

4.1 Meta model...... 9

4.2 EMF Gen model...... 9

4.3 Model code...... 9

4.4 Edit code...... 9

4.5 Editor code...... 9

4.6 Graphical representation...... 9

4.7 Tools definitions...... 10

4.8 Mapping model...... 10

4.9 GMF Gen Model...... 10

4.10 Diagram Editor code...... 10

5. Approvals...... 11

Page 1
GUI for REMES / Version: 0.4
Design Description / Date: 2008-12-01

1.Introduction

1.1Purpose of this document

Purpose of this document is to provide the design and detail design information of the GUI for REMES project. The document is a reference to the project architecture, design and its overall working.

1.2Intended Audience

  • Aneta Vulgarakis, main supervisor/customer
  • Ana Petričić, secondary supervisor
  • Ivica Crnkovic, part of steering group
  • Rikard Land, part of steerirng group

1.3Scope

The scope of this document is the project design description. It describes the meta model which describes the concepts of REMES and also gives design description of the GUI. And this document provides the software architecture of the project at each level.

1.4Definitions and acronyms

1.4.1Definitions

Keyword / Definitions
REMES / Resource Model for Embedded Systems
GUI / Graphical User Interface

1.4.2Acronyms and abbreviations

Acronym or
abbreviation / Definitions
EMF / Eclipse Modeling Framework
GEF / Graphical Editing Framework
GMF / Graphical Modeling Framework

1.5References

2.External interfaces

This project GUI for REMES provides an editor to make and analyse the resource models. It provides graphical interface for the user to construct his resource models easily.

2.1Graphical User Interface

REMES editor contains project explorer where you can observe the tree of REMES components used for your model, attribute editor displays the attribute information, and the palette contains the actual REMES components and the graphical editor where you design your REMES model.

Figure 1. Screenshot of Graphical User Interface

Here the user will able to create a new remes model and edit the existing models. And with in the model he is able to retrieve the information about invariance, resource and the function of a mode.

3.Software architecture

3.1Conceptual design

REMES project is a MVC design.In model layer EMF takes the metamodel(.ecore) which represent remes grammar.It provides an editor.It offers the basic elements for modeling class,attribute,associations and generalizations. And in View layer all the components of remes can be created using Draw2D plug-in which is available in GEF.and GEF acts in the controller layer.GMF creates a mapping between the business model and the view controller model and derives a graphical editor where the user can create his remes models.

Figure 2. Conceptual design

3.2System specification

In this project errors can be occurred in the first phase I.e. creating the meta model. This has to be created manually .If something is wrongly defined it reflects on the other phases of the project .and also it may not satisfy the REMES semantics.

3.3Error handling

Error / Action
Creation of meta model / Should satisfy REMES symantics while designing meta model manually.
Corrupt REMES project loaded / User is notified, the project is not load in the GUI.
Duplicate name of the project / User is notified, user must change the name of the new project before creating it.
Invalid value for some REMES element / User is notified, user must change it to go on working with the GUI.

4.Detailed software design

This class diagram shows model view of REMES editor. There can be different views of the model. User can choose the model view. In the dynamic view user can see the functional view of a top most mode. Time view shows how long the mode will be in action by displaying its invariance. Resource view gives the information of resource consumption (CPU,memory and power) and utilization of a mode.

Figure 3. Detailed software design

The following diagram describes the process used for the creation of a graphical editor using EMF and GMF.

Figure 4. Process used for creation of graphical editor

5.EMF

The EMF project is a modeling framework and code generation facility for building tools and other applications based on a structured data model. From a model specification described in XMI, EMF provides tools and runtime support to produce a set of Java classes for the model, along with a set of adapter classes that enable viewing and command-based editing of the model, and a basic editor.

GMF

Bases on EMF and GMF the Eclipse Graphical Modeling Framework (GMF) provides a generative component and runtime infrastructure for developing graphical editors.

The meta model (blue box) to be created manually. It’s the first step. Then EMF and GMF can derive the others files automatically from the meta model.

It’s a one way process: if something is missing or wrongly defined in a previous step, this will affect all the next steps and it’s sometimes hard/long to correct the error.

The files represented by rose boxes are generated but you have to edit/modify those files in order to specify exactly what you need.

The green boxes represent the generated tools.

5.1Meta model

This is how REMES meta model designed. It defines what is a REMES mode. And it satisfies the symantics of a REMES in well defined way.

Figure 5. REMES Meta model

5.2EMF Gen model

When your meta model is designed, you can generate the EMF Gen model file. In this file you must specify the “Base Package”.

In this file you can also specify the edition feature you would like for your object properties (e.g. Multi line field, read-only attribute…).

When you are done with those specifications, you can generate: model code, edit code and editor code.

5.3Model code

This code is generated by EMF according to your specifications defined in the EMF Gen model file. This code will be stored in the “src” directory of your project. This code is interfaces and templates used by the other tool. This code is actually the implementation of your meta model.

5.4Edit code

This code is the implementation of the edition of the properties: the attributes of your elements in the meta model.

5.5Editor code

The editor is a textual tree representation of your system

5.6Graphical representation

This file contains the definition of the graphical representation for each element in your meta model. This is represented as .gmfgraph file.

5.7Tools definitions

This file provides a way to define the creation tools and menus for the graphical editor. In our REMES editor we need a File menu that contains standard project management such as new, save, open, close and add to existing project. For changing views we have defined a menu with three choices that will filter the mode information in different ways, available selections are Functional View, Timing View and Resource usage View. We also need a right-click pop up menu with delete, copy, paste, cut and a property item, the property will bring up a new window were you can change element information. The modeling tools and elements are defined as a palette, the tools are selection and marquee that are used for selection and the modeling elements are mode, init, entry, exit point, a conditional connector, and at last an element for creating connections. This file provides a way to define the creation tools for the graphical editor.

Figure 6. Tools definition

5.8Mapping model

This file describes the mapping between an element in the meta model, a graphical representation and a tool for the creation. This is represented as .gmfmap file.

5.9GMF Gen Model

This file will be used to generate the diagram editor code. This is represented as .gmfgen file.

5.10Diagram Editor code

This code is the graphical editor. It’s an eclipse plug-in triggered and launched when opening a corresponding diagram file.

6.Approvals

Name / Title / Date
yyyy-mm-dd / Signature
Aneta Vulgarakis
main supervisor
Ana Petričić
secondary supervisor
Ivica Crnkovic
steering group
Rikard Land
Steering group
Page 1