1 |
/** @file |
/** @file |
2 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
3 |
* $Date: 2004/09/22 13:14:03 $ |
* $Date: 2004/09/24 11:57:49 $ |
4 |
* $Revision: 2.1 $ |
* $Revision: 2.2 $ |
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. |
87 |
*/ |
*/ |
88 |
std::string EventReader::GetVersionInfo(void) const { |
std::string EventReader::GetVersionInfo(void) const { |
89 |
return |
return |
90 |
"$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 2.1 2004/09/22 13:14:03 kusanagi Exp $\n"; |
"$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 2.2 2004/09/24 11:57:49 kusanagi Exp $\n"; |
91 |
} |
} |
92 |
|
|
93 |
/** |
/** |
136 |
if (FindStart()) { |
if (FindStart()) { |
137 |
if(UnpackPscuHeader()){ |
if(UnpackPscuHeader()){ |
138 |
const PacketType* type = Header->GetPscuHeader()->GetPacketType(); |
const PacketType* type = Header->GetPscuHeader()->GetPacketType(); |
139 |
|
//if (filter->CheckPacket(type)) |
140 |
AlgorithmMap::iterator i = TechmodelAlgorithmMap.find(type); |
AlgorithmMap::iterator i = TechmodelAlgorithmMap.find(type); |
141 |
if (i != TechmodelAlgorithmMap.end()) { |
if (i != TechmodelAlgorithmMap.end()) { |
142 |
TechmodelAlgorithm *EventAlgorithm = i->second; |
TechmodelAlgorithm *EventAlgorithm = i->second; |
147 |
oss.flush(); |
oss.flush(); |
148 |
oss << "No way to read events of type" << type->GetName(); |
oss << "No way to read events of type" << type->GetName(); |
149 |
logger->info(oss.str().c_str()); |
logger->info(oss.str().c_str()); |
150 |
throw Exception("No way to read events of type " + type->GetName()); |
throw Exception("No way to read events of type " + type->GetName()); |
151 |
} |
} |
152 |
} //else { |
} //else { |
153 |
//**TO BE DONE** <<WRONG CRC l --- LOST PACKET>>// |
//**TO BE DONE** <<WRONG CRC l --- LOST PACKET>>// |
154 |
//Have to be defined a "WrongCRC" packet::Type? |
//Have to be defined a "WrongCRC" packet::Type? |
155 |
//} |
//} |
156 |
} |
} |
157 |
} catch (...) { |
} catch (...) { |
158 |
//This have to be more detailed. More exceptions type are needed. |
//This have to be more detailed. More exceptions type are needed. |
159 |
logger->error("Couldn't read the event. Skipping to the next header."); |
logger->error("Couldn't read the event. Skipping to the next header."); |
199 |
logger->info(oss.str().c_str()); |
logger->info(oss.str().c_str()); |
200 |
} |
} |
201 |
|
|
|
|
|
202 |
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)){ |
203 |
prevPckCounter = Counter; |
prevPckCounter = Counter; |
204 |
prevPckOBT = OrbitalTime; |
prevPckOBT = OrbitalTime; |