|
Embedded Artistry Framework
Embedded Systems C++ Framework
|
This class checks if values are within a certain tolerance. More...
#include <tolerance.hpp>
Static Public Member Functions | |
| static constexpr int64_t | absoluteError (uint32_t reference, uint32_t actual) |
| static constexpr float | relativeError (uint32_t reference, uint32_t actual) |
| static constexpr bool | isErrorInTolerance (float error, uint16_t tolerance) |
| static constexpr bool | isValueInTolerance (uint32_t reference, uint32_t actual, uint16_t tolerance) |
| template<uint32_t reference, uint32_t actual, uint16_t tolerance> | |
| static void | assertValueInTolerance () |
Static Public Attributes | |
| static constexpr uint16_t | Exact = 0 |
| static constexpr uint16_t | ZeroPercent = 0 |
| static constexpr uint16_t | HalfPercent = 5 |
| static constexpr uint16_t | OnePercent = 10 |
| static constexpr uint16_t | TwoPercent = 20 |
| static constexpr uint16_t | FivePercent = 50 |
| static constexpr uint16_t | TenPercent = 100 |
| static constexpr uint16_t | TwentyPercent = 200 |
| static constexpr uint16_t | DontCare = 1000 |
This class checks if values are within a certain tolerance.
This can be used to guarantee the quality of certain parameters, mostly baudrate or datarate.
|
inlinestatic |
|
inlinestatic |
References isValueInTolerance().
|
inlinestatic |
Referenced by isValueInTolerance().
|
inlinestatic |
References isErrorInTolerance(), and relativeError().
Referenced by assertValueInTolerance().
|
inlinestatic |
Referenced by isValueInTolerance().
|
static |
|
static |
Common tolerances in percent
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.15