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}),
20 set(status, std::move(message));
27 if(status !=
_status || message != std::string(
_message) ||
_status.getVersionNumber() == VersionNumber{nullptr}) {
28 write(status, std::move(message));
42 if(
_status != StatusOutput::Status::OK ||
_status.getVersionNumber() == VersionNumber{nullptr}) {
48 assert(std::string(
_message).empty());
54 assert(status != StatusOutput::Status::OK);
62 _status = StatusOutput::Status::OK;
70 const std::string& description,
const std::unordered_set<std::string>& tags)
71 :
VariableGroup(owner, Utilities::getPathName(qualifiedName),
"", tags),
72 _status(this, Utilities::getUnqualifiedName(qualifiedName), description) {
73 hasMessageSource =
false;
74 _statusNameLong = description;
81 if(msgInputName.empty()) {
86 hasMessageSource =
true;
const std::string & getName() const
Get the name of the module instance.
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.
constexpr auto explicitDataValidityTag
Special tag to designate that a node should not automatically take over DataValidity of its owning mo...
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()