pl ack in tmtc

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of COM_MNG_TMTC_SIMPLE_pl123 by shubham c

Revision:
107:396aa26f3fff
Parent:
69:20f09a0c3fd2
--- a/COM_MNG_TMTC.h	Sun Jan 17 14:04:08 2016 +0000
+++ b/COM_MNG_TMTC.h	Tue Feb 02 13:10:50 2016 +0000
@@ -1,4 +1,4 @@
-// 8 Jul
+/*// 8 Jul
 // did flowchart of states
 
 // handle sd card with cdms team
@@ -37,7 +37,7 @@
 }
 
 #define delete_all_tm(tm_ptr_head){\
-    /*DELETE THE TM AFTER USE*/\
+     DELETE THE TM AFTER USE \
     Base_tm *temp_tm_ptr = tm_ptr_head;\
     int overflowCountExecute = 0;\
     while(temp_tm_ptr != NULL){\
@@ -48,7 +48,7 @@
             ++overflowCountExecute;\
         }\
         else{\
-            /*PENDING: RESET CDMS*/\
+             PENDING: RESET CDMS \
             break;\
         }\
     }\
@@ -65,16 +65,16 @@
     temp8 = SHORT_TM_CODE;\
     PUTshort_or_long_tm(tm_ptr->fields, temp8);\
     tm_ptr->TM_string[0] = TMID_ACK_L1 << 4;\
-    /*PENDING: PA TEMPERATURE*/\
+     PENDING: PA TEMPERATURE \
     tm_ptr->TM_string[1] = gTOTAL_INCORRECT_SIZE_TC & 0xFF;\
     tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\
 }
 
 #define put_crc_l1_ack(tm_ptr) {\
     tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\
-    /*TC LIST STATUS*/\
+     TC LIST STATUS \
     tm_ptr->TM_string[3] |= (gMASTER_STATE << 5) & 0xE0;\
-    /*PA HOT*/\
+     PA HOT \
     if( gFLAGS & COM_PA_HOT_FLAG ){\
         tm_ptr->TM_string[3] |= (1 << 4);\
     }\
@@ -104,7 +104,7 @@
                 temp_ack = 0x01;\
             else{\
                 temp_ack = 0x00;\
-                /*CHECK FOR NACK CODE: CRC FAIL NACK*/\
+                 CHECK FOR NACK CODE: CRC FAIL NACK \
                 temp8 = tm_ptr->TM_string[TM_ACK_CODE_INDEX];\
                 temp8 = temp8 & 0x0F;\
                 if( temp8 == CRC_FAIL_NACK_CODE ){\
@@ -139,7 +139,7 @@
 }
 
 #define isPAhot(returnHere){\
-    /*PENDING : COMPLETE THIS FUNCTION*/\
+     PENDING : COMPLETE THIS FUNCTION \
     returnHere = 0xFF;\
 }
 
@@ -147,22 +147,22 @@
     gCOM_MNG_TMTC_THREAD->signal_set(COM_MNG_TMTC_SIGNAL_UART_INT);
 }
 
-/*
+ 
 @brief:     check for missing tc, also check crc, i.e. 
             if true execution can be started else have to wait
             decide the next state
 @param:     none
 @return:    bool indicating whether there are missing tc
-*/
+ 
 // PENDING: LAST FRAME BIT
-/*
+ 
 for loop: check for missing tc
 if: check for incorrect sized tc
 if: check for last frame bit
-*/
+ 
 #define continueToExecute(returnHere) {\
     uint8_t tempReturn = 0x00;\
-    /*search for missing psc*/\
+     search for missing psc \
     for(uint8_t p = 0x00 ; p < (gTOTAL_VALID_TC) ; ++p){\
         bool flag = false;\
         Base_tc *node_ptr = gHEAD_NODE_TCL;\
@@ -180,7 +180,7 @@
             break;\
         }\
     }\
-    /*search for last packet bit*/\
+     search for last packet bit \
     tempReturn = tempReturn + 0x01;\
     Base_tc *tcp = gHEAD_NODE_TCL;\
     while(tcp != NULL){\
@@ -193,7 +193,7 @@
         tcp = tcp->next_TC;\
     }\
     returnHere = tempReturn;\
-    /*UPDATE gMASTER STATE*/\
+     UPDATE gMASTER STATE \
     if( (returnHere == 0x00) ){\
         if( (gMASTER_STATE == TCL_STATE_INCOMPLETE) || (gMASTER_STATE == TCL_STATE_COMPLETED) || (gMASTER_STATE == TCL_STATE_ABORTED) ){\
             gMASTER_STATE = TCL_STATE_EXECUTING;\
@@ -206,17 +206,17 @@
     }\
 }
 
-/*
+ 
 return 1 if code match
 return 0 if code mismatch
-*/
+ 
 #define GScodeVerification(returnHere){\
     Base_tc *testTC = gHEAD_NODE_TCL;\
     uint16_t overflowCount = 0;\
     returnHere = 0xFF;\
     while( (overflowCount < TCL_OVERFLOW_CONSTANT) && (testTC != NULL) ){\
         if( (GETpacket_seq_count(testTC) == PSC_CALLSIGN) && (GETapid(testTC) == APID_CALLSIGN) ){\
-            /*uint8_t temp8 = testTC->TC_string[1];*/\
+             uint8_t temp8 = testTC->TC_string[1]; \
             if( true ){\
                 for( int i = 2 ; i <= 8 ; ++i ){\
                     if( testTC->TC_string[i] != gGSCODE[i-2] ){\
@@ -232,37 +232,37 @@
     }\
 }
 
-/*
+ 
 @brief:     DELETE THE CRC FAILED TC FROM THE LIST TO FREE-UP MEMORY AND UPDATE 
             THE TOTAL VALID TC AND GENERATE L1_ACK_TM
 @param:     none
 @return:    none
-*/
-/*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 */
+ 
+ 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  
 #define get_ack_l1( tm_ptr ){\
     Base_tc *current_TC = gHEAD_NODE_TCL;\
     Base_tm *l1_ack = new Short_tm;\
-    /*APPEND TO THE tm_ptr HERE*/\
+     APPEND TO THE tm_ptr HERE \
     tm_ptr = l1_ack;\
     fill_l1_ack(l1_ack);\
     int TC_count = 0;\
     int overflowCountL1 = 0;\
     while(current_TC != NULL){\
         if( overflowCountL1 < TCL_OVERFLOW_CONSTANT ){\
-            /*IF CRC PASS*/\
+             IF CRC PASS \
             if( (GETcrc_pass(current_TC) == 1) ){\
                 if(TC_count > 4){\
-                    /*PENDING: FILL TC_EXEC_CODE, APPEND CRC TO THE TM*/\
+                     PENDING: FILL TC_EXEC_CODE, APPEND CRC TO THE TM \
                     put_crc_l1_ack( l1_ack );\
-                    /*extend the TM linked list*/\
+                     extend the TM linked list \
                     TC_count = 0;\
                     l1_ack->next_TM = new Short_tm;\
                     l1_ack = l1_ack->next_TM;\
                     fill_l1_ack(l1_ack);\
                 }\
-                /*PSC starts from 7th byte*/\
+                 PSC starts from 7th byte \
                 l1_ack->TM_string[6+TC_count] = GETpacket_seq_count(current_TC);\
-                /*TC exec status*/\
+                 TC exec status \
                 switch(TC_count){\
                     case 0:\
                         l1_ack->TM_string[3] = (GETexec_status(current_TC)) & 0x0F;\
@@ -285,11 +285,11 @@
             ++overflowCountL1;\
         }\
         else{\
-            /*PENDING: RESET CDMS*/\
+             PENDING: RESET CDMS \
             break;\
         }\
     }\
-    /*FILL UP THE REMAINING FIELDS WITH 0x00 as PSC, AND 0xF as tc exec status*/\
+     FILL UP THE REMAINING FIELDS WITH 0x00 as PSC, AND 0xF as tc exec status \
     if( (TC_count < 5) && (TC_count != 0) ){\
         while(TC_count < 5){\
             l1_ack->TM_string[6+TC_count] = 0x00;\
@@ -312,7 +312,7 @@
     put_crc_l1_ack(l1_ack);\
 }
 
-/*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 */
+ 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  
 #define get_tc_list(tm_ptr, thePSC){\
     uint8_t TM_PSC = 0xFF;\
     uint8_t TC_PSC = thePSC;\
@@ -324,7 +324,7 @@
     while( temp_tc != NULL ){\
         if( overflowCount < TCL_OVERFLOW_CONSTANT ){\
             TM_PSC = TM_PSC + 1;\
-            /*Increment TM_PSC for every new TM pointer created*/\
+             Increment TM_PSC for every new TM pointer created \
             Base_tm *temp_tm = new Long_tm;\
             temp_tm->next_TM = NULL;\
             uint8_t temp8 = LONG_TM_CODE;\
@@ -332,7 +332,7 @@
             temp8 = TMID_TCL;\
             PUTtmid((temp_tm->fields), temp8);\
             temp_tm->TM_string[0] = 0x38;\
-            /*Frame type(1) = 0; TMID = 0111; Spare = 000*/\
+             Frame type(1) = 0; TMID = 0111; Spare = 000 \
             temp_tm->TM_string[1] = TC_PSC;\
             temp_tm->TM_string[3] = TM_PSC;\
             int indexCustom = 4, num_of_short_tc = 0;\
@@ -344,36 +344,36 @@
                         }\
                         indexCustom = indexCustom + TC_SHORT_SIZE;\
                         ++overflowCount;\
-                        /*INCREMENT STUFF*/\
+                         INCREMENT STUFF \
                         temp_tc = temp_tc->next_TC;\
                         num_of_short_tc = num_of_short_tc + 1;\
                         if (temp_tc == NULL){\
                             for (int i = indexCustom ; i < TM_LONG_SIZE-2 ; ++i){\
                                 temp_tm->TM_string[i] = 0;\
-                                /*Fill remaining values with 0*/\
+                                 Fill remaining values with 0 \
                             }\
                             TC_LIST_TAG = num_of_short_tc;\
                             break;\
                         }\
                         if( (GETshort_or_long_tc(temp_tc) == LONG_TC_CODE) || (num_of_short_tc == OBOSC_TCL_MAX_SHORT_SIZE) ){\
-                            /*Next TC is long or memory is filled*/\
+                             Next TC is long or memory is filled \
                             for(int i = indexCustom; i < TM_LONG_SIZE-2 ; ++i){\
                                 temp_tm->TM_string[i] = 0;\
-                                /*Fill remaining values with 0*/\
+                                 Fill remaining values with 0 \
                             }\
                             TC_LIST_TAG = num_of_short_tc;\
                             break;\
                         }\
                     }\
                     else if (TC_LIST_TAG == OBOSC_TCL_TAG_LONG_FIRST_HALF){\
-                        /*Long TC, 2nd half*/\
+                         Long TC, 2nd half \
                         for (int i = 0; i < OBOSC_LONG_TC_SECOND_HALF_SIZE ; ++i){\
                             temp_tm->TM_string[indexCustom + i] = temp_tc->TC_string[OBOSC_LONG_TC_FIRST_HALF_SIZE + i];\
-                            /*Fill the TM with TC_values*/\
+                             Fill the TM with TC_values \
                         }\
                         for (int i = OBOSC_LONG_TC_SECOND_HALF_SIZE + indexCustom ; i < TM_LONG_SIZE-2 ; ++i ){\
                             temp_tm->TM_string[i] = 0;\
-                            /*Fill remaining values with 0*/\
+                             Fill remaining values with 0 \
                         }\
                         temp_tc = temp_tc->next_TC;\
                         TC_LIST_TAG = OBOSC_TCL_TAG_LONG_SECOND_HALF;\
@@ -381,31 +381,31 @@
                         break;\
                     }\
                     else{\
-                        /*Long TC, 1st half */\
+                         Long TC, 1st half  \
                         for (int i = 0; i < OBOSC_LONG_TC_FIRST_HALF_SIZE; ++i){\
-                            /*gPC.printf("indexCustom = %d\r\n", indexCustom);*/\
+                             gPC.printf("indexCustom = %d\r\n", indexCustom); \
                             temp_tm->TM_string[indexCustom + i] = temp_tc->TC_string[i];\
-                            /*Fill the TM with TC_values*/\
+                             Fill the TM with TC_values \
                         }\
                         for (int i = OBOSC_LONG_TC_FIRST_HALF_SIZE + indexCustom ; i < TM_LONG_SIZE-2 ; ++i ){\
                             temp_tm->TM_string[i] = 0;\
-                            /*Fill remaining values with 0*/\
+                             Fill remaining values with 0 \
                         }\
                         TC_LIST_TAG = OBOSC_TCL_TAG_LONG_FIRST_HALF;\
                         break;\
                     }\
                 }\
                 else{\
-                    /*PENDING: reset cdms*/\
+                     PENDING: reset cdms \
                     break;\
                 }\
             }\
             temp_tm->TM_string[2] = TC_LIST_TAG;\
-            /*TC_LIST_TAG as is updated in the inner while loop*/\
+             TC_LIST_TAG as is updated in the inner while loop \
             uint16_t crc16 = crc16_gen(temp_tm->TM_string, TM_LONG_SIZE-2);\
             temp_tm->TM_string[TM_LONG_SIZE-2] = (crc16 & 0xFF00) >> 8 ;\
             temp_tm->TM_string[TM_LONG_SIZE-1] = crc16 & 0x00FF;\
-            /*Attach this new node to the TM linked list*/\
+             Attach this new node to the TM linked list \
             if( first_time ){\
                 first_time = false;\
                 tm_ptr = temp_tm;\
@@ -415,10 +415,10 @@
                 current_tm->next_TM = temp_tm;\
                 current_tm = current_tm->next_TM;\
             }\
-            /*Attach this new node at the end*/\
+             Attach this new node at the end \
         }\
         else{\
-            /*PENDING: reset CDMS*/\
+             PENDING: reset CDMS \
             break;\
         }\
     }\
@@ -1065,16 +1065,16 @@
     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("disable type obosc\r\n");*/\
+             gPC.puts("\r\n"); \
+             gPC.puts("disable type obosc\r\n"); \
             while( modify_this != NULL ){\
                 if( modify_overflow < TCL_OVERFLOW_CONSTANT ){\
                     uint8_t modify_psc = GETpacket_seq_count(modify_this);\
-                    /*gPC.printf("mosify_psc = %u\r\n", modify_psc);*/\
+                     gPC.printf("mosify_psc = %u\r\n", modify_psc); \
                     for( int i = 3 ; i < 9 ; ++i ){\
                         uint8_t target_psc = tc_ptr->TC_string[i];\
                         if( (target_psc == modify_psc) && (target_psc != 0) ){\
@@ -1087,13 +1087,13 @@
                     ++modify_overflow;\
                 }\
                 else{\
-                    /*PENDING: RESET CDMS*/\
+                     PENDING: RESET CDMS \
                     break;\
                 }\
             }\
             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);\
@@ -1102,7 +1102,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;\
                         }\
                     }\
@@ -1110,7 +1110,7 @@
                     ++modify_overflow;\
                 }\
                 else{\
-                    /*PENDING: RESET CDMS*/\
+                     PENDING: RESET CDMS \
                     break;\
                 }\
             }\
@@ -1118,7 +1118,7 @@
     }\
     Base_tm *ackl234new = new Short_tm;\
     ackl234new->next_TM = NULL;\
-    /*return telemetry pointer here*/\
+     return telemetry pointer here \
     tm_ptr = ackl234new;\
     temp8 = SHORT_TM_CODE;\
     PUTshort_or_long_tm(ackl234new->fields, temp8);\
@@ -1133,16 +1133,16 @@
     uint16_t crc = crc16_gen(ackl234new->TM_string, TM_SHORT_SIZE-2);\
     ackl234new->TM_string[11] = (crc & 0xFF00) >> 8;\
     ackl234new->TM_string[12] = crc & 0x00FF;\
-    /*ack l234 old*/\
+     ack l234 old \
     if( service_subtype == OBOSC_SUB_REP_LE ){\
         if( gLAST_TM_SHORT_OR_LONG == SHORT_TM_CODE ){\
             Base_tm *ackl234old = new Short_tm;\
             ackl234old->next_TM = NULL;\
-            /*APPEND TO ACK L234 NEW HERE*/\
+             APPEND TO ACK L234 NEW HERE \
             ackl234new->next_TM = ackl234old;\
             uint8_t temp82 = TM_SHORT_SIZE;\
             PUTshort_or_long_tm(ackl234old->fields, temp82);\
-            /*TMID FOR SHORT TM*/\
+             TMID FOR SHORT TM \
             uint8_t y = (gLAST_TM[0] & 0xF0) >> 4;\
             PUTtmid((ackl234old->fields), y);\
             for( int i = 0 ; i < TM_SHORT_SIZE ; ++i ){\
@@ -1152,11 +1152,11 @@
         else{\
             Base_tm *tempLongTM = new Long_tm;\
             tempLongTM->next_TM = NULL;\
-            /*APPEND TO ACK L234 NEW HERE*/\
+             APPEND TO ACK L234 NEW HERE \
             ackl234new->next_TM = tempLongTM;\
             uint8_t temp82 = TM_LONG_SIZE;\
             PUTshort_or_long_tm(tempLongTM->fields, temp82);\
-            /*TMID FOR LONG TM*/\
+             TMID FOR LONG TM \
             uint8_t y = (gLAST_TM[0] & 0x78) >> 3;\
             PUTtmid((tempLongTM->fields), y);\
             for( int i = 0 ; i < TM_LONG_SIZE ; ++i ){\
@@ -1168,18 +1168,18 @@
         get_tc_list(ackl234new->next_TM, GETpacket_seq_count(tc_ptr));\
     }\
     else if( service_subtype == OBOSC_SUB_RESET ){\
-        /*reset_all;*/\
+         reset_all; \
         reset_flag = 1;\
-        /*PENDING: VERIFY reset_all, RESET CDMS*/\
+         PENDING: VERIFY reset_all, RESET CDMS \
     }\
     else if( (service_subtype != OBOSC_SUB_DISABLE) && (service_subtype != OBOSC_SUB_RETRY) ){\
-        /*CHANGE THE ACK CODE TO INVALID TC*/\
+         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 */
+ 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  
 #define get_call_sign(tm_ptr) {\
     Base_tm* call_sign_tm = new Short_tm;\
     call_sign_tm->next_TM = NULL;\
@@ -1206,7 +1206,7 @@
             ++overflowCountOBONLY;\
         }\
         else{\
-            /*PENDING: RESET CDMS*/\
+             PENDING: RESET CDMS \
             break;\
         }\
     }\
@@ -1217,7 +1217,7 @@
         while( current_TC != NULL ){\
             if( overCount < TCL_OVERFLOW_CONSTANT ){\
                 if( (GETcrc_pass(current_TC) == 1) && (GETpacket_seq_count(current_TC) == execute_psc) ){\
-                    /*CHECK FOR OBOSC*/\
+                     CHECK FOR OBOSC \
                     uint8_t temp82 = 0x00;\
                     isit_obosc(current_TC, temp82);\
                     if(temp82 == 0x01){\
@@ -1225,12 +1225,12 @@
                         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);*/\
-                            /*EXECUTION OF OBOSC TC*/\
-                            /*WARNING: LARGE MEMORY UTILIZATION FOR TC-LIST-REPORT */\
+                             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, reset_flag);\
                             ++obosc_executed_count;\
-                            /*INCREMENT POINTER TO THE LAST NODE*/\
+                             INCREMENT POINTER TO THE LAST NODE \
                             int overflowCountOBinside = 0;\
                             while( obosc_tm_current->next_TM != NULL ){\
                                 if( overflowCountOBinside < TM_OVERFLOW_CONSTANT ){\
@@ -1238,7 +1238,7 @@
                                     ++overflowCountOBinside;\
                                 }\
                                 else{\
-                                    /*PENDING: RESET CDMS*/\
+                                     PENDING: RESET CDMS \
                                     break;\
                                 }\
                             }\
@@ -1251,7 +1251,7 @@
                 ++overCount;\
             }\
             else{\
-                /*PENDING: REST CDMS: MEMORY LEAK FOUND*/\
+                 PENDING: REST CDMS: MEMORY LEAK FOUND \
                 break;\
             }\
         }\
@@ -1269,11 +1269,11 @@
 
 #define EXECUTE_TC {\
     gMASTER_STATE = TCL_STATE_EXECUTING;\
-    /*gPC.printf("%u\r\n", gTOTAL_VALID_TC);*/\
+     gPC.printf("%u\r\n", gTOTAL_VALID_TC); \
     for(uint8_t execute_psc = PSC_START_VALUE ; execute_psc < gTOTAL_VALID_TC ; ++execute_psc ){\
-        /*gPC.printf("executing normal %u\r\n", execute_psc);*/\
-        /*gLEDG = !gLEDG;*/\
-        /*gLEDR = !gLEDR;*/\
+         gPC.printf("executing normal %u\r\n", execute_psc); \
+         gLEDG = !gLEDG; \
+         gLEDR = !gLEDR; \
         Base_tc* current_TC = gHEAD_NODE_TCL;\
         int overflowCount = 0;\
         while(current_TC != NULL){\
@@ -1281,14 +1281,14 @@
                 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); \
                         if( execute_psc == (gTOTAL_VALID_TC-1) ){\
                             gMASTER_STATE = TCL_STATE_COMPLETED;\
                             Base_tm *tm_ptr_head = NULL;\
                             get_call_sign(tm_ptr_head);\
                             Base_tm *tm_ptr = tm_ptr_head;\
                             get_ack_l1(tm_ptr->next_TM);\
-                            /*Send only call sign, ACK_L1*/\
+                             Send only call sign, ACK_L1 \
                             snd_tm.head_pointer(tm_ptr_head);\
                             adf_not_SDcard;\
                             delete_all_tm(tm_ptr_head);\
@@ -1296,25 +1296,25 @@
                         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;\
                         Base_tm *tm_ptr_head = NULL;\
                         get_call_sign(tm_ptr_head);\
                         Base_tm *tm_ptr = tm_ptr_head;\
                         get_ack_l1(tm_ptr->next_TM);\
-                        /*Send only call sign, ACK_L1*/\
+                         Send only call sign, ACK_L1 \
                         snd_tm.head_pointer(tm_ptr_head);\
                         adf_not_SDcard;\
                         delete_all_tm(tm_ptr_head);\
                         break;\
                     }\
                     else if( (current_exec_status == TC_STATE_UNEXECUTED) || (current_exec_status == TC_STATE_MARKED_RETRY) ){\
-                        /*EXECUTION OF TC START*/\
+                         EXECUTION OF TC START \
                         uint8_t temp81 = 0x00;\
                         isit_sdcard(current_TC, temp81);\
                         if( temp81 == 0x00 ){\
-                            /*gPC.printf("non sd card at %u\r\n", execute_psc);*/\
-                            /*EXECUTION OF NON SD-CARD (BOTH OBOSC and CDMS functions)*/\
+                             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);\
                             Base_tm *put_tm_here = NULL;\
@@ -1322,21 +1322,21 @@
                             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);*/\
-                                /*EXECUTION OF OBOSC TC*/\
-                                /*SKIP EXECUTION OF OBOSC HERE*/\
+                                 gPC.printf("obosc tc inside normal tc at %u\r\n", execute_psc); \
+                                 EXECUTION OF OBOSC TC \
+                                 SKIP EXECUTION OF OBOSC HERE \
                                 if( execute_psc == (gTOTAL_VALID_TC-1) ){\
                                     gMASTER_STATE = TCL_STATE_COMPLETED;\
                                 }\
                                 break;\
                             }\
                             else{\
-                                /*gPC.printf("cdms relay tmtc at %u\r\n", execute_psc);*/\
-                                /*call CDMS_RLY_TMTC*/\
-                                /*CDMS_RLY_TMTC(current_TC, put_tm_here);*/\
+                                 gPC.printf("cdms relay tmtc at %u\r\n", execute_psc); \
+                                 call CDMS_RLY_TMTC \
+                                 CDMS_RLY_TMTC(current_TC, put_tm_here); \
                                 put_tm_here =  FCTN_CDMS_RLY_TMTC(current_TC);\
                             }\
-                            /*DETECT ACK OR NACK*/\
+                             DETECT ACK OR NACK \
                             uint8_t temp83 = 0x00;\
                             uint8_t temp84 = GETpacket_seq_count(current_TC);\
                             detect_ack(put_tm_here, temp83, temp84);\
@@ -1345,19 +1345,19 @@
                                 PUTexec_status(current_TC, temp16);\
                             }\
                             else{\
-                                /*gPC.puts("TC_STATE_EXECUTION_FAILED");*/\
+                                 gPC.puts("TC_STATE_EXECUTION_FAILED"); \
                                 uint16_t temp16 = TC_STATE_EXECUTION_FAILED;\
                                 PUTexec_status(current_TC, temp16);\
                             }\
-                            /*ABORT ON NACK AND TC LIST COMPLETED: UPDATE IN gMASTERSTATE*/\
+                             ABORT ON NACK AND TC LIST COMPLETED: UPDATE IN gMASTERSTATE \
                             if( (GETexec_status(current_TC) == TC_STATE_EXECUTION_FAILED) && (GETabort_on_nack(current_TC) == 1) ){\
                                 gMASTER_STATE = TCL_STATE_ABORTED;\
                             }\
                             else if( execute_psc == (gTOTAL_VALID_TC-1) ){\
-                                /*LAST TC IS EXECUTED*/\
+                                 LAST TC IS EXECUTED \
                                 gMASTER_STATE = TCL_STATE_COMPLETED;\
                             }\
-                            /*update last executed L1_ack*/\
+                             update last executed L1_ack \
                             if( put_tm_here != NULL ){\
                                 if( GETshort_or_long_tm(put_tm_here->fields) == SHORT_TM_CODE ){\
                                     for(int i = 0 ; i < TM_SHORT_SIZE ; ++i){\
@@ -1372,7 +1372,7 @@
                                     }\
                                 }\
                             }\
-                            /*PENDING: APPEND ACK L1*/\
+                             PENDING: APPEND ACK L1 \
                             Base_tm *tm_ptr = tm_ptr_head;\
                             get_ack_l1(tm_ptr->next_TM);\
                             int overflowCountExecute = 0;\
@@ -1382,39 +1382,39 @@
                                     ++overflowCountExecute;\
                                 }\
                                 else{\
-                                    /*PENDING: RESET CDMS*/\
+                                     PENDING: RESET CDMS \
                                     break;\
                                 }\
                             }\
                             tm_ptr->next_TM = put_tm_here;\
-                            /*CHECK FOR HOT PA*/\
+                             CHECK FOR HOT PA \
                             isPAhot(tempPAhot);\
                             if( tempPAhot == 0x00 ){\
                                 gFLAGS = gFLAGS | COM_PA_HOT_FLAG;\
                             }\
-                            /*Send call sign, ACK_L1, NON OBSRS TM*/\
+                             Send call sign, ACK_L1, NON OBSRS TM \
                             snd_tm.head_pointer(tm_ptr_head);\
                             adf_not_SDcard;\                            
                             delete_all_tm(tm_ptr_head);\
                         }\
                         else{\
-                            /*gPC.printf("sd card at %u\r\n", execute_psc);*/\
-                            /*EXECUTION OF SD-CARD DATA SENDING (OBSRS)*/\
+                             gPC.printf("sd card at %u\r\n", execute_psc); \
+                             EXECUTION OF SD-CARD DATA SENDING (OBSRS) \
                             Base_tm *tm_ptr_head = NULL;\
                             get_call_sign(tm_ptr_head);\
                             Base_tm *put_tm_here = NULL;\
-                            /*execute_obsrs(current_TC, put_tm_here)*/\
-                            /*read_TC(current_TC);*/\
+                             execute_obsrs(current_TC, put_tm_here) \
+                             read_TC(current_TC); \
                             uint8_t tempExec = TC_STATE_SUCCESSFULLY_EXECUTED;\
                             PUTexec_status(current_TC, tempExec);\
-                            /*PENDING: ABORT ON NACK CHECK, gMASTER_STATE VERIFICATION WITH SD CARD,PA hot and session timeout, last executed ack l234*/\
+                             PENDING: ABORT ON NACK CHECK, gMASTER_STATE VERIFICATION WITH SD CARD,PA hot and session timeout, last executed ack l234 \
                             if( (GETexec_status(current_TC) == TC_STATE_EXECUTION_FAILED) && (GETabort_on_nack(current_TC) == 1) ){\
                                 gMASTER_STATE = TCL_STATE_ABORTED;\
                             }\
                             else if( execute_psc == (gTOTAL_VALID_TC-1) ){\
                                 gMASTER_STATE = TCL_STATE_COMPLETED;\
                             }\
-                            /*PENDING: APPEND ACK L1*/\
+                             PENDING: APPEND ACK L1 \
                             Base_tm *tm_ptr = tm_ptr_head;\
                             get_ack_l1(tm_ptr->next_TM);\
                             int overflowCountExecute = 0;\
@@ -1424,18 +1424,18 @@
                                     ++overflowCountExecute;\
                                 }\
                                 else{\
-                                    /*PENDING: RESET CDMS*/\
+                                     PENDING: RESET CDMS \
                                     break;\
                                 }\
                             }\
                             tm_ptr->next_TM = put_tm_here;\
-                            /*CHECK FOR HOT PA*/\
+                             CHECK FOR HOT PA \
                             uint8_t tempPAhot = 0x00;\
                             isPAhot(tempPAhot);\
                             if( tempPAhot == 0x00 ){\
                                 gFLAGS = gFLAGS | COM_PA_HOT_FLAG;\
                             }\
-                            /*Send only call sign, ACK_L1, OBSRS TM*/\
+                             Send only call sign, ACK_L1, OBSRS TM \
                             snd_tm.head_pointer(tm_ptr_head);\
                             adf_not_SDcard;\
                             delete_all_tm(tm_ptr_head);\
@@ -1447,7 +1447,7 @@
                 ++overflowCount;\
             }\
             else{\
-                /*PENDING: RESET CDMS*/\
+                 PENDING: RESET CDMS \
                 break;\
             }\
         }\
@@ -1455,32 +1455,32 @@
             break;\
         }\
         else if( gMASTER_STATE == TCL_STATE_ABORTED ){\
-            /*gPC.puts("ABORTING DUE TO ABORT ON NACK\r\n");*/\
-            /*EXITED DUE TO ABORT ON NACK:*/\
-            /*PENDING : POWER OFF COM TX*/\
+             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);\
             gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);\
             break;\
         }\
         else if( gFLAGS & COM_PA_HOT_FLAG ){\
-            /*PA HOT: WAIT FOR TIMEOUT*/\
+             PA HOT: WAIT FOR TIMEOUT \
             gCOM_PA_COOLING_TIMEOUT.attach(&after_cooling_pa, COM_PA_COOLING_TIME_LIMIT);\
-            /*PENDING : POWER OFF COMM TX*/\
+             PENDING : POWER OFF COMM TX \
             RX1M.attach(&rx_read, Serial::RxIrq);\
             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);*/\
-        /*COMPLETED EXECUTION OF TC*/\
+         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;\
         reset_all;\
-        /*PENDING : ENABLE THREADS*/\
+         PENDING : ENABLE THREADS \
         gSESSION_TIMEOUT.detach();\
         gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);\
         gFLAGS = gFLAGS & (~COM_SESSION_FLAG);\
     }\
-}
\ No newline at end of file
+}*/
\ No newline at end of file