Skip to content

AlarmCondition

class AlarmCondition

@brief A unified alarm condition class, which holds the alarm conditions known to Karabo

Operators

Name Description
std::string Allows for direct assignment of conditions to strings Return :

Functions

Name Description
returnMostSignificant Returns the most significant alarm condition out of a list of conditions v: : the list of alarm conditions Return : the most significant condition in the list (it will return the parent condition where applicable) e.g. WARN_HIGH -> WARN
fromString Returns an alarm condition object matching to the stringified condition condition: : a known alarm condition Return : a reference to an alarm condition object
asString Returns a stringified version of the alarm condition Return :
asBaseString Returns a stringified version of the alarm condition or its base if applicable Return :
isMoreCriticalThan Tests whether an alarm condition is more critical than this alarm condition other: : the condition to test criticality against Return : true if this condition has a higher criticality than the other; false otherwise.
isSameCriticality Tests whether two alarm conditions are similar, e.g. are subsets of the same basic condition test: : the condition to test similarity against Return : true if the conditions are subsets of the same base; false otherwise.
returnMoreSignificant Returns the more significant of the two condtions other : Return :

Operator Details

std::string

operator std::string() const

Allows for direct assignment of conditions to strings

Return :

Function Details

asBaseString

const std::string& asBaseString() const

Returns a stringified version of the alarm condition or its base if applicable

Return :

asString

const std::string& asString() const

Returns a stringified version of the alarm condition

Return :

fromString

static const AlarmCondition& fromString(const std::string& condition)

Returns an alarm condition object matching to the stringified condition

condition: : a known alarm condition

Return : a reference to an alarm condition object

isMoreCriticalThan

bool isMoreCriticalThan(const AlarmCondition& other) const

Tests whether an alarm condition is more critical than this alarm condition

other: : the condition to test criticality against

Return : true if this condition has a higher criticality than the other; false otherwise.

isSameCriticality

bool isSameCriticality(const AlarmCondition& test) const

Tests whether two alarm conditions are similar, e.g. are subsets of the same basic condition

test: : the condition to test similarity against

Return : true if the conditions are subsets of the same base; false otherwise.

returnMoreSignificant

const AlarmCondition& returnMoreSignificant(const AlarmCondition& other) const

Returns the more significant of the two condtions

other :

Return :

returnMostSignificant

static AlarmCondition returnMostSignificant(const std::vector<AlarmCondition>& v)

Returns the most significant alarm condition out of a list of conditions

v: : the list of alarm conditions

Return : the most significant condition in the list (it will return the parent condition where applicable) e.g. WARN_HIGH -> WARN