Implemented thread specific error-downgrading to events and wrote corresponding unit test

This commit is contained in:
EricLiu2000
2019-07-24 12:52:15 -04:00
parent 42a5d525ce
commit 6f8d307850
5 changed files with 87 additions and 4 deletions
+4
View File
@@ -45,6 +45,10 @@ std::string APIEvent::describe() const noexcept {
return ss.str();
}
void APIEvent::downgradeFromError() noexcept {
eventStruct.severity = (uint8_t) APIEvent::Severity::EventWarning;
}
bool APIEvent::isForDevice(std::string filterSerial) const noexcept {
if(!device || filterSerial.length() == 0)
return false;