7#include <boost/make_shared.hpp>
14 class MathPluginFormulaHelper;
24 template<
typename UserType,
typename TargetType>
26 boost::shared_ptr<LogicalNameMappingBackend>& backend,
29 void openHook(
const boost::shared_ptr<LogicalNameMappingBackend>& backend)
override;
30 void postParsingHook(
const boost::shared_ptr<const LogicalNameMappingBackend>& backend)
override;
36 boost::shared_ptr<MathPluginFormulaHelper>
getFormulaHelper(boost::shared_ptr<LogicalNameMappingBackend> backend);
65 boost::weak_ptr<MathPluginFormulaHelper> _h;
A class to describe which of the supported data types is used.
@ float64
Double precision float.
LNMBackendRegisterInfo _info
RegisterInfo describing the the target register for which this plugin instance should work.
Base class for plugins that modify the behaviour of accessors in the logical name mapping backend.
Math Plugin: Apply mathematical formula to register's data.
DataType getTargetDataType(DataType) const override
Return the data type for which the target accessor shall be obtained.
ChimeraTK::DataValidity _lastMainValidity
bool _creatingFormulaHelper
void exceptionHook() override
Hook called when an exception is reported to the the backend via setException(), after the backend ha...
boost::shared_ptr< NDRegisterAccessor< UserType > > decorateAccessor(boost::shared_ptr< LogicalNameMappingBackend > &backend, boost::shared_ptr< NDRegisterAccessor< TargetType > > &target, const UndecoratedParams &accessorParams)
void openHook(const boost::shared_ptr< LogicalNameMappingBackend > &backend) override
Hook called when the backend is opened, at the end of the open() function after all backend work has ...
bool _enablePushParameters
static thread_local int64_t _writeLockCounter
bool _mainValueWrittenAfterOpen
LNMBackendRegisterInfo * info()
std::map< std::string, std::string > _parameters
bool _allParametersWrittenAfterOpen
void closeHook() override
Hook called when the backend is closed, at the beginning of the close() function when the device is s...
std::recursive_mutex _writeMutex
boost::shared_ptr< MathPluginFormulaHelper > getFormulaHelper(boost::shared_ptr< LogicalNameMappingBackend > backend)
if not yet existing, creates the instance and returns it if already existing, backend ptr may be empt...
void postParsingHook(const boost::shared_ptr< const LogicalNameMappingBackend > &backend) override
Hook called after the parsing of logical name map.
void doRegisterInfoUpdate() override
Implementation of the plugin specific register information update.
std::vector< double > _lastMainValue
RegisterInfo structure for the LogicalNameMappingBackend.
N-dimensional register accessor.
DataValidity
The current state of the data.
Helper struct to hold extra parameters needed by some plugins, used in decorateAccessor()