1 |
|
|
2 |
// Implementation of the CalAlarmReader class. |
// Implementation of the CalAlarmReader class. |
3 |
|
|
|
|
|
|
#define UINT unsigned int |
|
|
#define BYTE unsigned char |
|
|
#include <string> |
|
|
#include <log4cxx/logger.h> |
|
|
extern "C" { |
|
|
#include "CRC.h" |
|
|
} |
|
|
|
|
|
#include <fstream> |
|
|
#include "stdio.h" |
|
4 |
#include "ReaderAlgorithms.h" |
#include "ReaderAlgorithms.h" |
5 |
|
|
|
using namespace pamela; |
|
6 |
using namespace pamela::techmodel; |
using namespace pamela::techmodel; |
7 |
|
|
8 |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalAlarmReader")); |
static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.CalAlarmReader")); |
21 |
*/ |
*/ |
22 |
std::string CalAlarmReader::GetVersionInfo(void) const { |
std::string CalAlarmReader::GetVersionInfo(void) const { |
23 |
return |
return |
24 |
"$Trailer: /home/cvsmanager/yoda/techmodel/CalAlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 kusanagi Exp $\n"; |
"$Trailer: /opt/cvsmanager/yoda/techmodel/CalAlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; |
25 |
} |
} |
26 |
|
|
27 |
/** |
/** |
36 |
|
|
37 |
/** |
/** |
38 |
* Unpack the CalAlarm event from an input file. |
* Unpack the CalAlarm event from an input file. |
39 |
|
* The CPU does not add any CRC control at the packet end. |
40 |
|
* @param EventNumber |
41 |
|
* @param dataLength |
42 |
*/ |
*/ |
43 |
void CalAlarmReader::RunEvent(int EventNumber, long int length) throw (WrongCRCException){ |
void CalAlarmReader::RunEvent(int EventNumber, long int dataLength) throw (WrongCRCException){ |
44 |
|
char subData[dataLength]; |
45 |
|
InputFile->read(subData, sizeof(subData)); |
46 |
|
calAlarm->calAlarmData = new TArrayC(dataLength, subData); |
47 |
} |
} |
48 |
|
|