![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
#include <memory_monitor.hpp>
Public Member Functions | |
| memory_monitor (memory_monitor const &)=delete | |
| void | operator= (memory_monitor const &)=delete |
| void | start (int32_t delay=CONFIG_FLASH_MONITOR_BURST_DELAY_SECS) |
| Start the flash-monitor task. | |
| void | stop () |
| Stop the flash-monitor task. | |
Static Public Member Functions | |
| static memory_monitor & | get_instance () |
| static void | flash_monitor_hdlr (struct k_work *work) |
| Work-queue handler that scans the active firmware image for unrecoverable flash ECC errors. | |
Definition at line 35 of file memory_monitor.hpp.
|
delete |
|
static |
Work-queue handler that scans the active firmware image for unrecoverable flash ECC errors.
Scan a slice of the running firmware image for unrecoverable ECC errors.
Each invocation processes exactly burst_bytes (1 KiB) of the active MCUboot slot, then reschedules itself after m_burst_delay_ms. Any flash_read() that returns -EIO is interpreted as a double-bit ECC error and translated to ::flash_read_exception, which the policy layer treats as a reboot request.
| flash_init_exception | Flash device or slot not accessible. |
| flash_read_exception | Unrecoverable ECC or other flash fault. |
Definition at line 117 of file memory_monitor.cpp.
|
inlinestatic |
Definition at line 39 of file memory_monitor.hpp.
|
delete |
| void satnogs::comms::memory_monitor::start | ( | int32_t | delay = CONFIG_FLASH_MONITOR_BURST_DELAY_SECS | ) |
Start the flash-monitor task.
Schedules the first scan immediately on the system work-queue and enables subsequent periodic re-scheduling. If the monitor is already running the call is ignored.
| delay | Delay in seconds to pause after reading burst_bytes (e.g. default value of CONFIG_FLASH_MONITOR_BURST_DELAY_SECS or a new value set by a telecommand). |
Definition at line 53 of file memory_monitor.cpp.
| void satnogs::comms::memory_monitor::stop | ( | ) |
Stop the flash-monitor task.
Cancels the pending (or timer-armed) work item so that no new scan will start after this call. If a scan of a flash chunk is already executing it is allowed to finish once.
Definition at line 73 of file memory_monitor.cpp.