ChimeraTK-DeviceAccess  03.18.00
testAsyncVarAndHierarchicalInterruptsUnified.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
4 #define BOOST_TEST_DYN_LINK
5 // Define a name for the test module.
6 #define BOOST_TEST_MODULE AsyncVarAndHierarchicalInterruptsUnified
7 // Only after defining the name include the unit test header.
8 #include <boost/test/unit_test.hpp>
9 using namespace boost::unit_test_framework;
10 
11 #include "BackendFactory.h"
12 //#include "Device.h"
13 #include "DummyBackend.h"
14 #include "DummyRegisterAccessor.h"
15 #include "ExceptionDummyBackend.h"
16 //#include "TransferGroup.h"
17 #include "UnifiedBackendTest.h"
18 
19 using namespace ChimeraTK;
20 
21 /**********************************************************************************************************************/
23  using ExceptionDummy::ExceptionDummy;
24 
25  static boost::shared_ptr<DeviceBackend> createInstance(std::string, std::map<std::string, std::string> parameters) {
26  return boost::make_shared<DummyForCleanupCheck>(parameters["map"]);
27  }
28  ~DummyForCleanupCheck() override {
29  std::cout << "~DummyForCleanupCheck()" << std::endl;
30  cleanupCalled = true;
31  }
32 
36  "DummyForCleanupCheck", &DummyForCleanupCheck::createInstance, {"map"});
37  }
38  };
39  static std::atomic_bool cleanupCalled;
40 };
41 std::atomic_bool DummyForCleanupCheck::cleanupCalled{false};
42 static DummyForCleanupCheck::BackendRegisterer gDFCCRegisterer;
43 
44 /* ===============================================================================================
45  * This test is checking async variables and the map-file related part of interrupts for
46  * consistency with the specification (implemented in the unified test).
47  * - AsyncNDRegisterAccessor
48  * - AsyncVariable (multiple listeners to one logical async variable)
49  * - Hierarchical interrupts (multiplexed interrupts via DummyMuxedInterruptDistributor)
50  * - TriggeredPollDistributor
51  * - Instantiation from the map file
52  *
53  * FIXME: Unified test does not support void variables yet.
54  * ==============================================================================================*/
55 
56 // Create a test suite which holds all your tests.
57 BOOST_AUTO_TEST_SUITE(AsyncVarAndHierarchicalInterruptsUnifiedTestSuite)
58 
59 /**********************************************************************************************************************/
60 
61 static std::string cdd("(DummyForCleanupCheck:1?map=testHierarchicalInterrupts.map)");
62 static auto exceptionDummy =
63  boost::dynamic_pointer_cast<ExceptionDummy>(BackendFactory::getInstance().createBackend(cdd));
64 
65 template<class WITHPATH, uint32_t INTERRUPT>
66 struct TriggeredInt {
67  bool isWriteable() { return false; }
68  bool isReadable() { return true; }
71  }
72  size_t nChannels() { return 1; }
73  size_t nElementsPerChannel() { return 1; }
74  size_t writeQueueLength() { return std::numeric_limits<size_t>::max(); }
75  size_t nRuntimeErrorCases() { return 1; }
76  typedef int32_t minimumUserType;
78 
79  static constexpr auto capabilities = TestCapabilities<>()
81  .disableSwitchReadOnly()
82  .disableSwitchWriteOnly()
83  .disableTestWriteNeverLosesData()
84  .enableTestRawTransfer();
85 
86  DummyRegisterAccessor<int32_t> acc{exceptionDummy.get(), "", WITHPATH::path()};
87 
88  template<typename Type>
89  std::vector<std::vector<Type>> generateValue([[maybe_unused]] bool raw = false) {
90  return {{acc + static_cast<int32_t>(INTERRUPT)}}; // just re-use the interrupt here. Any number does the job.
91  }
92 
93  template<typename UserType>
94  std::vector<std::vector<UserType>> getRemoteValue([[maybe_unused]] bool raw = false) {
95  return {{acc}};
96  }
97 
98  void setRemoteValue() {
99  acc = generateValue<minimumUserType>()[0][0];
100  if(!WITHPATH::activeInterruptsPath().empty()) {
101  DummyRegisterAccessor<uint32_t> activeInterrupts{exceptionDummy.get(), "", WITHPATH::activeInterruptsPath()};
102  activeInterrupts = WITHPATH::activeInterruptsValue();
103  }
104  if(exceptionDummy->isOpen()) {
105  exceptionDummy->triggerInterrupt(INTERRUPT);
106  }
107  }
108 
109  void forceAsyncReadInconsistency() { acc = generateValue<minimumUserType>()[0][0]; }
110 
111  void setForceRuntimeError(bool enable, size_t) {
112  exceptionDummy->throwExceptionRead = enable;
113  exceptionDummy->throwExceptionWrite = enable;
114  exceptionDummy->throwExceptionOpen = enable;
115  if(exceptionDummy->isOpen()) {
116  exceptionDummy->triggerInterrupt(INTERRUPT);
117  }
118  }
119 };
120 
121 /**********************************************************************************************************************/
122 
123 struct datafrom6 : public TriggeredInt<datafrom6, 6> {
124  static std::string path() { return "/datafrom6"; }
125  static std::string activeInterruptsPath() { return ""; } // empty
126  static uint32_t activeInterruptsValue() { return 0; }
127 };
128 
129 struct datafrom5_9 : public TriggeredInt<datafrom5_9, 5> {
130  static std::string path() { return "/datafrom5_9"; }
131  static std::string activeInterruptsPath() { return "/int_ctrls/controller5/active_ints"; }
132  static uint32_t activeInterruptsValue() { return 1U << 9U; }
133 };
134 
135 struct datafrom4_8_2 : public TriggeredInt<datafrom4_8_2, 4> {
136  static std::string path() { return "/datafrom4_8_2"; }
137  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
138  static uint32_t activeInterruptsValue() { return 1U << 2U; }
140  DummyRegisterAccessor<uint32_t> activeParentInterrupts{
141  exceptionDummy.get(), "", "/int_ctrls/controller4/active_ints"};
142  activeParentInterrupts = 1U << 8U;
143  }
144 };
145 
146 struct datafrom4_8_3 : public TriggeredInt<datafrom4_8_3, 4> {
147  static std::string path() { return "/datafrom4_8_3"; }
148  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
149  static uint32_t activeInterruptsValue() { return 1U << 3U; }
151  DummyRegisterAccessor<uint32_t> activeParentInterrupts{
152  exceptionDummy.get(), "", "/int_ctrls/controller4/active_ints"};
153  activeParentInterrupts = 1U << 8U;
154  }
155 };
156 
157 /**********************************************************************************************************************/
158 
159 // Use bool accessors instead of void
160 template<class WITHPATH, uint32_t INTERRUPT>
161 struct BoolAsVoid {
162  bool isWriteable() { return false; }
163  bool isReadable() { return true; }
165  size_t nChannels() { return 1; }
166  size_t nElementsPerChannel() { return 1; }
167  size_t writeQueueLength() { return std::numeric_limits<size_t>::max(); }
168  size_t nRuntimeErrorCases() { return 1; }
171 
172  static constexpr auto capabilities = TestCapabilities<>()
174  .disableSwitchReadOnly()
175  .disableSwitchWriteOnly()
176  .disableTestWriteNeverLosesData()
177  .disableTestRawTransfer();
178 
179  template<typename Type>
180  std::vector<std::vector<Type>> generateValue([[maybe_unused]] bool raw = false) {
181  return {{{}}};
182  }
183 
184  template<typename UserType>
185  std::vector<std::vector<UserType>> getRemoteValue([[maybe_unused]] bool raw = false) {
186  return {{{}}};
187  }
188 
189  void setRemoteValue() {
190  if(!WITHPATH::activeInterruptsPath().empty()) {
191  DummyRegisterAccessor<uint32_t> activeInterrupts{exceptionDummy.get(), "", WITHPATH::activeInterruptsPath()};
192  activeInterrupts = WITHPATH::activeInterruptsValue();
193  }
194  if(exceptionDummy->isOpen()) {
195  exceptionDummy->triggerInterrupt(INTERRUPT);
196  }
197  }
198 
200 
201  void setForceRuntimeError(bool enable, size_t) {
202  exceptionDummy->throwExceptionRead = enable;
203  exceptionDummy->throwExceptionWrite = enable;
204  exceptionDummy->throwExceptionOpen = enable;
205  if(exceptionDummy->isOpen()) {
206  exceptionDummy->triggerInterrupt(INTERRUPT);
207  }
208  }
209 };
210 
211 /**********************************************************************************************************************/
212 
213 struct interrupt6 : public BoolAsVoid<interrupt6, 6> {
214  static std::string path() { return "/interrupt6"; }
215  static std::string activeInterruptsPath() { return ""; } // empty
216  static uint32_t activeInterruptsValue() { return 0; }
217 
218  // The accessor itself cannot trigger a runtime error, as it is indirectly fed by a thread that does not
219  // know about the individual accessors.
220  // Exceptions only are written to the queue when setException() is called.
221  size_t nRuntimeErrorCases() { return 0; }
222 };
223 
224 struct canonicalInterrupt6 : public BoolAsVoid<canonicalInterrupt6, 6> {
225  static std::string path() { return "/!6"; }
226  static std::string activeInterruptsPath() { return ""; } // empty
227  static uint32_t activeInterruptsValue() { return 0; }
228  size_t nRuntimeErrorCases() { return 0; }
229 };
230 
231 struct interrupt5_9 : public BoolAsVoid<interrupt5_9, 5> {
232  static std::string path() { return "/interrupt5_9"; }
233  static std::string activeInterruptsPath() { return "/int_ctrls/controller5/active_ints"; }
234  static uint32_t activeInterruptsValue() { return 1U << 9U; }
235 };
236 
237 struct canonicalInterrupt5 : public BoolAsVoid<canonicalInterrupt5, 5> {
238  static std::string path() { return "/!5"; }
239  static std::string activeInterruptsPath() { return "/int_ctrls/controller5/active_ints"; }
240  static uint32_t activeInterruptsValue() { return 1U << 9U; }
241  size_t nRuntimeErrorCases() { return 0; }
242 };
243 
244 struct canonicalInterrupt5_9 : public BoolAsVoid<canonicalInterrupt5_9, 5> {
245  static std::string path() { return "/!5:9"; }
246  static std::string activeInterruptsPath() { return "/int_ctrls/controller5/active_ints"; }
247  static uint32_t activeInterruptsValue() { return 1U << 9U; }
248 };
249 
250 struct interrupt4_8_2 : public BoolAsVoid<interrupt4_8_2, 4> {
251  static std::string path() { return "/interrupt4_8_2"; }
252  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
253  static uint32_t activeInterruptsValue() { return 1U << 2U; }
254 };
255 
256 struct canonicalInterrupt4a : public BoolAsVoid<canonicalInterrupt4a, 4> {
257  static std::string path() { return "/!4"; }
258  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
259  static uint32_t activeInterruptsValue() { return 1U << 2U; }
260  size_t nRuntimeErrorCases() { return 0; }
261 };
262 
263 struct canonicalInterrupt4_8a : public BoolAsVoid<canonicalInterrupt4_8a, 4> {
264  static std::string path() { return "/!4:8"; }
265  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
266  static uint32_t activeInterruptsValue() { return 1U << 2U; }
267 };
268 
269 struct canonicalInterrupt4_8_2 : public BoolAsVoid<canonicalInterrupt4_8_2, 4> {
270  static std::string path() { return "/!4:8:2"; }
271  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
272  static uint32_t activeInterruptsValue() { return 1U << 2U; }
273 };
274 
275 struct interrupt4_8_3 : public BoolAsVoid<interrupt4_8_3, 4> {
276  static std::string path() { return "/interrupt4_8_3"; }
277  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
278  static uint32_t activeInterruptsValue() { return 1U << 3U; }
279 };
280 
281 struct canonicalInterrupt4b : public BoolAsVoid<canonicalInterrupt4b, 4> {
282  static std::string path() { return "/!4"; }
283  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
284  static uint32_t activeInterruptsValue() { return 1U << 3U; }
285  size_t nRuntimeErrorCases() { return 0; }
286 };
287 
288 struct canonicalInterrupt4_8b : public BoolAsVoid<canonicalInterrupt4_8b, 4> {
289  static std::string path() { return "/!4:8"; }
290  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
291  static uint32_t activeInterruptsValue() { return 1U << 3U; }
292 };
293 
294 struct canonicalInterrupt4_8_3 : public BoolAsVoid<canonicalInterrupt4_8_3, 4> {
295  static std::string path() { return "/!4:8:3"; }
296  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
297  static uint32_t activeInterruptsValue() { return 1U << 3U; }
298 };
299 
300 /**********************************************************************************************************************/
301 
302 BOOST_AUTO_TEST_CASE(testRegisterAccessor) {
303  struct canonicalInterrupt4_8b : public BoolAsVoid<canonicalInterrupt4_8b, 4> {
304  static std::string path() { return "/!4:8"; }
305  static std::string activeInterruptsPath() { return "/int_ctrls/controller4_8/active_ints"; }
306  static uint32_t activeInterruptsValue() { return 1U << 3U; }
307  };
308 
309  std::cout << "*** testRegisterAccessor *** " << std::endl;
310  {
313  .addRegister<datafrom5_9>()
314  .addRegister<datafrom4_8_2>()
315  .addRegister<datafrom4_8_3>()
316  .addRegister<interrupt6>()
317  .addRegister<canonicalInterrupt6>()
318  .addRegister<interrupt5_9>()
319  .addRegister<canonicalInterrupt5>()
320  .addRegister<canonicalInterrupt5_9>()
321  .addRegister<interrupt4_8_2>()
322  .addRegister<canonicalInterrupt4a>()
323  .addRegister<canonicalInterrupt4_8a>()
324  .addRegister<canonicalInterrupt4_8_2>()
325  .addRegister<interrupt4_8_3>()
326  .addRegister<canonicalInterrupt4b>()
327  .addRegister<canonicalInterrupt4_8b>()
328  .addRegister<canonicalInterrupt4_8_3>()
329  .runTests(cdd);
330  }
331  exceptionDummy = nullptr;
332  // This is checking that there is no internal shared pointer loop which prevents the destructor from ever being called.
334 }
335 
336 /**********************************************************************************************************************/
337 
338 BOOST_AUTO_TEST_SUITE_END()
ExceptionDummyBackend.h
ChimeraTK::Void
Wrapper Class for void.
Definition: SupportedUserTypes.h:71
canonicalInterrupt4b::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:284
canonicalInterrupt5_9
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:244
canonicalInterrupt4b::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:285
datafrom6::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:125
BoolAsVoid::setForceRuntimeError
void setForceRuntimeError(bool enable, size_t)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:201
interrupt4_8_3::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:277
ChimeraTK::ExceptionDummy
Definition: ExceptionDummyBackend.h:23
BoolAsVoid::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:166
interrupt6
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:213
ChimeraTK::AccessMode::raw
@ raw
Raw access: disable any possible conversion from the original hardware data type into the given UserT...
interrupt5_9
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:231
BoolAsVoid::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue([[maybe_unused]] bool raw=false)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:185
canonicalInterrupt4_8_3::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:297
interrupt4_8_2::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:253
BoolAsVoid::isReadable
bool isReadable()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:163
canonicalInterrupt4a::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:260
DummyForCleanupCheck
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:22
DummyForCleanupCheck::~DummyForCleanupCheck
~DummyForCleanupCheck() override
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:28
ChimeraTK::DummyRegisterAccessor< int32_t >
interrupt4_8_3::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:278
canonicalInterrupt6
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:224
ChimeraTK::BackendFactory::getInstance
static BackendFactory & getInstance()
Static function to get an instance of factory.
Definition: BackendFactory.cc:191
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(testRegisterAccessor)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:302
canonicalInterrupt4_8b::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:291
DummyBackend.h
canonicalInterrupt5::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:240
datafrom4_8_3::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:149
BoolAsVoid::setRemoteValue
void setRemoteValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:189
BoolAsVoid::isWriteable
bool isWriteable()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:162
canonicalInterrupt5::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:239
canonicalInterrupt4b
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:281
interrupt4_8_3::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:276
TriggeredInt::isReadable
bool isReadable()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:68
interrupt6::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:221
canonicalInterrupt4_8_2::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:271
canonicalInterrupt5_9::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:247
canonicalInterrupt4a::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:258
datafrom5_9::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:132
canonicalInterrupt6::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:226
datafrom6::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:124
BoolAsVoid::writeQueueLength
size_t writeQueueLength()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:167
cdd
std::string cdd
Definition: testAsyncRead.cpp:25
interrupt6::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:215
TriggeredInt::supportedFlags
ChimeraTK::AccessModeFlags supportedFlags()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:69
ChimeraTK::TestCapabilities
Descriptor for the test capabilities for each register.
Definition: UnifiedBackendTest.h:54
datafrom5_9::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:130
TriggeredInt
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:66
interrupt4_8_2::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:251
datafrom5_9::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:131
TriggeredInt::setForceRuntimeError
void setForceRuntimeError(bool enable, size_t)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:111
interrupt4_8_2::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:252
datafrom4_8_3::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:148
canonicalInterrupt5
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:237
canonicalInterrupt4_8_2::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:270
TriggeredInt::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:75
datafrom4_8_3::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:147
TriggeredInt::setRemoteValue
void setRemoteValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:98
datafrom6
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:123
canonicalInterrupt4a::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:257
DummyForCleanupCheck::cleanupCalled
static std::atomic_bool cleanupCalled
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:39
canonicalInterrupt4_8b::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:289
BoolAsVoid::forceAsyncReadInconsistency
void forceAsyncReadInconsistency()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:199
canonicalInterrupt4a::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:259
BoolAsVoid::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:168
DummyForCleanupCheck::createInstance
static boost::shared_ptr< DeviceBackend > createInstance(std::string, std::map< std::string, std::string > parameters)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:25
canonicalInterrupt4_8_3::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:296
ChimeraTK::AccessMode::wait_for_new_data
@ wait_for_new_data
Make any read blocking until new data has arrived since the last read.
TriggeredInt::rawUserType
minimumUserType rawUserType
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:77
interrupt5_9::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:234
canonicalInterrupt4_8_2
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:269
TriggeredInt::getRemoteValue
std::vector< std::vector< UserType > > getRemoteValue([[maybe_unused]] bool raw=false)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:94
canonicalInterrupt4_8a::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:264
datafrom4_8_3
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:146
datafrom4_8_2::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:138
TriggeredInt::minimumUserType
int32_t minimumUserType
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:76
DummyForCleanupCheck::BackendRegisterer::BackendRegisterer
BackendRegisterer()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:34
interrupt6::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:216
BoolAsVoid::minimumUserType
ChimeraTK::Boolean minimumUserType
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:169
canonicalInterrupt4b::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:283
canonicalInterrupt5_9::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:245
BoolAsVoid
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:161
datafrom4_8_2::datafrom4_8_2
datafrom4_8_2()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:139
canonicalInterrupt4_8_3::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:295
canonicalInterrupt4_8a
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:263
datafrom4_8_2
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:135
ChimeraTK::UnifiedBackendTest
Class to test any backend for correct behaviour.
Definition: UnifiedBackendTest.h:259
canonicalInterrupt6::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:228
canonicalInterrupt6::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:225
datafrom4_8_3::datafrom4_8_3
datafrom4_8_3()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:150
canonicalInterrupt4_8b::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:290
canonicalInterrupt5::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:238
ChimeraTK::TestCapabilities::disableForceDataLossWrite
constexpr TestCapabilities< _syncRead, TestCapability::disabled, _asyncReadInconsistency, _switchReadOnly, _switchWriteOnly, _writeNeverLosesData, _testWriteOnly, _testReadOnly, _testRawTransfer, _testCatalogue, _setRemoteValueIncrementsVersion > disableForceDataLossWrite() const
Definition: UnifiedBackendTest.h:81
DummyForCleanupCheck::BackendRegisterer
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:33
canonicalInterrupt4_8_2::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:272
BoolAsVoid::rawUserType
ChimeraTK::Void rawUserType
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:170
canonicalInterrupt4b::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:282
interrupt5_9::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:233
BoolAsVoid::nChannels
size_t nChannels()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:165
interrupt4_8_2
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:250
TriggeredInt::writeQueueLength
size_t writeQueueLength()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:74
DummyRegisterAccessor.h
TriggeredInt::isWriteable
bool isWriteable()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:67
BackendFactory.h
canonicalInterrupt4_8a::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:266
BoolAsVoid::generateValue
std::vector< std::vector< Type > > generateValue([[maybe_unused]] bool raw=false)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:180
canonicalInterrupt4_8b
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:288
TriggeredInt::forceAsyncReadInconsistency
void forceAsyncReadInconsistency()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:109
canonicalInterrupt5_9::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:246
BoolAsVoid::supportedFlags
ChimeraTK::AccessModeFlags supportedFlags()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:164
interrupt5_9::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:232
ChimeraTK::AccessModeFlags
Set of AccessMode flags with additional functionality for an easier handling.
Definition: AccessMode.h:48
interrupt6::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:214
ChimeraTK::BackendFactory::registerBackendType
void registerBackendType(const std::string &backendType, boost::shared_ptr< DeviceBackend >(*creatorFunction)(std::string address, std::map< std::string, std::string > parameters), const std::vector< std::string > &sdmParameterNames={}, const std::string &deviceAccessVersion=CHIMERATK_DEVICEACCESS_VERSION)
Register a backend by the name backendType with the given creatorFunction.
Definition: BackendFactory.cc:45
canonicalInterrupt6::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:227
datafrom6::activeInterruptsValue
static uint32_t activeInterruptsValue()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:126
datafrom4_8_2::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:137
canonicalInterrupt4_8a::activeInterruptsPath
static std::string activeInterruptsPath()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:265
canonicalInterrupt4_8_3
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:294
ChimeraTK
Definition: DummyBackend.h:16
TriggeredInt::nChannels
size_t nChannels()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:72
UnifiedBackendTest.h
ChimeraTK::Boolean
Wrapper Class to avoid vector<bool> problems.
Definition: SupportedUserTypes.h:21
TriggeredInt::generateValue
std::vector< std::vector< Type > > generateValue([[maybe_unused]] bool raw=false)
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:89
canonicalInterrupt5::nRuntimeErrorCases
size_t nRuntimeErrorCases()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:241
exceptionDummy
auto exceptionDummy
Definition: testExceptionDummyDevice.cc:16
datafrom5_9
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:129
TriggeredInt::nElementsPerChannel
size_t nElementsPerChannel()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:73
interrupt4_8_3
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:275
ChimeraTK::UnifiedBackendTest::addRegister
UnifiedBackendTest< typename boost::mpl::push_back< VECTOR_OF_REGISTERS_T, REG_T >::type > addRegister()
Add a register to be used by the test.
Definition: UnifiedBackendTest.h:352
datafrom4_8_2::path
static std::string path()
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:136
canonicalInterrupt4a
Definition: testAsyncVarAndHierarchicalInterruptsUnified.cpp:256