--- yoda/techmodel/S4AlarmReader.cpp 2005/03/06 04:33:02 4.0 +++ yoda/techmodel/S4AlarmReader.cpp 2006/02/07 10:36:43 5.2 @@ -1,20 +1,13 @@ +/** @file + * $Author: kusanagi $ + * $Date: 2006/02/04 12:37:45 $ + * $Revision: 5.1 $ + * + * Implementation of the S4AlarmReader class. + */ -// Implementation of the S4AlarmReader class. - - -#define UINT unsigned int -#define BYTE unsigned char -#include -#include -extern "C" { -#include "CRC.h" -} - -#include -#include "stdio.h" #include "ReaderAlgorithms.h" -using namespace pamela; using namespace pamela::techmodel; static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.S4AlarmReader")); @@ -33,7 +26,7 @@ */ std::string S4AlarmReader::GetVersionInfo(void) const { return - "$Trailer: /home/cvsmanager/yoda/techmodel/s4AlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $\n"; + "$Trailer: /opt/cvsmanager/yoda/techmodel/s4AlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; } /** @@ -48,9 +41,13 @@ /** * Unpack the S4Alarm event from an input file. + * The CPU does not add any CRC control at the packet end. + * @param EventNumber + * @param dataLength */ -void S4AlarmReader::RunEvent(int EventNumber, long int length) throw (WrongCRCException){ - - +void S4AlarmReader::RunEvent(int EventNumber, long int dataLength) throw (WrongCRCException){ + char subData[dataLength]; + InputFile->read(subData, sizeof(subData)); + s4Alarm->s4AlarmData = new TArrayC(dataLength, subData); }