System Management code

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

CAN_RxIDs.h

00001 #ifndef CAN_RXIDS_H
00002 #define CAN_RXIDS_H
00003 
00004 #define RX_ID_BASE                      0x580                   // Start at 0x500 for this device
00005 
00006 // Receive Command IDs
00007 // NOTE after each command is parsed, a message will return back with the same ID of length 1 with data[0]=1 for success and data[0]=0 for fail
00008 #define RESET_RX_ID                     RX_ID_BASE + 0x00       // Reset over CAN
00009 #define RESETCLEAR_RX_ID                RX_ID_BASE + 0x01       // Clear all errors and then reset, clean slate startup
00010 #define CLEAR_RX_ID                     RX_ID_BASE + 0x02       // Clear a freeze frame error (0), clear every fault (1)
00011 #define TIME_RX_ID                      RX_ID_BASE + 0x03       // Change the time (MM DD YY HH MM SS - 6 bytes)
00012 #define PROFILE_RX_ID                   RX_ID_BASE + 0x04       // Byte[0] = load/write Byte[1] = profile #
00013 
00014 #define FAN_CONTROL_RX_ID               RX_ID_BASE + 0x10
00015 #define PUMP_CONTROL_RX_ID              RX_ID_BASE + 0x11
00016 #define SOC_RX_ID                       RX_ID_BASE + 0x12       // Change the current SOC to some float from 0 to 1
00017 #define AH_RX_ID                        RX_ID_BASE + 0x13       // Change the current ampHours to some float from 0 to capacity
00018 
00019 // Profile Data Change Requests
00020 #define PROFILE_CHARGECURRENT_RX_ID     RX_ID_BASE + 0x20
00021 #define PROFILE_DISCHARGECURRENT_RX_ID  RX_ID_BASE + 0x21
00022 #define PROFILE_NOMINALCAPACITY_RX_ID   RX_ID_BASE + 0x22
00023 #define PROFILE_GLVBATTAPS_RX_ID        RX_ID_BASE + 0x23
00024 #define PROFILE_DCDCONTHRESHOLD_RX_ID   RX_ID_BASE + 0x24
00025 #define PROFILE_DCDCOVERCURRENT_RX_ID   RX_ID_BASE + 0x25
00026 #define PROFILE_DCDCSTARTDELAY_RX_ID    RX_ID_BASE + 0x26
00027 #define PROFILE_DCDCSTOPDELAY_RX_ID     RX_ID_BASE + 0x27
00028 #define PROFILE_DCDC_TAPS_RX_ID         RX_ID_BASE + 0x28
00029 #define PROFILE_IMDSTARTDELAY_RX_ID     RX_ID_BASE + 0x29
00030 #define PROFILE_AMSSTARTDELAY_RX_ID     RX_ID_BASE + 0x2A
00031 #define PROFILE_INTERNALOVERTEMP_RX_ID  RX_ID_BASE + 0x2B
00032 #define PROFILE_CANNOACK_RX_ID          RX_ID_BASE + 0x2C
00033 #define PROFILE_EXTENDSERIAL_RX_ID      RX_ID_BASE + 0x2D
00034 #define PROFILE_CANTXSIZE_RX_ID         RX_ID_BASE + 0x2E
00035 #define PROFILE_CANRXSIZE_RX_ID         RX_ID_BASE + 0x2F
00036 #define PROFILE_SERIALBAUD_RX_ID        RX_ID_BASE + 0x30
00037 #define PROFILE_SERIALTXSIZE_RX_ID      RX_ID_BASE + 0x31
00038 
00039 #define RX_ID_END                       0x5FF       // End of SYS MGMT receive block
00040 
00041 // Messages from other devices in the car
00042 #define CHARGER_ERR_RX_ID               0x700       // Is the charger connected?
00043 #define AMS_MODE_RX_ID                  0x301       // Contains AIRs data
00044 #define GLOBAL_CAR_RESET_RX_ID          0x602       // Reset button from steering wheel
00045 
00046 #endif