Skip to content
Snippets Groups Projects
Commit 1ae65379 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

for read-only device variables, set initial data validity to faulty

parent a1334fe5
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,11 @@ namespace ChimeraTK {
protected:
using ChimeraTK::NDRegisterAccessor<UserType>::buffer_2D;
DeviceModule& deviceModule;
DataValidity localValidity{DataValidity::ok};
// local validity is faulty for read-only accessors at first, which will be overwritten after the first successful
// read.
DataValidity localValidity{this->isWriteable() ? DataValidity::ok : DataValidity::faulty};
bool genericTransfer(std::function<bool(void)> callable, bool updateOwnerValidityFlag = true);
void setOwnerValidity(DataValidity newValidity);
boost::shared_ptr<NDRegisterAccessor<UserType>> _recoveryAccessor{nullptr};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment