10 const std::string& description,
const std::unordered_set<std::string>& tags)
11 :
VariableGroup(owner, Utilities::getPathName(qualifiedStatusVariableName), description, tags),
12 _status(this, Utilities::getUnqualifiedName(qualifiedStatusVariableName), description, {
tagStatusHasMessage}),
18 set(status, std::move(message));
26 write(status, std::move(message));
46 assert(std::string(
_message).empty());
52 assert(status != StatusOutput::Status::OK);
60 _status = StatusOutput::Status::OK;
68 const std::string& description,
const std::unordered_set<std::string>& tags)
69 :
VariableGroup(owner, Utilities::getPathName(qualifiedName),
"", tags),
70 _status(this, Utilities::getUnqualifiedName(qualifiedName), description) {
71 hasMessageSource =
false;
72 _statusNameLong = description;
79 if(msgInputName.empty()) {
84 hasMessageSource =
true;
const std::string & getName() const
Get the name of the module instance.
bool checkMetadataWriteDifference()
Checks whether a writeIfDifferent would have to issue a write, even if the payload data is unchanged.
void writeAll(bool includeReturnChannels=false)
Just call write() on all writable variables in the group.
Class describing a node of a variable network.
std::string getUnqualifiedName(const std::string &qualifiedName)
Return the last component of the given qualified path name.
InvalidityTracer application module.
void writeOk()
Set status to OK, clear the message and write the outputs.
static constexpr auto tagStatusHasMessage
Reserved tag which is used to mark presense of the message output.
void setOk()
Set status to OK and clear the message, but to not write.
void set(StatusOutput::Status status, std::string message)
Set status and message but to not write.
void writeIfDifferent(StatusOutput::Status status, std::string message)
ScalarOutput< std::string > _message
void write(StatusOutput::Status status, std::string message)
Set the status and the message and write the outputs.
StatusWithMessage()=default
void writeOkIfDifferent()