Handles crash data storage and retrieval for ESP8266.
More...
#include <CrashStorage.h>
|
| Bytes | buildDumpData () const |
| | Generates formatted crash information including stack dump.
|
| |
| void | setPath (const String &path) |
| | Sets the file path, ensuring it starts with "/".
|
| |
|
| struct rst_info * | mResetInfo |
| | ESP8266 reset/crash information.
|
| |
| uint32_t | mStackStart |
| | Start address of stack to be dumped.
|
| |
| uint32_t | mStackEnd |
| | End address of stack to be dumped.
|
| |
| Bytes | mData |
| | The byte array containing the data to be stored or the loaded data.
|
| |
| String | mPath |
| | The file path where data is stored.
|
| |
|
| void | uniotCrashCallback (struct rst_info *resetInfo, uint32_t stackStart, uint32_t stackEnd) |
| | ESP8266 crash callback function registered with system.
|
| |
|
| static void | unmount () |
| | Explicitly unmounts the filesystem.
|
| |
Handles crash data storage and retrieval for ESP8266.
CrashStorage extends Storage to provide crash dump functionality. It captures crash information including exception details, register values, and a stack trace when a crash occurs, saving this information to a file for later diagnostics.
◆ CrashStorage()
| uniot::CrashStorage::CrashStorage |
( |
const String & | path | ) |
|
|
inline |
Constructs a CrashStorage object.
- Parameters
-
| path | The file path where crash information will be stored |
◆ ~CrashStorage()
| virtual uniot::CrashStorage::~CrashStorage |
( |
| ) |
|
|
inlinevirtual |
◆ buildDumpData()
| Bytes uniot::CrashStorage::buildDumpData |
( |
| ) |
const |
|
protected |
Generates formatted crash information including stack dump.
Creates a formatted text report of crash information including:
- Crash time and reason
- Exception information
- Register values
- Stack dump
- Return values
-
| Bytes | Formatted crash report data |
◆ clean()
| bool uniot::CrashStorage::clean |
( |
| ) |
|
|
overridevirtual |
Clears crash information and removes file.
Resets crash data members and cleans the stored file.
- Return values
-
| true | Clean operation was successful |
| false | Clean operation failed (e.g., file system error) |
Reimplemented from uniot::Storage.
◆ printCrashDataIfExists()
| bool uniot::CrashStorage::printCrashDataIfExists |
( |
| ) |
const |
Outputs crash data to Serial if it exists.
Checks if crash data is available and prints it to the Serial output.
- Return values
-
| true | Crash data was printed to Serial |
| false | No crash data exists to print |
◆ store()
| bool uniot::CrashStorage::store |
( |
| ) |
|
|
overridevirtual |
Stores crash information to a file.
Builds the crash dump data and writes it to storage.
- Return values
-
| true | Storage operation was successful |
| false | Storage operation failed (e.g., file system error) |
Reimplemented from uniot::Storage.
◆ uniotCrashCallback
| void uniotCrashCallback |
( |
struct rst_info * | resetInfo, |
|
|
uint32_t | stackStart, |
|
|
uint32_t | stackEnd ) |
|
friend |
ESP8266 crash callback function registered with system.
Called by the ESP8266 system when a crash occurs to save crash information to persistent storage for later analysis.
- Parameters
-
| resetInfo | Crash reason and register information from ESP8266 |
| stackStart | Start address of the stack to be dumped |
| stackEnd | End address of the stack to be dumped |
◆ mResetInfo
| struct rst_info* uniot::CrashStorage::mResetInfo |
|
protected |
ESP8266 reset/crash information.
◆ mStackEnd
| uint32_t uniot::CrashStorage::mStackEnd |
|
protected |
End address of stack to be dumped.
◆ mStackStart
| uint32_t uniot::CrashStorage::mStackStart |
|
protected |
Start address of stack to be dumped.
The documentation for this class was generated from the following files: