ChimeraTK-DeviceAccess  03.18.00
LNMAccessorPlugin.h
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 #pragma once
4 
7 
8 #include <utility>
9 
10 namespace ChimeraTK::LNMBackend {
11 
14  UndecoratedParams(const std::string& name, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
15  : _name(name), _numberOfWords(numberOfWords), _wordOffsetInRegister(wordOffsetInRegister),
16  _flags(std::move(flags)) {}
17  std::string _name;
21  };
22 
26  public:
27  explicit AccessorPluginBase(const LNMBackendRegisterInfo& info);
28  virtual ~AccessorPluginBase() = default;
29 
31  template<typename UserType>
32  boost::shared_ptr<NDRegisterAccessor<UserType>> getAccessor(boost::shared_ptr<LogicalNameMappingBackend> backend,
33  size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags, size_t pluginIndex) {
35  getAccessor_impl, UserType, backend, numberOfWords, wordOffsetInRegister, flags, pluginIndex);
36  }
38  boost::shared_ptr<NDRegisterAccessor<T>>(
39  boost::shared_ptr<LogicalNameMappingBackend>, size_t, size_t, AccessModeFlags, size_t));
40 
49 
66  virtual void doRegisterInfoUpdate() = 0;
67 
72  virtual void openHook(const boost::shared_ptr<LogicalNameMappingBackend>& backend) { std::ignore = backend; }
73 
78  virtual void postParsingHook([[maybe_unused]] const boost::shared_ptr<const LogicalNameMappingBackend>& backend) {}
79 
83  virtual void closeHook() {}
84 
89  virtual void exceptionHook() {}
90 
91  protected:
94  };
95 
103  template<typename Derived>
105  public:
111  explicit AccessorPlugin(const LNMBackendRegisterInfo& info, size_t pluginIndex, bool shareTargetAccessors = false);
112 
113  private:
114  // we make our destructor private and add Derived as a friend to enforce the correct CRTP
115  ~AccessorPlugin() override = default;
116  friend Derived;
117 
118  protected:
123  const bool _needSharedTarget;
124 
125  public:
132  virtual DataType getTargetDataType(DataType userType) const { return userType; }
133 
141  template<typename UserType, typename TargetType>
142  boost::shared_ptr<NDRegisterAccessor<UserType>> decorateAccessor(
143  boost::shared_ptr<LogicalNameMappingBackend>& backend,
144  boost::shared_ptr<NDRegisterAccessor<TargetType>>& target, const UndecoratedParams& accessorParams);
145 
147  template<typename UserType>
148  boost::shared_ptr<NDRegisterAccessor<UserType>> getAccessor_impl(
149  boost::shared_ptr<LogicalNameMappingBackend>& backend, size_t numberOfWords, size_t wordOffsetInRegister,
150  AccessModeFlags flags, size_t pluginIndex);
151 
155  size_t _pluginIndex;
156  };
157 
158  /********************************************************************************************************************/
159 
161  boost::shared_ptr<AccessorPluginBase> makePlugin(LNMBackendRegisterInfo info, size_t pluginIndex,
162  const std::string& name, const std::map<std::string, std::string>& parameters);
163 
164  /********************************************************************************************************************/
165  /* Known plugins are defined below (implementations should go to a separate .cc file) */
166  /********************************************************************************************************************/
167 
169  class MultiplierPlugin : public AccessorPlugin<MultiplierPlugin> {
170  public:
172  const LNMBackendRegisterInfo& info, size_t pluginIndex, const std::map<std::string, std::string>& parameters);
173 
174  void doRegisterInfoUpdate() override;
176 
177  template<typename UserType, typename TargetType>
178  boost::shared_ptr<NDRegisterAccessor<UserType>> decorateAccessor(
179  boost::shared_ptr<LogicalNameMappingBackend>& backend,
180  boost::shared_ptr<NDRegisterAccessor<TargetType>>& target, const UndecoratedParams& accessorParams);
181 
182  double _factor;
183  };
184 
185  /********************************************************************************************************************/
186 
188  class MonostableTriggerPlugin : public AccessorPlugin<MonostableTriggerPlugin> {
189  public:
191  LNMBackendRegisterInfo info, size_t pluginIndex, const std::map<std::string, std::string>& parameters);
192 
193  void doRegisterInfoUpdate() override;
195 
196  template<typename UserType, typename TargetType>
197  boost::shared_ptr<NDRegisterAccessor<UserType>> decorateAccessor(
198  boost::shared_ptr<LogicalNameMappingBackend>& backend,
199  boost::shared_ptr<NDRegisterAccessor<TargetType>>& target, const UndecoratedParams& accessorParams);
200 
202  uint32_t _active{1};
203  uint32_t _inactive{0};
204  };
205 
207  class ForceReadOnlyPlugin : public AccessorPlugin<ForceReadOnlyPlugin> {
208  public:
210  const LNMBackendRegisterInfo& info, size_t pluginIndex, const std::map<std::string, std::string>& parameters);
211 
212  void doRegisterInfoUpdate() override;
213 
214  template<typename UserType, typename TargetType>
215  boost::shared_ptr<NDRegisterAccessor<UserType>> decorateAccessor(
216  boost::shared_ptr<LogicalNameMappingBackend>& backend,
217  boost::shared_ptr<NDRegisterAccessor<TargetType>>& target, const UndecoratedParams& accessorParams);
218  };
219 
221  class ForcePollingReadPlugin : public AccessorPlugin<ForcePollingReadPlugin> {
222  public:
224  const LNMBackendRegisterInfo& info, size_t pluginIndex, const std::map<std::string, std::string>& parameters);
225 
226  void doRegisterInfoUpdate() override;
227 
228  template<typename UserType, typename TargetType>
229  boost::shared_ptr<NDRegisterAccessor<UserType>> decorateAccessor(
230  boost::shared_ptr<LogicalNameMappingBackend>& backend,
231  boost::shared_ptr<NDRegisterAccessor<TargetType>>& target, const UndecoratedParams& accessorParams);
232  };
233 
235  class TypeHintModifierPlugin : public AccessorPlugin<TypeHintModifierPlugin> {
236  public:
238  const LNMBackendRegisterInfo& info, size_t pluginIndex, const std::map<std::string, std::string>& parameters);
239 
240  void doRegisterInfoUpdate() override;
241 
242  private:
243  DataType _dataType{DataType::none};
244  };
245 
246  class BitRangeAccessPlugin : public AccessorPlugin<BitRangeAccessPlugin> {
247  public:
249  const LNMBackendRegisterInfo& info, size_t pluginIndex, const std::map<std::string, std::string>& parameters);
250 
251  template<typename UserType, typename TargetType>
252  boost::shared_ptr<NDRegisterAccessor<UserType>> decorateAccessor(
253  boost::shared_ptr<LogicalNameMappingBackend>& backend,
254  boost::shared_ptr<NDRegisterAccessor<TargetType>>& target, const UndecoratedParams& accessorParams);
255 
256  void doRegisterInfoUpdate() override;
257  DataType getTargetDataType(DataType /*userType*/) const override { return DataType::uint64; }
258  uint32_t _shift{0};
259  uint32_t _numberOfBits{0};
260  bool _writeable{true};
263  };
264 
265  /********************************************************************************************************************/
266  /* Implementations follow here */
267  /********************************************************************************************************************/
268 
269  template<typename Derived>
271  const LNMBackendRegisterInfo& info, size_t pluginIndex, bool shareTargetAccessors)
272  : AccessorPluginBase(info), _needSharedTarget{shareTargetAccessors}, _pluginIndex(pluginIndex) {
273  FILL_VIRTUAL_FUNCTION_TEMPLATE_VTABLE(getAccessor_impl);
274  }
275 
276  /********************************************************************************************************************/
277 
278  template<typename Derived>
279  template<typename UserType, typename TargetType>
280  boost::shared_ptr<NDRegisterAccessor<UserType>> AccessorPlugin<Derived>::decorateAccessor(
281  boost::shared_ptr<LogicalNameMappingBackend>&, boost::shared_ptr<NDRegisterAccessor<TargetType>>& target,
282  const UndecoratedParams&) {
283  if constexpr(std::is_same<UserType, TargetType>::value) {
284  return target;
285  }
286 
287  assert(false); // When overriding getTargetDataType(), also decorateAccessor()
288  // must be overridden!
289 
290  return {};
291  }
292 
293  /********************************************************************************************************************/
294 
295  template<typename Derived>
296  template<typename UserType>
297  boost::shared_ptr<NDRegisterAccessor<UserType>> AccessorPlugin<Derived>::getAccessor_impl(
298  boost::shared_ptr<LogicalNameMappingBackend>& backend, size_t numberOfWords, size_t wordOffsetInRegister,
299  AccessModeFlags flags, size_t pluginIndex) {
300  boost::shared_ptr<NDRegisterAccessor<UserType>> decorated;
301 
302  assert(_pluginIndex == pluginIndex);
303 
304  // obtain desired target type from plugin implementation
305  auto type = getTargetDataType(typeid(UserType));
306  if((_info._dataDescriptor.rawDataType() == DataType::none) && flags.has(AccessMode::raw)) {
308  "Access mode 'raw' is not supported for register '" + std::string(_info.getRegisterName()) + "'");
309  }
310 
311  callForType(type, [&](auto T) {
312  boost::shared_ptr<ChimeraTK::NDRegisterAccessor<decltype(T)>> target;
313 
314  if(_needSharedTarget) {
315  auto& map = boost::fusion::at_key<decltype(T)>(backend->sharedAccessorMap.table);
316  RegisterPath path{_info.registerName};
317  path.setAltSeparator(".");
318  LogicalNameMappingBackend::AccessorKey key{backend.get(), path};
319 
320  auto it = map.find(key);
321  if(it == map.end() || (target = it->second.accessor.lock()) == nullptr) {
322  // obtain target accessor with desired type
323  target = backend->getRegisterAccessor_impl<decltype(T)>(
324  _info.getRegisterName(), numberOfWords, wordOffsetInRegister, flags, pluginIndex + 1);
325  map[key].accessor = target;
326  }
327  }
328  else {
329  target = backend->getRegisterAccessor_impl<decltype(T)>(
330  _info.getRegisterName(), numberOfWords, wordOffsetInRegister, flags, pluginIndex + 1);
331  }
332 
333  // double buffering plugin needs numberOfWords, wordOffsetInRegister of already existing accessor
334  UndecoratedParams accessorParams(_info.registerName, numberOfWords, wordOffsetInRegister, flags);
335  decorated = static_cast<Derived*>(this)->template decorateAccessor<UserType>(backend, target, accessorParams);
336  });
337 
338  decorated->setExceptionBackend(backend);
339  return decorated;
340  }
341 
342 } // namespace ChimeraTK::LNMBackend
ChimeraTK::LNMBackend::makePlugin
boost::shared_ptr< AccessorPluginBase > makePlugin(LNMBackendRegisterInfo info, size_t pluginIndex, const std::string &name, const std::map< std::string, std::string > &parameters)
Factory function for accessor plugins.
Definition: LNMAccessorPlugin.cc:14
ChimeraTK::LogicalNameMappingBackend::AccessorKey
std::pair< DeviceBackend *, RegisterPath > AccessorKey
Map of target accessors which are potentially shared across our accessors.
Definition: LogicalNameMappingBackend.h:82
ChimeraTK::LNMBackend::UndecoratedParams::_flags
AccessModeFlags _flags
Definition: LNMAccessorPlugin.h:20
ChimeraTK::LNMBackend::BitRangeAccessPlugin::decorateAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType >> &target, const UndecoratedParams &accessorParams)
Definition: LNMBitRangeAccessPlugin.cc:269
ChimeraTK::LNMBackend::MonostableTriggerPlugin::getTargetDataType
DataType getTargetDataType(DataType) const override
Return the data type for which the target accessor shall be obtained.
Definition: LNMAccessorPlugin.h:194
ChimeraTK::LNMBackend::AccessorPlugin::getAccessor_impl
boost::shared_ptr< NDRegisterAccessor< UserType > > getAccessor_impl(boost::shared_ptr< LogicalNameMappingBackend > &backend, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags, size_t pluginIndex)
This function is called by the backend.
Definition: LNMAccessorPlugin.h:297
ChimeraTK::LNMBackend::UndecoratedParams::_name
std::string _name
Definition: LNMAccessorPlugin.h:17
ChimeraTK::LNMBackend::UndecoratedParams::UndecoratedParams
UndecoratedParams(const std::string &name, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
Definition: LNMAccessorPlugin.h:14
ChimeraTK::LNMBackend::ForceReadOnlyPlugin::doRegisterInfoUpdate
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
Definition: LNMForceReadOnlyPlugin.cc:21
ChimeraTK::LNMBackend::MonostableTriggerPlugin::decorateAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType >> &target, const UndecoratedParams &accessorParams)
Definition: LNMMonostableTriggerPlugin.cc:121
ChimeraTK::LNMBackend::BitRangeAccessPlugin
Definition: LNMAccessorPlugin.h:246
ChimeraTK::DataType::float64
@ float64
Double precision float.
Definition: SupportedUserTypes.h:616
ChimeraTK::LNMBackend::AccessorPlugin::getTargetDataType
virtual DataType getTargetDataType(DataType userType) const
Return the data type for which the target accessor shall be obtained.
Definition: LNMAccessorPlugin.h:132
ChimeraTK::LNMBackend::ForcePollingReadPlugin
ForcePollingRead Plugin: Forces a register to not allow setting the AccessMode::wait_for_new_data fla...
Definition: LNMAccessorPlugin.h:221
ChimeraTK::LNMBackend::AccessorPlugin
Base class for plugins that modify the behaviour of accessors in the logical name mapping backend.
Definition: LNMAccessorPlugin.h:104
ChimeraTK::LNMBackend::BitRangeAccessPlugin::BitRangeAccessPlugin
BitRangeAccessPlugin(const LNMBackendRegisterInfo &info, size_t pluginIndex, const std::map< std::string, std::string > &parameters)
Definition: LNMBitRangeAccessPlugin.cc:203
ChimeraTK::LNMBackend::AccessorPluginBase::postParsingHook
virtual void postParsingHook([[maybe_unused]] const boost::shared_ptr< const LogicalNameMappingBackend > &backend)
Hook called after the parsing of logical name map.
Definition: LNMAccessorPlugin.h:78
ChimeraTK::LNMBackend
Definition: LNMMathPluginFormulaHelper.h:16
ChimeraTK::LNMBackend::AccessorPluginBase::~AccessorPluginBase
virtual ~AccessorPluginBase()=default
ChimeraTK::LNMBackend::AccessorPlugin::decorateAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType >> &target, const UndecoratedParams &accessorParams)
This function should be overridden by the plugin (yes, this is possible due to the CRTP).
Definition: LNMAccessorPlugin.h:280
ChimeraTK::LNMBackend::MultiplierPlugin::doRegisterInfoUpdate
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
Definition: LNMMultiplierPlugin.cc:27
ChimeraTK::LNMBackend::BitRangeAccessPlugin::dataInterpretationFractionalBits
uint32_t dataInterpretationFractionalBits
Definition: LNMAccessorPlugin.h:261
ChimeraTK::LNMBackend::UndecoratedParams::_wordOffsetInRegister
size_t _wordOffsetInRegister
Definition: LNMAccessorPlugin.h:19
ChimeraTK::LNMBackend::BitRangeAccessPlugin::_shift
uint32_t _shift
Definition: LNMAccessorPlugin.h:258
ChimeraTK::LNMBackend::TypeHintModifierPlugin
TypeHintModifier Plugin: Change the catalogue type of the mapped register.
Definition: LNMAccessorPlugin.h:235
ChimeraTK::LNMBackend::AccessorPluginBase
Base class for AccessorPlugins used by the LogicalNameMapping backend to store backends in lists.
Definition: LNMAccessorPlugin.h:25
VirtualFunctionTemplate.h
LogicalNameMappingBackend.h
ChimeraTK::LNMBackend::ForceReadOnlyPlugin
ForceReadOnly Plugin: Forces a register to be read only.
Definition: LNMAccessorPlugin.h:207
ChimeraTK::LNMBackend::MonostableTriggerPlugin::doRegisterInfoUpdate
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
Definition: LNMMonostableTriggerPlugin.cc:38
ChimeraTK::LNMBackend::AccessorPluginBase::openHook
virtual void openHook(const boost::shared_ptr< LogicalNameMappingBackend > &backend)
Hook called when the backend is opened, at the end of the open() function after all backend work has ...
Definition: LNMAccessorPlugin.h:72
FILL_VIRTUAL_FUNCTION_TEMPLATE_VTABLE
#define FILL_VIRTUAL_FUNCTION_TEMPLATE_VTABLE(functionName)
Fill the vtable of a virtual function template defined with DEFINE_VIRTUAL_FUNCTION_TEMPLATE.
Definition: VirtualFunctionTemplate.h:84
ChimeraTK::LNMBackend::MonostableTriggerPlugin::MonostableTriggerPlugin
MonostableTriggerPlugin(LNMBackendRegisterInfo info, size_t pluginIndex, const std::map< std::string, std::string > &parameters)
Definition: LNMMonostableTriggerPlugin.cc:15
ChimeraTK::RegisterPath::setAltSeparator
void setAltSeparator(const std::string &altSeparator)
set alternative separator.
Definition: RegisterPath.h:37
ChimeraTK::LNMBackend::AccessorPluginBase::getAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > getAccessor(boost::shared_ptr< LogicalNameMappingBackend > backend, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags, size_t pluginIndex)
Called by the backend when obtaining a register accessor.
Definition: LNMAccessorPlugin.h:32
ChimeraTK::LNMBackend::AccessorPluginBase::DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE
DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE(getAccessor_impl, boost::shared_ptr< NDRegisterAccessor< T >>(boost::shared_ptr< LogicalNameMappingBackend >, size_t, size_t, AccessModeFlags, size_t))
ChimeraTK::LNMBackend::AccessorPluginBase::updateRegisterInfo
void updateRegisterInfo(BackendRegisterCatalogue< LNMBackendRegisterInfo > &)
Update the register info inside the catalogue if needed.
Definition: LNMAccessorPlugin.cc:48
ChimeraTK::LNMBackend::AccessorPluginBase::AccessorPluginBase
AccessorPluginBase(const LNMBackendRegisterInfo &info)
Definition: LNMAccessorPlugin.cc:43
ChimeraTK::LNMBackend::UndecoratedParams
Helper struct to hold extra parameters needed by some plugins, used in decorateAccessor()
Definition: LNMAccessorPlugin.h:13
ChimeraTK::BackendRegisterCatalogue
Interface for backends to the register catalogue.
Definition: BackendRegisterCatalogue.h:70
ChimeraTK::AccessModeFlags::has
bool has(AccessMode flag) const
Check if a certain flag is in the set.
Definition: AccessMode.cc:20
ChimeraTK::DataType::uint32
@ uint32
Unsigned 32 bit integer.
Definition: SupportedUserTypes.h:612
ChimeraTK::LNMBackend::MultiplierPlugin::_factor
double _factor
Definition: LNMAccessorPlugin.h:182
ChimeraTK::LNMBackend::ForceReadOnlyPlugin::decorateAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType >> &target, const UndecoratedParams &accessorParams)
Definition: LNMForceReadOnlyPlugin.cc:55
ChimeraTK::LNMBackend::AccessorPluginBase::closeHook
virtual void closeHook()
Hook called when the backend is closed, at the beginning of the close() function when the device is s...
Definition: LNMAccessorPlugin.h:83
ChimeraTK::LNMBackendRegisterInfo
RegisterInfo structure for the LogicalNameMappingBackend.
Definition: LNMBackendRegisterInfo.h:22
ChimeraTK::LNMBackend::MultiplierPlugin::MultiplierPlugin
MultiplierPlugin(const LNMBackendRegisterInfo &info, size_t pluginIndex, const std::map< std::string, std::string > &parameters)
Definition: LNMMultiplierPlugin.cc:15
ChimeraTK::DataType::none
@ none
The data type/concept does not exist, e.g. there is no raw transfer (do not confuse with Void)
Definition: SupportedUserTypes.h:606
ChimeraTK::LNMBackend::BitRangeAccessPlugin::doRegisterInfoUpdate
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
Definition: LNMBitRangeAccessPlugin.cc:258
ChimeraTK::LNMBackend::AccessorPluginBase::_info
LNMBackendRegisterInfo _info
RegisterInfo describing the the target register for which this plugin instance should work.
Definition: LNMAccessorPlugin.h:93
ChimeraTK::LNMBackend::AccessorPluginBase::doRegisterInfoUpdate
virtual void doRegisterInfoUpdate()=0
Implementation of the plugin specific register information update.
ChimeraTK::LNMBackend::MultiplierPlugin
Multiplier Plugin: Multiply register's data with a constant factor.
Definition: LNMAccessorPlugin.h:169
ChimeraTK::LNMBackend::UndecoratedParams::_numberOfWords
size_t _numberOfWords
Definition: LNMAccessorPlugin.h:18
ChimeraTK::LNMBackend::BitRangeAccessPlugin::_writeable
bool _writeable
Definition: LNMAccessorPlugin.h:260
ChimeraTK::DataType
A class to describe which of the supported data types is used.
Definition: SupportedUserTypes.h:599
ChimeraTK::LNMBackend::TypeHintModifierPlugin::doRegisterInfoUpdate
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
Definition: LNMTypeHintModifierPlugin.cc:29
ChimeraTK::LNMBackend::BitRangeAccessPlugin::_numberOfBits
uint32_t _numberOfBits
Definition: LNMAccessorPlugin.h:259
ChimeraTK::LNMBackend::MultiplierPlugin::getTargetDataType
DataType getTargetDataType(DataType) const override
Return the data type for which the target accessor shall be obtained.
Definition: LNMAccessorPlugin.h:175
ChimeraTK::LNMBackend::BitRangeAccessPlugin::dataInterpretationIsSigned
bool dataInterpretationIsSigned
Definition: LNMAccessorPlugin.h:262
ChimeraTK::LNMBackend::ForcePollingReadPlugin::decorateAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType >> &target, const UndecoratedParams &accessorParams)
Definition: LNMForcePollingReadPlugin.cc:29
ChimeraTK::LNMBackend::BitRangeAccessPlugin::getTargetDataType
DataType getTargetDataType(DataType) const override
Return the data type for which the target accessor shall be obtained.
Definition: LNMAccessorPlugin.h:257
ChimeraTK::LNMBackend::MonostableTriggerPlugin::_milliseconds
double _milliseconds
Definition: LNMAccessorPlugin.h:201
ChimeraTK::LNMBackend::ForcePollingReadPlugin::doRegisterInfoUpdate
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
Definition: LNMForcePollingReadPlugin.cc:20
ChimeraTK::LNMBackend::ForcePollingReadPlugin::ForcePollingReadPlugin
ForcePollingReadPlugin(const LNMBackendRegisterInfo &info, size_t pluginIndex, const std::map< std::string, std::string > &parameters)
Definition: LNMForcePollingReadPlugin.cc:14
ChimeraTK::LNMBackend::TypeHintModifierPlugin::TypeHintModifierPlugin
TypeHintModifierPlugin(const LNMBackendRegisterInfo &info, size_t pluginIndex, const std::map< std::string, std::string > &parameters)
Definition: LNMTypeHintModifierPlugin.cc:11
ChimeraTK::callForType
void callForType(const std::type_info &type, LAMBDATYPE lambda)
Helper function for running code which uses some compile-time type that is specified at runtime as a ...
Definition: SupportedUserTypes.h:919
ChimeraTK::LNMBackend::AccessorPluginBase::exceptionHook
virtual void exceptionHook()
Hook called when an exception is reported to the the backend via setException(), after the backend ha...
Definition: LNMAccessorPlugin.h:89
ChimeraTK::RegisterPath
Class to store a register path name.
Definition: RegisterPath.h:16
ChimeraTK::LNMBackend::AccessorPlugin::AccessorPlugin
AccessorPlugin(const LNMBackendRegisterInfo &info, size_t pluginIndex, bool shareTargetAccessors=false)
The constructor of the plugin should also accept a 3rd argument: const std::map<std::string,...
Definition: LNMAccessorPlugin.h:270
ChimeraTK::LNMBackend::MultiplierPlugin::decorateAccessor
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType >> &target, const UndecoratedParams &accessorParams)
Definition: LNMMultiplierPlugin.cc:81
ChimeraTK::LNMBackend::AccessorPlugin::_needSharedTarget
const bool _needSharedTarget
Deriving plugins should set this to true if they want to use interlocked access to the same target ac...
Definition: LNMAccessorPlugin.h:123
ChimeraTK::LNMBackend::MonostableTriggerPlugin
Monostable Trigger Plugin: Write value to target which falls back to another value after defined time...
Definition: LNMAccessorPlugin.h:188
ChimeraTK::LNMBackend::ForceReadOnlyPlugin::ForceReadOnlyPlugin
ForceReadOnlyPlugin(const LNMBackendRegisterInfo &info, size_t pluginIndex, const std::map< std::string, std::string > &parameters)
Definition: LNMForceReadOnlyPlugin.cc:15
CALL_VIRTUAL_FUNCTION_TEMPLATE
#define CALL_VIRTUAL_FUNCTION_TEMPLATE(functionName, templateArgument,...)
Execute the virtual function template call using the vtable defined with the DEFINE_VIRTUAL_FUNCTION_...
Definition: VirtualFunctionTemplate.h:70
ChimeraTK::LNMBackend::AccessorPlugin::_pluginIndex
size_t _pluginIndex
Index of the plugin instance within the stack of plugins on a particular register.
Definition: LNMAccessorPlugin.h:155
ChimeraTK::AccessModeFlags
Set of AccessMode flags with additional functionality for an easier handling.
Definition: AccessMode.h:48
ChimeraTK::LNMBackend::MonostableTriggerPlugin::_active
uint32_t _active
Definition: LNMAccessorPlugin.h:202
ChimeraTK::DataType::uint64
@ uint64
Unsigned 64 bit integer.
Definition: SupportedUserTypes.h:614
ChimeraTK::NDRegisterAccessor< T >
ChimeraTK::logic_error
Exception thrown when a logic error has occured.
Definition: Exception.h:51
ChimeraTK::LNMBackend::MonostableTriggerPlugin::_inactive
uint32_t _inactive
Definition: LNMAccessorPlugin.h:203