1 |
mocchiut |
1.1 |
/** @file |
2 |
|
|
* $Author: messineo $ |
3 |
|
|
* $Date: 2008-03-04 18:09:31 $ |
4 |
|
|
* $Revision: 1.4 $ |
5 |
|
|
* |
6 |
|
|
* Implementation of the S4AlarmReader class. |
7 |
|
|
*/ |
8 |
|
|
|
9 |
|
|
#include "ReaderAlgorithms.h" |
10 |
|
|
|
11 |
|
|
using namespace pamela::techmodel; |
12 |
|
|
|
13 |
|
|
|
14 |
|
|
/** |
15 |
|
|
* Constructor. |
16 |
|
|
*/ |
17 |
|
|
S4AlarmReader::S4AlarmReader(void): |
18 |
|
|
TechmodelAlgorithm(PacketType::S4Alarm, "S4AlarmReader") { |
19 |
|
|
s4Alarm = new S4AlarmEvent(); |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
/** |
23 |
|
|
* Get a string with the version info of the algorithm. |
24 |
|
|
*/ |
25 |
|
|
std::string S4AlarmReader::GetVersionInfo(void) const { |
26 |
|
|
return |
27 |
|
|
"$Trailer: /home/cvsmanager/yoda/techmodel/s4AlarmReader.cpp,v 1.1.1.1 2004/07/06 12:20:23 Maurizio Nagni Exp $\n"; |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
/** |
31 |
|
|
* Initialize the algorithm with a special run. This will initialize the |
32 |
|
|
* event reader routines for all packet types. |
33 |
|
|
*/ |
34 |
|
|
void S4AlarmReader::Init(PamelaRun *run) { |
35 |
|
|
run->WriteSubPacket(this, &s4Alarm, s4Alarm->Class()); |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
/** |
39 |
|
|
* Unpack the S4Alarm event |
40 |
|
|
* The CPU does not add any CRC control at the packet end. |
41 |
|
|
* @param EventNumber |
42 |
|
|
* @param dataLength |
43 |
|
|
*/ |
44 |
|
|
void S4AlarmReader::PKT_RunEvent(char* subData, long int dataLength) throw (WrongCRCException){ |
45 |
|
|
s4Alarm->s4AlarmData = new TArrayC(dataLength, subData); |
46 |
|
|
} |