1 / 15

PyTango release 3

PyTango release 3. Two new features: New installation procedure Tango device server Bug fixes, speed improvements, new methods…. PyTango release 3. New installation procedure You install the source tree where you want Still uses Bjam (the Boost make system)

morrie
Télécharger la présentation

PyTango release 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PyTango release 3 • Two new features: • New installation procedure • Tango device server • Bug fixes, speed improvements, new methods…

  2. PyTango release 3 • New installation procedure • You install the source tree where you want • Still uses Bjam (the Boost make system) • Some Bjam related scripts have to be modified according to your disk files structures • It is now a Python package • Installation procedure documented in the ReadMe files (Unix and Windows)

  3. PyTango release 3 • Python device server is a wrapping of the C++ API. It is not a new package coming from the IDL file (like Java DS) • Uses Boost.Python • It needs Tango C++ API V5.5 (or older) • Management of the Python GIL • Per thread data to handle data type conversion • Python not needed to compile Tango

  4. PyTango release 3 • All the commands are managed by one C++ command class (PyCmd) • One instance of this class per command • Command name is a data member of this class (Tango feature) • All the attributes are managed by three C++ attribute class (PyScaAttr, PySpecAttr and PyIma Attr) • One instance of one of these classes per attribute • Attribute name is a data member

  5. PyTango release 3 • Command • They are defined in a Python dictionary called cmd_list data member of the xxxClass (PowerSupplyClass class) • cmd_list dictionary : • ‘cmd_name’:[[in_type,<“In desc”>],[out_type,<“Out desc”>],<{Opt parameters}>] cmd_list = {‘IOLong’,[[PyTango.DevLong,”Number”], [PyTango.DevLong,”Number * 2”], {“polling period”:2000, “display type”: PyTango.DispLevel.EXPERT}]}

  6. PyTango release 3 • Command simple data types

  7. PyTango release 3 • Command array data types

  8. PyTango release 3 • Attribute • They are defined in a Python dictionary called attr_list data member of the xxxClass (PowerSupplyClass class) • attr_list dictionary : • ‘attr_name’:[[attr data type, attr data format, attr data R/W type],<{opt parameters}>] attr_list = {‘Long_attr’:[[PyTango.DevLong,PyTango.SCALAR, PyTango.READ], {“label”: “A dummy attribute”, “min alarm”: 1000, “max alarm”: 1500}]}

  9. PyTango release 3 • General methods • init_device() • delete_device() • always_executed_hook() • read_attr_hardware() • signal_handler() • State and Status can be re-defined if needed

  10. PyTango release 3 • Coding difference related to C++ • Command’s is_allowed methods does not have argument • No class_factory file/method. Replaced by the add_TgClass() and add_Cpp_TgClass() methods of the Python PyUtil class • No device_factory() method

  11. PyTango release 3 • Some timing measurement (2 CPU Xeon 3.2 Ghz Suse 9.3, 2 GB mem) • In = One Long, Out = One long • In = Void, Out = 100000 double (Python list)

  12. PyTango release 3 • Several Tango classes within the same interpreter • All Python Tango classes • No problem, use the client part of PyTango • Mixing Python and C++ Tango classes • Within the same Device Server process, you can have C++ Tango class and Python Tango class. • The C++ Tango classes are dynamically loaded

  13. PyTango release 3 • Pogo (4.5.4 and above) now generates : • A small “C” function to create the xxxClass singleton of the Tango class (in the xxxClass.cpp file) • A new Make dependency called “shlib” in the Makefile • A new method (not a command) of the admin device • Load the shared library • Retrieve the symbol associated with the new small C function • Execute this function

  14. PyTango release 3 • Developed and tested with Linux Suse 9.3 and Windows XP using VC8 • Python 2.4 and 2.4.1 • Boost.Python 1.33.1 • Solaris ?

  15. PyTango release 3 • What is not done • Device logging, • Management of large data number with NumPy • Pogo could be modified to support Python device server • Same property management than C++ or Java DS • Wizard initialization • HTML doc generation

More Related