Tango C++ library 9.3.7 Release Notes
October 24th, 2024This version contains a backported fix for the following issue:
- Cannot change alarm range for memorized attribute !401
Please refer to
CHANGELOG.md for a detailed list of changes and references to corresponding GitLab issues and merge requests.You can also refer to
Milestone 9.3.7You can see the source code comparison with
Tango 9.3.6, as well as the commits and contributors on this page:
https://gitlab.com/tango-controls/cppTango/-/compare/9.3.6...9.3.7Tango C++ library 9.3.6 Release Notes
April 2nd, 2022In this version, it is now possible to extract the DEV_STATE attribute multiple times from a
DeviceAttribute object (
!943,
#845).
The device server programmer can now use the
DeviceImpl::get_client_ident()
method to get information on the client (
!1055,
#801)Many bugs have been fixed, the most important ones are:
- Event data corruption could occur with big spectrum or image attributes when a device server was exporting several devices (!1069,#1007,#684)
- Restore event subscriptions after device server rename and restart (!1052,#679)
- A crash could occur when reading a DevString RW Scalar Forwarded Attribute (!914,#512)
- A Segfault could occur in db API when using alternate casing for "DServer" class (!960,#893)
- Fix group write_attribute connection problem when server starts after client (!961,#906)
- The interface event stateless subscription can now succeed as expected with non reachable device (!860,#750)
- Device Servers should now always exit as expected when receiving the SIGTERM signal (!1054,#927)
- Case sensitivity bug for class attributes property (!1070,#1085)
- Allow users to select C++ standard (!928). There was a regression preventing users to use c++98 standard
- Use Expected omniidl When TANGO_OMNI_BASE Is Given (!994,#971)
- "Suspected bug in devapi_pipe" (!954,#925)
On the tests side, we now use our own Gitlab runners (
!1063,
#1078). Many thanks to the institutes contributing Gitlab Runners!
The tests compilation is now faster (
!1017,
#1009).
A ABI-API Compliance check CI job has been added to 9.3-backports branch (
!1059,
#1047).
The tests are no longer using the deprecated dockerhub/tango docker images (
!1036,
#1009).
Support for sonarcould and coveralls.io have been removed (
!1015,
#1000)Please refer to
CHANGELOG.md for a detailed list of changes and references to corresponding GitLab issues and merge requests.You can also refer to
Milestone 9.3.6You can see the source code comparison with
Tango 9.3.5, as well as the commits and contributors on this page:
https://gitlab.com/tango-controls/cppTango/-/compare/9.3.5...9.3.6Tango C++ library 9.3.5 Release Notes
February 2022ZMQ ports used for the
Tango events can now be configured using TANGO_ZMQ_EVENT_PORT and TANGO_ZMQ_HEARTBEAT_PORT environment variables ((
#880,
!893).
cppTango can now also be compiled in Release mode with debugging information using CMAKE_BUILD_TYPE=RelWithDebInfo and can also be compiled in Release mode with the smallest possible binary size using CMAKE_BUILD_TYPE=MinSizeRel (
#839,
!905).
The way to build on Windows has been modified to be able to build independently the static and dynamic versions of the library (
#550,
!896).
The logging timestamp precision has been increased to microseconds (
#858,
!866).
An artificial limit of 6 device classes per device server when using the File
Database has been removed (
#816,
!818).
It is now possible to compile the
Tango C++ library on Alpine Linux using musl libc (
#767,
!841). Some additional classes are now also documented in the
Doxygen documentation which is now available on Gitlab.com:
https://tango-controls.gitlab.io/cppTango/ (
!780).
Many bugs have been fixed, the most important ones are:
- Events should now work better in nodb mode !852)
- Fix the problem where archive periodic events were no longer received after a polling restart (#675, !778)
- Allow compiling JPEG support with MMX extensions with old compilers again (!828)
- Fix wrong usage of omniORB object leading to crash (#842, !842)
- Fix deadlock when updating attribute configuration (#409, !863)
- Catch more exceptions in the PollThread to avoid crashes (#691, !873)
- Fix segfault on unsubscribing (#843, !852)
- Fix crash when reading a forwarded State attribute (#550, !896)
Please refer to
CHANGELOG.md for a detailed list of changes and references to corresponding GitLab issues and merge requests.You can see the source code comparison with
Tango 9.3.4, as well as the commits and contributors on this page:
https://gitlab.com/tango-controls/cppTango/-/compare/9.3.4...9.3.5Tango C++ library 9.3.4 Release Notes
October 21, 2019cppTango can now be built even with the zmq.hpp file provided by your favourite Linux distribution.Please refer to
CHANGELOG.md for a detailed list of changes and references to corresponding GitLab issues and merge requests.You can see the source code comparison with
Tango 9.3.3, as well as the commits and contributors on this page:
https://gitlab.com/tango-controls/cppTango/-/compare/9.3.3...9.3.4Tango C++ library 9.3.3 Release Notes
March 29, 2019
Table of Contents
- What's new (since version 9.2.5)?
- Changes which might have an impact on users
- Bug fixes
- Event related bug fixes
- Other bug fixes
- Changelog
- Source code comparison with version 9.2.5
- Feedback
- Contributions
- Acknowledgement
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 (version 2.8.12 or more recent) 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 and should produce less heat on your CPU. A small contribution to reduce the impact on the climate.
- 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 also 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 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.
- It is now possible to insert a const C string in a DeviceData
Tango::DeviceData din;
din << "My Wonderful C string";
- We improved the integration tests by splitting one of our big monolithic tests into several executables, by adding new tests and by making them more reliable. Still we are far from 100% coverage.
- As python 2.x is reaching EOL soon (PEP 373) and some distributions already switched to use python 3.x as a default python interpreter, we follow PEP 394 and use
python2
command/link instead of python
when invoking cxxtestgen
. If python2
is missing, CMake will fall-back to using python
(if it's on $PATH
).
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 throws an 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:
da = device->read_attribute("AnAttributeWithINVALIDQualityFactor");
Fundamental type for sending an dreceiving data to and from device attributes.
Definition: DeviceAttribute.h:73
int get_type()
Get attribute data type.
const char *const CmdArgTypeName[]
Definition: tango_const.h:1021
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](i-359) and [!503](pr-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()
.
- We added -pedantic flag when compiling with g++ or Clang in debug mode. This change can generate build errors with very old compilers (e.g. g++ 3.4.6) when compiling the library debug version. Please remove manually -pedantic flag in configure/CMakeLists.txt if you need to compile the debug version on a very old compiler.
Bug fixes
Event related 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. At least not configured as Tango would have expected it). 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?
- A bug in ZMQ 4.2.0 and ZMQ 4.2.1 was preventing clients to receive more than 1000 events. We found a work-around so if you use this new Tango C++ library version, you should not be impacted by this ZMQ bug unless you are tuning the event system high water mark with the
CtrlSystem/EventBufferHwm
free property. And even in this case, if you restart all your clients after changing the value of this free property, you should be fine until the next time you change the value of this advanced free property, which should not be the case for 99.9999999% of our users (estimation which is not 100% accurate).
- When you push events by code, you would like in some cases to be able to push error events containing an exception so that the clients get notified that something wrong happened. You could do that in the previous version but the Tango 9 clients were not receiving the error events because the device server was sending these error events using a wrong channel name. Then the Tango 9 clients were receiving nasty API_MissedEvents errors events afterwards. We fixed that. This problem was on the server side.
- We also fixed a bug related to heartbeat events which could occur when a device server runs on a host with multiple network interfaces.
- Tango 9 device servers sometimes didn't like when a Tango 8 client had subscribed to events for one of its attributes and this attribute became invalid (INVALID quality factor). In this case, the device server was expressing its dissatisfaction by stopping activity with a segmentation fault. We managed to reconcile Tango 8 clients and Tango 9 device servers in this use case.
- We fixed a leak in the pipes! There was indeed a memory leak when a pipe event was sent and no client had subscribed to this pipe event.
- If you are using ZMQ 4.2.3, peer disconnection triggers zmq_disconnect on a ZMQ socket. Further zmq_disconnect calls for such a socket and endpoint will fail with errno set to ENOENT. The ZMQ Event consumer now silently ignores ENOENT failures when disconnecting the socket. The result is that the user no longer gets useless exceptions related to zmq socket disconnection when the DeviceProxy destructor is invoked for instance. DeviceProxy destructor now also catches all the exceptions which could be thrown from unsubscribe_event().
Other bug fixes
- When you specify a polling period for a dynamic attribute from POGO, you expect the polling to start up automatically for these attributes. The device servers used to be lazy in previous versions and didn't start the polling in this specific case. We found the right words to motivate them to do what you expect.
- DeviceAttribute::get_type() is now returning the correct type when the DeviceAttribute object is initialized with a short or enum value. The bug which was not present in Tango 8 was a side effect of the first implementations of the DevEnum feature.
- The class list from the Util object was not cleaned up and reassigned with the reconstructed classes during the execution of the RestartServer admin command. Now this is clean.
- Device server with a user defined event loop now works as well on Windows.
- A device server had the power to remotely eradicate a client (with a spell producing a client segmentation fault) when the client was trying to write asynchronously an attribute on the device server as the first action immediately after the device server restart. We decided to reinforce the defensive skills of the client which now manages to survive in this case and it even manages to write the remote attribute.
- We fixed a bug in Attribute::get_att_device_class() method which was generating an exception when a device server was trying to set an attribute property (e.g.: set_max_value) when a memorized attribute was written during the device init phase (write hardware at init feature). If you didn't understand anything to this explanation, you were probably not affected by this bug.
- We fixed a memory leak in get_device_property() which was occurring only on Windows and only when using Visual Studio 10 compiler or an older MSVC compiler version.
- If you are not using DevUShort WRITE only attributes, you can skip to the next item. Still reading? So you are really using DevUShort WRITE only attributes? The DevUShort WRITE attribute value was not rolled back correctly to the previous valid value in some specific cases (exception thrown in the device server write method associated to this attribute, exception thrown by read_attr_hardware() method or exception thrown because it is not allowed to read this attribute in the current state). Now it is!
- We fixed many compilation warnings and build errors with recent compilers and with Doxygen
Changelog
Please refer to
CHANGELOG.md for a detailed list of changes and references to corresponding Gitlab issues and merge requests.
Source code comparison with version 9.2.5
You can see the source code comparison with
Tango 9.2.5, as well as the commits and contributors on this page:
https://gitlab.com/tango-controls/cppTango/-/compare/cppapi_Release_9_2_5...9.3.3Feedback
You can report issues on
https://gitlab.com/tango-controls/cppTango/-/issues or
https://gitlab.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 Merge requests in
cppTango Gitlab repository.
Acknowledgement
Many thanks to all the persons who contributed to this release, to the
Tango kernel team and to the
Tango community for its feedback, bug reports and tests.