Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SimpleDMA eeprom mbed-rtos mbed
Fork of CDMS_CODE_FM_28JAN2017 by
Diff: TEST_PL.h
- Revision:
- 240:946a9342a95f
- Parent:
- 239:a3a012a0fecc
diff -r a3a012a0fecc -r 946a9342a95f TEST_PL.h
--- a/TEST_PL.h Thu Jul 07 17:25:37 2016 +0000
+++ b/TEST_PL.h Thu Jul 07 18:43:12 2016 +0000
@@ -233,6 +233,15 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
#define test_schedule_2(test_tm_ptr) {\
Base_tc *test_tc = new Long_tc;\
@@ -247,6 +256,15 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
#define test_schedule_3(test_tm_ptr) {\
Base_tc *test_tc = new Long_tc;\
@@ -261,6 +279,15 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
#define test_schedule_4(test_tm_ptr) {\
Base_tc *test_tc = new Long_tc;\
@@ -275,6 +302,15 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
#define test_schedule_5(test_tm_ptr) {\
Base_tc *test_tc = new Long_tc;\
@@ -289,6 +325,15 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
#define test_schedule_6(test_tm_ptr) {\
Base_tc *test_tc = new Long_tc;\
@@ -303,6 +348,15 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
#define test_schedule_F(test_tm_ptr) {\
Base_tc *test_tc = NULL;\
@@ -323,6 +377,7 @@
test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
+ delete test_tc;\
}
void send_verify_0xF(Base_tm* test_tm_ptr)
{
@@ -330,8 +385,8 @@
uint8_t j=0,tm_data_err_count=0;
Base_tm* temp_ptr;
test_schedule_F(test_tm_ptr);
- //gPC.printf("\n\r----------------------------------------------------------------------------------");
- //gPC.printf("\n\rTC_Schedule_Report(0xF):\n");
+ gPC.printf("\n\r----------------------------------------------------------------------------------");
+ gPC.printf("\n\rTC_Schedule_Report(0xF):\n");
temp_ptr=test_tm_ptr;
while(temp_ptr!=NULL)
{
@@ -389,7 +444,15 @@
{
gPC.printf("\n\rNo errors in TM Data(0xF)");
}
- //gPC.printf("\n\r----------------------------------------------------------------------------------");
+ gPC.printf("\n\r----------------------------------------------------------------------------------");
+ Base_tm *temp;\
+ temp = test_tm_ptr;\
+ while(test_tm_ptr!=NULL)\
+ {\
+ temp = temp->next_TM;\
+ delete test_tm_ptr;\
+ test_tm_ptr = temp;\
+ }\
}
void verify_extracted(uint8_t c)
{
@@ -426,7 +489,6 @@
uint32_t temp_pl_block[192] = {0};
uint8_t wrong_modify=0,z;
Base_tm* test_tm_ptr;
- //Base_tm* temp;
for(z=0;z<192;z++)
pl_block[z] = 0xFFFFFFFF;
// testing 0xF
@@ -435,8 +497,8 @@
temp_pl_block[z] = pl_block[z];
//testing TC = 0x1,0x2...0x6
- uint8_t w =1;
- for(uint8_t v=1;w<2;w++)
+ int w =1;
+ for(uint8_t v=1;w<1000;w++)
{
/*switch(v)
{
@@ -453,6 +515,7 @@
case 6: test_schedule_6(test_tm_ptr);
break;
}*/
+ gPC.printf("\n\rIndex:%d",w);
if(v==1)
{
test_schedule_1(test_tm_ptr);
@@ -506,7 +569,7 @@
verify_extracted(v);
for(z=0;z<192;z++)
temp_pl_block[z] = pl_block[z];
- wait(1);
+ //wait(1);
}
gPC.printf("\n\rTesting TC_TM block processing complete");
}
\ No newline at end of file
