Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • chimeratk-mirror/ControlSystemAdapter-DoocsAdapter
1 result
Show changes
Commits on Source (3)
......@@ -5,7 +5,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
set(${PROJECT_NAME}_MAJOR_VERSION 01)
set(${PROJECT_NAME}_MINOR_VERSION 12)
set(${PROJECT_NAME}_PATCH_VERSION 01)
set(${PROJECT_NAME}_PATCH_VERSION 02)
include(cmake/set_version_numbers.cmake)
include(cmake/set_default_build_to_release.cmake)
......
......@@ -28,11 +28,8 @@ define them. Hence, you need to provide a second configuration file which define
by your application should be mapped to the DOOCS structure.
All locations have the same `eq_fct_type` 10. As DOOCS will add the properties inside the locations automatically, you
do not have to specify them here.
Missing locations will also be added automatically by the adapter, so it is perfectly fine to just have the server
location in the config file. Deflaut `eq_fct_type` is 10, but you can set a new `code` corresponding to `eq_fct_type`,
see \ref specifie_code.
do not have to specify them here. Missing locations will also be added automatically by the adapter, so it is perfectly fine to just have the server
location in the config file.
\subsection mapping_file DOOCS adapter mapping file
......@@ -50,9 +47,6 @@ An example for the mapping file is:
Each location is specified with a `location` tag.The `location` tag must have one XML attribute:
- `name`: Specifies the name of the location
It is possible to specify the `eq_fct_code` which must match `eq_fct_type` in the configuration file, see \ref specifie_code.
- `code`: Optional, specifies `eq_fct_code`
Properties can be specified in each location with the property tag, or in case of special properties like a `D_spectrum`
with the respective tag. A list of special properties is found in the next section. Each `property` tag has the
following attributes:
......@@ -205,29 +199,4 @@ sets the properties ERROR, ERROR.STR, STS.ERROR, STS.NEWERROR, and also logs int
Compare DOOCS documentation for error properties and propagation to the overall error counting per server, SVR.ERROR_COUNT.
\subsection specifie_code Specify `eq_fct_code` in the mapping file
It is possible to specify the `eq_fct_code` which must match `eq_fct_type` in the configuration file with `code` in
the \<location\> tag of the mapping file.
If `eq_fct_type` is set in the configuration file, `code` must have the same number in the mapping file. If the location
in the configuration file is missing, you can set your own new `code` in the mapping file. But if no code is set,
the default code is 10. You can set `code` multiple times, but `code` must always be consistent.
The `code` must be integer and > 1, since 1 is reserved for server.
An example configuration file and mapping file with the code specified:
\include tests/serverTestVariableMapperWithLocationAndCode.conf
\include tests/serverTestVariableMapperWithLocationAndCode-DoocsVariableConfig.xml
The location `DOUBLE` has already the `code` 10 specified in the configuration file.
If you set the `code` in the mapping file, it must have 10 as well.
The location `CREATED` will be created new with the default `code` of 10.
The location `NEW` will be created new with `code` of 12.
The location `FLOAT` is only specifed in the configuration file but will be also created with `code` 11.
*/
......@@ -23,7 +23,7 @@ namespace ChimeraTK {
// construct and populate the StatusHandler for this location
for(const ErrorReportingInfo& errorReportingInfo :
ChimeraTK::VariableMapper::getInstance().getErrorReportingInfos()) {
if(name_.get_value() != errorReportingInfo.targetLocation) {
if(name() != errorReportingInfo.targetLocation) {
continue;
}
......
......@@ -13,7 +13,6 @@ extern const char* object_name;
#include "DoocsAdapter.h"
#include "serverBasedTestTools.h"
#include <doocs-server-test-helper/ThreadedDoocsServer.h>
#include <eq_client.h>
#include <algorithm>
#include <random>
......@@ -36,8 +35,7 @@ BOOST_AUTO_TEST_CASE(testIiiiUpdate) {
IIII value; // a copy of the value. We don't want to hold the location lock longer than needed
location->lock();
value = *(
d_iiii
value = *(d_iiii
->value()); // value returs a pointer which we only must dereference while holding the lock. So we make a copy
location->unlock();
return value;
......@@ -88,7 +86,7 @@ BOOST_AUTO_TEST_CASE(testIiiiUpdate) {
BOOST_TEST(resultIiii.i4_data == referenceIiii.i4_data);
// change the values
IIII newReferenceIiii;
[[maybe_unused]] IIII newReferenceIiii;
newReferenceIiii.i1_data = 345;
newReferenceIiii.i2_data = 34;
newReferenceIiii.i3_data = -34;
......