System Management code

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 30:91af74a299e1 1 #ifndef CAN_RXIDS_H
pspatel321 30:91af74a299e1 2 #define CAN_RXIDS_H
pspatel321 30:91af74a299e1 3
pspatel321 39:ddf38df9699e 4 #define RX_ID_BASE 0x580 // Start at 0x500 for this device
pspatel321 33:6bc82b6b62e5 5
pspatel321 38:8efacce315ae 6 // Receive Command IDs
pspatel321 38:8efacce315ae 7 // 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
pspatel321 39:ddf38df9699e 8 #define RESET_RX_ID RX_ID_BASE + 0x00 // Reset over CAN
pspatel321 39:ddf38df9699e 9 #define RESETCLEAR_RX_ID RX_ID_BASE + 0x01 // Clear all errors and then reset, clean slate startup
pspatel321 39:ddf38df9699e 10 #define CLEAR_RX_ID RX_ID_BASE + 0x02 // Clear a freeze frame error (0), clear every fault (1)
pspatel321 39:ddf38df9699e 11 #define TIME_RX_ID RX_ID_BASE + 0x03 // Change the time (MM DD YY HH MM SS - 6 bytes)
pspatel321 39:ddf38df9699e 12 #define PROFILE_RX_ID RX_ID_BASE + 0x04 // Byte[0] = load/write Byte[1] = profile #
pspatel321 38:8efacce315ae 13
pspatel321 39:ddf38df9699e 14 #define FAN_CONTROL_RX_ID RX_ID_BASE + 0x10
pspatel321 39:ddf38df9699e 15 #define PUMP_CONTROL_RX_ID RX_ID_BASE + 0x11
pspatel321 39:ddf38df9699e 16 #define SOC_RX_ID RX_ID_BASE + 0x12 // Change the current SOC to some float from 0 to 1
pspatel321 39:ddf38df9699e 17 #define AH_RX_ID RX_ID_BASE + 0x13 // Change the current ampHours to some float from 0 to capacity
pspatel321 31:7eaa5e881b56 18
pspatel321 38:8efacce315ae 19 // Profile Data Change Requests
pspatel321 38:8efacce315ae 20 #define PROFILE_CHARGECURRENT_RX_ID RX_ID_BASE + 0x20
pspatel321 38:8efacce315ae 21 #define PROFILE_DISCHARGECURRENT_RX_ID RX_ID_BASE + 0x21
pspatel321 38:8efacce315ae 22 #define PROFILE_NOMINALCAPACITY_RX_ID RX_ID_BASE + 0x22
pspatel321 38:8efacce315ae 23 #define PROFILE_GLVBATTAPS_RX_ID RX_ID_BASE + 0x23
pspatel321 38:8efacce315ae 24 #define PROFILE_DCDCONTHRESHOLD_RX_ID RX_ID_BASE + 0x24
pspatel321 38:8efacce315ae 25 #define PROFILE_DCDCOVERCURRENT_RX_ID RX_ID_BASE + 0x25
pspatel321 38:8efacce315ae 26 #define PROFILE_DCDCSTARTDELAY_RX_ID RX_ID_BASE + 0x26
pspatel321 38:8efacce315ae 27 #define PROFILE_DCDCSTOPDELAY_RX_ID RX_ID_BASE + 0x27
pspatel321 38:8efacce315ae 28 #define PROFILE_DCDC_TAPS_RX_ID RX_ID_BASE + 0x28
pspatel321 38:8efacce315ae 29 #define PROFILE_IMDSTARTDELAY_RX_ID RX_ID_BASE + 0x29
pspatel321 39:ddf38df9699e 30 #define PROFILE_AMSSTARTDELAY_RX_ID RX_ID_BASE + 0x2A
pspatel321 39:ddf38df9699e 31 #define PROFILE_INTERNALOVERTEMP_RX_ID RX_ID_BASE + 0x2B
pspatel321 39:ddf38df9699e 32 #define PROFILE_CANNOACK_RX_ID RX_ID_BASE + 0x2C
pspatel321 39:ddf38df9699e 33 #define PROFILE_EXTENDSERIAL_RX_ID RX_ID_BASE + 0x2D
pspatel321 39:ddf38df9699e 34 #define PROFILE_CANTXSIZE_RX_ID RX_ID_BASE + 0x2E
pspatel321 39:ddf38df9699e 35 #define PROFILE_CANRXSIZE_RX_ID RX_ID_BASE + 0x2F
pspatel321 39:ddf38df9699e 36 #define PROFILE_SERIALBAUD_RX_ID RX_ID_BASE + 0x30
pspatel321 39:ddf38df9699e 37 #define PROFILE_SERIALTXSIZE_RX_ID RX_ID_BASE + 0x31
pspatel321 31:7eaa5e881b56 38
pspatel321 39:ddf38df9699e 39 #define RX_ID_END 0x5FF // End of SYS MGMT receive block
pspatel321 38:8efacce315ae 40
pspatel321 38:8efacce315ae 41 // Messages from other devices in the car
pspatel321 39:ddf38df9699e 42 #define CHARGER_ERR_RX_ID 0x700 // Is the charger connected?
pspatel321 39:ddf38df9699e 43 #define AMS_MODE_RX_ID 0x301 // Contains AIRs data
pspatel321 39:ddf38df9699e 44 #define GLOBAL_CAR_RESET_RX_ID 0x602 // Reset button from steering wheel
pspatel321 30:91af74a299e1 45
pspatel321 39:ddf38df9699e 46 #endif