| 1 |
/** @file |
/** @file |
| 2 |
* $Author: kusanagi $ |
* $Author: kusanagi $ |
| 3 |
* $Date: 2004/08/20 15:01:42 $ |
* $Date: 2004/08/24 13:19:59 $ |
| 4 |
* $Revision: 1.7 $ |
* $Revision: 1.8 $ |
| 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. |
| 75 |
*/ |
*/ |
| 76 |
std::string EventReader::GetVersionInfo(void) const { |
std::string EventReader::GetVersionInfo(void) const { |
| 77 |
return |
return |
| 78 |
"$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 1.7 2004/08/20 15:01:42 kusanagi Exp $\n"; |
"$Header: /home/cvsmanager/yoda/techmodel/EventReader.cpp,v 1.8 2004/08/24 13:19:59 kusanagi Exp $\n"; |
| 79 |
} |
} |
| 80 |
|
|
| 81 |
/** |
/** |
| 169 |
unsigned int OrbitalTime = (((UINT32)buff[8]<<24)&0xFF000000) + (((UINT32)buff[9]<<16)&0x00FF0000) + (((UINT32)buff[10]<<8)&0x0000FF00) + (((UINT32)buff[11])&0x000000FF); |
unsigned int OrbitalTime = (((UINT32)buff[8]<<24)&0xFF000000) + (((UINT32)buff[9]<<16)&0x00FF0000) + (((UINT32)buff[10]<<8)&0x0000FF00) + (((UINT32)buff[11])&0x000000FF); |
| 170 |
unsigned int PacketLenght = (((UINT32)buff[12]<<16)&0x00FF0000) + (((UINT32)buff[13]<<8)&0x0000FF00) + (((UINT32)buff[14])&0x000000FF); |
unsigned int PacketLenght = (((UINT32)buff[12]<<16)&0x00FF0000) + (((UINT32)buff[13]<<8)&0x0000FF00) + (((UINT32)buff[14])&0x000000FF); |
| 171 |
unsigned char CRC = buff[15]; |
unsigned char CRC = buff[15]; |
| 172 |
|
unsigned char FileOffset = buff[15]; |
| 173 |
|
|
| 174 |
if (Counter < prevPckCounter){ |
if (Counter < prevPckCounter){ |
| 175 |
cat << log4cpp::Priority::WARN |
cat << log4cpp::Priority::WARN |
| 196 |
//plus the CRC legth (which varies for each type of packet) |
//plus the CRC legth (which varies for each type of packet) |
| 197 |
Header->GetPscuHeader()->SetPacketLenght(PacketLenght); |
Header->GetPscuHeader()->SetPacketLenght(PacketLenght); |
| 198 |
Header->GetPscuHeader()->SetCRC(CRC); |
Header->GetPscuHeader()->SetCRC(CRC); |
| 199 |
|
Header->GetPscuHeader()->SetFileOffset(((long int)(InputFile->tellg()) - 16)); |
| 200 |
|
|
| 201 |
//commented out because of the above test code |
//commented out because of the above test code |
| 202 |
InputFile->seekg(Header->GetPscuHeader()->GetPacketLenght(), std::ios::cur); |
InputFile->seekg(Header->GetPscuHeader()->GetPacketLenght(), std::ios::cur); |
| 231 |
sprintf(tmpId1, "%02X", PacketId1); |
sprintf(tmpId1, "%02X", PacketId1); |
| 232 |
sprintf(tmpId2, "%02X", PacketId2); |
sprintf(tmpId2, "%02X", PacketId2); |
| 233 |
sprintf(tmpLength, "%06X", Header->GetPscuHeader()->GetPacketLenght()); |
sprintf(tmpLength, "%06X", Header->GetPscuHeader()->GetPacketLenght()); |
| 234 |
sprintf(tmpStart, "%X", ((long int)(InputFile->tellg()) - 16)); |
sprintf(tmpStart, "%X", Header->GetPscuHeader()->GetFileOffset()); |
| 235 |
sprintf(tmpCRC, "%02X", CRC); |
sprintf(tmpCRC, "%02X", CRC); |
| 236 |
cat << log4cpp::Priority::INFO |
cat << log4cpp::Priority::INFO |
| 237 |
<< "\n Packet Counter (decimal) : " << Counter |
<< "\n Packet Counter (decimal) : " << Counter |