--- yoda/techmodel/CalibTrailerReader.cpp 2006/02/07 10:36:43 5.2 +++ yoda/techmodel/CalibTrailerReader.cpp 2006/09/29 10:19:21 6.3 @@ -1,7 +1,7 @@ /** @file * $Author: kusanagi $ - * $Date: 2006/02/04 12:37:44 $ - * $Revision: 5.1 $ + * $Date: 2006/05/30 19:10:03 $ + * $Revision: 6.2 $ * * Implementation of the CalibTrailerReader class. */ @@ -26,7 +26,7 @@ */ std::string CalibTrailerReader::GetVersionInfo(void) const { return - "$Trailer: /opt/cvsmanager/yoda/techmodel/CalibTrailerReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; + "$Trailer: /home/cvsmanager/yoda/techmodel/CalibTrailerReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; } /** @@ -47,11 +47,12 @@ UINT16 subCRC; //calculated CRC of the data UINT16 readCRC; //CRC read from the end of the subpacket long int length = dataLength - 2; //the block of data - + memset(subData, 0, dataLength*sizeof(char)); InputFile->read(subData, sizeof(subData)); subCRC = CM_Compute_CRC16(0, (UINT8*)subData, length); readCRC = (((UINT16)(subData[dataLength - 2]<<8))&0xFF00) + (((UINT16)subData[dataLength - 1])&0x00FF); if (subCRC != readCRC) throw WrongCRCException(" Wrong CRC for CalibTrailer Packet "); + calibTrailer->calibTrailerData = new TArrayC(length, subData); }