lkdsnf;
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of COM_MNG_TMTC_SIMPLE_PL_Working by
Diff: COM_MNG_TMTC.h
- Revision:
- 102:80c911a6e736
- Parent:
- 98:fd99ddc0e0a1
- Child:
- 103:b55559925dc1
--- a/COM_MNG_TMTC.h Tue Jan 26 13:15:01 2016 +0000 +++ b/COM_MNG_TMTC.h Fri Jan 29 17:09:41 2016 +0000 @@ -40,12 +40,7 @@ // typeof tc_ptr: Base_tc // typeof temp_xxxx: uint8_t #define fill_l1_ack(tm_ptr) {\ - uint8_t temp8;\ tm_ptr->next_TM = NULL;\ - temp8 = TMID_ACK_L1;\ - PUTtmid(tm_ptr->fields, temp8);\ - temp8 = SHORT_TM_CODE;\ - PUTshort_or_long_tm(tm_ptr->fields, temp8);\ tm_ptr->TM_string[0] = TMID_ACK_L1 << 4;\ /*PENDING: PA TEMPERATURE*/\ tm_ptr->TM_string[1] = gTOTAL_INCORRECT_SIZE_TC & 0xFF;\ @@ -71,7 +66,7 @@ #define detect_ack(tm_ptr, temp_ack, tc_psc) {\ if( tm_ptr != NULL ){\ int length = TM_SHORT_SIZE;\ - if( GETshort_or_long_tm(tm_ptr->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(tm_ptr) == SHORT_TM_CODE ){\ length = TM_SHORT_SIZE;\ }\ else{\ @@ -309,10 +304,6 @@ /*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;\ - PUTshort_or_long_tm(temp_tm->fields, temp8);\ - temp8 = TMID_TCL;\ - PUTtmid((temp_tm->fields), temp8);\ temp_tm->TM_string[0] = 0x38;\ /*Frame type(1) = 0; TMID = 0111; Spare = 000*/\ temp_tm->TM_string[1] = TC_PSC;\ @@ -1102,10 +1093,6 @@ ackl234new->next_TM = NULL;\ /*return telemetry pointer here*/\ tm_ptr = ackl234new;\ - temp8 = SHORT_TM_CODE;\ - PUTshort_or_long_tm(ackl234new->fields, temp8);\ - temp8 = TMID_ACK_L234;\ - PUTtmid((ackl234new->fields), temp8);\ ackl234new->TM_string[0] = TMID_ACK_L234 << 4;\ ackl234new->TM_string[1] = GETpacket_seq_count(tc_ptr);\ ackl234new->TM_string[2] = 0xA0;\ @@ -1122,11 +1109,6 @@ ackl234old->next_TM = NULL;\ /*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*/\ - uint8_t y = (gLAST_TM[0] & 0xF0) >> 4;\ - PUTtmid((ackl234old->fields), y);\ for( int i = 0 ; i < TM_SHORT_SIZE ; ++i ){\ ackl234old->TM_string[i] = gLAST_TM[i];\ }\ @@ -1136,11 +1118,6 @@ tempLongTM->next_TM = NULL;\ /*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*/\ - uint8_t y = (gLAST_TM[0] & 0x78) >> 3;\ - PUTtmid((tempLongTM->fields), y);\ for( int i = 0 ; i < TM_LONG_SIZE ; ++i ){\ tempLongTM->TM_string[i] = gLAST_TM[i];\ }\ @@ -1166,10 +1143,6 @@ Base_tm* call_sign_tm = new Short_tm;\ call_sign_tm->next_TM = NULL;\ tm_ptr = call_sign_tm;\ - uint8_t temp8 = TMID_CALL_SIGN;\ - PUTtmid(call_sign_tm->fields, temp8);\ - temp8 = SHORT_TM_CODE;\ - PUTshort_or_long_tm(call_sign_tm->fields, temp8);\ for( int i = 0 ; i < TM_SHORT_SIZE ; ++i ){\ call_sign_tm->TM_string[i] = gCALL_SIGN_STRING[i];\ }\ @@ -1217,7 +1190,7 @@ obosc_tm_current = obosc_tm_head;\ while( obosc_tm_current != NULL ){\ int length = TM_SHORT_SIZE;\ - if( GETshort_or_long_tm(obosc_tm_current->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(obosc_tm_current) == SHORT_TM_CODE ){\ length = TM_SHORT_SIZE;\ }\ else{\ @@ -1290,7 +1263,7 @@ tm_ptr = tm_ptr_head;\ while( tm_ptr != NULL ){\ int length = TM_SHORT_SIZE;\ - if( GETshort_or_long_tm(tm_ptr->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(tm_ptr) == SHORT_TM_CODE ){\ length = TM_SHORT_SIZE;\ }\ else{\ @@ -1389,7 +1362,7 @@ }\ /*update last executed L1_ack*/\ if( put_tm_here != NULL ){\ - if( GETshort_or_long_tm(put_tm_here->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(put_tm_here) == SHORT_TM_CODE ){\ for(int i = 0 ; i < TM_SHORT_SIZE ; ++i){\ gLAST_TM[i] = put_tm_here->TM_string[i];\ gLAST_TM_SHORT_OR_LONG = SHORT_TM_CODE;\ @@ -1425,7 +1398,7 @@ tm_ptr = tm_ptr_head;\ while( tm_ptr != NULL ){\ int length = TM_SHORT_SIZE;\ - if( GETshort_or_long_tm(tm_ptr->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(tm_ptr) == SHORT_TM_CODE ){\ length = TM_SHORT_SIZE;\ }\ else{\ @@ -1500,7 +1473,7 @@ }\ /*update last executed L1_ack*/\ if( put_tm_here != NULL ){\ - if( GETshort_or_long_tm(put_tm_here->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(put_tm_here) == SHORT_TM_CODE ){\ for(int i = 0 ; i < TM_SHORT_SIZE ; ++i){\ gLAST_TM[i] = put_tm_here->TM_string[i];\ gLAST_TM_SHORT_OR_LONG = SHORT_TM_CODE;\ @@ -1537,7 +1510,7 @@ tm_ptr = tm_ptr_head;\ while( tm_ptr != NULL ){\ int length = TM_SHORT_SIZE;\ - if( GETshort_or_long_tm(tm_ptr->fields) == SHORT_TM_CODE ){\ + if( GETshort_or_long_tm(tm_ptr) == SHORT_TM_CODE ){\ length = TM_SHORT_SIZE;\ }\ else{\