Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
DataStructures/Headers/FreezeFrame.h@39:ddf38df9699e, 2015-02-11 (annotated)
- Committer:
- pspatel321
- Date:
- Wed Feb 11 23:09:57 2015 +0000
- Revision:
- 39:ddf38df9699e
- Parent:
- 38:8efacce315ae
Updated CAN IDs for datalogging. Changed profile encoding.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pspatel321 | 38:8efacce315ae | 1 | #ifndef FREEZE_FRAME_H |
| pspatel321 | 38:8efacce315ae | 2 | #define FREEZE_FRAME_H |
| pspatel321 | 38:8efacce315ae | 3 | |
| pspatel321 | 38:8efacce315ae | 4 | #include "OperatingInfo.h" |
| pspatel321 | 38:8efacce315ae | 5 | #include "Profile.h" |
| pspatel321 | 38:8efacce315ae | 6 | |
| pspatel321 | 38:8efacce315ae | 7 | // Freeze frame class, containing everything that describes the current operation of the AMS |
| pspatel321 | 38:8efacce315ae | 8 | class FreezeFrame |
| pspatel321 | 38:8efacce315ae | 9 | { |
| pspatel321 | 38:8efacce315ae | 10 | public: |
| pspatel321 | 38:8efacce315ae | 11 | FreezeFrame(); |
| pspatel321 | 38:8efacce315ae | 12 | Profile_checkSum param; // Profile - contains parameters and configurable settings |
| pspatel321 | 38:8efacce315ae | 13 | OperatingInfo_checkSum op; // OperatingInfo - contains all the data gathered from sensors and processed outputs |
| pspatel321 | 38:8efacce315ae | 14 | |
| pspatel321 | 38:8efacce315ae | 15 | static bool getFrame(FreezeFrame **frame); // Fetch pointer to the last stored freeze frame if available |
| pspatel321 | 38:8efacce315ae | 16 | static bool writeFrame(); // Write the current RAM frame to flash as a freeze frame |
| pspatel321 | 38:8efacce315ae | 17 | static bool prepare(); // Call on microcontroller startup, pre-erase a flash sector so flash write occurs very fast upon error |
| pspatel321 | 38:8efacce315ae | 18 | |
| pspatel321 | 38:8efacce315ae | 19 | static bool getError(); // Get last marked error state |
| pspatel321 | 38:8efacce315ae | 20 | static bool setError(); // Mark error |
| pspatel321 | 38:8efacce315ae | 21 | static bool clearError(); // Reset (clear) the freeze frame error flag |
| pspatel321 | 38:8efacce315ae | 22 | }; |
| pspatel321 | 38:8efacce315ae | 23 | |
| pspatel321 | 38:8efacce315ae | 24 | #endif |
