To monitor a status of a varaible in an appplicaiton this group of modules provides different possiblites. It includes
- MaxMonitor to monitor a value depending upon two MAX thresholds for warning and fault.
- MinMonitor to monitor a value depending upon two MIN thresholds for warning and fault.
- RangeMonitor to monitor a value depending upon two ranges of thresholds for warning and fault.
- ExactMonitor to monitor a value which should be exactly same as required value. Depending upon the value and condition on of the four states are reported.
- OFF, OK, WARNING, FAULT.
Checkout the status monitor example to see in detail how it works.
#include <ChimeraTK/ApplicationCore/ApplicationCore.h>
#include <ChimeraTK/ApplicationCore/EnableXMLGenerator.h>
#include <ChimeraTK/ApplicationCore/ModuleGroup.h>
#include <ChimeraTK/ApplicationCore/StatusMonitor.h>
using ctk::ApplicationModule::ApplicationModule;
double direction = 1;
while(true) {
direction = -1;
}
direction = 1;
}
usleep(100000);
}
}
};
using ctk::ModuleGroup::ModuleGroup;
"/TemperatureMonitor/temperatureStatus", "/TemperatureMonitor", "monitor for the simulated temperature",
} simulationGroup{this, "Simulation", ""};
};
void shutdown() override
This will remove the global pointer to the instance and allows creating another instance afterwards.
void setCurrentVersionNumber(VersionNumber versionNumber) override
Set the current version number.
Generic module to read an XML config file and provide the defined values as constant variables.
bool write(ChimeraTK::VersionNumber versionNumber)=delete
[Snippet: Class Definition Start]
~ExampleApp() override
[Snippet: Destructor]
ctk::RangeMonitor< double > temperatureMonitor
SimulationModule simulation
InvalidityTracer application module.
const std::unordered_set< std::string > TAGS
Convenience type definition which can optionally be used as a shortcut for the type which defines a l...
Module for status monitoring depending on range of threshold values.
Convenience class for output scalar accessors (always UpdateMode::push)
Example to simulate the working and usage of StatusMonitor.
ctk::ScalarOutput< double > temperature
The value to be monitored.
void mainLoop() override
To be implemented by the user: function called in a separate thread executing the main loop of the mo...