Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

cppTango 9.3.3 Release Notes

Reynald Bourtembourg edited this page Mar 5, 2019 · 11 revisions

[DRAFT]

Tango C++ library (cppTango) 9.3.3

March 2019

What's new (since version 9.2.5)?

  • cppTango source code repository has been moved from subversion on Sourceforge.net to git on GitHub.com. The tango-cs subversion repository on SourceForge has been frozen at a temperature near 0 K. The SourceForge tickets have been converted to GitHub issues so we keep track of all the old problems which have been solved... as well as all the old problems which are still there and that we should fix at some point.
  • cppTango now uses CMake as build system because we think it's cool and much easier to use than the autotools... And we can even use it on Windows! Please refer to INSTALL.md file to get more details if you want to build and install from the source code.
  • Integration tests are now public and built automatically using Travis CI for Linux.
  • cppTango is now using appveyor to automatically build the Tango C++ library on Windows, as well as Windows installers for the Tango C++ library for different Windows compilers (from MSVC9 to MSVC15, 32 bits and 64 bits). Anyone who already tried to compile the Tango C++ library on Windows can understand how this is great news!
  • A map was added in MultiAttribute object to improve performances when searching for an attribute by name. We should have thought about it before, it is much faster to find something with a good map! This should greatly improve the performances in the case where a device has a large number of attributes.
  • An error message is now printed with the exception description if the event callback provided by the user (push_event() method) is throwing an exception. Yes, the user code can sometimes throw an exception!
  • Support for NaN and Inf was added in float and double properties. So now you can use the keywords NaN, -NaN, inf, -inf and +inf when writing double and float scalar and array properties from jive. It is not case sensitive, so nan, -NAN , nAn, iNF, -Inf and +INF are supported for instance. A negative NaN is extracted as NaN.
  • DevVarBooleanArray DeviceData insertion and extraction operators have been added.
  • It is now possible to create dynamic forwarded attributes. This works well when the device server exports only one device per class. Please refer to #342 for more details about the limitations.
  • Development Debian packages for the Tango C++ library are now deployed automatically on Bintray when a git tag is created so you can play with it easily after the creation of a new git tag. But be careful here. This Debian package provides only libtango library and is currently not compatible with the official libtango package provided by Debian.
  • Codacy and Sonar tools have been integrated. So it is now possible to monitor the tests coverage and to benefit from static analysis and automatic code reviews from these tools to detect potential issues. You can click on the GitHub badges in cppTango README.md file to get more details. Of course, we will use these results as a good basis to improve the tests coverage and fix the issues reported by these tools, in the next releases.
  • cppTango can now be compiled with Clang and recent g++ versions
  • A search bar has been added to Doxygen generated documentation, which is now generated and saved in cppTango-docs repository. The Doxygen documentation is now available directly at this URL: https://tango-controls.github.io/cppTango-docs or indirectly on the official Tango documentation.
  • The device server reliability has been improved when removing dynamic attributes from delete_device() method.

Changes which might have an impact on users

  • log4tango is no longer a separate library. It is now part of libtango library. This means that it is no longer required to link Tango C++ programs with liblog4tango. This also means that programs compiled with a previous Tango 9 release of the Tango C++ library will still require log4tango library at execution time until they are recompiled with the newer cppTango version and until their Makefile is updated to no longer link with log4tango library.

  • zmq.hpp file has been removed. This adds a dependency to cppzmq.

  • tango.h file is now generated during the build process from the tango.idl file. This adds a dependency to tango-idl repository. omniidl is also required to be able to generate tango.h file.

  • The include files are now installed under <install_prefix>/include/tango instead of <install_prefix>/include. You may have to update your Makefiles in order to match this new include install location.

  • log4tango include files are now installed under <install_prefix>/include/tango/log4tango. You may have to update your Makefiles in order to match this new include install location.

  • DeviceAttribute::get_type() no longer returns API_EmptyDeviceAttribute exception when the DeviceAttribute is empty. It returns DATA_TYPE_UNKNOWN instead.

    Warning! This change could lead to Segmentation fault in code doing something like:

    DeviceAttribute da;
    da = device->read_attribute("AnAttributeWithINVALIDQualityFactor");
    cout << "Type = " << Tango::CmdArgTypeName[da.get_type()] << endl;

Please refer to #510 for more details.

  • 2 consecutive change events having possibly the same attribute value (but different timestamps) might be sent now during the Device Server startup phase. This was necessary to fix a bug where a client would possibly miss some important change events after a device server restart. Please refer to #359 and #503 to get more details.
  • We reduced the sleep time during the event subscription phase. This should speed up the startup of some GUI applications which are subscribing to events for a huge number of attributes. Sadly, in some hopefully rare situations (slow network, busy computers), this could lead to a situation where some events might be missed if they occur between the subscribe_event() call and the ZMQ subscription reception (which is asynchronous) on the ZMQ publisher side, potentially leading to situations where a client application might show out of date/incorrect values until the next event is received. It was already the case in the previous versions but reducing the sleep time during the event subscription will increase the probability of this situation to happen. We are working on this topic to try to solve this edge case issue. We are sorry for the inconvenience. In any case, we hope this change will provide more comfort than problems.
  • Tango::string_free() method has been added. The users are strongly encouraged to use this method together with Tango::string_dup() when dealing with Tango::DevString variables instead of using CORBA::string_free() and CORBA::string_dup().

Bug fixes

  • We think we found a way to get rid of heartbeat events problems! You know, when you were subscribing to events and receiving an API_EventTimeout error event every 10 seconds, followed by a valid event (which was corresponding to the synchronous read_attribute call occurring during the event reconnection mechanism)? This problem was occurring because the client and the server were computing different heartbeat event channel names in some situations (for instance when the TANGO_HOST was not exactly the same string on the client side and server side or when the DNS was not well configured). So the client was subscribing to heartbeat events with a name and the device server was sending heartbeat events with another channel name. Since the key for a good relationship in a couple is communication, we managed to make them talk better to each other so they now agree on a channel name during the subscription phase. The new solution works only between Tango 9 clients using the new version of the C++ library and Tango 9 device servers also using this new version of the library. For the older clients and device servers, the behaviour will be as before. This sounds like a good reason to update, isn't it? We also fixed a bug related to heartbeat events which could occur when a device server runs on a host with multiple network interfaces.

Feedback

You can report issues on https://github.com/tango-controls/cppTango/issues or https://github.com/tango-controls/TangoTickets/issues for problems which may affect several repositories or when you don't know where to create the issue (well, now, you know!).

Contributions

Contributions are welcome. Please do not hesitate to create new Pull requests in cppTango GitHub repository.

Acknowledgement

A huge thanks to all the persons who contributed to this release, to the Tango kernel team and to the Tango community for its feedback and bug reports.

Clone this wiki locally