8 #ifndef MTCA4U_DOOCS_BACKEND_STRING_REGISTER_ACCESSOR_H
9 #define MTCA4U_DOOCS_BACKEND_STRING_REGISTER_ACCESSOR_H
12 #include <doocs/EqCall.h>
13 #include <type_traits>
17 template<
typename UserType>
24 const std::string& registerPathName,
size_t numberOfWords,
size_t wordOffsetInRegister, AccessModeFlags flags);
26 void doPostRead(TransferType type,
bool hasNewData)
override;
28 void doPreWrite(TransferType type, VersionNumber version)
override;
35 template<
typename UserType>
37 boost::shared_ptr<DoocsBackend> backend,
const std::string& path,
const std::string& registerPathName,
38 size_t numberOfWords,
size_t wordOffsetInRegister, AccessModeFlags flags)
40 backend, path, registerPathName, numberOfWords, wordOffsetInRegister, flags) {
42 if(
typeid(UserType) !=
typeid(std::string)) {
44 throw ChimeraTK::logic_error(
"Trying to access a string DOOCS property with a non-string user data type.");
50 throw ChimeraTK::logic_error(std::string(
"DOOCS data type ") +
52 " not supported by DoocsBackendStringRegisterAccessor.");
58 template<
typename UserType>
68 if(!hasNewData)
return;
86 template<
typename UserType>
89 throw ChimeraTK::logic_error(
"Trying to access a string DOOCS property with a non-string user data "
95 template<
typename UserType>
97 TransferType, VersionNumber) {
98 throw ChimeraTK::logic_error(
"Trying to access a string DOOCS property with a non-string user data "