![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Repository for testing ADF code of COM_TMTC_SIMPLE
Fork of COM_MNG_TMTC_SIMPLE by
Diff: COM_RCV_TC.h
- Revision:
- 2:2caf2a9a13aa
- Parent:
- 0:f016e9e8d48b
--- a/COM_RCV_TC.h Mon Dec 14 12:04:01 2015 +0000 +++ b/COM_RCV_TC.h Tue Dec 22 06:09:48 2015 +0000 @@ -7,7 +7,7 @@ tc_type = 1;\ }\ else{\ - ++rx_incorrectSizedTCcount;\ + ++gTOTAL_INCORRECT_SIZE_TC;\ }\ if( tc_type == 0 ){\ uint16_t crc_checksum = crc16_gen(rx_tempString, TC_SHORT_SIZE-2);\ @@ -44,6 +44,9 @@ PUTexec_status(gLAST_NODE_TCL, temp16);\ ++gTOTAL_VALID_TC;\ }\ + else{\ + ++gTOTAL_REPEATED_TC;\ + }\ }\ else{\ ++gTOTAL_CRC_FAIL_TC;\ @@ -84,6 +87,9 @@ PUTexec_status(gLAST_NODE_TCL, temp16);\ ++gTOTAL_VALID_TC;\ }\ + else{\ + ++gTOTAL_REPEATED_TC;\ + }\ }\ else{\ ++gTOTAL_CRC_FAIL_TC;\ @@ -94,7 +100,6 @@ unsigned int rx_tc_frames = 0; unsigned char rx_tempString[TC_LONG_SIZE+1]; -uint32_t rx_incorrectSizedTCcount = 0; void raw_data_to_tc(void){ bool frame_started = false; @@ -106,7 +111,8 @@ uint8_t outState = 0; uint32_t outByte = 0; uint32_t byteCount = 0; - rx_incorrectSizedTCcount = 0; + + gTOTAL_VALID_TC = 0; gOBOSC_PSC = PSC_START_VALUE + gTOTAL_VALID_TC - 1; gOBOSC_HEAD = gLAST_NODE_TCL; @@ -231,7 +237,7 @@ ++outByte; // exceeded tc length discard if(outByte > 135){ - ++rx_incorrectSizedTCcount; + ++gTOTAL_INCORRECT_SIZE_TC; outByte = 0; } ++byteCount; @@ -250,7 +256,7 @@ gRX_HEAD_DATA_NODE = new COM_RX_DATA_NODE; gRX_HEAD_DATA_NODE->next_node = NULL; gRX_CURRENT_DATA_NODE = gRX_HEAD_DATA_NODE; - gRX_CURRENT_PTR = gRX_CURRENT_DATA_NODE->values; + gRX_COUNT = 0; if( gOBOSC_HEAD != NULL ){ gOBOSC_HEAD = gOBOSC_HEAD->next_TC;