13 const std::string& description,
const std::unordered_set<std::string>& tags)
14 :
ScalarOutput(owner, name, std::move(unit), description, tags) {
22 const std::unordered_set<std::string>& tags)
25 std::vector<Model::ProcessVariableProxy> messageVars;
31 for(
const auto& pv : messageVars) {
38 void EventMessageAggregator::Impl::mainLoop() {
39 size_t autoClearTimerCounter{0};
45 std::map<TransferElementID, ScalarRegisterAccessor<std::string>> idMap;
46 for(
auto& input : _inputs) {
47 idMap[input.getId()].replace(input);
50 auto group = readAnyGroup();
53 auto id = group.readAny();
55 if(
id == _clear.getId()) {
57 _output.writeOkIfDifferent();
59 else if(
id == _autoClearTimer.getId()) {
60 if(_autoClearSeconds > 0 && _output._status != StatusOutput::Status::OK) {
62 ++autoClearTimerCounter;
63 if(autoClearTimerCounter == _autoClearSeconds) {
64 _output.writeOkIfDifferent();
70 _output.writeIfDifferent(StatusOutput::Status::WARNING, idMap.at(
id));
71 autoClearTimerCounter = 0;
AggregatableMessage(Module *owner, const std::string &name, std::string unit, const std::string &description, const std::unordered_set< std::string > &tags={})
static constexpr std::string_view aggregatableMessageTag
Model::RootProxy getModel()
Return the root of the application model.
static Application & getInstance()
Obtain instance of the application.
friend class ChimeraTK::Model::Impl
void addTag(const std::string &tag)
Add a tag.
auto visit(VISITOR visitor, Args... args) const
Traverse the model using the specified filter and call the visitor functor for each ModuleGroup,...
std::string getFullyQualifiedPath() const
Return the fully qualified path.
Base class for ApplicationModule and DeviceModule, to have a common interface for these module types.
InvalidityTracer application module.
Convenience class for output scalar accessors (always UpdateMode::push)