4#define BOOST_TEST_DYN_LINK
6#define BOOST_TEST_MODULE NumericAddressedBackendUnified
8#include <boost/test/unit_test.hpp>
9using namespace boost::unit_test_framework;
30BOOST_AUTO_TEST_SUITE(NumericAddressedBackendUnifiedTestSuite)
34static std::string
cdd(
"(ExceptionDummy:1?map=test3.map)");
38static std::string cddMuxed(
"(ExceptionDummy:1?map=muxedDataAccessor.jmap)");
39static auto exceptionDummyMuxed =
42static std::string cddBitRange(
"(ExceptionDummy:1?map=unifiedTest.jmap)");
43static auto exceptionDummyBitRange =
46static std::string cddBitRangeChannels(
"(dummy?map=bitRangeChannels.jmap)");
47static auto dummyBitRangeChannels =
53 std::string
path() {
return "/Integers/signed32"; }
66 .disableAsyncReadInconsistency()
67 .disableSwitchReadOnly()
68 .disableSwitchWriteOnly()
69 .disableTestWriteNeverLosesData()
70 .enableTestRawTransfer();
74 template<
typename Type>
79 template<
typename UserType>
94 std::string
path() {
return "/Integers/signed32_async"; }
109 .disableAsyncReadInconsistency()
110 .disableSwitchReadOnly()
111 .disableSwitchWriteOnly()
112 .disableTestWriteNeverLosesData()
113 .enableTestRawTransfer();
117 template<
typename Type>
122 template<
typename UserType>
128 acc = generateValue<minimumUserType>()[0][0];
143 std::string
path() {
return "/Integers/signed32_async/DUMMY_WRITEABLE"; }
158 .disableAsyncReadInconsistency()
159 .disableSwitchReadOnly()
160 .disableSwitchWriteOnly()
161 .disableTestWriteNeverLosesData()
162 .enableTestRawTransfer();
166 template<
typename Type>
171 template<
typename UserType>
177 acc = generateValue<minimumUserType>()[0][0];
193template<
typename Derived,
typename rawUserType>
195 Derived*
derived{
static_cast<Derived*
>(
this)};
217 .disableAsyncReadInconsistency()
218 .disableSwitchReadOnly()
219 .disableSwitchWriteOnly()
220 .disableTestWriteNeverLosesData()
221 .enableTestRawTransfer();
229 void set(rawUserType val) {
230 acc &= ~derived->bitmask;
237 template<
typename Type>
239 rawUserType newRawValue =
static_cast<rawUserType
>(
get() +
derived->rawIncrement);
240 Type v = ChimeraTK::numeric::convert<Type>(
raw ? newRawValue : (newRawValue *
derived->rawToCooked));
253 template<
typename Type>
258 std::cerr <<
"getRemoteValue(): Padding data has changed. Test will be failed by returing a false remote value "
259 <<
"(off by one)." << std::endl;
286 std::string
path() {
return "/ShortRaw/signed16"; }
302 std::string
path() {
return "/ShortRaw/unsigned16"; }
315 std::string
path() {
return "/ShortRaw/fixedPoint16_8u"; }
328 std::string
path() {
return "/ShortRaw/fixedPoint16_8s"; }
341 std::string
path() {
return "/ByteRaw/signed8"; }
354 std::string
path() {
return "/ByteRaw/unsigned8"; }
367 std::string
path() {
return "/ByteRaw/fixedPoint8_4u"; }
380 std::string
path() {
return "/ByteRaw/fixedPoint8_4s"; }
393 static std::string
path() {
return "/Text/someAsciiData"; }
406 .disableAsyncReadInconsistency()
407 .disableSwitchReadOnly()
408 .disableSwitchWriteOnly()
409 .disableTestWriteNeverLosesData()
410 .disableTestRawTransfer();
419 template<
typename UserType>
424 template<
typename UserType>
426 std::vector<std::vector<UserType>> v{{
""}};
429 size_t byteInWord = i % 4;
430 char ch = char((
acc[word] >> (byteInWord * 8U)) & 0xFF);
434 std::cout <<
"getRemoteValue: " << v[0][0] << std::endl;
439 auto v = generateValue<minimumUserType>();
443 for(
size_t i = 0; i < std::min(
asciiLength, v[0][0].length()); ++i) {
444 char ch = v[0][0][i];
446 size_t byteInWord = i % 4;
447 acc[word] =
acc[word] | uint32_t(ch) << (byteInWord * 8U);
449 std::cout <<
"setRemoteValue: " << v[0][0] << std::endl;
462 std::string
path() {
return "/TEST/NODMA"; }
476 .disableAsyncReadInconsistency()
477 .disableSwitchReadOnly()
478 .disableSwitchWriteOnly()
479 .disableTestWriteNeverLosesData()
480 .disableTestRawTransfer();
484 template<
typename UserType>
486 std::vector<std::vector<UserType>> v;
488 for(
size_t c = 0; c <
nChannels(); ++c) {
490 v[c].push_back(uint16_t(
acc[c][e] + 7 * c + 3 * e));
496 template<
typename UserType>
498 std::vector<std::vector<UserType>> v;
500 for(
size_t c = 0; c <
nChannels(); ++c) {
502 v[c].push_back(
acc[c][e]);
509 auto v = generateValue<minimumUserType>();
510 for(
size_t c = 0; c <
nChannels(); ++c) {
518 exceptionDummyMuxed->throwExceptionRead = enable;
519 exceptionDummyMuxed->throwExceptionWrite = enable;
520 exceptionDummyMuxed->throwExceptionOpen = enable;
529 std::string
path() {
return "/TEST/NODMA.0"; }
542 .disableAsyncReadInconsistency()
543 .disableSwitchReadOnly()
544 .disableSwitchWriteOnly()
545 .disableTestWriteNeverLosesData()
546 .enableTestRawTransfer();
552 template<
typename UserType>
554 std::vector<std::vector<UserType>> v(1);
561 template<
typename UserType>
563 std::vector<std::vector<UserType>> v(1);
565 v[0].push_back(
acc[e]);
571 auto v = generateValue<minimumUserType>();
578 exceptionDummyMuxed->throwExceptionRead = enable;
579 exceptionDummyMuxed->throwExceptionWrite = enable;
580 exceptionDummyMuxed->throwExceptionOpen = enable;
585 std::string
path() {
return "/TEST/NODMA.3"; }
598 .disableAsyncReadInconsistency()
599 .disableSwitchReadOnly()
600 .disableSwitchWriteOnly()
601 .disableTestWriteNeverLosesData()
602 .enableTestRawTransfer();
610 template<
typename UserType>
612 std::vector<std::vector<UserType>> v(1);
619 template<
typename UserType>
621 std::vector<std::vector<UserType>> v(1);
629 auto v = generateValue<minimumUserType>();
636 exceptionDummyMuxed->throwExceptionRead = enable;
637 exceptionDummyMuxed->throwExceptionWrite = enable;
638 exceptionDummyMuxed->throwExceptionOpen = enable;
643 std::string
path() {
return "/TEST/NODMAASYNC"; }
657 .disableAsyncReadInconsistency()
658 .disableSwitchReadOnly()
659 .disableSwitchWriteOnly()
660 .disableTestWriteNeverLosesData()
661 .disableTestRawTransfer();
665 template<
typename UserType>
667 std::vector<std::vector<UserType>> v;
669 for(
size_t c = 0; c <
nChannels(); ++c) {
671 v[c].push_back(uint16_t(
acc[c][e] + 7 * c + 3 * e));
677 template<
typename UserType>
679 std::vector<std::vector<UserType>> v;
681 for(
size_t c = 0; c <
nChannels(); ++c) {
683 v[c].push_back(
acc[c][e]);
690 auto v = generateValue<minimumUserType>();
691 for(
size_t c = 0; c <
nChannels(); ++c) {
696 if(exceptionDummyMuxed->isOpen()) exceptionDummyMuxed->triggerInterrupt(6);
700 exceptionDummyMuxed->throwExceptionRead = enable;
701 exceptionDummyMuxed->throwExceptionWrite = enable;
702 exceptionDummyMuxed->throwExceptionOpen = enable;
703 if(exceptionDummyMuxed->isOpen()) exceptionDummyMuxed->triggerInterrupt(6);
708 std::string
path() {
return "/TEST/NODMAASYNC.0"; }
724 .disableAsyncReadInconsistency()
725 .disableSwitchReadOnly()
726 .disableSwitchWriteOnly()
727 .disableTestWriteNeverLosesData()
728 .enableTestRawTransfer();
733 template<
typename UserType>
735 std::vector<std::vector<UserType>> v(1);
742 template<
typename UserType>
744 std::vector<std::vector<UserType>> v(1);
752 auto v = generateValue<minimumUserType>();
756 if(exceptionDummyMuxed->isOpen()) exceptionDummyMuxed->triggerInterrupt(6);
760 exceptionDummyMuxed->throwExceptionRead = enable;
761 exceptionDummyMuxed->throwExceptionWrite = enable;
762 exceptionDummyMuxed->throwExceptionOpen = enable;
763 if(exceptionDummyMuxed->isOpen()) exceptionDummyMuxed->triggerInterrupt(6);
770 std::string
path() {
return "/TEST/FLOAT"; }
783 .disableAsyncReadInconsistency()
784 .disableSwitchReadOnly()
785 .disableSwitchWriteOnly()
786 .disableTestWriteNeverLosesData()
787 .disableTestRawTransfer();
791 template<
typename UserType>
793 std::vector<std::vector<UserType>> v;
795 for(uint32_t c = 0; c <
nChannels(); ++c) {
797 v[c].push_back(
acc[c][e] + 0.7f * c + 3 * e);
803 template<
typename UserType>
805 std::vector<std::vector<UserType>> v;
807 for(uint32_t c = 0; c <
nChannels(); ++c) {
809 v[c].push_back(
acc[c][e]);
816 auto v = generateValue<minimumUserType>();
817 for(uint32_t c = 0; c <
nChannels(); ++c) {
825 exceptionDummyMuxed->throwExceptionRead = enable;
826 exceptionDummyMuxed->throwExceptionWrite = enable;
827 exceptionDummyMuxed->throwExceptionOpen = enable;
834template<
typename Derived>
836 Derived*
derived{
static_cast<Derived*
>(
this)};
840 .disableAsyncReadInconsistency()
841 .disableSwitchReadOnly()
842 .disableSwitchWriteOnly()
843 .disableTestWriteNeverLosesData()
844 .enableTestRawTransfer();
860 dummy.throwExceptionWrite = enable;
861 dummy.throwExceptionOpen = enable;
862 if(
derived->isPush() && enable) {
863 dummy.triggerInterrupt(6);
869template<
typename Derived>
878 template<
typename T,
typename Traw>
880 return static_cast<T
>(value);
883 template<
typename UserType>
887 template<
typename Type>
890 typedef typename Derived::rawUserType Traw;
891 typedef typename Derived::minimumUserType T;
892 auto cv =
derived->template getRemoteValue<Traw>(
true)[0];
893 for(
size_t i = 0; i <
derived->nElementsPerChannel(); ++i) {
894 Traw e = cv[i] +
derived->increment * (
static_cast<Traw
>(i) + 1);
896 v.push_back(
derived->template convertRawToCooked<T, Traw>(e));
899 v.push_back(
static_cast<T
>(e));
906 template<
typename UserType>
908 typedef typename Derived::rawUserType Traw;
910 std::vector<UserType> cookedValues(
derived->nElementsPerChannel());
911 std::vector<Traw> rawValues(
derived->nElementsPerChannel());
917 auto bufferLock =
derived->acc.getBufferLock();
919 for(
size_t i = 0; i <
derived->nElementsPerChannel(); ++i) {
924 for(
size_t i = 0; i <
derived->nElementsPerChannel(); ++i) {
926 cookedValues[i] =
derived->template convertRawToCooked<UserType, Traw>(rawValues[i]);
929 cookedValues[i] =
static_cast<UserType
>(rawValues[i]);
932 return {cookedValues};
936 auto v = generateValue<typename Derived::rawUserType>(
true)[0];
938 auto bufferLock =
derived->acc.getBufferLock();
939 for(
size_t i = 0; i <
derived->nElementsPerChannel(); ++i) {
950template<
typename Derived>
956template<
typename Derived>
969 template<
typename UserType>
970 std::vector<std::vector<UserType>>
generateValue([[maybe_unused]]
bool getRaw =
false) {
971 return derived->target.template generateValue<UserType>();
974 template<
typename UserType>
978 return derived->target.template getRemoteValue<UserType>(
true);
981 uint64_t v =
derived->target.template getRemoteValue<uint64_t>()[0][0];
983 UserType result = (v & mask) >>
derived->shift;
996 std::string
path() {
return "/WORD_FIRMWARE"; }
1006 std::string
path() {
return "/WORD_FIRMWARE/BitRangeLower"; }
1018 std::string
path() {
return "/WORD_FIRMWARE/BitRangeUpper"; }
1023 uint16_t
width = 16;
1024 uint16_t
shift = 16;
1030 std::string
path() {
return "/WORD_FIRMWARE/BitRangeMiddle"; }
1044template<
typename Derived>
1057 template<
typename UserType>
1058 std::vector<std::vector<UserType>>
generateValue([[maybe_unused]]
bool getRaw =
false) {
1059 return derived->target.template generateValue<UserType>();
1062 template<
typename UserType>
1066 return derived->target.template getRemoteValue<UserType>(
true);
1069 auto rawValues =
derived->target.template getRemoteValue<uint64_t>();
1070 std::vector<UserType> result;
1071 for(
size_t i = 0; i < rawValues[0].size(); ++i) {
1072 uint64_t v = rawValues[0][i];
1073 uint64_t mask = ((1ULL <<
derived->width) - 1) <<
derived->shift;
1074 result.push_back(
static_cast<UserType
>((v & mask) >>
derived->shift));
1085 std::string
path() {
return "/ARRAY_REG"; }
1099 std::string
path() {
return "/ARRAY_REG/ArrayBitRangeLow"; }
1111 std::string
path() {
return "/ARRAY_REG/ArrayBitRangeHigh"; }
1128 std::string
path() {
return "/TEST/DBL.1"; }
1145 .disableAsyncReadInconsistency()
1146 .disableSwitchReadOnly()
1147 .disableSwitchWriteOnly()
1148 .disableTestWriteNeverLosesData()
1149 .disableTestRawTransfer()
1150 .disableTestCatalogue();
1152 template<
typename UserType>
1154 auto values = getRemoteValue<minimumUserType>();
1156 values[0][e] += uint16_t(37 + 11 * e);
1165 template<
typename UserType>
1167 std::vector<std::vector<UserType>> v(1);
1185 auto values = generateValue<minimumUserType>();
1200 exceptionDummyMuxed->throwExceptionRead = enable;
1201 exceptionDummyMuxed->throwExceptionWrite = enable;
1202 exceptionDummyMuxed->throwExceptionOpen = enable;
1214 static std::string
path() {
return "/TEST/DBLASYNC.1"; }
1229 .disableAsyncReadInconsistency()
1230 .disableSwitchReadOnly()
1231 .disableSwitchWriteOnly()
1232 .disableTestWriteNeverLosesData()
1233 .disableTestRawTransfer()
1234 .disableTestCatalogue();
1236 template<
typename UserType>
1238 auto values = getRemoteValue<minimumUserType>();
1240 values[0][e] += uint16_t(37 + 11 * e);
1249 template<
typename UserType>
1251 std::vector<std::vector<UserType>> v(1);
1273 const uint16_t bufferOffset = finishingBuffer0 ? 0 : 1000;
1275 auto values = generateValue<minimumUserType>();
1277 values[0][e] += bufferOffset;
1290 if(exceptionDummyMuxed->isOpen()) {
1291 exceptionDummyMuxed->triggerInterrupt(7);
1296 exceptionDummyMuxed->throwExceptionRead = enable;
1297 exceptionDummyMuxed->throwExceptionWrite = enable;
1298 exceptionDummyMuxed->throwExceptionOpen = enable;
1299 if(exceptionDummyMuxed->isOpen()) {
1300 exceptionDummyMuxed->triggerInterrupt(7);
1310 std::cout <<
"*** testRegisterAccessor *** " << std::endl;
1313 .addRegister<Integers_signed32_async>()
1317 .addRegister<ShortRaw_unsigned16>()
1319 .addRegister<ShortRaw_fixedPoint16_8s>()
1321 .addRegister<ByteRaw_unsigned8>()
1323 .addRegister<ByteRaw_fixedPoint8_4u>()
1331 std::cout <<
"*** testMultiplexedRegisterAccessor *** " << std::endl;
1334 .addRegister<MuxedNodmaAsync>()
1336 .runTests(cddMuxed);
1342 std::cout <<
"*** testNamedChannelSlices *** " << std::endl;
1350 std::cout <<
"*** testNamedChannelSliceAsync *** " << std::endl;
1357 std::cout <<
"*** testDoubleBufferedNamedChannelSlices *** " << std::endl;
1364 std::cout <<
"*** testDoubleBufferedNamedChannelSliceAsync *** " << std::endl;
1371 std::cout <<
"*** testBitRanges *** " << std::endl;
1375 .addRegister<RegUpperHalfOfFirmware>()
1377 .addRegister<ArrayBitRangeLow>()
1379 .runTests(cddBitRange);
1390 std::cout <<
"*** TestBitRangeNamedChannelSlices *** " << std::endl;
1401 std::vector<uint32_t> wordA(n), wordB(n);
1402 for(
size_t e = 0; e < n; ++e) {
1403 wordA[e] = 0x12345678u + e * 0x01010101u;
1404 wordB[e] = 0xABCDEF01u + e * 0x00001111u;
1405 raw[2 * e] = wordA[e];
1406 raw[2 * e + 1] = wordB[e];
1415 BOOST_REQUIRE(accA.getNElements() == n);
1416 BOOST_REQUIRE(accLo.getNElements() == n);
1417 BOOST_REQUIRE(accHi.getNElements() == n);
1418 BOOST_REQUIRE(accB.getNElements() == n);
1425 for(
size_t e = 0; e < n; ++e) {
1426 BOOST_TEST(accA[e] == wordA[e]);
1427 BOOST_TEST(accLo[e] == (wordA[e] & 0xFFu));
1428 BOOST_TEST(accHi[e] == ((wordA[e] >> 8) & 0xFFu));
1429 BOOST_TEST(accB[e] == ((wordB[e] >> 16) & 0xFFu));
1444BOOST_AUTO_TEST_SUITE_END()
Set of AccessMode flags with additional functionality for an easier handling.
void add(AccessMode flag)
Add the given flag to the set.
static BackendFactory & getInstance()
Static function to get an instance of factory.
Class allows to read/write registers from device.
TwoDRegisterAccessor< UserType > getTwoDRegisterAccessor(const RegisterPath ®isterPathName, size_t numberOfElements=0, size_t elementsOffset=0, const AccessModeFlags &flags=AccessModeFlags({})) const
Get a TwoDRegisterAccessor object for the given register.
void close()
Close the device.
OneDRegisterAccessor< UserType > getOneDRegisterAccessor(const RegisterPath ®isterPathName, size_t numberOfWords=0, size_t wordOffsetInRegister=0, const AccessModeFlags &flags=AccessModeFlags({})) const
Get a OneDRegisterAccessor object for the given register.
void open(std::string const &aliasName)
Open a device by the given alias name from the DMAP file.
std::atomic< bool > throwExceptionRead
Register accessor for accessing multiplexed 2D array registers internally of a DummyBackend implement...
Register accessor for accessing single word or 1D array registers internally of a DummyBackend implem...
unsigned int getNumberOfElements()
return number of elements
Accessor for raw 32 bit integer access to the underlying memory space.
Class to test any backend for correct behaviour.
UnifiedBackendTest< typename boost::mpl::push_back< VECTOR_OF_REGISTERS_T, REG_T >::type > addRegister()
Add a register to be used by the test.
Exception thrown when a logic error has occured.
This header collects some conversion routines which should be useful both for ApplicationCore Python ...
@ wait_for_new_data
Make any read blocking until new data has arrived since the last read.
@ raw
Raw access: disable any possible conversion from the original hardware data type into the given UserT...
std::string to_string(const std::string &v)
Base descriptor for array bit-range accessors.
void setForceRuntimeError(bool enable, size_t caseIndex)
std::vector< std::vector< UserType > > getRemoteValue(bool getRaw=false)
size_t nRuntimeErrorCases()
std::vector< std::vector< UserType > > generateValue(bool getRaw=false)
ChimeraTK::AccessModeFlags supportedFlags()
static constexpr auto capabilities
size_t nElementsPerChannel()
DummyRegisterAccessor< minimumUserType > acc
size_t nElementsPerChannel()
std::vector< std::vector< UserType > > generateValue()
std::vector< std::vector< UserType > > getRemoteValue()
static size_t writeQueueLength()
DummyRegisterAccessor< uint32_t > acc
static size_t nChannels()
static bool isWriteable()
std::string minimumUserType
static constexpr auto capabilities
static std::string path()
static size_t nRuntimeErrorCases()
static ChimeraTK::AccessModeFlags supportedFlags()
static size_t nElementsPerChannel()
static void setForceRuntimeError(bool enable, size_t)
DummyRegisterAccessor< minimumUserType > acc
Descriptor for the test capabilities for each register.
constexpr TestCapabilities< _syncRead, TestCapability::disabled, _asyncReadInconsistency, _switchReadOnly, _switchWriteOnly, _writeNeverLosesData, _testWriteOnly, _testReadOnly, _testRawTransfer, _testCatalogue, _setRemoteValueIncrementsVersion, _testPartialAccessor > disableForceDataLossWrite() const
static size_t writeQueueLength()
static void setForceRuntimeError(bool enable, size_t)
static constexpr auto capabilities
static ChimeraTK::AccessModeFlags supportedFlags()
DummyRegisterAccessor< minimumUserType > buffer1
std::vector< std::vector< UserType > > getRemoteValue(bool=false)
std::vector< std::vector< UserType > > generateValue(bool=false)
static size_t nElementsPerChannel()
static bool isWriteable()
static size_t nChannels()
static std::string path()
DummyRegisterAccessor< minimumUserType > buffer0
static size_t nRuntimeErrorCases()
static uint32_t _currentBufferNumber
DummyRegisterAccessor< uint32_t > currentBufferNumber
size_t writeQueueLength()
static uint32_t _currentBufferNumber
DummyRegisterAccessor< minimumUserType > buffer0
std::vector< std::vector< UserType > > getRemoteValue(bool=false)
size_t nRuntimeErrorCases()
void setForceRuntimeError(bool enable, size_t)
DummyRegisterAccessor< minimumUserType > buffer1
static constexpr auto capabilities
size_t nElementsPerChannel()
std::vector< std::vector< UserType > > generateValue(bool=false)
ChimeraTK::AccessModeFlags supportedFlags()
DummyRegisterAccessor< uint32_t > currentBufferNumber
std::vector< std::vector< Type > > generateValue(bool raw=false)
size_t writeQueueLength()
static constexpr auto capabilities
void forceAsyncReadInconsistency()
std::vector< std::vector< UserType > > getRemoteValue(bool raw=false)
minimumUserType rawUserType
size_t nRuntimeErrorCases()
DummyRegisterAccessor< int32_t > acc
size_t nElementsPerChannel()
ChimeraTK::AccessModeFlags supportedFlags()
void setForceRuntimeError(bool enable, size_t)
std::vector< std::vector< Type > > generateValue(bool raw=false)
minimumUserType rawUserType
ChimeraTK::AccessModeFlags supportedFlags()
std::vector< std::vector< UserType > > getRemoteValue(bool raw=false)
size_t nElementsPerChannel()
void forceAsyncReadInconsistency()
static constexpr auto capabilities
void setForceRuntimeError(bool enable, size_t)
DummyRegisterAccessor< int32_t > acc
size_t nRuntimeErrorCases()
size_t writeQueueLength()
size_t nRuntimeErrorCases()
std::vector< std::vector< Type > > generateValue(bool raw=false)
void setForceRuntimeError(bool enable, size_t)
size_t writeQueueLength()
DummyRegisterAccessor< int32_t > acc
ChimeraTK::AccessModeFlags supportedFlags()
minimumUserType rawUserType
size_t nElementsPerChannel()
std::vector< std::vector< UserType > > getRemoteValue(bool raw=false)
static constexpr auto capabilities
static constexpr auto capabilities
void setForceRuntimeError(bool enable, size_t)
size_t nRuntimeErrorCases()
size_t nElementsPerChannel()
std::vector< std::vector< UserType > > generateValue()
ChimeraTK::AccessModeFlags supportedFlags()
DummyMultiplexedRegisterAccessor< float > acc
std::vector< std::vector< UserType > > getRemoteValue()
size_t nRuntimeErrorCases()
static constexpr auto capabilities
std::vector< std::vector< UserType > > getRemoteValue()
DummyMultiplexedRegisterAccessor< uint16_t > acc
minimumUserType rawUserType
ChimeraTK::AccessModeFlags supportedFlags()
void setForceRuntimeError(bool enable, size_t)
size_t nElementsPerChannel()
size_t writeQueueLength()
std::vector< std::vector< UserType > > generateValue()
size_t writeQueueLength()
DummyMultiplexedRegisterAccessor< uint16_t > acc
void setForceRuntimeError(bool enable, size_t)
size_t nRuntimeErrorCases()
size_t nElementsPerChannel()
std::vector< std::vector< UserType > > getRemoteValue()
ChimeraTK::AccessModeFlags supportedFlags()
minimumUserType rawUserType
static constexpr auto capabilities
std::vector< std::vector< UserType > > generateValue()
size_t nRuntimeErrorCases()
static constexpr auto capabilities
std::vector< std::vector< UserType > > generateValue(bool raw=false)
DummyRegisterAccessor< uint16_t > acc
size_t nElementsPerChannel()
ChimeraTK::AccessModeFlags supportedFlags()
DummyMultiplexedRegisterAccessor< uint16_t > full
std::vector< std::vector< UserType > > getRemoteValue(bool raw=false)
void setForceRuntimeError(bool enable, size_t)
static const size_t channelIndex
size_t writeQueueLength()
size_t nRuntimeErrorCases()
static constexpr auto capabilities
size_t writeQueueLength()
std::vector< std::vector< UserType > > generateValue(bool raw=false)
static const size_t channelIndex
std::vector< std::vector< UserType > > getRemoteValue(bool raw=false)
void setForceRuntimeError(bool enable, size_t)
DummyMultiplexedRegisterAccessor< uint16_t > full
ChimeraTK::AccessModeFlags supportedFlags()
size_t nElementsPerChannel()
size_t writeQueueLength()
void setForceRuntimeError(bool enable, size_t)
DummyMultiplexedRegisterAccessor< uint16_t > full
static constexpr auto capabilities
size_t nRuntimeErrorCases()
std::vector< std::vector< UserType > > getRemoteValue(bool raw=false)
size_t nElementsPerChannel()
ChimeraTK::AccessModeFlags supportedFlags()
static const size_t channelIndex
std::vector< std::vector< UserType > > generateValue(bool raw=false)
Base descriptor for 1D accessors (and scalars)
std::vector< std::vector< UserType > > getRemoteValue(bool getRaw=false)
void generateValueHook(std::vector< UserType > &)
T convertRawToCooked(Traw value)
std::vector< std::vector< Type > > generateValue(bool getRaw=false)
void setForceRuntimeError(bool enable, size_t caseIndex)
size_t nRuntimeErrorCases()
static constexpr auto capabilities
uint64_t debugReadRawFullWord()
Read the raw full word value from _barContents directly via the DummyRegisterAccessor.
std::vector< std::vector< UserType > > getRemoteValue(bool getRaw=false)
size_t nElementsPerChannel()
ChimeraTK::AccessModeFlags supportedFlags()
std::vector< std::vector< UserType > > generateValue(bool getRaw=false)
BitRangeAccessorTarget target
BitRangeAccessorTarget target
BitRangeAccessorTarget target
Base descriptor with defaults, used for all registers.
ChimeraTK::AccessModeFlags supportedFlags()
size_t writeQueueLength()
void setForceRuntimeError(bool enable, size_t)
static constexpr auto capabilities
size_t nRuntimeErrorCases()
Base descriptor for scalars.
size_t nElementsPerChannel()
void setForceRuntimeError(bool enable, size_t)
ChimeraTK::AccessModeFlags supportedFlags()
DummyRegisterRawAccessor acc
size_t writeQueueLength()
std::vector< std::vector< Type > > generateValue(bool raw=false)
size_t nRuntimeErrorCases()
bool printPaddingChangedMessage
static constexpr auto capabilities
void set(rawUserType val)
std::vector< std::vector< Type > > getRemoteValue(bool raw=false)
size_t nElementsPerChannel()
minimumUserType rawUserType
BOOST_AUTO_TEST_CASE(testRegisterAccessor)