Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FreezeFrame.h Source File

FreezeFrame.h

00001 #ifndef FREEZE_FRAME_H
00002 #define FREEZE_FRAME_H
00003 
00004 #include "OperatingInfo.h"
00005 #include "Profile.h"
00006 
00007 // Freeze frame class, containing everything that describes the current operation of the AMS
00008 class FreezeFrame
00009 {
00010 public:
00011     FreezeFrame();
00012     Profile_checkSum param;              // Profile - contains parameters and configurable settings
00013     OperatingInfo_checkSum op;           // OperatingInfo - contains all the data gathered from sensors and processed outputs
00014 
00015     static bool getFrame(FreezeFrame **frame);  // Fetch pointer to the last stored freeze frame if available
00016     static bool writeFrame();                   // Write the current RAM frame to flash as a freeze frame
00017     static bool prepare();                      // Call on microcontroller startup, pre-erase a flash sector so flash write occurs very fast upon error
00018 
00019     static bool getError();     // Get last marked error state
00020     static bool setError();     // Mark error
00021     static bool clearError();   // Reset (clear) the freeze frame error flag
00022 };
00023 
00024 #endif