|
FERS 0.1.0
The Flexible Extensible Radar Simulator
|
Classes | |
| struct | InferenceResult |
| Result of inferring likely units from a rotation value. More... | |
Enumerations | |
| enum class | ValueKind : std::uint8_t { Angle , Rate } |
| Kind of rotation value being inspected for unit mistakes. More... | |
| enum class | Confidence : std::uint8_t { None , Low , Medium , High } |
| Confidence level for an inferred rotation unit. More... | |
| enum class | WarningSensitivity : std::uint8_t { HighConfidence , MediumOrHigh , Aggressive } |
| Minimum confidence threshold for emitting rotation-unit warnings. More... | |
Functions | |
| InferenceResult | infer_unit_from_value (RealType value, ValueKind kind) noexcept |
| Infers the likely unit of a rotation value. | |
| bool | should_warn (Confidence confidence, WarningSensitivity sensitivity) noexcept |
| Returns true when a warning should be emitted for the confidence and sensitivity. | |
| void | clear_captured_warnings () noexcept |
| Clears the thread-local captured rotation warnings. | |
| std::vector< std::string > | take_captured_warnings () |
| Returns and clears the thread-local captured rotation warnings. | |
| void | maybe_warn_about_rotation_value (RealType value, params::RotationAngleUnit declared_unit, ValueKind kind, std::string_view source, std::string_view owner, std::string_view field) |
| Emits or captures a warning when a rotation value likely uses the wrong unit. | |
Variables | |
| constexpr WarningSensitivity | kWarningSensitivity = WarningSensitivity::MediumOrHigh |
| Default warning sensitivity used by parser and serializer warnings. | |
|
strong |
Confidence level for an inferred rotation unit.
| Enumerator | |
|---|---|
| None | No useful inference could be made. |
| Low | Weak evidence for the inferred unit. |
| Medium | Moderate evidence for the inferred unit. |
| High | Strong evidence for the inferred unit. |
Definition at line 27 of file rotation_warning_utils.h.
|
strong |
Kind of rotation value being inspected for unit mistakes.
| Enumerator | |
|---|---|
| Angle | Absolute rotation angle. |
| Rate | Rotation rate. |
Definition at line 20 of file rotation_warning_utils.h.
|
strong |
Minimum confidence threshold for emitting rotation-unit warnings.
| Enumerator | |
|---|---|
| HighConfidence | Warn only on high-confidence mismatches. |
| MediumOrHigh | Warn on medium or high-confidence mismatches. |
| Aggressive | Warn on any non-low mismatch. |
Definition at line 36 of file rotation_warning_utils.h.
|
noexcept |
Clears the thread-local captured rotation warnings.
Definition at line 301 of file rotation_warning_utils.cpp.
References max.
Referenced by begin_warning_capture(), discard_warning_capture(), and fers_get_interpolated_rotation_path().
Here is the caller graph for this function:
|
noexcept |
Infers the likely unit of a rotation value.
Definition at line 266 of file rotation_warning_utils.cpp.
References max.
Referenced by maybe_warn_about_rotation_value().
Here is the caller graph for this function:| void serial::rotation_warning_utils::maybe_warn_about_rotation_value | ( | const RealType | value, |
| const params::RotationAngleUnit | declared_unit, | ||
| const ValueKind | kind, | ||
| const std::string_view | source, | ||
| const std::string_view | owner, | ||
| const std::string_view | field | ||
| ) |
Emits or captures a warning when a rotation value likely uses the wrong unit.
Definition at line 310 of file rotation_warning_utils.cpp.
References infer_unit_from_value(), kWarningSensitivity, LOG, max, should_warn(), and logging::WARNING.
Referenced by fers_get_interpolated_rotation_path(), serial::xml_parser_utils::parseFixedRotation(), serial::xml_parser_utils::parseRotationPath(), and serial::update_platform_paths_from_json().
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Returns true when a warning should be emitted for the confidence and sensitivity.
Definition at line 286 of file rotation_warning_utils.cpp.
References Aggressive, High, HighConfidence, max, Medium, MediumOrHigh, and None.
Referenced by maybe_warn_about_rotation_value().
Here is the caller graph for this function:| std::vector< std::string > serial::rotation_warning_utils::take_captured_warnings | ( | ) |
Returns and clears the thread-local captured rotation warnings.
Definition at line 303 of file rotation_warning_utils.cpp.
References max.
Referenced by complete_warning_capture().
Here is the caller graph for this function:
|
constexpr |
Default warning sensitivity used by parser and serializer warnings.
Definition at line 53 of file rotation_warning_utils.h.
Referenced by maybe_warn_about_rotation_value().