diff --git a/include/ExceptionHandlingDecorator.h b/include/ExceptionHandlingDecorator.h index 995fbc92234a6a595f403951b2579b99afba371a..cc96917894906baa51e91e51283bd04c9b5f881e 100644 --- a/include/ExceptionHandlingDecorator.h +++ b/include/ExceptionHandlingDecorator.h @@ -18,15 +18,15 @@ namespace ChimeraTK { template<typename UserType> class ExceptionHandlingDecorator : public ChimeraTK::NDRegisterAccessorDecorator<UserType> { public: -// ExceptionHandlingDecorator( -// boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> accessor, DeviceModule& devMod, -// boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> recoveryAccessor=nullptr); /// Basic constructor, inititalizes the base decorator and the reference to the DeviceModule ExceptionHandlingDecorator( boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> accessor, DeviceModule& devMod); - /// Constructor for writeable registers, allows also setting the recoveryAccessor + /** + * Constructor for writeable registers, allows also setting the recoveryAccessor. + * Deletgates to the basic contructor for member initialization. + */ ExceptionHandlingDecorator( boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> accessor, DeviceModule& devMod, boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> recoveryAccessor); @@ -57,6 +57,7 @@ namespace ChimeraTK { void interrupt() override; protected: + using ChimeraTK::NDRegisterAccessor<UserType>::buffer_2D; DeviceModule& dm; DataValidity validity{DataValidity::ok}; bool genericTransfer(std::function<bool(void)> callable); diff --git a/src/ExceptionHandlingDecorator.cc b/src/ExceptionHandlingDecorator.cc index d9378c84ed4f3d794ac31d5a24d9d61428fbd17f..d127e93d90a2f26c60d414395efa4ee96d39e590 100644 --- a/src/ExceptionHandlingDecorator.cc +++ b/src/ExceptionHandlingDecorator.cc @@ -113,7 +113,7 @@ namespace ChimeraTK { // Access to _recoveryAccessor is only possible channel-wise for(unsigned int ch=0; ch<_recoveryAccessor->getNumberOfChannels(); ++ch){ - _recoveryAccessor->accessChannel(ch) = NDRegisterAccessorDecorator<UserType>::buffer_2D[ch]; + _recoveryAccessor->accessChannel(ch) = buffer_2D[ch]; } } // Now delegate call to the generic decorator, which swaps the buffer