diff --git a/include/ApplicationModule.h b/include/ApplicationModule.h index cc94b7856022dc16a93099ba5ca689ba16b88ba3..e0972e599be23e21041ab444f8b0af1c0d33162a 100644 --- a/include/ApplicationModule.h +++ b/include/ApplicationModule.h @@ -72,7 +72,7 @@ namespace ChimeraTK { VersionNumber getCurrentVersionNumber() const override { return currentVersionNumber; } DataValidity getDataValidity() const override { - return (dataFaultCounter == 0 || exceptionCounter == 0) ? DataValidity::ok : DataValidity::faulty; + return (dataFaultCounter == 0 && exceptionCounter == 0) ? DataValidity::ok : DataValidity::faulty; } void incrementDataFaultCounter() override; @@ -96,7 +96,7 @@ namespace ChimeraTK { * write operations */ VersionNumber currentVersionNumber{nullptr}; - /** Data fault and exception counters. TODO: Change this to metion the effect of both cnts If non-zero, getDataValidity() returns a fault, otherwise ok. */ + /** Data fault and exception counters. */ size_t dataFaultCounter{0}; size_t exceptionCounter{0}; }; diff --git a/src/Application.cc b/src/Application.cc index d0a585f1629a0ed1d8a979b77ac3234e7738ca56..8d1e049eb7ff52b301c2163b2c2d5136ca0fff9f 100644 --- a/src/Application.cc +++ b/src/Application.cc @@ -749,8 +749,8 @@ void Application::typedMakeConnection(VariableNetwork& network) { auto owningModule = consumer.getOwningModule(); // application module or variable group feedingDeviceImpl->setOwner(owningModule); // The decorator comes up with data validity faulty, and we have to keep the counting consistent - // TODO De we need to handle the exception counter in the same manner? owningModule->incrementDataFaultCounter(); + owningModule->incrementExceptionCounter(); } connectionMade = true; }