Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.eso.org/sci/libraries/SPIE2008/7019-74_poster.pdf
Дата изменения: Tue Jul 15 11:39:16 2008
Дата индексирования: Sat Sep 6 07:38:10 2008
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п
Workstation Software Framework A Model Driven Development Framework
L. Andolfato, R. Karban European Organisation for Astronomical Research in the Southern Hemisphere
PROCESS
The Workstation Software Framework (WSF) is a state machine model driven generate event driven software applications. State machine models are used to provides different, versatile generation options. It supports Mealy, Moore and Generated code is readable and maintainable since it applies common design p Template design patterns. The framework promotes a development process tha through the creation of a catalog of state machine patterns. development toolkit designed to generate executables and it hierarchical state machines. atterns such as the State and the t is based on model reusability
Operator Preset Telescope Telescope

Requirements

APPLICATIONS

Requirements are analyzed developing scenarios.

: Operator

presetControl

: Altitude

: Azimuth

Requirements Analysis

Catalog of State Machine Models (State Patterns)
EVENT1 / ACTION
IDLE EVENT1 / ACTION1 STEP1

Preset(alpha, delta) Preset(degree)

Preset(degree)

Phase Referenced Imaging and Microarcsecond Astrometry for VLTI (PRIMA).

IDLE

WAIT
EVENTn+ 1 EVENT2 / ACTION2

EVE NT2
STEPn

STEP2 EVENTn / ACTIONn

Asynchronous Action Pattern

Sequence Pattern

S c en ar io a re use d t o i de nt i fy the s ys te m 's dyna m ic be ha vi or a nd da ta ha nd ling . D yna m ic b eh av io r is de s c rib ed vi a St a te Ma c hi ne di a gra m s. Da t a ha ndli ng i s il lus tra t e d using class diagrams.

IDLE
IDLE EVENT1 ITERATION entry/ ACTION1

EVENT1

STEP1 entry/ ACTION1

Design
Active Phasing Experiment (APE). Sta te M achine Models can be eas ily reused.
ONLINE IDLE PRESET / Preset Axes PRESETTING
alpha delt a Convert AlphaDeltaToAltAz () Set AlphaDelta() PrepareAltitudeMes sage() PrepareAz imut hMes sage()

DATA

SKIPn
COMPLETED EVE NT2

EVENTn+1

EVENT2

SKIP1

STEPn
NEXT CONDITION entry/ ACTION2

EVENTn

STEP2 entry/ ACTION2

entry/ ACTIONn SKIP2

PRESET_DONE

Iteration Pattern

Configurable Sequence Pattern

Thermal Control for Auxiliary Telescopes (ATCS) S t a te M a c hi ne s m od el s a re use d t o g en er at e c ode : s ta t e m a ch in e l og ic , e ve nt s h a ndlin g, a c ti on s s ke let on .

State machine models used to describe specific application behavior (such as sequences of commands, control loops, etc) can be completely reused in different applications simply by re-generating the code and adding a different implementation of the actions. Reusability at model level has been found to be much more efficient (and easy to implement) than at class level since the interface between generated code and user defined components is well defined by the framework.

Generated Code
.h .C++ States classes, Events classes, Acti ons and Data classes stubs

Developed Code
.h .C++ Acti ons i mplementation Data i mplementati on

Libraries
C++ li bs VLT SW li bs

New General detector Controller (NGC)

MODEL TRANSFORMATIONS
WSF provides the following model transformation functionalities: From textu al rep resen tation to C ++ c lasses From RationalROSE XML format to textual representation using XMI plug for RationalROSE and openArchitectureWare to convert XML model into textual representation From EnterpriseArchitect to textual representation via EA plug-in From MagicDraw to textual representation via MagicDraw plug-in

Application DEVELOPMENT
An application based on the Workstation Software Framework can be developed by: Adding manually states, events, actions and data classes. Since the architecture is based on design patterns, a WSF application can be built by extending the classes provided by the framework. Writing a text configuration file which describes the state machine model. A tool provided by WSF will transform the textual representation of the model in C++ state, event, and action classes. The developer has to complete the implementation of the action and data classes. Drawing the state machine model with Rational ROSE and export the model in XML format. A tool provided by WSF (based on openArchitectureWare) will transform the XML representation of the model in C++ state, event, and action classes. The developer has to complete the implementation of the action and data classes. Drawing the state machine model with EnterpriseArchitect or MagicDraw and run a plug-in to convert the model in textual representation. A tool provided by WSF will transform the textual representation of the model in C++ state, event, and action classes. The developer has to complete the implementation of the action and data classes.

ARCHITECTURE

Maintenance and Alignment of Delay Lines (DL)

Modeling using Text Editor

Modeling using MagicDraw

Modeling using EnterpriseArchitect

Modeling using Rational ROSE

Model in .mdzip format

Model in .ea format

Model in .mdl format

The Workstation Software Framework (WSF) architecture is based solid design patterns such as: the State design pattern to split state machine logic from action implementation the Template design pattern to hide event handling a modification of the Command design pattern for the action exe Events (commands, replies, timeouts, database notifications, file I/ notifications, internal events) are propagated to the state machine l which in turn will execute the associated action (transition actions entry/exit actions).

on

cutions O ogic or

Convert model using MD to WSF plugin

Convert model using EA to WSF plugin

Convert model using XML plugin

STATISTICS ON CODE GENERATION

Model in .xml format

Convert model using WSF tool based on openArchitectureWare

Model in text format

Code generation using WSF tools

MAINTENANCE
Generated C++ code Developed C++ Action and Data classes

Compiler

An application based on t maintained: By updating the model (without affecting data By fixing bugs on actio

he Workstation Software Framework can be and regenerating states, transitions and events and action classes developed by the user) ns and data classes

Executable

FUTURE DEVELOPMENTS
Data classes used to access/store values, can be generated from a class diagram.

FEATURES
The It It It W su su us o p p e rkstation ports Mo ports the s the acti Sof ore, His ons tware F Mealy tory sta classes ramework provides the following features: and Haral state machine models te concept to encapsulate more than one action per class

SUPPORTED SOFTWARE PLATFORM
WSF has been developed for the Very Large Telescope Software platform based on: Linux GNU C++ ESO VLT Software

Code generation for the Action classes can be once the relation between actions and events and between actions and data is known. These relationships can be captured by WSF code generation can be improved model. The class diagram should descr the relation among data, event and acti a class diagram. by adding a class diagram in the ibe data classes, their attributes and on classes.