pl ack in tmtc

**
Dependencies:
**
FreescaleIAP
SimpleDMA
mbed-rtos
mbed

**Fork of**
COM_MNG_TMTC_SIMPLE_pl123
by

## COM_RCV_TC.h@0:f016e9e8d48b, 2015-12-01 (annotated)

- Committer:
- shreeshas95
- Date:
- Tue Dec 01 10:56:10 2015 +0000
- Revision:
- 0:f016e9e8d48b
- Child:
- 2:2caf2a9a13aa

Working without COM_SND_TM

### Who changed what in which revision?

User | Revision | Line number | New contents of line |
---|---|---|---|

shreeshas95 | 0:f016e9e8d48b | 1 | #define flushData_appendTC(bytes, outState) {\ |

shreeshas95 | 0:f016e9e8d48b | 2 | uint16_t tc_type = 2;\ |

shreeshas95 | 0:f016e9e8d48b | 3 | if( (bytes == TC_SHORT_SIZE) && (outState == 7) ){\ |

shreeshas95 | 0:f016e9e8d48b | 4 | tc_type = 0;\ |

shreeshas95 | 0:f016e9e8d48b | 5 | }\ |

shreeshas95 | 0:f016e9e8d48b | 6 | else if( (bytes == TC_LONG_SIZE) && (outState == 7) ){\ |

shreeshas95 | 0:f016e9e8d48b | 7 | tc_type = 1;\ |

shreeshas95 | 0:f016e9e8d48b | 8 | }\ |

shreeshas95 | 0:f016e9e8d48b | 9 | else{\ |

shreeshas95 | 0:f016e9e8d48b | 10 | ++rx_incorrectSizedTCcount;\ |

shreeshas95 | 0:f016e9e8d48b | 11 | }\ |

shreeshas95 | 0:f016e9e8d48b | 12 | if( tc_type == 0 ){\ |

shreeshas95 | 0:f016e9e8d48b | 13 | uint16_t crc_checksum = crc16_gen(rx_tempString, TC_SHORT_SIZE-2);\ |

shreeshas95 | 0:f016e9e8d48b | 14 | if( ( (crc_checksum & 0xFF) == rx_tempString[TC_SHORT_SIZE-1]) && ( ((crc_checksum >> 8) & 0xFF) == rx_tempString[TC_SHORT_SIZE-2] ) ){\ |

shreeshas95 | 0:f016e9e8d48b | 15 | uint16_t temp16;\ |

shreeshas95 | 0:f016e9e8d48b | 16 | Base_tc *temp_ptr = gHEAD_NODE_TCL;\ |

shreeshas95 | 0:f016e9e8d48b | 17 | bool repeat_flag = false;\ |

shreeshas95 | 0:f016e9e8d48b | 18 | uint8_t testPSC = rx_tempString[0];\ |

shreeshas95 | 0:f016e9e8d48b | 19 | while(temp_ptr != NULL){\ |

shreeshas95 | 0:f016e9e8d48b | 20 | if( GETpacket_seq_count(temp_ptr) == testPSC ){\ |

shreeshas95 | 0:f016e9e8d48b | 21 | repeat_flag = true;\ |

shreeshas95 | 0:f016e9e8d48b | 22 | break;\ |

shreeshas95 | 0:f016e9e8d48b | 23 | }\ |

shreeshas95 | 0:f016e9e8d48b | 24 | temp_ptr = temp_ptr->next_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 25 | }\ |

shreeshas95 | 0:f016e9e8d48b | 26 | if( repeat_flag == false ){\ |

shreeshas95 | 0:f016e9e8d48b | 27 | if( rx_tc_frames == 0 ){\ |

shreeshas95 | 0:f016e9e8d48b | 28 | gHEAD_NODE_TCL = new Short_tc;\ |

shreeshas95 | 0:f016e9e8d48b | 29 | gHEAD_NODE_TCL->next_TC = NULL;\ |

shreeshas95 | 0:f016e9e8d48b | 30 | gLAST_NODE_TCL = gHEAD_NODE_TCL;\ |

shreeshas95 | 0:f016e9e8d48b | 31 | }\ |

shreeshas95 | 0:f016e9e8d48b | 32 | else{\ |

shreeshas95 | 0:f016e9e8d48b | 33 | gLAST_NODE_TCL->next_TC = new Short_tc;\ |

shreeshas95 | 0:f016e9e8d48b | 34 | gLAST_NODE_TCL = gLAST_NODE_TCL;\ |

shreeshas95 | 0:f016e9e8d48b | 35 | gLAST_NODE_TCL->next_TC = NULL;\ |

shreeshas95 | 0:f016e9e8d48b | 36 | }\ |

shreeshas95 | 0:f016e9e8d48b | 37 | for(int i = 0 ; i < TC_SHORT_SIZE ; ++i){\ |

shreeshas95 | 0:f016e9e8d48b | 38 | gLAST_NODE_TCL->TC_string[i] = rx_tempString[i];\ |

shreeshas95 | 0:f016e9e8d48b | 39 | }\ |

shreeshas95 | 0:f016e9e8d48b | 40 | PUTshort_or_long(gLAST_NODE_TCL, tc_type);\ |

shreeshas95 | 0:f016e9e8d48b | 41 | temp16 = 1;\ |

shreeshas95 | 0:f016e9e8d48b | 42 | PUTcrc_pass(gLAST_NODE_TCL, temp16);\ |

shreeshas95 | 0:f016e9e8d48b | 43 | temp16 = 0;\ |

shreeshas95 | 0:f016e9e8d48b | 44 | PUTexec_status(gLAST_NODE_TCL, temp16);\ |

shreeshas95 | 0:f016e9e8d48b | 45 | ++gTOTAL_VALID_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 46 | }\ |

shreeshas95 | 0:f016e9e8d48b | 47 | }\ |

shreeshas95 | 0:f016e9e8d48b | 48 | else{\ |

shreeshas95 | 0:f016e9e8d48b | 49 | ++gTOTAL_CRC_FAIL_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 50 | }\ |

shreeshas95 | 0:f016e9e8d48b | 51 | }\ |

shreeshas95 | 0:f016e9e8d48b | 52 | else if( tc_type == 1 ){\ |

shreeshas95 | 0:f016e9e8d48b | 53 | uint16_t crc_checksum = crc16_gen(rx_tempString, TC_LONG_SIZE-2);\ |

shreeshas95 | 0:f016e9e8d48b | 54 | if( ( (crc_checksum & 0xFF) == rx_tempString[TC_LONG_SIZE-1]) && ( ((crc_checksum >> 8) & 0xFF) == rx_tempString[TC_LONG_SIZE-2] ) ){\ |

shreeshas95 | 0:f016e9e8d48b | 55 | uint16_t temp16;\ |

shreeshas95 | 0:f016e9e8d48b | 56 | Base_tc *temp_ptr = gHEAD_NODE_TCL;\ |

shreeshas95 | 0:f016e9e8d48b | 57 | bool repeat_flag = false;\ |

shreeshas95 | 0:f016e9e8d48b | 58 | uint8_t testPSC = rx_tempString[0];\ |

shreeshas95 | 0:f016e9e8d48b | 59 | while(temp_ptr != NULL){\ |

shreeshas95 | 0:f016e9e8d48b | 60 | if( GETpacket_seq_count(temp_ptr) == testPSC ){\ |

shreeshas95 | 0:f016e9e8d48b | 61 | repeat_flag = true;\ |

shreeshas95 | 0:f016e9e8d48b | 62 | break;\ |

shreeshas95 | 0:f016e9e8d48b | 63 | }\ |

shreeshas95 | 0:f016e9e8d48b | 64 | temp_ptr = temp_ptr->next_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 65 | }\ |

shreeshas95 | 0:f016e9e8d48b | 66 | if( repeat_flag == false ){\ |

shreeshas95 | 0:f016e9e8d48b | 67 | if( rx_tc_frames == 0 ){\ |

shreeshas95 | 0:f016e9e8d48b | 68 | gHEAD_NODE_TCL = new Long_tc;\ |

shreeshas95 | 0:f016e9e8d48b | 69 | gHEAD_NODE_TCL->next_TC = NULL;\ |

shreeshas95 | 0:f016e9e8d48b | 70 | gLAST_NODE_TCL = gHEAD_NODE_TCL;\ |

shreeshas95 | 0:f016e9e8d48b | 71 | }\ |

shreeshas95 | 0:f016e9e8d48b | 72 | else{\ |

shreeshas95 | 0:f016e9e8d48b | 73 | gLAST_NODE_TCL->next_TC = new Long_tc;\ |

shreeshas95 | 0:f016e9e8d48b | 74 | gLAST_NODE_TCL = gLAST_NODE_TCL->next_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 75 | gLAST_NODE_TCL->next_TC = NULL;\ |

shreeshas95 | 0:f016e9e8d48b | 76 | }\ |

shreeshas95 | 0:f016e9e8d48b | 77 | for(int i = 0 ; i < TC_LONG_SIZE ; ++i){\ |

shreeshas95 | 0:f016e9e8d48b | 78 | gLAST_NODE_TCL->TC_string[i] = rx_tempString[i];\ |

shreeshas95 | 0:f016e9e8d48b | 79 | }\ |

shreeshas95 | 0:f016e9e8d48b | 80 | PUTshort_or_long(gLAST_NODE_TCL, tc_type);\ |

shreeshas95 | 0:f016e9e8d48b | 81 | temp16 = 1;\ |

shreeshas95 | 0:f016e9e8d48b | 82 | PUTcrc_pass(gLAST_NODE_TCL, temp16);\ |

shreeshas95 | 0:f016e9e8d48b | 83 | temp16 = 0;\ |

shreeshas95 | 0:f016e9e8d48b | 84 | PUTexec_status(gLAST_NODE_TCL, temp16);\ |

shreeshas95 | 0:f016e9e8d48b | 85 | ++gTOTAL_VALID_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 86 | }\ |

shreeshas95 | 0:f016e9e8d48b | 87 | }\ |

shreeshas95 | 0:f016e9e8d48b | 88 | else{\ |

shreeshas95 | 0:f016e9e8d48b | 89 | ++gTOTAL_CRC_FAIL_TC;\ |

shreeshas95 | 0:f016e9e8d48b | 90 | }\ |

shreeshas95 | 0:f016e9e8d48b | 91 | }\ |

shreeshas95 | 0:f016e9e8d48b | 92 | ++rx_tc_frames;\ |

shreeshas95 | 0:f016e9e8d48b | 93 | } |

shreeshas95 | 0:f016e9e8d48b | 94 | |

shreeshas95 | 0:f016e9e8d48b | 95 | unsigned int rx_tc_frames = 0; |

shreeshas95 | 0:f016e9e8d48b | 96 | unsigned char rx_tempString[TC_LONG_SIZE+1]; |

shreeshas95 | 0:f016e9e8d48b | 97 | uint32_t rx_incorrectSizedTCcount = 0; |

shreeshas95 | 0:f016e9e8d48b | 98 | |

shreeshas95 | 0:f016e9e8d48b | 99 | void raw_data_to_tc(void){ |

shreeshas95 | 0:f016e9e8d48b | 100 | bool frame_started = false; |

shreeshas95 | 0:f016e9e8d48b | 101 | bool chain_started = false; |

shreeshas95 | 0:f016e9e8d48b | 102 | bool flush_called = false; |

shreeshas95 | 0:f016e9e8d48b | 103 | |

shreeshas95 | 0:f016e9e8d48b | 104 | uint32_t bytes_read = 0; |

shreeshas95 | 0:f016e9e8d48b | 105 | uint8_t state7e = 0; |

shreeshas95 | 0:f016e9e8d48b | 106 | uint8_t outState = 0; |

shreeshas95 | 0:f016e9e8d48b | 107 | uint32_t outByte = 0; |

shreeshas95 | 0:f016e9e8d48b | 108 | uint32_t byteCount = 0; |

shreeshas95 | 0:f016e9e8d48b | 109 | rx_incorrectSizedTCcount = 0; |

shreeshas95 | 0:f016e9e8d48b | 110 | |

shreeshas95 | 0:f016e9e8d48b | 111 | gOBOSC_PSC = PSC_START_VALUE + gTOTAL_VALID_TC - 1; |

shreeshas95 | 0:f016e9e8d48b | 112 | gOBOSC_HEAD = gLAST_NODE_TCL; |

shreeshas95 | 0:f016e9e8d48b | 113 | |

shreeshas95 | 0:f016e9e8d48b | 114 | COM_RX_DATA_NODE *data_node = gRX_HEAD_DATA_NODE; |

shreeshas95 | 0:f016e9e8d48b | 115 | // read byte by byte |

shreeshas95 | 0:f016e9e8d48b | 116 | while( data_node != NULL ){ |

shreeshas95 | 0:f016e9e8d48b | 117 | for(int iBuf = 0 ; iBuf < RX_BUFFER_LENGTH ; ++iBuf ){ |

shreeshas95 | 0:f016e9e8d48b | 118 | uint8_t test_this = data_node->values[iBuf]; |

shreeshas95 | 0:f016e9e8d48b | 119 | ++bytes_read; |

shreeshas95 | 0:f016e9e8d48b | 120 | |

shreeshas95 | 0:f016e9e8d48b | 121 | // read bit by bit |

shreeshas95 | 0:f016e9e8d48b | 122 | for(int i = 7 ; i >= 0 ; --i){ |

shreeshas95 | 0:f016e9e8d48b | 123 | unsigned char tempBit = (test_this >> i) & 1; |

shreeshas95 | 0:f016e9e8d48b | 124 | bool skipIteration = false; |

shreeshas95 | 0:f016e9e8d48b | 125 | |

shreeshas95 | 0:f016e9e8d48b | 126 | if( tempBit == 1 ){ |

shreeshas95 | 0:f016e9e8d48b | 127 | switch( state7e ){ |

shreeshas95 | 0:f016e9e8d48b | 128 | case 0: |

shreeshas95 | 0:f016e9e8d48b | 129 | state7e = 0; |

shreeshas95 | 0:f016e9e8d48b | 130 | break; |

shreeshas95 | 0:f016e9e8d48b | 131 | case 1: |

shreeshas95 | 0:f016e9e8d48b | 132 | state7e = 2; |

shreeshas95 | 0:f016e9e8d48b | 133 | break; |

shreeshas95 | 0:f016e9e8d48b | 134 | case 2: |

shreeshas95 | 0:f016e9e8d48b | 135 | state7e = 3; |

shreeshas95 | 0:f016e9e8d48b | 136 | break; |

shreeshas95 | 0:f016e9e8d48b | 137 | case 3: |

shreeshas95 | 0:f016e9e8d48b | 138 | state7e = 4; |

shreeshas95 | 0:f016e9e8d48b | 139 | break; |

shreeshas95 | 0:f016e9e8d48b | 140 | case 4: |

shreeshas95 | 0:f016e9e8d48b | 141 | state7e = 5; |

shreeshas95 | 0:f016e9e8d48b | 142 | break; |

shreeshas95 | 0:f016e9e8d48b | 143 | case 5: |

shreeshas95 | 0:f016e9e8d48b | 144 | state7e = 6; |

shreeshas95 | 0:f016e9e8d48b | 145 | break; |

shreeshas95 | 0:f016e9e8d48b | 146 | case 6: |

shreeshas95 | 0:f016e9e8d48b | 147 | state7e = 7; |

shreeshas95 | 0:f016e9e8d48b | 148 | break; |

shreeshas95 | 0:f016e9e8d48b | 149 | case 7: |

shreeshas95 | 0:f016e9e8d48b | 150 | // error reset |

shreeshas95 | 0:f016e9e8d48b | 151 | state7e = 0; |

shreeshas95 | 0:f016e9e8d48b | 152 | chain_started = false; |

shreeshas95 | 0:f016e9e8d48b | 153 | frame_started = false; |

shreeshas95 | 0:f016e9e8d48b | 154 | byteCount = 0; |

shreeshas95 | 0:f016e9e8d48b | 155 | outByte = 0; |

shreeshas95 | 0:f016e9e8d48b | 156 | outState = 0; |

shreeshas95 | 0:f016e9e8d48b | 157 | skipIteration = true; |

shreeshas95 | 0:f016e9e8d48b | 158 | break; |

shreeshas95 | 0:f016e9e8d48b | 159 | } |

shreeshas95 | 0:f016e9e8d48b | 160 | } |

shreeshas95 | 0:f016e9e8d48b | 161 | else{ |

shreeshas95 | 0:f016e9e8d48b | 162 | switch( state7e ){ |

shreeshas95 | 0:f016e9e8d48b | 163 | case 0: |

shreeshas95 | 0:f016e9e8d48b | 164 | case 1: |

shreeshas95 | 0:f016e9e8d48b | 165 | case 2: |

shreeshas95 | 0:f016e9e8d48b | 166 | case 3: |

shreeshas95 | 0:f016e9e8d48b | 167 | case 4: |

shreeshas95 | 0:f016e9e8d48b | 168 | case 5: |

shreeshas95 | 0:f016e9e8d48b | 169 | state7e = 1; |

shreeshas95 | 0:f016e9e8d48b | 170 | break; |

shreeshas95 | 0:f016e9e8d48b | 171 | case 6: |

shreeshas95 | 0:f016e9e8d48b | 172 | state7e = 1; |

shreeshas95 | 0:f016e9e8d48b | 173 | skipIteration = true; |

shreeshas95 | 0:f016e9e8d48b | 174 | break; |

shreeshas95 | 0:f016e9e8d48b | 175 | case 7: |

shreeshas95 | 0:f016e9e8d48b | 176 | state7e = 0; |

shreeshas95 | 0:f016e9e8d48b | 177 | // detected 7e |

shreeshas95 | 0:f016e9e8d48b | 178 | if( !chain_started ){ |

shreeshas95 | 0:f016e9e8d48b | 179 | chain_started = true; |

shreeshas95 | 0:f016e9e8d48b | 180 | frame_started = true; |

shreeshas95 | 0:f016e9e8d48b | 181 | byteCount = 0; |

shreeshas95 | 0:f016e9e8d48b | 182 | outByte = 0; |

shreeshas95 | 0:f016e9e8d48b | 183 | outState = 0; |

shreeshas95 | 0:f016e9e8d48b | 184 | skipIteration = true; |

shreeshas95 | 0:f016e9e8d48b | 185 | } |

shreeshas95 | 0:f016e9e8d48b | 186 | else{ |

shreeshas95 | 0:f016e9e8d48b | 187 | flush_called = true; |

shreeshas95 | 0:f016e9e8d48b | 188 | flushData_appendTC(byteCount, outState); |

shreeshas95 | 0:f016e9e8d48b | 189 | byteCount = 0; |

shreeshas95 | 0:f016e9e8d48b | 190 | outState = 0; |

shreeshas95 | 0:f016e9e8d48b | 191 | outByte = 0; |

shreeshas95 | 0:f016e9e8d48b | 192 | skipIteration = true; |

shreeshas95 | 0:f016e9e8d48b | 193 | } |

shreeshas95 | 0:f016e9e8d48b | 194 | break; |

shreeshas95 | 0:f016e9e8d48b | 195 | } |

shreeshas95 | 0:f016e9e8d48b | 196 | } |

shreeshas95 | 0:f016e9e8d48b | 197 | if( (!skipIteration) && (frame_started) ){ |

shreeshas95 | 0:f016e9e8d48b | 198 | // write bit to output |

shreeshas95 | 0:f016e9e8d48b | 199 | switch( outState ){ |

shreeshas95 | 0:f016e9e8d48b | 200 | case 0: |

shreeshas95 | 0:f016e9e8d48b | 201 | outState = 1; |

shreeshas95 | 0:f016e9e8d48b | 202 | rx_tempString[outByte] = tempBit << 7; |

shreeshas95 | 0:f016e9e8d48b | 203 | break; |

shreeshas95 | 0:f016e9e8d48b | 204 | case 1: |

shreeshas95 | 0:f016e9e8d48b | 205 | outState = 2; |

shreeshas95 | 0:f016e9e8d48b | 206 | rx_tempString[outByte] += tempBit << 6; |

shreeshas95 | 0:f016e9e8d48b | 207 | break; |

shreeshas95 | 0:f016e9e8d48b | 208 | case 2: |

shreeshas95 | 0:f016e9e8d48b | 209 | outState = 3; |

shreeshas95 | 0:f016e9e8d48b | 210 | rx_tempString[outByte] += tempBit << 5; |

shreeshas95 | 0:f016e9e8d48b | 211 | break; |

shreeshas95 | 0:f016e9e8d48b | 212 | case 3: |

shreeshas95 | 0:f016e9e8d48b | 213 | outState = 4; |

shreeshas95 | 0:f016e9e8d48b | 214 | rx_tempString[outByte] += tempBit << 4; |

shreeshas95 | 0:f016e9e8d48b | 215 | break; |

shreeshas95 | 0:f016e9e8d48b | 216 | case 4: |

shreeshas95 | 0:f016e9e8d48b | 217 | outState = 5; |

shreeshas95 | 0:f016e9e8d48b | 218 | rx_tempString[outByte] += tempBit << 3; |

shreeshas95 | 0:f016e9e8d48b | 219 | break; |

shreeshas95 | 0:f016e9e8d48b | 220 | case 5: |

shreeshas95 | 0:f016e9e8d48b | 221 | outState = 6; |

shreeshas95 | 0:f016e9e8d48b | 222 | rx_tempString[outByte] += tempBit << 2; |

shreeshas95 | 0:f016e9e8d48b | 223 | break; |

shreeshas95 | 0:f016e9e8d48b | 224 | case 6: |

shreeshas95 | 0:f016e9e8d48b | 225 | outState = 7; |

shreeshas95 | 0:f016e9e8d48b | 226 | rx_tempString[outByte] += tempBit << 1; |

shreeshas95 | 0:f016e9e8d48b | 227 | break; |

shreeshas95 | 0:f016e9e8d48b | 228 | case 7: |

shreeshas95 | 0:f016e9e8d48b | 229 | outState = 0; |

shreeshas95 | 0:f016e9e8d48b | 230 | rx_tempString[outByte] += tempBit; |

shreeshas95 | 0:f016e9e8d48b | 231 | ++outByte; |

shreeshas95 | 0:f016e9e8d48b | 232 | // exceeded tc length discard |

shreeshas95 | 0:f016e9e8d48b | 233 | if(outByte > 135){ |

shreeshas95 | 0:f016e9e8d48b | 234 | ++rx_incorrectSizedTCcount; |

shreeshas95 | 0:f016e9e8d48b | 235 | outByte = 0; |

shreeshas95 | 0:f016e9e8d48b | 236 | } |

shreeshas95 | 0:f016e9e8d48b | 237 | ++byteCount; |

shreeshas95 | 0:f016e9e8d48b | 238 | break; |

shreeshas95 | 0:f016e9e8d48b | 239 | } |

shreeshas95 | 0:f016e9e8d48b | 240 | } |

shreeshas95 | 0:f016e9e8d48b | 241 | } |

shreeshas95 | 0:f016e9e8d48b | 242 | } |

shreeshas95 | 0:f016e9e8d48b | 243 | COM_RX_DATA_NODE *temp = data_node->next_node; |

shreeshas95 | 0:f016e9e8d48b | 244 | delete data_node; |

shreeshas95 | 0:f016e9e8d48b | 245 | data_node = temp; |

shreeshas95 | 0:f016e9e8d48b | 246 | } |

shreeshas95 | 0:f016e9e8d48b | 247 | if( (!flush_called) && (gTOTAL_INCORRECT_SIZE_TC == 0) ){ |

shreeshas95 | 0:f016e9e8d48b | 248 | ++gTOTAL_INCORRECT_SIZE_TC; |

shreeshas95 | 0:f016e9e8d48b | 249 | } |

shreeshas95 | 0:f016e9e8d48b | 250 | gRX_HEAD_DATA_NODE = new COM_RX_DATA_NODE; |

shreeshas95 | 0:f016e9e8d48b | 251 | gRX_HEAD_DATA_NODE->next_node = NULL; |

shreeshas95 | 0:f016e9e8d48b | 252 | gRX_CURRENT_DATA_NODE = gRX_HEAD_DATA_NODE; |

shreeshas95 | 0:f016e9e8d48b | 253 | gRX_CURRENT_PTR = gRX_CURRENT_DATA_NODE->values; |

shreeshas95 | 0:f016e9e8d48b | 254 | |

shreeshas95 | 0:f016e9e8d48b | 255 | if( gOBOSC_HEAD != NULL ){ |

shreeshas95 | 0:f016e9e8d48b | 256 | gOBOSC_HEAD = gOBOSC_HEAD->next_TC; |

shreeshas95 | 0:f016e9e8d48b | 257 | if( gOBOSC_HEAD != NULL ){ |

shreeshas95 | 0:f016e9e8d48b | 258 | ++gOBOSC_PSC; |

shreeshas95 | 0:f016e9e8d48b | 259 | } |

shreeshas95 | 0:f016e9e8d48b | 260 | } |

shreeshas95 | 0:f016e9e8d48b | 261 | |

shreeshas95 | 0:f016e9e8d48b | 262 | // PENDING: SORT THE LINKED LIST ACCORDING TO PSC VALUE |

shreeshas95 | 0:f016e9e8d48b | 263 | } |