| 1 |
/** @file |
/** @file |
| 2 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
| 3 |
* $Date: 2004/12/22 11:38:35 $ |
* $Date: 2005/01/13 08:20:26 $ |
| 4 |
* $Revision: 2.7 $ |
* $Revision: 2.9 $ |
| 5 |
* |
* |
| 6 |
* Implementation of the functions of a sample Algorithm class. |
* Implementation of the functions of a sample Algorithm class. |
| 7 |
* This file can be used as a templace to develop your own algorithm. |
* This file can be used as a templace to develop your own algorithm. |
| 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)); |
| 84 |
|
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TsbT, new TsbTReader)); |
| 85 |
|
TechmodelAlgorithmMap.insert(AlgorithmMap::value_type(PacketType::TsbB, new TsbBReader)); |
| 86 |
} |
} |
| 87 |
|
|
| 88 |
/** |
/** |
| 90 |
*/ |
*/ |
| 91 |
std::string EventReader::GetVersionInfo(void) const { |
std::string EventReader::GetVersionInfo(void) const { |
| 92 |
return |
return |
| 93 |
"$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 2.7 2004/12/22 11:38:35 kusanagi Exp $\n"; |
"$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 2.9 2005/01/13 08:20:26 kusanagi Exp $\n"; |
| 94 |
} |
} |
| 95 |
|
|
| 96 |
/** |
/** |
| 242 |
} |
} |
| 243 |
if (finalPos > 0 && finalPos < 64) { |
if (finalPos > 0 && finalPos < 64) { |
| 244 |
oss.str(""); |
oss.str(""); |
| 245 |
oss << " Correct packet length: Padded of " << finalPos << " bytes"; |
oss << "\n Correct packet length: Padded of " << finalPos << " bytes"; |
| 246 |
logger->debug(oss.str().c_str()); |
logger->debug(oss.str().c_str()); |
| 247 |
} |
} |
| 248 |
if (finalPos > 64){ |
if (finalPos > 64){ |
| 249 |
oss.str(""); |
oss.str(""); |
| 250 |
oss << " 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." |
| 251 |
<< Header->GetPscuHeader()->Print(); |
<< Header->GetPscuHeader()->Print(); |
| 252 |
logger->error(oss.str().c_str()); |
logger->error(oss.str().c_str()); |
| 253 |
//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."); |