Uniot Docs
  • Introduction
  • Guides
    • Getting Started
    • Uniot Badge
    • Device Network
  • Foundations
    • Edge Logic Deployment
  • General Concepts
    • Primitives
    • Scripting
  • Platform
    • Dashboard
    • Sandbox
      • Visual Editor
        • Special
        • Logic
        • Math
        • Loops
        • Text
        • Variables
        • Functions
        • Primitives
      • Logger
      • Emulator
      • Control Panel
  • Advanced
    • Uniot Core
      • Scheduler
        • TaskScheduler
        • IExecutor
        • ISchedulerConnectionKit
        • Task
        • SchedulerTask
      • AppKit
        • AppKit
        • LispDevice
        • LispPrimitives
        • TopDevice
      • CBORWrapper
        • CBORObject
        • COSE
        • COSEMessage
        • ICOSESigner
      • Date
        • Date
        • SimpleNTP
      • EventBus
        • EventBus
        • IEventBusConnectionKit
        • DataChannels
        • EventEmitter
        • EventListener
        • EventEntity
        • CallbackEventListener
      • Hardware
        • Button
      • LispWrapper
        • DefaultPrimitives
        • LispHelper
        • PrimitiveExpeditor
        • unLisp
      • MQTTWrapper
        • CallbackMQTTDevice
        • MQTTDevice
        • MQTTKit
        • MQTTPath
      • Network
        • ConfigCaptivePortal
        • NetworkController
        • NetworkScheduler
      • Register
        • GpioRegister
        • ObjectRegister
        • ObjectRegisterRecord
        • Register
        • RegisterManager
        • RegisterManagerProxy
      • Storage
        • CBORStorage
        • CrashStorage
        • Storage
        • WifiStorage
      • Utils
        • Array
        • Bytes
        • ClearQueue
        • IterableQueue
        • LimitedQueue
        • GlobalBufferMemoryManager
        • Map
        • Singleton
        • TypeId
      • Credentials
    • Uniot Lisp
      • Language Description
      • Embedding Instructions
  • API
    • MQTT Convention
Powered by GitBook
On this page
  1. Advanced
  2. Uniot Core
  3. Storage

CrashStorage

PreviousCBORStorageNextStorage

Last updated 4 months ago

The CrashStorage class extends the class to log crash information specifically for the ESP8266 platform. It captures reset information and stack traces to aid in debugging and post-mortem analysis.

Constructor and Destructor:

  • CrashStorage(const String &path) Constructs a CrashStorage instance with a specified file path.

  • virtual ~CrashStorage() Destructor that ensures proper cleanup.

Methods:

  • bool store() override Stores the crash data to the specified file.

  • bool clean() override Cleans the crash data by resetting crash information and removing the file.

  • bool printCrashDataIfExists() const Prints the crash data to the serial console if it exists.

Protected Members:

  • CBORObject mCbor (inherited from Storage via CBORStorage): Manages structured CBOR data for crash information.

  • struct rst_info *mResetInfo Pointer to the reset information structure containing details about the crash.

  • uint32_t mStackStart Starting address of the stack trace.

  • uint32_t mStackEnd Ending address of the stack trace.

Private Members:

  • void setCrashInfo(struct rst_info* resetInfo, uint32_t stackStart, uint32_t stackEnd) Sets the crash information for logging.

    • resetInfo (struct rst_info*): Pointer to the reset information structure.

    • stackStart (uint32_t): Starting address of the stack trace.

    • stackEnd (uint32_t): Ending address of the stack trace.

  • Bytes buildDumpData() const Constructs the crash dump data from the reset information and stack trace.

Storage