17
March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF - Hamburg - 25 th of October 2010 A Short History of Pogo New Technology New Features Preferences Generated code Pogo-6 compatibility Conclusions

March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

Embed Size (px)

Citation preview

Page 1: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO collaboration 1March 19th 2007

POGO-7Pascal Verdier

ESRF-

Hamburg - 25th of October 2010

• A Short History of Pogo• New Technology• New Features• Preferences• Generated code• Pogo-6 compatibility• Conclusions

Page 2: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 2

POGO-7Pogo History

• The goal of Pogo:• Use a simple GUI to define device classes.• Write a class easily without re-invent “how to” every time.• Have classes based on same skeleton.

• Share classes.• Allow everybody to maintain or modify code

Help programmerto dance the

(good and same)

TANGO.

Page 3: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 3

POGO-7Pogo History

• It is a Java tool started in 1999.• It was based on very basic parsing technology.• For 10 years, the Tango devices have been subjected to many

evolutions and features:• Java and C++ APIs diverged, • The attribute model changed for C++, • The inheritance (in C++) must be managed, • A 3rd language (python) has been added, • IDL change (IDL-4 for C++ and Python and IDL-2 for Java), • New Types, • Polling, • Event push.

• The Tango community has grown up: • 300 device classes on sourceforge. • 180 device classes on ESRF repository. • Many device classes in each institute repository.

Page 4: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 4

POGO-7Pogo History

• The backward and universal compatibility is more and more difficult to be maintained with an in house parsing.

• So we would like to re-write it with an advanced parsing tool.

And

openArchitectureWare (oAW)

seems to be a good candidate to base

this new development.

Page 5: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 5

POGO-7New Technology

MDA/MDD: Model Driven Architecture Model Driven Development.

• openArchitectureWare :• It is a modular MDA/MDD generator framework implemented in Java(TM).• It supports parsing of arbitrary models, and a language family to check and

transform models as well as generate code based on them.• Supporting editors are based on Eclipse platform. oAW has strong support for EMF

(Eclipse Model Framework) based model.• It uses the Xtext/Xpand technology.

• The TANGO class model is defined with Eclipse using xtext grammar.

• oAW will generate a java API with classes and methods for commands, attributes, properties,...

• The TANGO class code is defined by templates with Eclipse, using Xpand language.

• This template can contain protected zones for programmer code.

Page 6: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 6

POGO-7New Technology

• Development diagram:

Page 7: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 7

POGO-7New Technology

• Tool principle diagram:

Page 8: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 8

POGO-7New Features

• The class model is now saved in a .xmi file.

• The areas for programmer’s code are well defined.

• Inheritance is not simply used as template.

• Inheritance could be done from a class containing code and not only from pure abstract class.

• A method has been added to add dynamic attributes (add_dynamic_attributes())

• The read attribute pointer allocation can be generated by Pogo

• An inheritance diagram is displayed.

• All classes in this diagram are edited.

Page 9: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 9

POGO-7Programmer’s Preferences

Previous project is re-load at Pogo startup

email address for contact in class ID

Default directory to search inherited classes

Page 10: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 10

POGO-7Site Preferences

Page 11: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 11

POGO-7Generated Code

Page 12: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 12

POGO-7Generated Code

Page 13: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 13

POGO-7Pogo-6 compatibility

Page 14: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 14

POGO-7Pogo-6 compatibility

Known Problems :

• Declaration duplicated (one time by generator, one time by code insertion)

• For writable attribute, in write_MyAttribute method, the attr.get_write_value()method management has changed. It is now returned in a local variable.Your old global variable does not exist any more (it is not necessary to be global in 99% of cases).It is now local and it is named : w_val.

It will try to insert your own code at right place.

Of course all cases cannot be tested, and something could be missing (test your server before any other modification !)

Page 15: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 15

POGO-7WARNINGS

http://www.esrf.eu/computing/cs/tango/tango_doc/tools_doc/pogo_doc/index.html

Page 16: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

TANGO Meeting 16

POGO-7Conclusions

• Pogo is now ready for C++ classes.

• Pogo is now waiting for Java code.

• And for Python code.

Page 17: March 19th 2007 TANGO collaboration 1 POGO-7 Pascal Verdier ESRF- Hamburg - 25 th of October 2010 A Short History of Pogo A Short History of Pogo New Technology

17