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 TemporaryData.h Source File

TemporaryData.h

00001 #ifndef TEMPORARY_DATA_H
00002 #define TEMPORARY_DATA_H
00003 
00004 #include "FreezeFrame.h"
00005 #include <string.h>
00006 
00007 // For temporary data that changes frequently in operation for inter-task communication.
00008 // NOTE there are no mutexes/protection mechanisms.  Ensure single producer, single consumer.
00009 class TemporaryData
00010 {
00011 public:
00012     TemporaryData() {
00013         memset(this, 0, sizeof(TemporaryData));
00014         parseGoodChar = ' ';    // Start with a blank after the "Command Input:" line
00015         viewProfileNum = -2;    // -2 = display live RAM profile
00016     }
00017     char inputStr[RX_SIZE+1];   // Stores the user-typed command input string for serial interface
00018     char parseGoodChar;         // Character to display for string parsed and successful operation
00019 
00020     Profile* viewProfile;       // Used by "profile view xxx" command, switch the profile display to this profile if not NULL, otherwise view the current RAM frame
00021     int viewProfileNum;         // Index of the profile being viewed
00022 
00023     FreezeFrame* freeze;        // Used by "view freeze" command, display this freezeFrame over serial if not NULL, otherwise view the current RAM frame
00024 
00025     bool timeSynced;            // Used to check whether or not RTC time has been synchronized with the AMS (master clock source)
00026     void* wdtThreadId;          // ID to access the watchdog check-in thread
00027 };
00028 
00029 #endif