ChimeraTK-DeviceAccess-DoocsBackend  01.09.02
testUnifiedBackendTest.cpp
Go to the documentation of this file.
1 /*
2  * testUnifiedBackendTest.cpp
3  *
4  * Created on: Jun 03, 2020
5  * Author: Martin Hierholzer
6  */
7 
8 #include <cstdlib>
9 #include <iostream>
10 #include <random>
11 #include <thread>
12 #include <unistd.h>
13 
14 #define BOOST_TEST_MODULE testUnifiedBackendTest
15 #include "eq_dummy.h"
16 #include <doocs-server-test-helper/doocsServerTestHelper.h>
17 #include <doocs-server-test-helper/ThreadedDoocsServer.h>
18 #include <doocs/EqCall.h>
19 
20 #include <ChimeraTK/Device.h>
21 #include <ChimeraTK/TransferGroup.h>
22 #include <ChimeraTK/UnifiedBackendTest.h>
23 
24 #include <boost/filesystem.hpp>
25 #include <boost/test/included/unit_test.hpp>
26 
27 #include <fstream>
28 
29 using namespace boost::unit_test_framework;
30 using namespace ChimeraTK;
31 
32 /**********************************************************************************************************************/
33 
34 static std::atomic<bool> zmqStartup_gotData{false};
35 
36 class DoocsLauncher : public ThreadedDoocsServer {
37  public:
39  : ThreadedDoocsServer("testUnifiedBackendTest.conf", boost::unit_test::framework::master_test_suite().argc,
40  boost::unit_test::framework::master_test_suite().argv, eq_dummy::createServer()) {
41  // set CDDs for the two doocs addresses used in the test
42  rpc_no = rpcNo();
43  DoocsServer = "doocs:doocs://localhost:" + rpcNo() + "/F/D";
44 
45  // wait until server has started (both the update thread and the rpc thread)
46  doocs::EqCall eq;
47  doocs::EqAdr ea;
48  doocs::EqData src, dst;
49  ea.adr("doocs://localhost:" + rpcNo() + "/F/D/MYDUMMY/SOME_ZMQINT");
50  while(eq.get(&ea, &src, &dst)) usleep(100000);
51 
52  // wait until ZeroMQ is working
53  dmsg_start();
54  dmsg_t tag;
55  std::cout << "ZeroMQ Subscribe" << std::endl;
56  [[maybe_unused]] int err = dmsg_attach(
57  &ea, &dst, nullptr,
58  [](void*, doocs::EqData* data, dmsg_info_t*) {
59  if(!data->error()) zmqStartup_gotData = true;
60  },
61  &tag);
62  assert(!err);
63  std::cout << "ZeroMQ wait" << std::endl;
64  [[maybe_unused]] auto location = dynamic_cast<eq_dummy*>(find_device("MYDUMMY"));
65  assert(location != nullptr);
66  while(!zmqStartup_gotData) {
67  usleep(100000);
68  DoocsServerTestHelper::runUpdate();
69  }
70  std::cout << "OK!" << std::endl;
71  dmsg_detach(&ea, nullptr);
72  }
73 
74  static std::string rpc_no;
75  static std::string DoocsServer;
76 };
77 
78 std::string DoocsLauncher::rpc_no;
79 std::string DoocsLauncher::DoocsServer;
80 
81 static eq_dummy* location{nullptr};
82 
83 static size_t mpn = 10000;
84 static size_t seconds = 0;
85 static size_t microseconds = 0;
86 
88 
89 /**********************************************************************************************************************/
90 
91 template<typename DERIVED>
93  DERIVED* derived{static_cast<DERIVED*>(this)};
94 
95  bool isWriteable() { return true; }
96  bool isReadable() { return true; }
97  ChimeraTK::AccessModeFlags supportedFlags() { return {}; }
98  size_t nChannels() { return 1; }
99  size_t writeQueueLength() { return std::numeric_limits<size_t>::max(); }
100  size_t nRuntimeErrorCases() { return 1; }
101  typedef std::nullptr_t rawUserType;
102 
103  static constexpr auto capabilities = TestCapabilities<>()
104  .disableForceDataLossWrite()
105  .disableAsyncReadInconsistency()
106  .disableSwitchReadOnly()
107  .disableSwitchWriteOnly();
108 
109  void setForceRuntimeError(bool enable, size_t) {
110  if(enable) {
111  location->lock();
112  }
113  else {
114  location->unlock();
115  }
116  }
117 
118  void updateStamp() {
119  ++mpn;
120  microseconds += 100000;
121  if(microseconds > 1000000) {
122  microseconds -= 1000000;
123  ++seconds;
124  }
125  derived->prop.set_tmstmp(seconds, microseconds);
126  derived->prop.set_mpnum(mpn);
127  }
128 };
129 
130 /**********************************************************************************************************************/
131 
132 template<typename DERIVED>
136  size_t nElementsPerChannel() { return 1; }
137 
138  template<typename UserType>
139  std::vector<std::vector<UserType>> generateValue() {
140  return {{ChimeraTK::numericToUserType<UserType>(static_cast<typename DERIVED::minimumUserType>(
141  derived->template getRemoteValue<typename DERIVED::minimumUserType>()[0][0] + derived->increment))}};
142  }
143 
144  template<typename UserType>
145  std::vector<std::vector<UserType>> getRemoteValue() {
146  std::lock_guard<EqFct> lk(*location);
147  auto v = ChimeraTK::numericToUserType<UserType>(derived->prop.value());
148  return {{v}};
149  }
150 
151  void setRemoteValue() {
152  auto v = derived->template generateValue<typename DERIVED::minimumUserType>()[0][0];
153  std::lock_guard<EqFct> lk(*location);
154  derived->prop.set_value(v);
155  this->updateStamp();
156  }
157 };
158 
159 /**********************************************************************************************************************/
160 
161 template<typename DERIVED>
165 
166  template<typename UserType>
167  std::vector<std::vector<UserType>> generateValue() {
168  auto curval = derived->template getRemoteValue<typename DERIVED::minimumUserType>()[0];
169  std::vector<UserType> val;
170  for(size_t i = 0; i < derived->nElementsPerChannel(); ++i) {
171  val.push_back(ChimeraTK::numericToUserType<UserType>(curval[i] + (i + 1) * derived->increment));
172  }
173  return {val};
174  }
175 
176  template<typename UserType>
177  std::vector<std::vector<UserType>> getRemoteValue() {
178  std::vector<UserType> val;
179  std::lock_guard<EqFct> lk(*location);
180  for(size_t i = 0; i < derived->nElementsPerChannel(); ++i) {
181  val.push_back(ChimeraTK::numericToUserType<UserType>(derived->prop.value(i)));
182  }
183  return {val};
184  }
185 
186  void setRemoteValue() {
187  auto val = derived->template generateValue<typename DERIVED::minimumUserType>()[0];
188  std::lock_guard<EqFct> lk(*location);
189  for(size_t i = 0; i < derived->nElementsPerChannel(); ++i) {
190  derived->prop.set_value(val[i], i);
191  }
192  this->updateStamp();
193  }
194 };
195 
196 /**********************************************************************************************************************/
197 
198 struct RegSomeInt : ScalarDefaults<RegSomeInt> {
199  std::string path() { return "MYDUMMY/SOME_INT"; }
200  D_int& prop{location->prop_someInt};
201  typedef int32_t minimumUserType;
202  int32_t increment{3};
203 
204  static constexpr auto capabilities = ScalarDefaults<RegSomeInt>::capabilities.enableSwitchReadOnly();
205 
206  void switchReadOnly(bool enable) {
207  if(enable) {
208  prop.set_ro_access();
209  }
210  else {
211  prop.set_rw_access();
212  }
213  }
214 };
215 
216 /**********************************************************************************************************************/
217 
218 struct RegSomeRoInt : ScalarDefaults<RegSomeInt> {
219  bool isWriteable() { return false; }
220  std::string path() { return "MYDUMMY/SOME_RO_INT"; }
221  D_int& prop{location->prop_someReadonlyInt};
222  typedef int32_t minimumUserType;
223  int32_t increment{7};
224  // the catalogue cannot be filled correctly because we don't know if the register is readable or not when filling the catalogue
225  static constexpr auto capabilities = ScalarDefaults<RegSomeInt>::capabilities.disableTestCatalogue();
226 };
227 
228 /**********************************************************************************************************************/
229 
230 struct RegSomeZmqInt : ScalarDefaults<RegSomeZmqInt> {
231  AccessModeFlags supportedFlags() { return {AccessMode::wait_for_new_data}; }
232  std::string path() { return "MYDUMMY/SOME_ZMQINT"; }
233  D_int& prop{location->prop_someZMQInt};
234  typedef int32_t minimumUserType;
235  int32_t increment{51};
236 
237  static constexpr auto capabilities = ScalarDefaults<RegSomeZmqInt>::capabilities.enableAsyncReadInconsistency();
238 
239  void setRemoteValue() {
241 
242  std::lock_guard<EqFct> lk(*location);
243  dmsg_info_t info;
244  memset(&info, 0, sizeof(info));
245  info.sec = seconds;
246  info.usec = microseconds;
247  info.ident = mpn;
248  prop.send(&info);
249  usleep(10000); // FIXME: DOOCS-ZeroMQ seems to lose data when sending too fast...
250  }
251 
253  // Change value without sending it via ZeroMQ
255  }
256 };
257 
258 /**********************************************************************************************************************/
259 
260 struct RegSomeFloat : ScalarDefaults<RegSomeFloat> {
261  std::string path() { return "MYDUMMY/SOME_FLOAT"; }
262  D_float& prop{location->prop_someFloat};
263  typedef float minimumUserType;
264  float increment{std::exp(1.F)};
265 };
266 
267 /**********************************************************************************************************************/
268 
269 struct RegSomeDouble : ScalarDefaults<RegSomeDouble> {
270  std::string path() { return "MYDUMMY/SOME_DOUBLE"; }
271  D_double& prop{location->prop_someDouble};
272  typedef double minimumUserType;
273  double increment{std::exp(1.5)};
274 };
275 
276 /**********************************************************************************************************************/
277 
278 struct RegSomeString : ScalarDefaults<RegSomeString> {
279  std::string path() { return "MYDUMMY/SOME_STRING"; }
280  D_string& prop{location->prop_someString};
281  typedef std::string minimumUserType;
282 
283  template<typename UserType>
284  std::vector<std::vector<UserType>> generateValue() {
285  assert(false); // See specialisation below
286  }
287 
288  template<typename UserType>
289  std::vector<std::vector<UserType>> getRemoteValue() {
290  std::vector<UserType> val;
291  std::lock_guard<EqFct> lk(*location);
292  val.push_back(prop.value());
293  return {val};
294  }
295 
296  size_t someValue{42};
297 };
298 
299 template<>
300 std::vector<std::vector<std::string>> RegSomeString::generateValue<std::string>() {
301  ++someValue;
302  return {{"This is a string: " + std::to_string(someValue)}};
303 }
304 
305 /**********************************************************************************************************************/
306 
307 struct RegSomeStatus : ScalarDefaults<RegSomeStatus> {
308  std::string path() { return "MYDUMMY/SOME_STATUS"; }
309  D_status& prop{location->prop_someStatus};
310  typedef uint16_t minimumUserType;
311  uint16_t increment{32000};
312 };
313 
314 /**********************************************************************************************************************/
315 
316 struct RegSomeBit : ScalarDefaults<RegSomeBit> {
317  std::string path() { return "MYDUMMY/SOME_BIT"; }
318  D_bit& prop{location->prop_someBit};
319  typedef ChimeraTK::Boolean minimumUserType;
320  uint8_t increment{0}; // unused
321 
322  template<typename UserType>
323  std::vector<std::vector<UserType>> generateValue() {
324  return {{!this->getRemoteValue<minimumUserType>()[0][0]}};
325  }
326 };
327 
328 /**********************************************************************************************************************/
329 
330 struct RegSomeIntArray : ArrayDefaults<RegSomeIntArray> {
331  std::string path() { return "MYDUMMY/SOME_INT_ARRAY"; }
332  size_t nElementsPerChannel() { return 42; }
333  D_intarray& prop{location->prop_someIntArray};
334  typedef int32_t minimumUserType;
335  int32_t increment{11};
336 };
337 
338 /**********************************************************************************************************************/
339 
340 struct RegSomeShortArray : ArrayDefaults<RegSomeShortArray> {
341  std::string path() { return "MYDUMMY/SOME_SHORT_ARRAY"; }
342  size_t nElementsPerChannel() { return 5; }
343  D_shortarray& prop{location->prop_someShortArray};
344  typedef int16_t minimumUserType;
345  int16_t increment{17};
346 };
347 
348 /**********************************************************************************************************************/
349 
350 struct RegSomeLongArray : ArrayDefaults<RegSomeLongArray> {
351  std::string path() { return "MYDUMMY/SOME_LONG_ARRAY"; }
352  size_t nElementsPerChannel() { return 5; }
353  D_longarray& prop{location->prop_someLongArray};
354  typedef int64_t minimumUserType;
355  int64_t increment{23};
356 };
357 
358 /**********************************************************************************************************************/
359 
360 struct RegSomeFloatArray : ArrayDefaults<RegSomeFloatArray> {
361  std::string path() { return "MYDUMMY/SOME_FLOAT_ARRAY"; }
362  size_t nElementsPerChannel() { return 5; }
363  D_floatarray& prop{location->prop_someFloatArray};
364  typedef float minimumUserType;
365  float increment{std::exp(5.F)};
366 };
367 
368 /**********************************************************************************************************************/
369 
370 struct RegSomeDoubleArray : ArrayDefaults<RegSomeDoubleArray> {
371  std::string path() { return "MYDUMMY/SOME_DOUBLE_ARRAY"; }
372  size_t nElementsPerChannel() { return 5; }
373  D_doublearray& prop{location->prop_someDoubleArray};
374  typedef double minimumUserType;
375  double increment{std::exp(7.)};
376 };
377 
378 /**********************************************************************************************************************/
379 
380 struct RegSomeSpectrum : ArrayDefaults<RegSomeSpectrum> {
381  std::string path() { return "MYDUMMY/SOME_SPECTRUM"; }
382  size_t nElementsPerChannel() { return 100; }
383  D_spectrum& prop{location->prop_someSpectrum};
384  typedef float minimumUserType;
385  float increment{std::exp(11.F)};
386 
387  void setRemoteValue() {
388  auto val = generateValue<minimumUserType>()[0];
389  std::lock_guard<EqFct> lk(*location);
390  prop.current_buffer(0);
391  for(size_t i = 0; i < nElementsPerChannel(); ++i) {
392  prop.fill_spectrum(i, val[i]);
393  }
394  this->updateStamp();
395  }
396 
397  template<typename UserType>
398  std::vector<std::vector<UserType>> getRemoteValue() {
399  std::vector<UserType> val;
400  std::lock_guard<EqFct> lk(*location);
401  for(size_t i = 0; i < nElementsPerChannel(); ++i) {
402  val.push_back(prop.read_spectrum(i));
403  }
404  return {val};
405  }
406 
407  void updateStamp() {
408  ++mpn;
409  microseconds += 100000;
410  if(microseconds > 1000000) {
411  microseconds -= 100000;
412  ++seconds;
413  }
414  derived->prop.set_tmstmp(seconds, microseconds, 0);
415  derived->prop.set_mpnum(mpn);
416  }
417 };
418 
419 /**********************************************************************************************************************/
420 
421 struct RegSomeIiii : ArrayDefaults<RegSomeIiii> {
422  std::string path() { return "MYDUMMY/SOME_IIII"; }
423  size_t nElementsPerChannel() { return 4; }
424  D_iiii& prop{location->prop_someIIII};
425  typedef int32_t minimumUserType;
426  int32_t increment{13};
427 
428  void setRemoteValue() {
429  auto val = generateValue<minimumUserType>()[0];
430  std::lock_guard<EqFct> lk(*location);
431  prop.set_value(val[0], val[1], val[2], val[3]);
432  this->updateStamp();
433  }
434 
435  template<typename UserType>
436  std::vector<std::vector<UserType>> getRemoteValue() {
437  std::lock_guard<EqFct> lk(*location);
438  auto val = prop.value();
439  return {{ChimeraTK::numericToUserType<UserType>(val->i1_data), ChimeraTK::numericToUserType<UserType>(val->i2_data),
440  ChimeraTK::numericToUserType<UserType>(val->i3_data), ChimeraTK::numericToUserType<UserType>(val->i4_data)}};
441  }
442 };
443 
444 /**********************************************************************************************************************/
445 
446 struct RegSomeIfff_I : ScalarDefaults<RegSomeIfff_I> {
447  std::string path() { return "MYDUMMY/SOME_IFFF/I"; }
448  D_ifff& prop{location->prop_someIFFF};
449  typedef int32_t minimumUserType;
450  int32_t increment{23};
451 
452  void setRemoteValue() {
453  auto v = generateValue<minimumUserType>()[0][0];
454  std::lock_guard<EqFct> lk(*location);
455  auto curval = prop.value();
456  prop.set_value(v, curval->f1_data, curval->f2_data, curval->f3_data);
457  this->updateStamp();
458  }
459 
460  template<typename UserType>
461  std::vector<std::vector<UserType>> getRemoteValue() {
462  std::lock_guard<EqFct> lk(*location);
463  return {{ChimeraTK::numericToUserType<UserType>(prop.value()->i1_data)}};
464  }
465 };
466 
467 /**********************************************************************************************************************/
468 
469 struct RegSomeIfff_F1 : ScalarDefaults<RegSomeIfff_F1> {
470  std::string path() { return "MYDUMMY/SOME_IFFF/F1"; }
471  D_ifff& prop{location->prop_someIFFF};
472  typedef float minimumUserType;
473  float increment{std::exp(3.14F)};
474 
475  void setRemoteValue() {
476  auto v = generateValue<minimumUserType>()[0][0];
477  std::lock_guard<EqFct> lk(*location);
478  auto curval = prop.value();
479  prop.set_value(curval->i1_data, v, curval->f2_data, curval->f3_data);
480  this->updateStamp();
481  }
482 
483  template<typename UserType>
484  std::vector<std::vector<UserType>> getRemoteValue() {
485  std::lock_guard<EqFct> lk(*location);
486  return {{ChimeraTK::numericToUserType<UserType>(prop.value()->f1_data)}};
487  }
488 };
489 
490 /**********************************************************************************************************************/
491 
492 struct RegSomeIfff_F2 : ScalarDefaults<RegSomeIfff_F2> {
493  std::string path() { return "MYDUMMY/SOME_IFFF/F2"; }
494  D_ifff& prop{location->prop_someIFFF};
495  typedef float minimumUserType;
496  float increment{std::exp(1.23F)};
497 
498  void setRemoteValue() {
499  auto v = generateValue<minimumUserType>()[0][0];
500  std::lock_guard<EqFct> lk(*location);
501  auto curval = prop.value();
502  prop.set_value(curval->i1_data, curval->f1_data, v, curval->f3_data);
503  this->updateStamp();
504  }
505 
506  template<typename UserType>
507  std::vector<std::vector<UserType>> getRemoteValue() {
508  std::lock_guard<EqFct> lk(*location);
509  return {{ChimeraTK::numericToUserType<UserType>(prop.value()->f2_data)}};
510  }
511 };
512 
513 /**********************************************************************************************************************/
514 
515 struct RegSomeIfff_F3 : ScalarDefaults<RegSomeIfff_F3> {
516  std::string path() { return "MYDUMMY/SOME_IFFF/F3"; }
517  D_ifff& prop{location->prop_someIFFF};
518  typedef float minimumUserType;
519  float increment{std::exp(2.34F)};
520 
521  void setRemoteValue() {
522  auto v = generateValue<minimumUserType>()[0][0];
523  std::lock_guard<EqFct> lk(*location);
524  auto curval = prop.value();
525  prop.set_value(curval->i1_data, curval->f1_data, curval->f2_data, v);
526  this->updateStamp();
527  }
528 
529  template<typename UserType>
530  std::vector<std::vector<UserType>> getRemoteValue() {
531  std::lock_guard<EqFct> lk(*location);
532  return {{ChimeraTK::numericToUserType<UserType>(prop.value()->f3_data)}};
533  }
534 };
535 
536 /**********************************************************************************************************************/
537 
538 BOOST_AUTO_TEST_CASE(unifiedBackendTest) {
539  location = dynamic_cast<eq_dummy*>(find_device("MYDUMMY"));
540  assert(location != nullptr);
541 
542  doocs::Timestamp timestamp = get_global_timestamp();
543  auto sinceEpoch = timestamp.get_seconds_and_microseconds_since_epoch();
544  seconds = sinceEpoch.seconds + 1;
545 
546  doocs::zmq_set_subscription_timeout(10); // reduce timout to make test faster
547 
548  auto ubt = ChimeraTK::UnifiedBackendTest<>()
549  .addRegister<RegSomeInt>()
550  .addRegister<RegSomeRoInt>()
551  .addRegister<RegSomeZmqInt>()
552  .addRegister<RegSomeFloat>()
553  .addRegister<RegSomeDouble>()
554  .addRegister<RegSomeString>()
555  .addRegister<RegSomeStatus>()
556  .addRegister<RegSomeBit>()
557  .addRegister<RegSomeIntArray>()
558  .addRegister<RegSomeShortArray>()
559  .addRegister<RegSomeLongArray>()
560  .addRegister<RegSomeFloatArray>()
561  .addRegister<RegSomeDoubleArray>()
562  .addRegister<RegSomeSpectrum>()
563  .addRegister<RegSomeIiii>()
564  .addRegister<RegSomeIfff_I>()
565  .addRegister<RegSomeIfff_F1>()
566  .addRegister<RegSomeIfff_F2>()
567  .addRegister<RegSomeIfff_F3>();
568 
569  ubt.runTests("(" + DoocsLauncher::DoocsServer + ")", "(" + DoocsLauncher::DoocsServer + "?unused=parameter)");
570 }
571 
572 /**********************************************************************************************************************/
RegSomeFloat
Definition: testUnifiedBackendTest.cpp:260
RegSomeString::generateValue
std::vector< std::vector< UserType > > generateValue()
Definition: testUnifiedBackendTest.cpp:284
RegSomeFloatArray
Definition: testUnifiedBackendTest.cpp:360
RegSomeRoInt::path
std::string path()
Definition: testUnifiedBackendTest.cpp:220
RegSomeInt::switchReadOnly
void switchReadOnly(bool enable)
Definition: testUnifiedBackendTest.cpp:206
RegSomeZmqInt::minimumUserType
int32_t minimumUserType
Definition: testUnifiedBackendTest.cpp:234
ScalarDefaults::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:145
eq_dummy::prop_someIIII
D_iiii prop_someIIII
Definition: eq_dummy.h:27
RegSomeBit::minimumUserType
ChimeraTK::Boolean minimumUserType
Definition: testUnifiedBackendTest.cpp:319
RegSomeLongArray::path
std::string path()
Definition: testUnifiedBackendTest.cpp:351
RegSomeZmqInt::supportedFlags
AccessModeFlags supportedFlags()
Definition: testUnifiedBackendTest.cpp:231
RegSomeIfff_F3
Definition: testUnifiedBackendTest.cpp:515
AllRegisterDefaults::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testUnifiedBackendTest.cpp:100
RegSomeDoubleArray
Definition: testUnifiedBackendTest.cpp:370
RegSomeString::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:289
RegSomeIfff_F1
Definition: testUnifiedBackendTest.cpp:469
RegSomeDouble::path
std::string path()
Definition: testUnifiedBackendTest.cpp:270
RegSomeShortArray::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:342
RegSomeIfff_F2::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:507
RegSomeSpectrum
Definition: testUnifiedBackendTest.cpp:380
RegSomeBit
Definition: testUnifiedBackendTest.cpp:316
RegSomeDoubleArray::minimumUserType
double minimumUserType
Definition: testUnifiedBackendTest.cpp:374
RegSomeSpectrum::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:398
RegSomeIfff_F3::minimumUserType
float minimumUserType
Definition: testUnifiedBackendTest.cpp:518
RegSomeZmqInt
Definition: testUnifiedBackendTest.cpp:230
RegSomeIiii::minimumUserType
int32_t minimumUserType
Definition: testUnifiedBackendTest.cpp:425
eq_dummy::prop_someString
D_string prop_someString
Definition: eq_dummy.h:16
eq_dummy::prop_someBit
D_bit prop_someBit
Definition: eq_dummy.h:18
RegSomeInt::minimumUserType
int32_t minimumUserType
Definition: testUnifiedBackendTest.cpp:201
RegSomeIiii::path
std::string path()
Definition: testUnifiedBackendTest.cpp:422
RegSomeBit::path
std::string path()
Definition: testUnifiedBackendTest.cpp:317
RegSomeIfff_I::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:461
RegSomeIfff_I::path
std::string path()
Definition: testUnifiedBackendTest.cpp:447
eq_dummy::prop_someFloatArray
D_floatarray prop_someFloatArray
Definition: eq_dummy.h:23
RegSomeIntArray::minimumUserType
int32_t minimumUserType
Definition: testUnifiedBackendTest.cpp:334
RegSomeStatus::minimumUserType
uint16_t minimumUserType
Definition: testUnifiedBackendTest.cpp:310
RegSomeZmqInt::forceAsyncReadInconsistency
void forceAsyncReadInconsistency()
Definition: testUnifiedBackendTest.cpp:252
RegSomeIntArray
Definition: testUnifiedBackendTest.cpp:330
ArrayDefaults::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:186
RegSomeIiii
Definition: testUnifiedBackendTest.cpp:421
eq_dummy
Definition: eq_dummy.h:7
ArrayDefaults
Definition: testUnifiedBackendTest.cpp:162
RegSomeLongArray
Definition: testUnifiedBackendTest.cpp:350
RegSomeDouble::minimumUserType
double minimumUserType
Definition: testUnifiedBackendTest.cpp:272
RegSomeZmqInt::path
std::string path()
Definition: testUnifiedBackendTest.cpp:232
RegSomeFloatArray::path
std::string path()
Definition: testUnifiedBackendTest.cpp:361
RegSomeIiii::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:428
ScalarDefaults::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:151
RegSomeSpectrum::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:382
eq_dummy::prop_someLongArray
D_longarray prop_someLongArray
Definition: eq_dummy.h:22
RegSomeLongArray::minimumUserType
int64_t minimumUserType
Definition: testUnifiedBackendTest.cpp:354
DoocsLauncher
Definition: testDoocsBackend.cpp:37
AllRegisterDefaults::isReadable
bool isReadable()
Definition: testUnifiedBackendTest.cpp:96
RegSomeIfff_F2::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:498
DoocsLauncher::DoocsLauncher
DoocsLauncher()
Definition: testUnifiedBackendTest.cpp:38
RegSomeDoubleArray::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:372
RegSomeIfff_F3::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:521
RegSomeShortArray
Definition: testUnifiedBackendTest.cpp:340
RegSomeRoInt::isWriteable
bool isWriteable()
Definition: testUnifiedBackendTest.cpp:219
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(unifiedBackendTest)
Definition: testUnifiedBackendTest.cpp:538
RegSomeRoInt
Definition: testUnifiedBackendTest.cpp:218
DoocsLauncher::rpc_no
static std::string rpc_no
Definition: testDoocsBackend.cpp:68
RegSomeInt
Definition: testUnifiedBackendTest.cpp:198
RegSomeIiii::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:423
ScalarDefaults::generateValue
std::vector< std::vector< UserType > > generateValue()
Definition: testUnifiedBackendTest.cpp:139
RegSomeSpectrum::path
std::string path()
Definition: testUnifiedBackendTest.cpp:381
RegSomeIfff_F2::minimumUserType
float minimumUserType
Definition: testUnifiedBackendTest.cpp:495
RegSomeString::minimumUserType
std::string minimumUserType
Definition: testUnifiedBackendTest.cpp:281
RegSomeFloat::minimumUserType
float minimumUserType
Definition: testUnifiedBackendTest.cpp:263
RegSomeDoubleArray::path
std::string path()
Definition: testUnifiedBackendTest.cpp:371
RegSomeIfff_F1::minimumUserType
float minimumUserType
Definition: testUnifiedBackendTest.cpp:472
RegSomeZmqInt::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:239
ScalarDefaults
Definition: testUnifiedBackendTest.cpp:133
RegSomeShortArray::path
std::string path()
Definition: testUnifiedBackendTest.cpp:341
eq_dummy::prop_someStatus
D_status prop_someStatus
Definition: eq_dummy.h:17
RegSomeIiii::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:436
eq_dummy::prop_someZMQInt
D_int prop_someZMQInt
Definition: eq_dummy.h:32
AllRegisterDefaults::nChannels
size_t nChannels()
Definition: testUnifiedBackendTest.cpp:98
eq_dummy.h
eq_dummy::prop_someSpectrum
D_spectrum prop_someSpectrum
Definition: eq_dummy.h:26
RegSomeFloatArray::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:362
RegSomeShortArray::minimumUserType
int16_t minimumUserType
Definition: testUnifiedBackendTest.cpp:344
RegSomeInt::path
std::string path()
Definition: testUnifiedBackendTest.cpp:199
AllRegisterDefaults::rawUserType
std::nullptr_t rawUserType
Definition: testUnifiedBackendTest.cpp:101
RegSomeStatus::path
std::string path()
Definition: testUnifiedBackendTest.cpp:308
RegSomeFloatArray::minimumUserType
float minimumUserType
Definition: testUnifiedBackendTest.cpp:364
AllRegisterDefaults
Definition: testUnifiedBackendTest.cpp:92
eq_dummy::prop_someInt
D_int prop_someInt
Definition: eq_dummy.h:12
ArrayDefaults::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:177
RegSomeIfff_F3::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:530
RegSomeIfff_F1::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue()
Definition: testUnifiedBackendTest.cpp:484
RegSomeIfff_I::minimumUserType
int32_t minimumUserType
Definition: testUnifiedBackendTest.cpp:449
eq_dummy::prop_someDouble
D_double prop_someDouble
Definition: eq_dummy.h:15
RegSomeIfff_F2::path
std::string path()
Definition: testUnifiedBackendTest.cpp:493
RegSomeRoInt::minimumUserType
int32_t minimumUserType
Definition: testUnifiedBackendTest.cpp:222
RegSomeString
Definition: testUnifiedBackendTest.cpp:278
AllRegisterDefaults::setForceRuntimeError
void setForceRuntimeError(bool enable, size_t)
Definition: testUnifiedBackendTest.cpp:109
eq_dummy::prop_someShortArray
D_shortarray prop_someShortArray
Definition: eq_dummy.h:21
RegSomeIfff_I
Definition: testUnifiedBackendTest.cpp:446
RegSomeIntArray::path
std::string path()
Definition: testUnifiedBackendTest.cpp:331
AllRegisterDefaults::writeQueueLength
size_t writeQueueLength()
Definition: testUnifiedBackendTest.cpp:99
RegSomeIfff_F1::path
std::string path()
Definition: testUnifiedBackendTest.cpp:470
ScalarDefaults::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:136
eq_dummy::prop_someIntArray
D_intarray prop_someIntArray
Definition: eq_dummy.h:20
RegSomeIfff_F1::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:475
RegSomeLongArray::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:352
BOOST_GLOBAL_FIXTURE
BOOST_GLOBAL_FIXTURE(DoocsLauncher)
RegSomeBit::generateValue
std::vector< std::vector< UserType > > generateValue()
Definition: testUnifiedBackendTest.cpp:323
RegSomeIfff_F3::path
std::string path()
Definition: testUnifiedBackendTest.cpp:516
RegSomeFloat::path
std::string path()
Definition: testUnifiedBackendTest.cpp:261
RegSomeIfff_I::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:452
RegSomeSpectrum::setRemoteValue
void setRemoteValue()
Definition: testUnifiedBackendTest.cpp:387
RegSomeDouble
Definition: testUnifiedBackendTest.cpp:269
eq_dummy::prop_someReadonlyInt
D_int prop_someReadonlyInt
Definition: eq_dummy.h:13
eq_dummy::prop_someDoubleArray
D_doublearray prop_someDoubleArray
Definition: eq_dummy.h:24
RegSomeIfff_F2
Definition: testUnifiedBackendTest.cpp:492
RegSomeSpectrum::updateStamp
void updateStamp()
Definition: testUnifiedBackendTest.cpp:407
RegSomeIntArray::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testUnifiedBackendTest.cpp:332
RegSomeStatus
Definition: testUnifiedBackendTest.cpp:307
AllRegisterDefaults::supportedFlags
ChimeraTK::AccessModeFlags supportedFlags()
Definition: testUnifiedBackendTest.cpp:97
AllRegisterDefaults::isWriteable
bool isWriteable()
Definition: testUnifiedBackendTest.cpp:95
ChimeraTK
Definition: spec_DoocsBackend.dox:2
DoocsLauncher::DoocsServer
static std::string DoocsServer
Definition: testUnifiedBackendTest.cpp:75
RegSomeString::path
std::string path()
Definition: testUnifiedBackendTest.cpp:279
ArrayDefaults::generateValue
std::vector< std::vector< UserType > > generateValue()
Definition: testUnifiedBackendTest.cpp:167
eq_dummy::prop_someIFFF
D_ifff prop_someIFFF
Definition: eq_dummy.h:28
AllRegisterDefaults::updateStamp
void updateStamp()
Definition: testUnifiedBackendTest.cpp:118
RegSomeSpectrum::minimumUserType
float minimumUserType
Definition: testUnifiedBackendTest.cpp:384
eq_dummy::prop_someFloat
D_float prop_someFloat
Definition: eq_dummy.h:14