|
K-FSW ec10f94
Modular flight software on Zephyr, for small satellites
|
Data Structures | |
| struct | kfsw_resmon_status |
Macros | |
| #define | KFSW_RESMON_PARAM_TABLE_ID 36U |
| #define | KFSW_RESMON_PARAM_TABLE_NAME "resmon" |
| #define | KFSW_RESMON_NAME_SIZE 20U |
Enumerations | |
| enum | kfsw_resmon_event { KFSW_EVENT_RESMON_LOW_STACK = 1 } |
Functions | |
| int | kfsw_resmon_start (void) |
| int | kfsw_resmon_stop (void) |
| int | kfsw_resmon_sample (void) |
| void | kfsw_resmon_get_status (struct kfsw_resmon_status *status) |
| int | kfsw_resmon_set_alert_percent (uint32_t percent) |
Variables | |
| const struct kfsw_param_definition_set | kfsw_resmon_param_definitions |
Reports stack use and unused bytes for each thread.
Sampling uses the kernel thread list; threads need no separate registration.
Usage is a percentage of each thread's configured stack size. Check it together with the unused bytes under the intended workload.
MCU targets measure their configured stacks. Native simulation uses host stacks, so its reported values do not measure stack headroom.
| #define KFSW_RESMON_NAME_SIZE 20U |
#include <resmon.h>
Longest thread name kept, including the terminator.
| #define KFSW_RESMON_PARAM_TABLE_ID 36U |
#include <resmon.h>
Table 36: stack headroom and its counters.
| #define KFSW_RESMON_PARAM_TABLE_NAME "resmon" |
#include <resmon.h>
Parameter table name.
| enum kfsw_resmon_event |
| void kfsw_resmon_get_status | ( | struct kfsw_resmon_status * | status | ) |
#include <resmon.h>
Copy the current measurements and counters.
| int kfsw_resmon_sample | ( | void | ) |
#include <resmon.h>
Sweep once, whether or not the periodic sweep is running.
| int kfsw_resmon_set_alert_percent | ( | uint32_t | percent | ) |
#include <resmon.h>
Set the stack use that raises an event, as a percentage.
| 0 | Applied. |
| -ERANGE | Zero or above 100. |
| int kfsw_resmon_start | ( | void | ) |
#include <resmon.h>
Start sweeping on the configured period.
| int kfsw_resmon_stop | ( | void | ) |
#include <resmon.h>
Stop sweeping.
The recorded numbers stay readable.
|
extern |
#include <resmon.h>
Parameter table 36.