|
Dawn Framework 1.0
Universal data acquisition framework for embedded systems
|
Common IO runtime limits container and validator. More...
#include <limits.hxx>
Public Types | |
| enum | { CFG_LIMIT_MIN = 2 , CFG_LIMIT_MAX = 3 , CFG_LIMIT_STEP = 4 } |
| Common IO limit configuration identifiers. More... | |
Public Member Functions | |
| CIOLimits () | |
| Construct empty limits. | |
| int | bind (uint8_t id, uint8_t dtype, size_t words, const uint32_t *data) |
| Bind one limit config item. | |
| const uint32_t * | getMax () const |
| Get maximum limit words pointer. | |
| const uint32_t * | getMin () const |
| Get minimum limit words pointer. | |
| const uint32_t * | getStep () const |
| Get step limit words pointer. | |
| size_t | getWords () const |
| Get configured limit array size in words. | |
| bool | isConfigured () const |
| Check whether any limits are configured. | |
| void | reset () |
| Reset all configured limits. | |
| int | validate (const uint32_t *data, size_t words, uint8_t dtype) const |
| Validate payload against configured limits. | |
Common IO runtime limits container and validator.
Stores descriptor-backed min/max/step arrays and validates payload words against configured limits.
Definition at line 23 of file limits.hxx.
| anonymous enum |
Common IO limit configuration identifiers.
Must match IO_CFG_*.
| Enumerator | |
|---|---|
| CFG_LIMIT_MIN | Minimum limit words. |
| CFG_LIMIT_MAX | Maximum limit words. |
| CFG_LIMIT_STEP | Step limit words. |
Definition at line 30 of file limits.hxx.
|
inline |
Bind one limit config item.
No-op bind when IO limits feature is disabled.
| id | Limit config ID (CFG_LIMIT_MIN/MAX/STEP). |
| dtype | Config data type. |
| words | Number of uint32 words in limit array. |
| data | Pointer to descriptor-backed limit words. |
Definition at line 164 of file limits.hxx.
|
inline |
Validate payload against configured limits.
No-op validation when IO limits feature is disabled.
| data | Payload words. |
| words | Payload size in uint32 words. |
| dtype | Payload data type. |
Definition at line 177 of file limits.hxx.