CDMS code for testing sbc

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Revision:
214:867de6d350fa
Parent:
209:63e9c8f8b5d2
Child:
216:570251b23c7b
--- a/DefinitionsAndGlobals.h	Sat Jul 02 15:28:21 2016 +0000
+++ b/DefinitionsAndGlobals.h	Sun Jul 03 09:26:42 2016 +0000
@@ -36,10 +36,9 @@
 
 // TC LIST
     #define TCL_STATE_INCOMPLETE 0x00
-    #define TCL_STATE_ABORTED 0x03
-    #define TCL_STATE_EXECUTING 0x04   
-    #define TCL_STATE_COMPLETED 0x05
-    #define TCL_STATE_EXCEEDED_LIMIT 0x06
+    #define TCL_STATE_ABORTED 0x01
+    #define TCL_STATE_EXECUTING 0x02   
+    #define TCL_STATE_COMPLETED 0x03
 
 // LIST OF FLAGS
     #define UART_INT_FLAG 0x0001
@@ -50,6 +49,7 @@
     #define COM_SESSION_VALIDITY 0x0020
     #define ALL_CRC_PASS_FLAG 0x0040
     #define COM_PA_HOT_FLAG 0x0080
+    #define COM_PA_OC_FLAG 0x8000
     #define COM_TX_FLAG 0x0100
     #define COM_SESSION_TIMEOUT_FLAG 0x0200
     #define COM_AUTO_POWER_OFF_BAE_FLAG 0x0400
@@ -64,13 +64,14 @@
 
 // COM_MNG_TMTC THREAD
     #define SESSION_TIME_LIMIT 1500
+    #define COM_RX_DISABLE_TIMEOUT 10
     #define COM_MNG_TMTC_SIGNAL_UART_INT 0x01
     #define COM_MNG_TMTC_SIGNAL_ADF_NSD 0x02
     #define COM_MNG_TMTC_SIGNAL_ADF_SD 0x03
     #define SCIENCE_SIGNAL 0x04
 // COM_MNG_TMTC
     #define COM_PA_COOLING_TIME_LIMIT 20
-    #define COM_MAX_TC_LIMIT 200
+    #define COM_MAX_TC_LIMIT 256
     #define TM_ACK_CODE_INDEX 2
     #define CRC_FAIL_NACK_CODE 0x01
     
@@ -81,6 +82,7 @@
     // max value of telecommands in a tcl
     #define TCL_OVERFLOW_CONSTANT 256
     #define TM_OVERFLOW_CONSTANT 256
+    #define BYTE_OVERFLOW_CONSTANT 35000
 
     // starting value of packet sequence count at each pass 
     #define PSC_START_VALUE 1
@@ -159,6 +161,7 @@
 COM_RX_DATA_NODE *gRX_CURRENT_DATA_NODE = NULL;
 // uint8_t *gRX_CURRENT_PTR = NULL;
 uint32_t gRX_COUNT = 0;
+uint16_t gTOTAL_RAW_BYTES = 0;
 uint16_t gTOTAL_INCORRECT_SIZE_TC = 0x00;
 uint16_t gTOTAL_CRC_FAIL_TC = 0x00;
 uint16_t gTOTAL_REPEATED_TC = 0x00;
@@ -191,6 +194,7 @@
 Thread* gCOM_MNG_TMTC_THREAD = NULL;
 Timeout gRX_TIMEOUT;
 Timeout gSESSION_TIMEOUT;
+Timeout gCOM_RX_DISABLE;
 
 // COM_MNG_TMTC