170 likes | 423 Views
A Short H istory of Pogo New Technology New Features Preferences Generated code Pogo-6 compatibility Conclusions. POGO-7 Pascal Verdier ESRF - Hamburg - 25 th of October 2010. POGO-7 Pogo History. The goal of Pogo: Use a simple GUI to define device classes.
E N D
A Short History of Pogo • New Technology • New Features • Preferences • Generated code • Pogo-6 compatibility • Conclusions POGO-7 Pascal Verdier ESRF - Hamburg - 25th of October 2010 TANGO collaboration
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 programmer to dance the (good and same) TANGO. TANGO Meeting
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. TANGO Meeting
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. TANGO Meeting
POGO-7New Technology • 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. • MDA/MDD: Model Driven Architecture • Model Driven Development. TANGO Meeting
POGO-7New Technology • Development diagram: TANGO Meeting
POGO-7New Technology • Tool principle diagram: TANGO Meeting
POGO-7New Features • The class model is now saved in a .xmi file. • The areas for programmer’s code are well defined. • A method has been added to add dynamic attributes (add_dynamic_attributes()) • The read attribute pointer allocation can be generated by Pogo • Inheritance is not simply used as template. • Inheritance could be done from a class containing code and not only from pure abstract class. • An inheritance diagram is displayed. • All classes in this diagram are edited. TANGO Meeting
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 TANGO Meeting
POGO-7Site Preferences TANGO Meeting
POGO-7Generated Code TANGO Meeting
POGO-7Generated Code TANGO Meeting
POGO-7Pogo-6 compatibility TANGO Meeting
POGO-7Pogo-6 compatibility 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 !) • 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. TANGO Meeting
POGO-7WARNINGS http://www.esrf.eu/computing/cs/tango/tango_doc/tools_doc/pogo_doc/index.html TANGO Meeting
POGO-7Conclusions • Pogo is now ready for C++ classes. • Pogo is now waiting for Java code. • And for Python code. TANGO Meeting
Thank you! Any Questions ?