Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

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?

UserRevisionLine numberNew contents of line
pspatel321 38:8efacce315ae 1 #ifndef TEMPORARY_DATA_H
pspatel321 38:8efacce315ae 2 #define TEMPORARY_DATA_H
pspatel321 38:8efacce315ae 3
pspatel321 38:8efacce315ae 4 #include "FreezeFrame.h"
pspatel321 38:8efacce315ae 5 #include <string.h>
pspatel321 38:8efacce315ae 6
pspatel321 38:8efacce315ae 7 // For temporary data that changes frequently in operation for inter-task communication.
pspatel321 38:8efacce315ae 8 // NOTE there are no mutexes/protection mechanisms. Ensure single producer, single consumer.
pspatel321 38:8efacce315ae 9 class TemporaryData
pspatel321 38:8efacce315ae 10 {
pspatel321 38:8efacce315ae 11 public:
pspatel321 38:8efacce315ae 12 TemporaryData() {
pspatel321 38:8efacce315ae 13 memset(this, 0, sizeof(TemporaryData));
pspatel321 38:8efacce315ae 14 parseGoodChar = ' '; // Start with a blank after the "Command Input:" line
pspatel321 38:8efacce315ae 15 viewProfileNum = -2; // -2 = display live RAM profile
pspatel321 38:8efacce315ae 16 }
pspatel321 38:8efacce315ae 17 char inputStr[RX_SIZE+1]; // Stores the user-typed command input string for serial interface
pspatel321 38:8efacce315ae 18 char parseGoodChar; // Character to display for string parsed and successful operation
pspatel321 38:8efacce315ae 19
pspatel321 38:8efacce315ae 20 Profile* viewProfile; // Used by "profile view xxx" command, switch the profile display to this profile if not NULL, otherwise view the current RAM frame
pspatel321 38:8efacce315ae 21 int viewProfileNum; // Index of the profile being viewed
pspatel321 38:8efacce315ae 22
pspatel321 38:8efacce315ae 23 FreezeFrame* freeze; // Used by "view freeze" command, display this freezeFrame over serial if not NULL, otherwise view the current RAM frame
pspatel321 38:8efacce315ae 24
pspatel321 38:8efacce315ae 25 bool timeSynced; // Used to check whether or not RTC time has been synchronized with the AMS (master clock source)
pspatel321 38:8efacce315ae 26 void* wdtThreadId; // ID to access the watchdog check-in thread
pspatel321 38:8efacce315ae 27 };
pspatel321 38:8efacce315ae 28
pspatel321 38:8efacce315ae 29 #endif