System Management code

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Revision:
39:ddf38df9699e
Parent:
38:8efacce315ae
--- a/IOobjects/CAN_TxIDs.h	Sat Feb 07 08:54:51 2015 +0000
+++ b/IOobjects/CAN_TxIDs.h	Wed Feb 11 23:09:57 2015 +0000
@@ -1,45 +1,39 @@
 #ifndef CAN_TXIDS_H
 #define CAN_TXIDS_H
 
-#define BASE_ID                 0x500                // Start at 0x500 for this device
+#define TX_ID_BASE              0x500                // Start at 0x500 for this device
 
 // Transmit IDs - System Mgmt Specific
 // Operating diagnostics
-#define SYS_ERROR_ID            BASE_ID + 0x00       // Error frame - critical errors that require shutdown
-#define SYS_MODE_ID             BASE_ID + 0x01       // Operating mode
-#define SYS_FLAGS_ID            BASE_ID + 0x02       // Signals
-#define SYS_PROFILE_ID          BASE_ID + 0x03       // Profile being used
-#define SYS_TIME_ID             BASE_ID + 0x04       // SysTime and startup time
-#define SYS_XBEE1_MSG_ID        BASE_ID + 0x05       // Message in/out counter for xbee1
-#define SYS_XBEE1_RATE_ID       BASE_ID + 0x06       // Message in/out counter for xbee1
-#define SYS_XBEE2_MSG_ID        BASE_ID + 0x07       // Message in/out counter for xbee2
-#define SYS_XBEE2_RATE_ID       BASE_ID + 0x08       // Message in/out counter for xbee2
-#define SYS_TEMP_ID             BASE_ID + 0x09       // Internal temperature of the glv battery chargerFET
+#define FAULTCODE_TX_ID         TX_ID_BASE + 0x00       // Error frame - critical errors that require shutdown
+#define MODE_TX_ID              TX_ID_BASE + 0x01       // Operating mode
+#define SIGNALS_TX_ID           TX_ID_BASE + 0x02       // Signals
+#define PROFILE_TX_ID           TX_ID_BASE + 0x03       // Profile being used
+#define TIME_TX_ID              TX_ID_BASE + 0x04       // SysTime and startup time
 
 // GLV Battery
-#define SYS_GLV_CURRENT_ID      BASE_ID + 0x10       // GLV battery current
-#define SYS_GLV_CAPACITY_ID     BASE_ID + 0x11       // GLV battery capacity setting
-#define SYS_GLV_AH_ID           BASE_ID + 0x12       // GLV battery amphours
-#define SYS_GLV_SOC_ID          BASE_ID + 0x13       // GLV battery SOC
-#define SYS_GLV_ERROR_ID        BASE_ID + 0x14       // GLV battery error byte
+#define TEMP_TX_ID              TX_ID_BASE + 0x10       // Internal temperature of the glv battery chargerFET
+#define GLV_CURRENT_TX_ID       TX_ID_BASE + 0x11       // GLV battery current
+#define GLV_CAPACITY_TX_ID      TX_ID_BASE + 0x12       // GLV battery capacity setting
+#define GLV_AH_TX_ID            TX_ID_BASE + 0x13       // GLV battery amphours
+#define GLV_SOC_TX_ID           TX_ID_BASE + 0x14       // GLV battery SOC
+#define GLV_ERROR_TX_ID         TX_ID_BASE + 0x15       // GLV battery error byte
 
 // DC-DC Converter
-#define SYS_DCDC_CURRENT_ID     BASE_ID + 0x20       // DC-DC current 
-#define SYS_DCDC_STATUS_ID      BASE_ID + 0x21       // DC-DC status byte
-
-// PWM Channels
-#define SYS_PWM_FAN_ID          BASE_ID + 0x30       // FAN1 actual pwm
-#define SYS_PWM_PUMP_ID         BASE_ID + 0x31       // PUMP1 actual pwm
+#define DCDC_CURRENT_TX_ID      TX_ID_BASE + 0x20       // DC-DC current 
+#define DCDC_STATUS_TX_ID       TX_ID_BASE + 0x21       // DC-DC status byte
+#define PWM_FAN_TX_ID           TX_ID_BASE + 0x22       // FAN1 actual pwm
+#define PWM_PUMP_TX_ID          TX_ID_BASE + 0x23       // PUMP1 actual pwm
 
 // IMD
-#define SYS_IMD_STATUS_ID       BASE_ID + 0x40       // IMD status byte
-#define SYS_IMD_RESIST_ID       BASE_ID + 0x41       // IMD resistance measurement
+#define IMD_STATUS_TX_ID        TX_ID_BASE + 0x30       // IMD status byte
+#define IMD_RESIST_TX_ID        TX_ID_BASE + 0x31       // IMD resistance measurement
 
 // Latch Supervisor states
-#define SYS_IMD_LATCH_ID        BASE_ID + 0x50       // IMD Latch circuit error byte
-#define SYS_AMS_LATCH_ID        BASE_ID + 0x51       // AMS Latch circuit error byte
+#define IMD_LATCH_TX_ID         TX_ID_BASE + 0x40       // IMD Latch circuit error byte
+#define AMS_LATCH_TX_ID         TX_ID_BASE + 0x41       // AMS Latch circuit error byte
 
 // Shutdown Switches
-#define SYS_SWITCHES_ID         BASE_ID + 0x60       // Shutdown Switch State
+#define SWITCHES_TX_ID          TX_ID_BASE + 0x50       // Shutdown Switch State
 
-#endif
\ No newline at end of file
+#endif