25
Surya Bahadur Kathayat [email protected]

Surya Bahadur Kathayat [email protected]. Outline Ramses Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example

Embed Size (px)

Citation preview

Page 1: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Surya Bahadur [email protected]

Page 2: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Outline Ramses

Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example Projects Creating New Modeling Project Creating Packages and Components Editing State Machines Working with Corresponding Java Files Code Generation Execution

Page 3: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

What is Ramses ? It is a tool suite for creating reative

systems All implemented as eclipse-plugins

You can quickly edit the

functionality of your

application

You can test your model for typical error situations

You can quickly generate code

for different platforms

Once the system is running and if you want

to know what is happening – here you are

!

Page 4: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Other Tools Needed.... ActorFrame (TellU)

It constitutes of classes that are used for implementation and execution of state machines in Java

Knopflerfish OSGi Framework Open Source OSGi Framework – Java Based

Service Platform More Information on

http://www.knopflerfish.org

Page 5: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Installing Ramses

Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example Projects Creating New Modeling Project Creating Packages and Components Editing State Machines Working with Corresponding Java Files Code Generation Execution

Page 6: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Installing Ramses Install Eclipse 3.3 or later (download and unzip to

a local directory) Open update manager (Help | Software Updates |

Find and Install... | Search for new features to install)

Add a new remote site for Ramses as http://www.item.ntnu.no/ramses/updates

Select Europa Discovery Site as well. Press Finish Select latest version of Ramses and press ”Select

Required” Restart Eclipse Check !! (Help | About Eclipse Platform | Plugin..)Use the eclipse that is references

in the course web

Page 7: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Ramses Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example Projects Creating New Modeling Project Creating Packages and Components Editing State Machines Working with Corresponding Java Files Code Generation Execution

Page 8: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Ramses Perspectives

Inspection View

Model View

Editor View

Property View

Page 9: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Ramses Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example Projects Creating New Modeling Project Creating Packages and Components Editing State Machines Working with Corresponding Java Files Code Generation Execution

Page 10: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Importing Example Projects File > New > Example > Import

ActorFrame OSGI Libraries File > New > Example > Import Other

Examples Projects that you want

Page 11: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Ramses Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example Projects Creating New Modeling Project Creating Packages and Components Editing State Machines Working with Corresponding Java Files Code Generation Execution

Page 12: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Creating/Modeling New Project (1) Create a new Java Project File > New > New Project… >

Java Project with default “src” and “bin” config In the context menu of the created Java project, select

“Extend Project to Ramses Project”. Import the actor frame library: File > New > Example >

Import ActorFrame OSGI Libraries Add the ActorFrame project to the build path: In Package

Explorer > project context menu > Build Path > Configure Build Path > Projects Tab > Add and then add the ActorFrame project

Add the intermediate builder. Make sure that property view is visible, then select your project in model view and then within the property view, select only “ActorFrame OSGi Code for ISIS”

Then start building your model...>

Page 13: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Ramses Installing Ramses Ramses Perspective (Views and Editors) Importing/Exporting Example Projects Creating New Modeling Project Creating Packages and Components Editing State Machines Working with Corresponding Java Files Code Generation Execution

Page 14: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Creating Packages and Components With the operations in the context menu

you can add packages to the UML resource, then add required Components, Signals…

Project NameUML ModelYour Package

ComponentState Machine

Page 15: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Editing State Machines

Page 16: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Working with Java Files (1) You dont have to work with too much with

Java files. You can back and forth between model and package explorer views

Page 17: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Working with Java Files (2)

Actions on Any Activity / Tasks

Page 18: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Variable Initializations

Page 19: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Code Generation

Page 20: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Execution Installing Knopflerfish OSGi

Download Knopflerfish from knopflerfish.org (knopflerfish_fullbin_osgi_2.0.1.jar)

Install it by double clicking the executable jar file and follow the instructions

Start the Knopflerfish by a duble clicking on framework.jar in the osgi folder

Add the ActorFrame bunder (osgiactorrouter.jar) by dragging it to the main window of Knopflerfish

Page 21: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Execution

Page 22: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

You are done !!! Drag and Drop your osgi bundles to the

Knopflerfish OSGi framework See the logs files or other (depending your

application)

Page 23: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Signal From Environment ** Console

OSGi Bundles

Code attached

Page 24: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

Some Practical Information !!! Form groups on your own. Each group should consists of at most 2

students Send the Group Information to me

[email protected]

IDI Room 160

Visit our Course Web and Ramses Wiki Regularly

Page 25: Surya Bahadur Kathayat surya@item.ntnu.no. Outline  Ramses  Installing Ramses  Ramses Perspective (Views and Editors)  Importing/Exporting Example

DEMO