|
Modbus Vault v1.0
|
Flash-backed circular logging system header internals. More...
Go to the source code of this file.
Data Structures | |
| struct | __attribute__ |
| Blackbox logger entry header structure. More... | |
Macros | |
| #define | BLACKBOX_LOGGER_HEADER_MAGIC (0x5355424DUL) |
| #define | BLACKBOX_LOGGER_TAIL_MAGIC (0x4D425553UL) |
| #define | BLACKBOX_LOGGER_ENTRY_SIZE_WITHOUT_DATA_LENGTH |
| #define | BLACKBOX_LOGGER_WRITE_LOCK_TIMEOUT_MS (50U) |
| #define | BLACKBOX_LOGGER_SECTOR_LOCK_TIMEOUT_MS (500U) |
Functions | |
| size_t | align_num_up_helper (size_t number, size_t align_to) |
| Align-up number. | |
| size_t | entry_total_size_helper (size_t data_length) |
| Calculates entry total size. | |
| size_t | entry_total_aligned_size_helper (size_t data_length, size_t align_to) |
| Calculates entry total aligned size. | |
| static bool | is_logically_next_in_order_helper (uint32_t candidate, uint32_t reference) |
| Check if candidate comes after reference taking wrap-around into account. | |
Flash-backed circular logging system header internals.
Blackbox logger internal header provides different definitions and structures needed by the logger
| #define BLACKBOX_LOGGER_ENTRY_SIZE_WITHOUT_DATA_LENGTH |
Entry size without data field
| #define BLACKBOX_LOGGER_HEADER_MAGIC (0x5355424DUL) |
"MBUS" reversed
| #define BLACKBOX_LOGGER_SECTOR_LOCK_TIMEOUT_MS (500U) |
Sector lock wait timeout in micro seconds
| #define BLACKBOX_LOGGER_TAIL_MAGIC (0x4D425553UL) |
"SUBM" reversed
| #define BLACKBOX_LOGGER_WRITE_LOCK_TIMEOUT_MS (50U) |
Write lock wait timeout in micro seconds
|
inline |
Align-up number.
Align number up-to nearest multiple configurable in kconfig
| number | Number to align |
| align_to | Align to nearest |
| size_t entry_total_aligned_size_helper | ( | size_t | data_length, |
| size_t | align_to | ||
| ) |
Calculates entry total aligned size.
| data_length | Length of data |
| align_to | Align to nearest |
< Entry size without data field
|
inline |
Calculates entry total size.
| data_length | Length of data |
< Entry size without data field
|
inlinestatic |
Check if candidate comes after reference taking wrap-around into account.
| candidate | Candidate number |
| reference | Reference number |