5#include <boost/pointer_cast.hpp>
9 template<
typename UserType>
15 this->
_readQueue = target->getReadQueue().template then<void>([
this]() {
readCallback(); }, std::launch::deferred);
20 template<
typename UserType>
22 _hGroup->handleMissingPreReads(this->getId());
23 _target->preRead(type);
28 template<
typename UserType>
36 if(_hGroup->lastMatchingVersionNumber() > this->_versionNumber) {
37 _hGroup->handleMissingPostReads(this->getId(), updateDataBuffer);
43 if(this->_activeException) {
44 _target->setActiveException(this->_activeException);
45 _target->postRead(type,
false);
49 auto transferElementId = this->getId();
50 this->_hGroup->getMatchingInfo(transferElementId, this->_versionNumber, this->_dataValidity);
53 if(!updateDataBuffer) {
57 auto& matchingBuffer = this->_hGroup->template getMatchingBuffer<UserType>(transferElementId);
58 for(
size_t i = 0; i < _target->getNumberOfChannels(); ++i) {
59 buffer_2D[i].swap(matchingBuffer[i]);
65 template<
typename UserType>
77 _hGroup->updateHistory(_target->getId());
84 bool consistent = _hGroup->checkUpdate(_target->getId());
90 throw detail::DiscardValueException();
#define INSTANTIATE_TEMPLATE_FOR_CHIMERATK_USER_TYPES(TemplateClass)
A quasi-decorator to be used to decorate targets which should provide data updates only when data is ...
void doPostRead(TransferType type, bool updateDataBuffer) override
Backend specific implementation of postRead().
void doPreRead(TransferType type) override
Backend specific implementation of preRead().
DataConsistencyDecorator(const boost::shared_ptr< NDRegisterAccessor< UserType > > &target, DataConsistencyGroupDetail::HistorizedMatcher *dGroup)
Data consistency matching via history of available data.
Base class for decorators of the NDRegisterAccessor.
N-dimensional register accessor.
ReadAnyGroup * _inReadAnyGroup
ReadAnyGroup this TransferElement has been added to, nullptr if not in a ReadAnyGroup.
cppext::future_queue< void > _readQueue
The queue for asynchronous read transfers.
Class for generating and holding version numbers without exposing a numeric representation.
TransferType
Used to indicate the applicable operation on a Transferelement.