June 30

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE by shubham c

Committer:
chaithanyarss
Date:
Sat Jul 02 13:36:18 2016 +0000
Revision:
191:d14b1c783736
Parent:
189:fba4aeebf004
;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chaithanyarss 189:fba4aeebf004 1 //F11 to exit full screen mode
chaithanyarss 189:fba4aeebf004 2 /*---------------------------------------------------------------------------
chaithanyarss 189:fba4aeebf004 3 Testing PL_MAIN
chaithanyarss 189:fba4aeebf004 4 ----------------------------------------------------------------------------*/
chaithanyarss 189:fba4aeebf004 5
chaithanyarss 189:fba4aeebf004 6
chaithanyarss 189:fba4aeebf004 7 /* Testing as per the flow chart */
chaithanyarss 189:fba4aeebf004 8 /* columns of the array schedule1[][] correspond to Year,Month,Day,Hours,Minutes,Seconds,SID and EXEC_STATUS in integer formats*/
chaithanyarss 189:fba4aeebf004 9 Base_tm* FCTN_CDMS_RLY_TMTC(Base_tc *tc_ptr);
chaithanyarss 189:fba4aeebf004 10
chaithanyarss 189:fba4aeebf004 11 extern uint8_t schedule1[32][8]=
chaithanyarss 189:fba4aeebf004 12 {
chaithanyarss 189:fba4aeebf004 13 {0,1,1,0,0,15,3,3},
chaithanyarss 189:fba4aeebf004 14 {0,1,1,0,0,45,2,3},
chaithanyarss 189:fba4aeebf004 15 {0,1,1,0,1,00,1,3},
chaithanyarss 189:fba4aeebf004 16 {0,1,1,0,1,25,0,3},
chaithanyarss 189:fba4aeebf004 17 {0,1,1,0,2,10,3,3},
chaithanyarss 189:fba4aeebf004 18 {0,1,1,0,1,50,2,3},
chaithanyarss 189:fba4aeebf004 19 {0,1,1,0,2, 0,2,3},
chaithanyarss 189:fba4aeebf004 20 {0,1,1,0,2,10,2,3},
chaithanyarss 189:fba4aeebf004 21 {0,1,1,0,2,20,2,0},
chaithanyarss 189:fba4aeebf004 22 {0,1,1,0,2,30,2,3},
chaithanyarss 189:fba4aeebf004 23
chaithanyarss 189:fba4aeebf004 24 {0,1,1,0,2,50,0,1},
chaithanyarss 189:fba4aeebf004 25 {0,1,1,0,4,10,3,3},
chaithanyarss 189:fba4aeebf004 26 {0,1,1,0,5,30,3,3},
chaithanyarss 189:fba4aeebf004 27 {0,1,1,0,4,15,2,3},
chaithanyarss 189:fba4aeebf004 28 {0,1,1,0,4,10,1,0},
chaithanyarss 189:fba4aeebf004 29 {0,1,1,0,3,10,2,3},
chaithanyarss 189:fba4aeebf004 30 {0,1,1,0,4,10,3,3},
chaithanyarss 189:fba4aeebf004 31 {0,1,1,0,5,10,0,3},
chaithanyarss 189:fba4aeebf004 32 {0,1,1,0,6,10,1,3},
chaithanyarss 189:fba4aeebf004 33 {0,1,1,0,6,20,1,2},
chaithanyarss 189:fba4aeebf004 34
chaithanyarss 189:fba4aeebf004 35 {0,1,1,0,1,40,2,3},
chaithanyarss 189:fba4aeebf004 36 {0,1,1,0,1,20,3,1},
chaithanyarss 189:fba4aeebf004 37 {0,1,1,0,1,30,3,3},
chaithanyarss 189:fba4aeebf004 38 {0,1,1,0,1,10,2,1},
chaithanyarss 189:fba4aeebf004 39 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 40 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 41 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 42 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 43 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 44 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 45
chaithanyarss 189:fba4aeebf004 46 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 47 {0,1,1,0,0, 0,0,0},
chaithanyarss 189:fba4aeebf004 48 };
chaithanyarss 189:fba4aeebf004 49
chaithanyarss 189:fba4aeebf004 50 void convert(Base_tc* test_tc)
chaithanyarss 189:fba4aeebf004 51 {
chaithanyarss 189:fba4aeebf004 52 for(uint8_t k=3;k<=127;k+=4)
chaithanyarss 189:fba4aeebf004 53 {
chaithanyarss 189:fba4aeebf004 54 /*-----------1st byte of a block----------*/
chaithanyarss 189:fba4aeebf004 55 test_tc->TC_string[k] &= 0x00;
chaithanyarss 189:fba4aeebf004 56 //setting Year (2 bits)
chaithanyarss 189:fba4aeebf004 57 //test_tc->TC_string[k] &= (~0xC0);
chaithanyarss 189:fba4aeebf004 58 test_tc->TC_string[k] |= ((schedule1[(k-3)/4][0] & 0x03)<<6);
chaithanyarss 189:fba4aeebf004 59
chaithanyarss 189:fba4aeebf004 60 //setting Month (4 bits)
chaithanyarss 189:fba4aeebf004 61 //test_tc->TC_string[k] &= (~0x3C);
chaithanyarss 189:fba4aeebf004 62 test_tc->TC_string[k] |= ((schedule1[(k-3)/4][1] & 0x0F)<<2);
chaithanyarss 189:fba4aeebf004 63
chaithanyarss 189:fba4aeebf004 64 //setting first two bits(MSB) of Day
chaithanyarss 189:fba4aeebf004 65 //test_tc->TC_string[k] &= (~0x03);
chaithanyarss 189:fba4aeebf004 66 test_tc->TC_string[k] |= ((schedule1[(k-3)/4][2] & 0x18)>>3);
chaithanyarss 189:fba4aeebf004 67 /*------------end of 1st byte-------------*/
chaithanyarss 189:fba4aeebf004 68
chaithanyarss 189:fba4aeebf004 69 /*-----------2nd byte of a block----------*/
chaithanyarss 189:fba4aeebf004 70 test_tc->TC_string[k+1] &= 0x00000000;
chaithanyarss 189:fba4aeebf004 71 //setting remaining 3 bits of Day
chaithanyarss 189:fba4aeebf004 72 //test_tc->TC_string[k+1] &= (~0xE0);
chaithanyarss 189:fba4aeebf004 73 test_tc->TC_string[k+1] |= ((schedule1[(k-3)/4][2] & 0x07)<<5);
chaithanyarss 189:fba4aeebf004 74
chaithanyarss 189:fba4aeebf004 75 //setting Hours (5 bits)
chaithanyarss 189:fba4aeebf004 76 //test_tc->TC_string[k+1] &= (~0x1F);
chaithanyarss 189:fba4aeebf004 77 test_tc->TC_string[k+1] |= ((schedule1[(k-3)/4][3] & 0x1F));
chaithanyarss 189:fba4aeebf004 78 /*------------end of 2nd byte-------------*/
chaithanyarss 189:fba4aeebf004 79
chaithanyarss 189:fba4aeebf004 80 /*-----------3rd byte of a block----------*/
chaithanyarss 189:fba4aeebf004 81 test_tc->TC_string[k+2] &= 0x00000000;
chaithanyarss 189:fba4aeebf004 82 //setting Minutes (6 bits)
chaithanyarss 189:fba4aeebf004 83 //test_tc->TC_string[k+2] &= (~0xFC);
chaithanyarss 189:fba4aeebf004 84 test_tc->TC_string[k+2] |= ((schedule1[(k-3)/4][4] & 0x3F)<<2);
chaithanyarss 189:fba4aeebf004 85
chaithanyarss 189:fba4aeebf004 86 //setting first 2 bits(MSB) of Seconds
chaithanyarss 189:fba4aeebf004 87 //test_tc->TC_string[k+2] &= (~0x03);
chaithanyarss 189:fba4aeebf004 88 test_tc->TC_string[k+2] |= ((schedule1[(k-3)/4][5] & 0x30)>>4);
chaithanyarss 189:fba4aeebf004 89 /*------------end of 3rd byte-------------*/
chaithanyarss 189:fba4aeebf004 90
chaithanyarss 189:fba4aeebf004 91 /*-----------4th byte of a block----------*/
chaithanyarss 189:fba4aeebf004 92 test_tc->TC_string[k+3] &= 0x00;
chaithanyarss 189:fba4aeebf004 93 //setting remaining 4 bits of Seconds
chaithanyarss 189:fba4aeebf004 94 //test_tc->TC_string[k+3] &= (~0xF0);
chaithanyarss 189:fba4aeebf004 95 test_tc->TC_string[k+3] |= ((schedule1[(k-3)/4][5] & 0x0F)<<4);
chaithanyarss 189:fba4aeebf004 96
chaithanyarss 189:fba4aeebf004 97 //setting STATE_ID (2 bits)
chaithanyarss 189:fba4aeebf004 98 //test_tc->TC_string[k+3] &= (~0x0C);
chaithanyarss 189:fba4aeebf004 99 test_tc->TC_string[k+3] |= ((schedule1[(k-3)/4][6] & 0x03)<<2);
chaithanyarss 189:fba4aeebf004 100
chaithanyarss 189:fba4aeebf004 101 //setting EXEC_STATUS (2 bits)
chaithanyarss 189:fba4aeebf004 102 //test_tc->TC_string[k+3] &= (~0x03);
chaithanyarss 189:fba4aeebf004 103 test_tc->TC_string[k+3] |= ((schedule1[(k-3)/4][7] & 0x03));
chaithanyarss 189:fba4aeebf004 104 /*------------end of 4th byte-------------*/
chaithanyarss 189:fba4aeebf004 105 }
chaithanyarss 189:fba4aeebf004 106 }
chaithanyarss 189:fba4aeebf004 107 /*void test_schedule_1(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 108 {
chaithanyarss 189:fba4aeebf004 109 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 110 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 111 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 112 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 113 test_tc->TC_string[2] = 0x71;
chaithanyarss 189:fba4aeebf004 114 convert(test_tc);
chaithanyarss 189:fba4aeebf004 115 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 116 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 117 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 118 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 119 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 120 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 121 }
chaithanyarss 189:fba4aeebf004 122
chaithanyarss 189:fba4aeebf004 123 void test_schedule_2(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 124 {
chaithanyarss 189:fba4aeebf004 125 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 126 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 127 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 128 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 129 test_tc->TC_string[2] = 0x72;
chaithanyarss 189:fba4aeebf004 130 convert(test_tc);
chaithanyarss 189:fba4aeebf004 131 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 132 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 133 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 134 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 135 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 136 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 137 }
chaithanyarss 189:fba4aeebf004 138
chaithanyarss 189:fba4aeebf004 139 void test_schedule_3(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 140 {
chaithanyarss 189:fba4aeebf004 141 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 142 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 143 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 144 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 145 test_tc->TC_string[2] = 0x73;
chaithanyarss 189:fba4aeebf004 146 convert(test_tc);
chaithanyarss 189:fba4aeebf004 147 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 148 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 149 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 150 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 151 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 152 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 153 }
chaithanyarss 189:fba4aeebf004 154
chaithanyarss 189:fba4aeebf004 155 void test_schedule_4(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 156 {
chaithanyarss 189:fba4aeebf004 157 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 158 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 159 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 160 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 161 test_tc->TC_string[2] = 0x74;
chaithanyarss 189:fba4aeebf004 162 convert(test_tc);
chaithanyarss 189:fba4aeebf004 163 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 164 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 165 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 166 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 167 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 168 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 169 }
chaithanyarss 189:fba4aeebf004 170
chaithanyarss 189:fba4aeebf004 171 void test_schedule_5(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 172 {
chaithanyarss 189:fba4aeebf004 173 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 174 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 175 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 176 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 177 test_tc->TC_string[2] = 0x75;
chaithanyarss 189:fba4aeebf004 178 convert(test_tc);
chaithanyarss 189:fba4aeebf004 179 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 180 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 181 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 182 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 183 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 184 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 185 }
chaithanyarss 189:fba4aeebf004 186
chaithanyarss 189:fba4aeebf004 187 void test_schedule_6(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 188 {
chaithanyarss 189:fba4aeebf004 189 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 190 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 191 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 192 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 193 test_tc->TC_string[2] = 0x76;
chaithanyarss 189:fba4aeebf004 194 convert(test_tc);
chaithanyarss 189:fba4aeebf004 195 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 196 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 197 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 198 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 199 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 200 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 201 }
chaithanyarss 189:fba4aeebf004 202
chaithanyarss 189:fba4aeebf004 203 void test_schedule_F(Base_tm *test_tm_ptr)
chaithanyarss 189:fba4aeebf004 204 {
chaithanyarss 189:fba4aeebf004 205 Base_tc *test_tc = new Long_tc;
chaithanyarss 189:fba4aeebf004 206 test_tc->next_TC = NULL;
chaithanyarss 189:fba4aeebf004 207 test_tc->TC_string[0] = 0x01;
chaithanyarss 189:fba4aeebf004 208 test_tc->TC_string[1] = 0xB2;
chaithanyarss 189:fba4aeebf004 209 test_tc->TC_string[2] = 0x7F;
chaithanyarss 189:fba4aeebf004 210 convert(test_tc);
chaithanyarss 189:fba4aeebf004 211 test_tc->TC_string[131] = 0x00;
chaithanyarss 189:fba4aeebf004 212 test_tc->TC_string[132] = 0x00;
chaithanyarss 189:fba4aeebf004 213 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);
chaithanyarss 189:fba4aeebf004 214 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;
chaithanyarss 189:fba4aeebf004 215 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);
chaithanyarss 189:fba4aeebf004 216 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);
chaithanyarss 189:fba4aeebf004 217 }*/
chaithanyarss 189:fba4aeebf004 218 #define test_schedule_1(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 219 Base_tc *test_tc = NULL;\
chaithanyarss 189:fba4aeebf004 220 if(!(test_tc = new Long_tc))\
chaithanyarss 189:fba4aeebf004 221 {\
chaithanyarss 189:fba4aeebf004 222 gPC.printf("\n\rError: out of memory");\
chaithanyarss 189:fba4aeebf004 223 return;\
chaithanyarss 189:fba4aeebf004 224 }\
chaithanyarss 189:fba4aeebf004 225 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 226 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 227 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 228 test_tc->TC_string[2] = 0x71;\
chaithanyarss 189:fba4aeebf004 229 convert(test_tc);\
chaithanyarss 189:fba4aeebf004 230 test_tc->TC_string[131] = 0x00;\
chaithanyarss 189:fba4aeebf004 231 test_tc->TC_string[132] = 0x00;\
chaithanyarss 189:fba4aeebf004 232 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 233 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 234 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 235 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 236 }
chaithanyarss 189:fba4aeebf004 237 #define test_schedule_2(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 238 Base_tc *test_tc = new Long_tc;\
chaithanyarss 189:fba4aeebf004 239 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 240 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 241 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 242 test_tc->TC_string[2] = 0x72;\
chaithanyarss 189:fba4aeebf004 243 convert(test_tc);\
chaithanyarss 189:fba4aeebf004 244 test_tc->TC_string[131] = 0x00;\
chaithanyarss 189:fba4aeebf004 245 test_tc->TC_string[132] = 0x00;\
chaithanyarss 189:fba4aeebf004 246 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 247 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 248 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 249 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 250 }
chaithanyarss 189:fba4aeebf004 251 #define test_schedule_3(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 252 Base_tc *test_tc = new Long_tc;\
chaithanyarss 189:fba4aeebf004 253 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 254 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 255 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 256 test_tc->TC_string[2] = 0x73;\
chaithanyarss 189:fba4aeebf004 257 convert(test_tc);\
chaithanyarss 189:fba4aeebf004 258 test_tc->TC_string[131] = 0x00;\
chaithanyarss 189:fba4aeebf004 259 test_tc->TC_string[132] = 0x00;\
chaithanyarss 189:fba4aeebf004 260 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 261 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 262 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 263 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 264 }
chaithanyarss 189:fba4aeebf004 265 #define test_schedule_4(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 266 Base_tc *test_tc = new Long_tc;\
chaithanyarss 189:fba4aeebf004 267 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 268 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 269 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 270 test_tc->TC_string[2] = 0x74;\
chaithanyarss 189:fba4aeebf004 271 convert(test_tc);\
chaithanyarss 189:fba4aeebf004 272 test_tc->TC_string[131] = 0x00;\
chaithanyarss 189:fba4aeebf004 273 test_tc->TC_string[132] = 0x00;\
chaithanyarss 189:fba4aeebf004 274 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 275 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 276 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 277 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 278 }
chaithanyarss 189:fba4aeebf004 279 #define test_schedule_5(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 280 Base_tc *test_tc = new Long_tc;\
chaithanyarss 189:fba4aeebf004 281 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 282 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 283 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 284 test_tc->TC_string[2] = 0x75;\
chaithanyarss 189:fba4aeebf004 285 convert(test_tc);\
chaithanyarss 189:fba4aeebf004 286 test_tc->TC_string[131] = 0x00;\
chaithanyarss 189:fba4aeebf004 287 test_tc->TC_string[132] = 0x00;\
chaithanyarss 189:fba4aeebf004 288 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 289 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 290 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 291 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 292 }
chaithanyarss 189:fba4aeebf004 293 #define test_schedule_6(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 294 Base_tc *test_tc = new Long_tc;\
chaithanyarss 189:fba4aeebf004 295 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 296 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 297 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 298 test_tc->TC_string[2] = 0x76;\
chaithanyarss 189:fba4aeebf004 299 convert(test_tc);\
chaithanyarss 189:fba4aeebf004 300 test_tc->TC_string[131] = 0x00;\
chaithanyarss 189:fba4aeebf004 301 test_tc->TC_string[132] = 0x00;\
chaithanyarss 189:fba4aeebf004 302 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 303 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 304 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 305 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 306 }
chaithanyarss 189:fba4aeebf004 307 #define test_schedule_F(test_tm_ptr) {\
chaithanyarss 189:fba4aeebf004 308 Base_tc *test_tc = NULL;\
chaithanyarss 189:fba4aeebf004 309 if(!(test_tc = new Long_tc))\
chaithanyarss 189:fba4aeebf004 310 {\
chaithanyarss 189:fba4aeebf004 311 gPC.printf("\n\rError: out of memory");\
chaithanyarss 189:fba4aeebf004 312 return;\
chaithanyarss 189:fba4aeebf004 313 }\
chaithanyarss 189:fba4aeebf004 314 test_tc->next_TC = NULL;\
chaithanyarss 189:fba4aeebf004 315 test_tc->TC_string[0] = 0x01;\
chaithanyarss 189:fba4aeebf004 316 test_tc->TC_string[1] = 0xB2;\
chaithanyarss 189:fba4aeebf004 317 test_tc->TC_string[2] = 0x7F;\
chaithanyarss 189:fba4aeebf004 318 for(uint8_t i=3;i<133;i++)\
chaithanyarss 189:fba4aeebf004 319 {\
chaithanyarss 189:fba4aeebf004 320 test_tc->TC_string[i] = 0;\
chaithanyarss 189:fba4aeebf004 321 }\
chaithanyarss 189:fba4aeebf004 322 uint16_t crc16 = crc16_gen(test_tc->TC_string,133);\
chaithanyarss 189:fba4aeebf004 323 test_tc->TC_string[133] = (uint8_t)(crc16 & 0xFF00)>>8;\
chaithanyarss 189:fba4aeebf004 324 test_tc->TC_string[134] = (uint8_t)(crc16 & 0x00FF);\
chaithanyarss 189:fba4aeebf004 325 test_tm_ptr = FCTN_CDMS_RLY_TMTC(test_tc);\
chaithanyarss 189:fba4aeebf004 326 }
chaithanyarss 189:fba4aeebf004 327 void send_verify_0xF(Base_tm* test_tm_ptr)
chaithanyarss 189:fba4aeebf004 328 {
chaithanyarss 189:fba4aeebf004 329 uint32_t temp_blk[4] = {0};
chaithanyarss 189:fba4aeebf004 330 uint8_t j=0,tm_data_err_count=0;
chaithanyarss 189:fba4aeebf004 331 Base_tm* temp_ptr;
chaithanyarss 189:fba4aeebf004 332 test_schedule_F(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 333 //gPC.printf("\n\r----------------------------------------------------------------------------------");
chaithanyarss 189:fba4aeebf004 334 //gPC.printf("\n\rTC_Schedule_Report(0xF):\n");
chaithanyarss 189:fba4aeebf004 335 temp_ptr=test_tm_ptr;
chaithanyarss 189:fba4aeebf004 336 while(temp_ptr!=NULL)
chaithanyarss 189:fba4aeebf004 337 {
chaithanyarss 189:fba4aeebf004 338 /*gPC.printf("\n\rTM[0] = %02X",temp_ptr->TM_string[0]);
chaithanyarss 189:fba4aeebf004 339 gPC.printf("\tTM[1] = %02X",temp_ptr->TM_string[1]);
chaithanyarss 189:fba4aeebf004 340 gPC.printf("\tTM[2] = %02X",temp_ptr->TM_string[2]);
chaithanyarss 189:fba4aeebf004 341 gPC.printf("\tTM[3] = %02X",temp_ptr->TM_string[3]);*/
chaithanyarss 189:fba4aeebf004 342 for(uint8_t i=0;i<=112;i+=16)
chaithanyarss 189:fba4aeebf004 343 {
chaithanyarss 189:fba4aeebf004 344 temp_blk[0] &= 0x00000000;
chaithanyarss 189:fba4aeebf004 345 temp_blk[0] |= (((uint32_t)(temp_ptr->TM_string[i+4]))&0x000000FF)<<24;
chaithanyarss 189:fba4aeebf004 346 temp_blk[0] |= (((uint32_t)(temp_ptr->TM_string[i+5]))&0x000000FF)<<16;
chaithanyarss 189:fba4aeebf004 347 temp_blk[0] |= (((uint32_t)(temp_ptr->TM_string[i+6]))&0x000000FF)<<8;
chaithanyarss 189:fba4aeebf004 348 temp_blk[0] |= (((uint32_t)(temp_ptr->TM_string[i+7]))&0x000000FF);
chaithanyarss 189:fba4aeebf004 349
chaithanyarss 189:fba4aeebf004 350 temp_blk[1] &= 0x00000000;
chaithanyarss 189:fba4aeebf004 351 temp_blk[1] |= (((uint32_t)(temp_ptr->TM_string[i+8]))&0x000000FF)<<24;
chaithanyarss 189:fba4aeebf004 352 temp_blk[1] |= (((uint32_t)(temp_ptr->TM_string[i+9]))&0x000000FF)<<16;
chaithanyarss 189:fba4aeebf004 353 temp_blk[1] |= (((uint32_t)(temp_ptr->TM_string[i+10]))&0x000000FF)<<8;
chaithanyarss 189:fba4aeebf004 354 temp_blk[1] |= (((uint32_t)(temp_ptr->TM_string[i+11]))&0x000000FF);
chaithanyarss 189:fba4aeebf004 355
chaithanyarss 189:fba4aeebf004 356 temp_blk[2] &= 0x00000000;
chaithanyarss 189:fba4aeebf004 357 temp_blk[2] |= (((uint32_t)(temp_ptr->TM_string[i+12]))&0x000000FF)<<24;
chaithanyarss 189:fba4aeebf004 358 temp_blk[2] |= (((uint32_t)(temp_ptr->TM_string[i+13]))&0x000000FF)<<16;
chaithanyarss 189:fba4aeebf004 359 temp_blk[2] |= (((uint32_t)(temp_ptr->TM_string[i+14]))&0x000000FF)<<8;
chaithanyarss 189:fba4aeebf004 360 temp_blk[2] |= (((uint32_t)(temp_ptr->TM_string[i+15]))&0x000000FF);
chaithanyarss 189:fba4aeebf004 361
chaithanyarss 189:fba4aeebf004 362 temp_blk[3] &= 0x00000000;
chaithanyarss 189:fba4aeebf004 363 temp_blk[3] |= (((uint32_t)(temp_ptr->TM_string[i+16]))&0x000000FF)<<24;
chaithanyarss 189:fba4aeebf004 364 temp_blk[3] |= (((uint32_t)(temp_ptr->TM_string[i+17]))&0x000000FF)<<16;
chaithanyarss 189:fba4aeebf004 365 temp_blk[3] |= (((uint32_t)(temp_ptr->TM_string[i+18]))&0x000000FF)<<8;
chaithanyarss 189:fba4aeebf004 366 temp_blk[3] |= (((uint32_t)(temp_ptr->TM_string[i+19]))&0x000000FF);
chaithanyarss 189:fba4aeebf004 367
chaithanyarss 189:fba4aeebf004 368 if(temp_blk[0]!=pl_block[(i/4)+j])
chaithanyarss 189:fba4aeebf004 369 tm_data_err_count++;
chaithanyarss 189:fba4aeebf004 370 if(temp_blk[1]!=pl_block[(i/4)+j+1])
chaithanyarss 189:fba4aeebf004 371 tm_data_err_count++;
chaithanyarss 189:fba4aeebf004 372 if(temp_blk[2]!=pl_block[(i/4)+j+2])
chaithanyarss 189:fba4aeebf004 373 tm_data_err_count++;
chaithanyarss 189:fba4aeebf004 374 if(temp_blk[3]!=pl_block[(i/4)+j+3])
chaithanyarss 189:fba4aeebf004 375 tm_data_err_count++;
chaithanyarss 189:fba4aeebf004 376 //gPC.printf("\n\r%03d-0x%08X\t%03d-0x%08X",(i/4)+j,temp_blk[0],(i/4)+1+j,temp_blk[1]);
chaithanyarss 189:fba4aeebf004 377 //gPC.printf("\t%03d-0x%08X\t%03d-0x%08X\n",(i/4)+2+j,temp_blk[2],(i/4)+3+j,temp_blk[3]);
chaithanyarss 189:fba4aeebf004 378 }
chaithanyarss 189:fba4aeebf004 379 j+=32;
chaithanyarss 189:fba4aeebf004 380 //gPC.printf("\n");
chaithanyarss 189:fba4aeebf004 381 temp_ptr = temp_ptr->next_TM;
chaithanyarss 189:fba4aeebf004 382 }
chaithanyarss 189:fba4aeebf004 383 if(tm_data_err_count!=0)
chaithanyarss 189:fba4aeebf004 384 {
chaithanyarss 189:fba4aeebf004 385 gPC.printf("\n\rTM Data(0xF) not matching pl_block!!!");
chaithanyarss 189:fba4aeebf004 386 gPC.printf("\n\rNumber of mismatches = %d",tm_data_err_count);
chaithanyarss 189:fba4aeebf004 387 }
chaithanyarss 189:fba4aeebf004 388 else if(tm_data_err_count==0)
chaithanyarss 189:fba4aeebf004 389 {
chaithanyarss 189:fba4aeebf004 390 gPC.printf("\n\rNo errors in TM Data(0xF)");
chaithanyarss 189:fba4aeebf004 391 }
chaithanyarss 189:fba4aeebf004 392 //gPC.printf("\n\r----------------------------------------------------------------------------------");
chaithanyarss 189:fba4aeebf004 393 }
chaithanyarss 189:fba4aeebf004 394 void verify_extracted(uint8_t c)
chaithanyarss 189:fba4aeebf004 395 {
chaithanyarss 189:fba4aeebf004 396 uint8_t wrong_extracted=0;
chaithanyarss 189:fba4aeebf004 397 uint8_t temp_extracted[8] = {0};
chaithanyarss 189:fba4aeebf004 398 for(uint8_t z=(32*(c-1));z<(32*c);z++)
chaithanyarss 189:fba4aeebf004 399 {
chaithanyarss 189:fba4aeebf004 400 temp_extracted[0] = (uint8_t)((pl_block[z]&0xC0000000)>>30);
chaithanyarss 189:fba4aeebf004 401 temp_extracted[1] = (uint8_t)((pl_block[z]&0x3C000000)>>26);
chaithanyarss 189:fba4aeebf004 402 temp_extracted[2] = (uint8_t)((pl_block[z]&0x03E00000)>>21);
chaithanyarss 189:fba4aeebf004 403 temp_extracted[3] = (uint8_t)((pl_block[z]&0x001F0000)>>16);
chaithanyarss 189:fba4aeebf004 404 temp_extracted[4] = (uint8_t)((pl_block[z]&0x0000FC00)>>10);
chaithanyarss 189:fba4aeebf004 405 temp_extracted[5] = (uint8_t)((pl_block[z]&0x000003F0)>>4);
chaithanyarss 189:fba4aeebf004 406 temp_extracted[6] = (uint8_t)((pl_block[z]&0x0000000C)>>2);
chaithanyarss 189:fba4aeebf004 407 temp_extracted[7] = (uint8_t)((pl_block[z]&0x00000003));
chaithanyarss 189:fba4aeebf004 408
chaithanyarss 189:fba4aeebf004 409 for(uint8_t y=0;y<8;y++)
chaithanyarss 189:fba4aeebf004 410 {
chaithanyarss 189:fba4aeebf004 411 if(temp_extracted[y]!=schedule1[z-(32*(c-1))][y])
chaithanyarss 189:fba4aeebf004 412 wrong_extracted++;
chaithanyarss 189:fba4aeebf004 413 }
chaithanyarss 189:fba4aeebf004 414 }
chaithanyarss 189:fba4aeebf004 415 if(wrong_extracted!=0)
chaithanyarss 189:fba4aeebf004 416 {
chaithanyarss 189:fba4aeebf004 417 gPC.printf("\n\rExtracted values do not match input values!!!");
chaithanyarss 189:fba4aeebf004 418 gPC.printf("\n\rNumber of wrong extracted values = %d",wrong_extracted);
chaithanyarss 189:fba4aeebf004 419 wrong_extracted = 0;
chaithanyarss 189:fba4aeebf004 420 }
chaithanyarss 189:fba4aeebf004 421 else if(wrong_extracted==0)
chaithanyarss 189:fba4aeebf004 422 gPC.printf("\n\rExtracted values are correct(0x%d)",c);
chaithanyarss 189:fba4aeebf004 423 }
chaithanyarss 189:fba4aeebf004 424 void test_pl_main()
chaithanyarss 189:fba4aeebf004 425 {
chaithanyarss 189:fba4aeebf004 426 //uint32_t temp_pl_block[192] = {0};
chaithanyarss 189:fba4aeebf004 427 uint8_t wrong_modify=0,z;
chaithanyarss 189:fba4aeebf004 428 Base_tm* test_tm_ptr;
chaithanyarss 189:fba4aeebf004 429 //Base_tm* temp;
chaithanyarss 189:fba4aeebf004 430 //for(z=0;z<192;z++)
chaithanyarss 189:fba4aeebf004 431 // pl_block[z] = 0xFFFFFFFF;
chaithanyarss 189:fba4aeebf004 432 //testing 0xF
chaithanyarss 189:fba4aeebf004 433 send_verify_0xF(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 434 //for(z=0;z<192;z++)
chaithanyarss 189:fba4aeebf004 435 // temp_pl_block[z] = pl_block[z];
chaithanyarss 189:fba4aeebf004 436
chaithanyarss 189:fba4aeebf004 437 //testing TC = 0x1,0x2...0x6
chaithanyarss 189:fba4aeebf004 438 uint8_t w =1;
chaithanyarss 189:fba4aeebf004 439 for(uint8_t v=1;w<7;w++)
chaithanyarss 189:fba4aeebf004 440 {
chaithanyarss 189:fba4aeebf004 441 /*switch(v)
chaithanyarss 189:fba4aeebf004 442 {
chaithanyarss 189:fba4aeebf004 443 case 1: test_schedule_1(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 444 break;
chaithanyarss 189:fba4aeebf004 445 case 2: test_schedule_2(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 446 break;
chaithanyarss 189:fba4aeebf004 447 case 3: test_schedule_3(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 448 break;
chaithanyarss 189:fba4aeebf004 449 case 4: test_schedule_4(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 450 break;
chaithanyarss 189:fba4aeebf004 451 case 5: test_schedule_5(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 452 break;
chaithanyarss 189:fba4aeebf004 453 case 6: test_schedule_6(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 454 break;
chaithanyarss 189:fba4aeebf004 455 }*/
chaithanyarss 189:fba4aeebf004 456 if(v==1)
chaithanyarss 189:fba4aeebf004 457 {
chaithanyarss 189:fba4aeebf004 458 test_schedule_1(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 459 }
chaithanyarss 189:fba4aeebf004 460 else if(v==2)
chaithanyarss 189:fba4aeebf004 461 {
chaithanyarss 189:fba4aeebf004 462 test_schedule_2(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 463 }
chaithanyarss 189:fba4aeebf004 464 else if(v==3)
chaithanyarss 189:fba4aeebf004 465 {
chaithanyarss 189:fba4aeebf004 466 test_schedule_3(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 467 }
chaithanyarss 189:fba4aeebf004 468 else if(v==4)
chaithanyarss 189:fba4aeebf004 469 {
chaithanyarss 189:fba4aeebf004 470 test_schedule_4(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 471 }
chaithanyarss 189:fba4aeebf004 472 else if(v==5)
chaithanyarss 189:fba4aeebf004 473 {
chaithanyarss 189:fba4aeebf004 474 test_schedule_5(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 475 }
chaithanyarss 189:fba4aeebf004 476 else if(v==6)
chaithanyarss 189:fba4aeebf004 477 {
chaithanyarss 189:fba4aeebf004 478 test_schedule_6(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 479 }
chaithanyarss 189:fba4aeebf004 480 /*for(z=0;z<192;z++)
chaithanyarss 189:fba4aeebf004 481 {
chaithanyarss 189:fba4aeebf004 482 if((z>=((v-1)*32)) && (z<=((v*32)-1)))
chaithanyarss 189:fba4aeebf004 483 z++;
chaithanyarss 189:fba4aeebf004 484 else
chaithanyarss 189:fba4aeebf004 485 {
chaithanyarss 189:fba4aeebf004 486 if(temp_pl_block[z]!=pl_block[z])
chaithanyarss 189:fba4aeebf004 487 wrong_modify++;
chaithanyarss 189:fba4aeebf004 488 }
chaithanyarss 189:fba4aeebf004 489 }
chaithanyarss 189:fba4aeebf004 490 if(wrong_modify!=0)
chaithanyarss 189:fba4aeebf004 491 {
chaithanyarss 189:fba4aeebf004 492 gPC.printf("\n\rWrong values of pl_block modified by TC = 0x%d",v);
chaithanyarss 189:fba4aeebf004 493 gPC.printf("\n\rNumber of wrong modifications = %d",wrong_modify);
chaithanyarss 189:fba4aeebf004 494 wrong_modify = 0;
chaithanyarss 189:fba4aeebf004 495 }
chaithanyarss 189:fba4aeebf004 496 else if(wrong_modify==0)
chaithanyarss 189:fba4aeebf004 497 {
chaithanyarss 189:fba4aeebf004 498 gPC.printf("\n\rTC(0x%d) updated pl_block correctly",v);
chaithanyarss 189:fba4aeebf004 499 for(uint8_t i=0;i<=188;i+=4)
chaithanyarss 189:fba4aeebf004 500 {
chaithanyarss 189:fba4aeebf004 501 //gPC.printf("\n\r%03d-0x%08X\t%03d-0x%08X",(i),pl_block[i],(i)+1,pl_block[(i)+1]);
chaithanyarss 189:fba4aeebf004 502 //gPC.printf("\t%03d-0x%08X\t%03d-0x%08X\n",(i)+2,pl_block[(i)+2],(i)+3,pl_block[(i)+3]);
chaithanyarss 189:fba4aeebf004 503 }
chaithanyarss 189:fba4aeebf004 504 }*/
chaithanyarss 189:fba4aeebf004 505 send_verify_0xF(test_tm_ptr);
chaithanyarss 189:fba4aeebf004 506 verify_extracted(v);
chaithanyarss 189:fba4aeebf004 507 //for(z=0;z<192;z++)
chaithanyarss 189:fba4aeebf004 508 // temp_pl_block[z] = pl_block[z];
chaithanyarss 189:fba4aeebf004 509 wait(1);
chaithanyarss 189:fba4aeebf004 510 }
chaithanyarss 189:fba4aeebf004 511 gPC.printf("\n\rTesting TC_TM block processing complete");
chaithanyarss 189:fba4aeebf004 512 }