THE ICASAPLATFORM
PHILIPPE LALANDA / COLIN AYGALINC
KOBE UNIVERSITY – AUGUST 2017

STRUCTURE

Generality about iCasa
Details
Expected exercises

2

ICASAA software environment for the development, deployment,
configuration, execution of pervasive applications:• Simplifying these tasks

Autonomic
deployment
Code generation
High-level
feedback

Configuration facilities
Autonomic execution

3

ICASA OVERVIEW

Eclipse-based environment

Configuration/administration

Deployment

Synchronization

Dynamic
Pervasive app
Runtime environment4ICASA RUNTIME

The runtime is made of several frameworks:• RoSe (resource integration)• iPOJO (development model)• Wisdom (web server)• Context management• HMI management

DynamicAutonomic

RoSe & Wisdom & context
iPOJO
Apache Felix OSGi

5

IPOJOA service-oriented component model:• Required and provided services (specifications)• Dependencies resolved at runtime• Re-assessed at every context modification• Built-in runtime architecture

Runtime Architecture

Monitoring

Adaptation

Open Source (Apache)
6

IPOJOA service-oriented component model with selfadaptation features.
Administration APIs

Provided
Provided
APIsServicesComponent

Required
RequiredServices APIs

Execution machine

7

IPOJO - ILLUSTRATIONYXX

AYC2YC5C4C1B

D

DEC3Serviceregistry

Execution machine8

WEB-BASED CONFIGURATION/TEST

Represents the environment, including a map of the house• Full control over time, devices, zone, simulated persons• Mixes simulated and real devices• Synchronized• Extensible

9

CURRENT WORK
Better context• More than “just devices”• Abstract services• In line with application needs

10

STRUCTURE

Generality about iCasa
Details
Expected exercises

11ECLIPSE ENVIRONMENT

Toolbox integrated as an Eclipse plug in• How to install it ? http://self-star.imag.fr/?page_id=243• How to use it ?
Select12

ECLIPSE ENVIRONMENT

Use it to describe your iPOJO component
Services that yourcomponent provides

Services that yourcomponent requires
to work

13

ECLIPSE ENVIRONMENT

Generates the implementation class:• It will be the place where you code yourapplication/service.

14

ECLIPSE ENVIRONMENT

POJO
IMPL

15

ECLIPSE ENVIRONMENT
Component
description contains
references to field,
method of thecorresponding javaClass

Component Description

Java ClassJava Class expectthat some field or
method aremanaged by thecomponent
description to work
properly

Each change on the java Class or the component
description impact the other. Try to keep themsynchronized.

16

ECLIPSE ENVIRONMENTYour implementation class must
implements the service contract
exposed by your component

The dependency you described
are wrapped as regular java field inyour code. So to use them, justmanipulate these fields. The nameof the attribute must correspond totheidofthecomponent
dependency description section.

17

ECLIPSE ENVIRONMENT
Deployment feature:••

It compiles your code. Ensurethat all your file are saved.

It will copy the compiled
artifact
totheruntimedirectory. The one that you haveindicated
duringtheconfiguration phase of the plugin in preferences section.

18

RUNTIME ENVIRONMENT

A dynamic interactive runtime environment:• Folder + Configuration files on your laptop• Use launch script to start the runtime environment(startGateway.sh on Unix based system orstartGateway.bat on windows)

The deployment actionin Eclipse Environment
copy the generated
bundle in this directory.
If
theruntime
environment is started,
it continuously watch
thisdirectoryandintegrated the newcode in the execution.

19

RUNTIME ENVIRONMENT
A dynamic interactive runtime environment:••

An interactive shell to understand what happens at execution time.
Usefull commands:•••

lb : for list bundle – List of the bundle present in theenvironment and their state
instances : list all the instances of iPOJO component present
in the environment and their states.
instance $id : print the description of a particular instance. Itshows the state of the different features of an iPOJO instance(state of the dependency, provided services,…)

20

WEB UI

A graphical view of the execution environment:• Available on any web browser if the Runtime Environment isstarted• Adress : http://localhost:9000/simulator

Map ofthehouse
Configuration
panel

21

WEB UI

Creation of simulated devices :Choose a simulated device type

Ask the execution
environment to create
a new simulated
device of the specifiedtype

List of running devices

22

WEB UI

Creation of simulated zones:

Provide the zone name

Ask the execution
environment to create
a new zone with thename you provide

Listofofrunningzones devices
List

Use the map todynamically adjust thesize and the position ofthe zone

23

WEB UI

Ask the execution
environment to create
a new simulated user

Creation of simulated users:

Provide the simulated user name

Listofofrunningzones devices
List
List of simulatedusers

Use the map to movethe user in the house24

WEB UI

Script player :Clock control panel:• Start/Stop the simulated clock• Several physical models of thesimulator (like the temperature)need the clock to be started inorder to work

Listofofrunningzones devices
List
List of simulatedusers

All of the previous actions can be automatedand contains in a script file to speed up theconfiguration of the execution environment

25

STRUCTURE

Generality about iCasa
Details
Expected exercises

26

EXPECTED EXERCICES

Understand bundle, component lifecycle.

• Create and deploy a bundle that contains a single
component. This component have two lifecyle methodthat will automatically be called by the runtime each time
you deployed/undeployed it.
http://self-star.imag.fr/?page_id=196

27

EXPECTED EXERCICES
The Light Follow Me Application :• Try to provide a luminous path to user inside the house.
Basic behavior :• Each time a user enter in a zone (the presence is detected bypresence sensor), the application turn on the binary light of thezone. If the user leave the zone, the application turn off thelight.
http://self-star.imag.fr/?page_id=61

28

EXPECTED EXERCICES

Optional Features to integrate gradually:• Control more device type (DimmerLight)• Manage an autonomic illuminance goal
• Manage an autonomic energy goal

http://self-star.imag.fr/?theme=theme-1

29

EXPECTED EXERCICESThe Temperature Follow Me Application :• Try to regulate the temperature in the house.
Basic behavior :• Try to reach a goal temperature in each room of the housethrough the .
http://self-star.imag.fr/?theme=temperature-management30