Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Commit dd4e34f

Browse files
mliszczbourtemb
authored andcommitted
Skip alarm evaluation if no value is set for attribute
1 parent 38cfe88 commit dd4e34f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cppapi/server/attribute.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,14 @@ bool Attribute::check_alarm()
16811681
return returned;
16821682
}
16831683

1684+
// Skip alarm evaluation if no value for this attribute was provided during last read.
1685+
1686+
if (!get_value_flag())
1687+
{
1688+
DEV_WARN_STREAM(dev) << "Attribute has no value, skipping alarm evaluation for: " << get_name() << std::endl;
1689+
return false;
1690+
}
1691+
16841692
//
16851693
// Get the monitor protecting device att config
16861694
//

0 commit comments

Comments
 (0)