Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert Prioritization #45

Conversation

moritz-meier
Copy link
Collaborator

Implement TAWS Alert Prioritization.

DO-367 Class C is not very detailed about alert prioritization nor does it describe tests. It just gives an example table.

The opentaws crate provides an TawsAlertSourcePrioritization trait which can be optionally implemented on the AlertSource type. It describes static rules for prioritization.

If TawsAlertSourcePrioritization is implemented an extension trait is implemented on the TawsAlerts type, which provides an additional function prioritize.

prioritize can be used to turn the unsorted set of alerts (TawsAlerts) into a sorted set of alerts (TawsPrioritizedAlerts), which then provides an integer index.

The prioritization happens based on rules which assign a unique priority to a tuple of (AlertSource, Level) with the notion that an alert from the specified AlertSource, with a level greater than or equal to the level specified in the rule is cached by the rule and placed somewhere in the sorted set in the range 0..=priority.

update heapless dependency to current main branch. last release on crates.io is over a year old.
replaced by const MAX_NUM_ALERT_SOURCES

maybe one day we will get const generic expr in stable rust
@moritz-meier moritz-meier force-pushed the feature/alert-prioritization branch from db1afcc to 71a997c Compare September 21, 2023 12:40
docs
@moritz-meier moritz-meier force-pushed the feature/alert-prioritization branch from 71a997c to 43aad64 Compare September 21, 2023 13:01
fix: code coverage typo
@wucke13 wucke13 merged commit a794276 into aeronautical-informatics:staging Oct 10, 2023
3 of 4 checks passed
@moritz-meier moritz-meier deleted the feature/alert-prioritization branch October 27, 2023 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants