Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Files at this revision

API Documentation at this revision

Comitter:
aniruddhv
Date:
Thu Dec 31 11:49:42 2015 +0000
Parent:
10:414fde3ef107
Child:
13:615e842073dd
Commit message:
Removed Print statements

Changed in this revision

COM_MNG_TMTC.h Show annotated file Show diff for this revision Revisions of this file
COM_POWER_OFF_TX.h Show annotated file Show diff for this revision Revisions of this file
COM_POWER_ON_TX.h Show annotated file Show diff for this revision Revisions of this file
COM_RCV_TC.h Show annotated file Show diff for this revision Revisions of this file
ThreadsAndFunctions.h Show annotated file Show diff for this revision Revisions of this file
--- a/COM_MNG_TMTC.h	Thu Dec 31 10:27:56 2015 +0000
+++ b/COM_MNG_TMTC.h	Thu Dec 31 11:49:42 2015 +0000
@@ -411,11 +411,11 @@
     int modify_overflow = 0x00;\
     switch( service_subtype ){\
         case OBOSC_SUB_DISABLE:\
-            gPC.puts("target psc are ");\
+            /*gPC.puts("target psc are ");*/\
             for(int i = 3 ; i < 9 ; ++i){\
-                gPC.printf("%u ", tc_ptr->TC_string[i]);\
+                /*gPC.printf("%u ", tc_ptr->TC_string[i]);*/\
             }\
-            gPC.puts("\r\n");\
+            /*gPC.puts("\r\n");*/\
             /*gPC.puts("disable type obosc\r\n");*/\
             while( modify_this != NULL ){\
                 if( modify_overflow < TCL_OVERFLOW_CONSTANT ){\
@@ -439,7 +439,7 @@
             }\
             break;\
         case OBOSC_SUB_RETRY:\
-            gPC.puts("retry type obosc\r\n");\
+            /*gPC.puts("retry type obosc\r\n");*/\
             while( modify_this != NULL ){\
                 if( modify_overflow < TCL_OVERFLOW_CONSTANT ){\
                     uint8_t modify_psc = GETpacket_seq_count(modify_this);\
@@ -448,7 +448,7 @@
                         if( (target_psc == modify_psc) && (target_psc != 0) ){\
                             uint16_t tempExec = TC_STATE_MARKED_RETRY;\
                             PUTexec_status( modify_this, tempExec );\
-                            gPC.puts("reqquired tc found: disable\r\n");\
+                            /*gPC.puts("reqquired tc found: disable\r\n");*/\
                             break;\
                         }\
                     }\
@@ -521,7 +521,7 @@
         /*CHANGE THE ACK CODE TO INVALID TC*/\
         ackl234new->TM_string[2] = 0xA2;\
     }\
-    gPC.puts("completed obosc\r\n");\
+    /*gPC.puts("completed obosc\r\n");*/\
 }
 
 /*tm_ptr is the next_TM of a linked list, and should have the value NULL, i.e. tm_ptr should be the next_TM pointer of thte last node */
@@ -568,7 +568,7 @@
                         if( (current_exec_status == TC_STATE_SUCCESSFULLY_EXECUTED) || (current_exec_status == TC_STATE_DISABLED) )\
                             break;\
                         else if( (current_exec_status == TC_STATE_UNEXECUTED) || (current_exec_status == TC_STATE_MARKED_RETRY) ){\
-                            gPC.printf("It is obosc: %u\r\n", execute_psc);\
+                            /*gPC.printf("It is obosc: %u\r\n", execute_psc);*/\
                             /*EXECUTION OF OBOSC TC*/\
                             /*WARNING: LARGE MEMORY UTILIZATION FOR TC-LIST-REPORT */\
                             execute_obosc_core(current_TC, obosc_tm_current->next_TM);\
@@ -629,11 +629,11 @@
                 if( (GETcrc_pass(current_TC) == 1) && (GETpacket_seq_count(current_TC) == execute_psc) ){\
                     uint8_t current_exec_status = GETexec_status(current_TC);\
                     if( (current_exec_status == TC_STATE_SUCCESSFULLY_EXECUTED) || (current_exec_status == TC_STATE_DISABLED) ){\
-                        gPC.printf("disabled or completed at %u\n", execute_psc);\
+                        /*gPC.printf("disabled or completed at %u\n", execute_psc);*/\
                         break;\
                     }\
                     else if( (current_exec_status == TC_STATE_EXECUTION_FAILED) && (GETabort_on_nack(current_TC) == 1) ){\
-                        gPC.printf("abort on nack at %u psc\r\n", execute_psc);\
+                        /*gPC.printf("abort on nack at %u psc\r\n", execute_psc);*/\
                         gMASTER_STATE = TCL_STATE_ABORTED;\
                         break;\
                     }\
@@ -642,7 +642,7 @@
                         uint8_t temp81 = 0x00;\
                         isit_sdcard(current_TC, temp81);\
                         if( temp81 == 0x00 ){\
-                            gPC.printf("non sd card at %u\r\n", execute_psc);\
+                            /*gPC.printf("non sd card at %u\r\n", execute_psc);*/\
                             /*EXECUTION OF NON SD-CARD (BOTH OBOSC and CDMS functions)*/\
                             Base_tm *tm_ptr_head = NULL;\
                             get_call_sign(tm_ptr_head);\
@@ -651,12 +651,12 @@
                             uint8_t tempPAhot = 0x00;\
                             isit_obosc(current_TC, temp82);\
                             if(temp82 == 0x01){\
-                                gPC.printf("obosc tc inside normal tc at %u\r\n", execute_psc);\
+                                /*gPC.printf("obosc tc inside normal tc at %u\r\n", execute_psc);*/\
                                 /*EXECUTION OF OBOSC TC*/\
                                 /*SKIP EXECUTION OF OBOSC HERE*/\
                             }\
                             else{\
-                                gPC.printf("cdms relay tmtc at %u\r\n", execute_psc);\
+                                /*gPC.printf("cdms relay tmtc at %u\r\n", execute_psc);*/\
                                 /*call CDMS_RLY_TMTC*/\
                                 /*CDMS_RLY_TMTC(current_TC, put_tm_here);*/\
                             }\
@@ -735,7 +735,7 @@
                             }\
                         }\
                         else{\
-                            gPC.printf("sd card at %u\r\n", execute_psc);\
+                            /*gPC.printf("sd card at %u\r\n", execute_psc);*/\
                             /*EXECUTION OF SD-CARD DATA SENDING (OBSRS)*/\
                             /*CHECK FOR HOT PA*/\
                             uint8_t tempPAhot = 0x00;\
@@ -769,7 +769,7 @@
             break;\
         }\
         else if( gMASTER_STATE == TCL_STATE_ABORTED ){\
-            gPC.puts("ABORTING DUE TO ABORT ON NACK\r\n");\
+            /*gPC.puts("ABORTING DUE TO ABORT ON NACK\r\n");*/\
             /*EXITED DUE TO ABORT ON NACK:*/\
             /*PENDING : POWER OFF COM TX*/\
             RX1M.attach(&rx_read, Serial::RxIrq);\
@@ -784,10 +784,10 @@
             gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);\
             break;\
         }\
-        gPC.printf("successflly executed %u tc\r\n", execute_psc);\
+        /*gPC.printf("successflly executed %u tc\r\n", execute_psc);*/\
     }\
     if( (gMASTER_STATE == TCL_STATE_COMPLETED) || (gFLAGS & COM_SESSION_TIMEOUT_FLAG) ){\
-        gPC.printf("completed or session timed out: %x\r\n", gMASTER_STATE);\
+        /*gPC.printf("completed or session timed out: %x\r\n", gMASTER_STATE);*/\
         /*COMPLETED EXECUTION OF TC*/\
         gMASTER_STATE = TCL_STATE_COMPLETED;\
         COM_POWER_OFF_TX;\
--- a/COM_POWER_OFF_TX.h	Thu Dec 31 10:27:56 2015 +0000
+++ b/COM_POWER_OFF_TX.h	Thu Dec 31 11:49:42 2015 +0000
@@ -1,5 +1,5 @@
 #define COM_POWER_OFF_TX {\
-    gPC.puts("Inside COM_POWER_OFF_TX\r\n");\
+    /*gPC.puts("Inside COM_POWER_OFF_TX\r\n");*/\
     /*PENDING: POWER OFF TRANSMITTER*/\
     RX1M.attach(&rx_read, Serial::RxIrq);\
     gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);\
@@ -11,5 +11,5 @@
     gFLAGS = gFLAGS & (~COM_PA_HOT_FLAG);\
     gCOM_PA_COOLING_TIMEOUT.detach();\
     gFLAGS = gFLAGS & (~COM_TX_FLAG);\
-    gPC.puts("ompleted com_power_off tx\r\n");\
+    /*gPC.puts("ompleted com_power_off tx\r\n");*/\
 }
\ No newline at end of file
--- a/COM_POWER_ON_TX.h	Thu Dec 31 10:27:56 2015 +0000
+++ b/COM_POWER_ON_TX.h	Thu Dec 31 11:49:42 2015 +0000
@@ -1,5 +1,5 @@
 #define COM_POWER_ON_TX {\
-    gPC.puts("Inside COM_POWER_ON_TX\r\n");\
+    /*gPC.puts("Inside COM_POWER_ON_TX\r\n");*/\
     if( !(gFLAGS & COM_TX_FLAG) ){\
         gFLAGS = gFLAGS | COM_TX_FLAG;\
         /*WARNING: INFINITE WHILE LOOP POSSIBLE: if standby ack received and bcn tx main status = 0*/\
@@ -100,5 +100,5 @@
             /*PENDING: RESET CDMS*/\
         }\
     }\
-    gPC.puts("COMPLETED COM_POWER_ON_TX\r\n");\
+    /*gPC.puts("COMPLETED COM_POWER_ON_TX\r\n");*/\
 }
\ No newline at end of file
--- a/COM_RCV_TC.h	Thu Dec 31 10:27:56 2015 +0000
+++ b/COM_RCV_TC.h	Thu Dec 31 11:49:42 2015 +0000
@@ -48,12 +48,12 @@
                 ++gTOTAL_VALID_TC;\
             }\
             else{\
-                gPC.puts("repeated psc short\r\n");\
+                /*gPC.puts("repeated psc short\r\n");*/\
                 ++gTOTAL_REPEATED_TC;\
             }\
         }\
         else{\
-            gPC.puts("crc fail tc short\r\n");\
+            /*gPC.puts("crc fail tc short\r\n");*/\
             ++gTOTAL_CRC_FAIL_TC;\
         }\
     }\
@@ -94,12 +94,12 @@
                 ++gTOTAL_VALID_TC;\
             }\
             else{\
-                gPC.puts("repeated psc long\r\n");\
+                /*gPC.puts("repeated psc long\r\n");*/\
                 ++gTOTAL_REPEATED_TC;\
             }\
         }\
         else{\
-            gPC.puts("crc fail tc long\r\n");\
+            /*gPC.puts("crc fail tc long\r\n");*/\
             ++gTOTAL_CRC_FAIL_TC;\
         }\
     }\
@@ -108,7 +108,7 @@
 unsigned char rx_tempString[TC_LONG_SIZE+1];
 
 void raw_data_to_tc(void){
-    gPC.puts("inside raw_data_to_tc\r\n");
+    /*gPC.puts("inside raw_data_to_tc\r\n")*/;
     bool frame_started = false;
     bool chain_started = false;
     bool flush_called = false;
@@ -260,6 +260,6 @@
     gRX_CURRENT_DATA_NODE = gRX_HEAD_DATA_NODE;
     gRX_COUNT = 0;
     
-    gPC.puts("Completed conversion of raw_data\r\n");
+    /*gPC.puts("Completed conversion of raw_data\r\n")*/;
     // PENDING: SORT THE LINKED LIST ACCORDING TO PSC VALUE
 }
\ No newline at end of file
--- a/ThreadsAndFunctions.h	Thu Dec 31 10:27:56 2015 +0000
+++ b/ThreadsAndFunctions.h	Thu Dec 31 11:49:42 2015 +0000
@@ -23,7 +23,7 @@
 
 #define reset_all {\
     Base_tc *tcp = gHEAD_NODE_TCL;\
-    gPC.puts("inside reset\r\n");\
+    /*gPC.puts("inside reset\r\n");*/\
     gFLAGS = 0x0000;\
     while(tcp != NULL){\
         Base_tc *temp = tcp->next_TC;\
@@ -52,7 +52,7 @@
     gRX_CURRENT_DATA_NODE = gRX_HEAD_DATA_NODE;\
     gRX_COUNT = 0;\
     /*PENDING : ALL GLOBAL VAARIABLES AND FLAGS*/\
-    gPC.puts("finished reset all\r\n");\
+    /*gPC.puts("finished reset all\r\n");*/\
 }
 
 #define PUT_RAW_BYTE {\
@@ -102,7 +102,7 @@
             }
         }
         else if( gFLAGS & NEW_TC_RECEIVED ){
-            gPC.puts("NEW TC RECEIVED\r\n");
+            /*gPC.puts("NEW TC RECEIVED\r\n");*/
             gFLAGS = gFLAGS & (~NEW_TC_RECEIVED);
             gFLAGS = gFLAGS | COM_MNG_TMTC_RUNNING_FLAG;
 
@@ -119,20 +119,20 @@
             gFLAGS = gFLAGS & (~COM_RX_FLAG);
 
             if( gTOTAL_VALID_TC > 0 ){
-                gPC.printf("valid TC rx: %u\r\n", gTOTAL_VALID_TC);
+                /*gPC.printf("valid TC rx: %u\r\n", gTOTAL_VALID_TC);*/
                 if( gTOTAL_VALID_TC < COM_MAX_TC_LIMIT ){
                     // CHECK WEATHER TC LIST HAS MISSING TC OR WEATHER LAST FRAME BIT IS HIGH IN THE LAST PSC-TC
-                    gPC.puts("checking for tc list complete\r\n");
+                    /*gPC.puts("checking for tc list complete\r\n");*/
                     uint8_t tempContinue = 0xFF;
                     continueToExecute(tempContinue);
                     if(tempContinue == 0x00){
-                        gPC.puts("tc list is complete\r\n");
+                        /*gPC.puts("tc list is complete\r\n");*/
                         // CHECK WEATHER GS VERIFICATION CODE MATCHES
                         uint8_t tempGSver = 0x00;
                         GScodeVerification(tempGSver);
                         /*PENDING: INCLUDE GS VERIFICATION CODE*/
                         if( true ){
-                            gPC.puts("GC code match !!\r\n");
+                            /*gPC.puts("GC code match !!\r\n");*/
                             gFLAGS = gFLAGS | COM_SESSION_VALIDITY;
                             COM_POWER_ON_TX;
                             // PENDING: PA HOT HANDLED IN EXECUTE_XXX FUNCTIONS
@@ -141,10 +141,10 @@
                             if( tempPAHot == 0xFF ){
                                 gFLAGS = gFLAGS & ~(COM_PA_HOT_FLAG);
                                 gCOM_PA_COOLING_TIMEOUT.detach();
-                                gPC.puts("EXECUTING TELECOMMANDS\r\n");
+                                /*gPC.puts("EXECUTING TELECOMMANDS\r\n");*/
                                 EXECUTE_OBOSC_ONLY;
                                 EXECUTE_TC;
-                                gPC.puts("COMPLETED EXECUTION\r\n");
+                                /*gPC.puts("COMPLETED EXECUTION\r\n");*/
                             }
                             else{
                                 gFLAGS = gFLAGS | COM_PA_HOT_FLAG;
@@ -155,7 +155,7 @@
                             }
                         }
                         else{
-                            gPC.puts("GS code mismatch !!\r\n");
+                            /*gPC.puts("GS code mismatch !!\r\n");*/
                             RX1M.attach(&rx_read, Serial::RxIrq);
                             reset_all;
                             gFLAGS = gFLAGS & (~COM_SESSION_VALIDITY);
@@ -166,16 +166,16 @@
                         }
                     }
                     else{
-                        gPC.puts("tc list is not complete\r\n");
+                        /*gPC.puts("tc list is not complete\r\n");*/
                         if(tempContinue & 0x01){
-                            gPC.puts("last packet bit not found\r\n");
+                            /*gPC.puts("last packet bit not found\r\n");*/
                         }
                         if( tempContinue & 0x02 ){
-                            gPC.puts("missing psc found\r\n");
+                            /*gPC.puts("missing psc found\r\n");*/
                         }
-                        gPC.printf("crc fail tc = %u\r\n", gTOTAL_CRC_FAIL_TC);
-                        gPC.printf("incorrect size tc = %u\r\n", gTOTAL_INCORRECT_SIZE_TC);
-                        gPC.printf("repeated psc = %u\r\n", gTOTAL_REPEATED_TC);
+                        /*gPC.printf("crc fail tc = %u\r\n", gTOTAL_CRC_FAIL_TC);*/
+                        /*gPC.printf("incorrect size tc = %u\r\n", gTOTAL_INCORRECT_SIZE_TC);*/
+                        /*gPC.printf("repeated psc = %u\r\n", gTOTAL_REPEATED_TC);*/
                         Base_tc *test_tc = gHEAD_NODE_TCL;
                         while( test_tc != NULL ){
                             int length = 0;
@@ -185,13 +185,13 @@
                             else{
                                 length = TC_LONG_SIZE;
                             }
-                            for(int i = 0 ; i < length ; ++i ){
+                            /*for(int i = 0 ; i < length ; ++i ){
                                 gPC.printf("%x ", test_tc->TC_string[i]);
                             }
-                            gPC.puts("\r\n");
+                            gPC.puts("\r\n");*/
                             test_tc = test_tc->next_TC;
                         }
-                        gPC.puts("\r\n");
+                        /*gPC.puts("\r\n");*/
                         COM_POWER_ON_TX;
                         // PENDING : POWER OFF TX
                         RX1M.attach(&rx_read, Serial::RxIrq);
@@ -207,7 +207,7 @@
                 }
             }
             else{
-                gPC.puts("No valid TC received\r\n");
+                /*gPC.puts("No valid TC received\r\n");*/
                 RX1M.attach(&rx_read, Serial::RxIrq);
                 gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);
                 reset_all;
@@ -217,7 +217,7 @@
             }
         }
         else if( gFLAGS & COM_PA_HOT_FLAG ){
-            gPC.puts("checking for PA hot in main\r\n");
+            /*gPC.puts("checking for PA hot in main\r\n");*/
             if( gFLAGS & COM_RX_FLAG ){
                 uint8_t tempPA = 0xFF;
                 isPAhot(tempPA);
@@ -236,7 +236,7 @@
                     gCOM_PA_COOLING_TIMEOUT.attach(&after_cooling_pa, COM_PA_COOLING_TIME_LIMIT);
                 }
                 else{
-                    gPC.puts("PA IS COOLED DOWN\r\n");
+                    /*gPC.puts("PA IS COOLED DOWN\r\n");*/
                     gFLAGS = gFLAGS & (~COM_PA_HOT_FLAG);
                     gFLAGS = gFLAGS | COM_MNG_TMTC_RUNNING_FLAG;
                     RX1M.attach(NULL);
@@ -248,7 +248,7 @@
             }
         }
         else if( gFLAGS & COM_SESSION_TIMEOUT_FLAG ){
-            gPC.puts("session timeout: resetting in main\r\n");
+            /*gPC.puts("session timeout: resetting in main\r\n");*/
             COM_POWER_OFF_TX;
             /*PENDING : ENABLE THREADS*/
             gSESSION_TIMEOUT.detach();
@@ -257,7 +257,7 @@
             reset_all;
         }
         else{
-            gPC.puts("INVALID SIGNAL RECEIVED IN MAIN\r\n");
+            /*gPC.puts("INVALID SIGNAL RECEIVED IN MAIN\r\n");*/
             // SOME INVALID SIGNAL RECEIVED
             COM_POWER_OFF_TX;
             reset_all;