From 5b54aa116d8d9f47f2cb1c09b66f524374aefbf7 Mon Sep 17 00:00:00 2001
From: Martin Killenberg <martin.killenberg@desy.de>
Date: Thu, 23 Apr 2020 11:56:38 +0200
Subject: [PATCH] IFFF: added config and DoocsVariableConfig for test. Now
 fails because not known in XML

---
 tests/serverTestIfff-DoocsVariableConfig.xml | 15 +++++++++++++++
 tests/serverTestIfff.conf                    | 16 ++++++++++++++++
 tests/src/serverTestIfff.cpp                 |  6 +++---
 3 files changed, 34 insertions(+), 3 deletions(-)
 create mode 100644 tests/serverTestIfff-DoocsVariableConfig.xml
 create mode 100644 tests/serverTestIfff.conf

diff --git a/tests/serverTestIfff-DoocsVariableConfig.xml b/tests/serverTestIfff-DoocsVariableConfig.xml
new file mode 100644
index 0000000..f54fa52
--- /dev/null
+++ b/tests/serverTestIfff-DoocsVariableConfig.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<device_server xmlns="https://github.com/ChimeraTK/ControlSystemAdapter-DoocsAdapter">
+
+  <location name="CUSTOM">
+      <D_ifff name="IFFF"
+          i1_source="/INT/FROM_DEVICE_SCALAR"
+          f1_source="/FLOAT/FROM_DEVICE_SCALAR"
+          f2_source="/DOUBLE/FROM_DEVICE_SCALAR"
+          f3_source="/SHORT/FROM_DEVICE_SCALAR">
+      </D_ifff>
+  </location>
+
+  <import>/</import>
+
+</device_server>
diff --git a/tests/serverTestIfff.conf b/tests/serverTestIfff.conf
new file mode 100644
index 0000000..aabc25e
--- /dev/null
+++ b/tests/serverTestIfff.conf
@@ -0,0 +1,16 @@
+eq_conf:
+
+oper_uid:       -1
+oper_gid:       405
+xpert_uid:      1000
+xpert_gid:      1000
+ring_buffer:    10000
+memory_buffer:  500
+
+eq_fct_name:    "IFFF_TEST._SVR"
+eq_fct_type:    1
+{
+SVR.RPC_NUMBER:         700000007
+SVR.NAME:       "IFFF_TEST._SVR"
+SVR.BPN:        6000
+}
diff --git a/tests/src/serverTestIfff.cpp b/tests/src/serverTestIfff.cpp
index ea06a77..cd796ca 100644
--- a/tests/src/serverTestIfff.cpp
+++ b/tests/src/serverTestIfff.cpp
@@ -71,18 +71,18 @@ std::string DoocsLauncher::rpc_no;
 BOOST_GLOBAL_FIXTURE(DoocsLauncher);
 
 /**********************************************************************************************************************/
-
 BOOST_AUTO_TEST_CASE(testIfffUpdate) {
   std::cout << "testIfffUpdate" << std::endl;
 
-
   auto extractValue = []() -> IFFF {
     auto d_ifff = getDoocsProperty<D_ifff>(PROPERTY_NAME);
     auto location = getLocationFromPropertyAddress(PROPERTY_NAME);
     IFFF value; // a copy of the value. We don't want to hold the location lock longer than needed
 
     location->lock();
-    value = *(d_ifff->value()); // value returs a pointer which we only must dereference while holding the lock. So we make a copy
+    value = *(
+        d_ifff
+            ->value()); // value returs a pointer which we only must dereference while holding the lock. So we make a copy
     location->unlock();
     return value;
   };
-- 
GitLab