| 81 |
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TrgAlarm, new TrgAlarmReader)); |
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TrgAlarm, new TrgAlarmReader)); |
| 82 |
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TofAlarm, new TofAlarmReader)); |
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TofAlarm, new TofAlarmReader)); |
| 83 |
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::S4Alarm, new S4AlarmReader)); |
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::S4Alarm, new S4AlarmReader)); |
|
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TsbT, new TsbTReader)); |
|
|
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TsbB, new TsbBReader)); |
|
| 84 |
} |
} |
| 85 |
|
|
| 86 |
/** |
/** |
| 177 |
logger->error("Couldn't read the event. Skipping to the next header. \n"); |
logger->error("Couldn't read the event. Skipping to the next header. \n"); |
| 178 |
} |
} |
| 179 |
if ((step%1000) == 0) std::cout << step/1000 << "K \n"; |
if ((step%1000) == 0) std::cout << step/1000 << "K \n"; |
| 180 |
|
oss.str(""); |
| 181 |
|
oss << "----endPck " << Header->GetPscuHeader()->GetCounter() << "\n"; |
| 182 |
|
logger->info(oss.str().c_str()); |
| 183 |
} |
} |
| 184 |
Header->GetCounter()->PrintCounters(); |
Header->GetCounter()->PrintCounters(); |
| 185 |
} |
} |
| 211 |
if (Counter < prevPckCounter){ |
if (Counter < prevPckCounter){ |
| 212 |
oss.str(""); |
oss.str(""); |
| 213 |
oss << "Packet counter is less than before of " << (prevPckCounter - Counter); |
oss << "Packet counter is less than before of " << (prevPckCounter - Counter); |
| 214 |
logger->warn(oss.str().c_str()); |
logger->error(oss.str().c_str()); |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
if (Counter > prevPckCounter + 1){ |
| 218 |
|
oss.str(""); |
| 219 |
|
oss << "Packet counter is greater than before of " << (Counter - prevPckCounter); |
| 220 |
|
logger->error(oss.str().c_str()); |
| 221 |
} |
} |
| 222 |
|
|
| 223 |
if (OrbitalTime < prevPckOBT){ |
if (OrbitalTime < prevPckOBT){ |
| 224 |
oss.str(""); |
oss.str(""); |
| 225 |
oss << " Onboard Time is less than before of " << (prevPckOBT - OrbitalTime); |
oss << " Onboard Time is less than before of " << (prevPckOBT - OrbitalTime); |
| 226 |
logger->warn(oss.str().c_str()); |
logger->error(oss.str().c_str()); |
| 227 |
} |
} |
| 228 |
|
|
| 229 |
if (((BYTE)CM_Compute_CRC16(0, (BYTE*)&buff, 15) == (BYTE)buff[15]) && (PacketId1 == PacketId2)){ |
if (((BYTE)CM_Compute_CRC16(0, (BYTE*)&buff, 15) == (BYTE)buff[15]) && (PacketId1 == PacketId2)){ |
| 249 |
} |
} |
| 250 |
if (finalPos > 0 && finalPos < 64) { |
if (finalPos > 0 && finalPos < 64) { |
| 251 |
oss.str(""); |
oss.str(""); |
| 252 |
oss << "\n Correct packet length: Padded of " << finalPos << " bytes"; |
oss << "Correct packet length: Padded of " << finalPos << " bytes"; |
| 253 |
logger->debug(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
| 254 |
} |
} |
| 255 |
if (finalPos > 64){ |
if (finalPos > 64){ |
| 256 |
oss.str(""); |
oss.str(""); |
| 257 |
oss << "\n The begin of the next packet is far more than 64 byte from the end of the previous." |
oss << "\n The begin of the next packet is far more than 64 byte from the end of the previous." |
| 258 |
<< Header->GetPscuHeader()->Print(); |
<< "\n Below the is the now unpacking packet"; |
| 259 |
logger->error(oss.str().c_str()); |
logger->error(oss.str().c_str()); |
| 260 |
|
logger->error(Header->GetPscuHeader()->Print()); |
| 261 |
//throw LengthException("The begin of the next packet is far more than 64 byte from the end of the previous."); |
//throw LengthException("The begin of the next packet is far more than 64 byte from the end of the previous."); |
| 262 |
} |
} |
| 263 |
} |
} |