/[PAMELA software]/yoda/event/PscuHeader.cpp
ViewVC logotype

Annotation of /yoda/event/PscuHeader.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2.3 - (hide annotations) (download)
Thu Dec 9 08:47:42 2004 UTC (19 years, 11 months ago) by kusanagi
Branch: MAIN
Changes since 2.2: +5 -2 lines
Fixed bug of Stack overflow in case of Log CRCError
Added S4Init & S4Alarm packets

1 kusanagi 1.1 /** @file
2 kusanagi 1.2 * $Source: /home/cvsmanager/yoda/event/PscuHeader.cpp,v $
3 kusanagi 2.3 * $Id: PscuHeader.cpp,v 2.2 2004/12/03 22:04:04 kusanagi Exp $
4 kusanagi 1.2 * $Author: kusanagi $
5 kusanagi 1.1 *
6     * Implementation of the PscuHeader class.
7     */
8 kusanagi 1.5 #include <log4cxx/logger.h>
9 kusanagi 1.1 #include "PscuHeader.h"
10    
11     using namespace pamela;
12    
13 kusanagi 1.5 static log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(_T("pamela.techmodel.PscuHeader"));
14 kusanagi 2.2 //static std::stringstream oss;
15 kusanagi 1.1
16     /**
17     * Create an PscuHeader object.
18     */
19     PscuHeader::PscuHeader():
20     OrbitalTime(0),
21     PacketId1(0),
22     PacketId2(0),
23     Counter(0),
24     PacketLenght(0) { }
25    
26     PscuHeader::~PscuHeader() { }
27    
28     /**
29     * Get the packet type of this header.
30     */
31 kusanagi 2.2 const PacketType* PscuHeader::GetPacketType(void) const throw (UnidentifiedPacketException) {
32 kusanagi 1.1 switch (PacketId1) {
33 kusanagi 1.3 case 0x07: return PacketType::PhysEndRun;
34     case 0x08: return PacketType::CalibCalPulse1;
35     case 0x09: return PacketType::CalibCalPulse2;
36     case 0x10: return PacketType::Physics;
37     case 0x11: return PacketType::CalibTrkBoth;
38     case 0x12: return PacketType::CalibTrk1;
39     case 0x13: return PacketType::CalibTrk2;
40     case 0x15: return PacketType::CalibTrd;
41     case 0x16: return PacketType::CalibTof;
42     case 0x17: return PacketType::CalibS4;
43     case 0x18: return PacketType::CalibCalPed;
44     case 0x19: return PacketType::CalibAc;
45     case 0x20: return PacketType::RunHeader;
46     case 0x21: return PacketType::RunTrailer;
47     case 0x22: return PacketType::CalibHeader;
48     case 0x23: return PacketType::CalibTrailer;
49     case 0x24: return PacketType::InitHeader;
50     case 0x25: return PacketType::InitTrailer;
51     case 0x30: return PacketType::EventTrk;
52     case 0x40: return PacketType::TestTrk;
53 kusanagi 1.5 case 0x41: return PacketType::TestTof;
54 kusanagi 1.3 case 0x50: return PacketType::Log;
55     case 0x51: return PacketType::VarDump;
56     case 0x52: return PacketType::ArrDump;
57     case 0x53: return PacketType::TabDump;
58     case 0x54: return PacketType::Tmtc;
59     case 0x55: return PacketType::Mcmd;
60     case 0x60: return PacketType::ForcedFECmd;
61     case 0x70: return PacketType::AcInit;
62     case 0x71: return PacketType::CalInit;
63     case 0x72: return PacketType::TrkInit;
64     case 0x73: return PacketType::TofInit;
65     case 0x74: return PacketType::TrgInit;
66 kusanagi 2.3 case 0x75: return PacketType::NdInit;
67     case 0x76: return PacketType::S4Init;
68 kusanagi 1.5 case 0x81: return PacketType::CalAlarm;
69     case 0x82: return PacketType::AcAlarm;
70     case 0x83: return PacketType::TrkAlarm;
71     case 0x84: return PacketType::TrgAlarm;
72     case 0x85: return PacketType::TofAlarm;
73 kusanagi 2.3 case 0x86: return PacketType::S4Alarm;
74 kusanagi 1.3
75 kusanagi 1.1 default: {
76 kusanagi 2.2 throw UnidentifiedPacketException(PacketId1);
77 kusanagi 1.1 }
78     }
79     }
80    
81    
82     ClassImp(PscuHeader)
83    
84 kusanagi 2.3

  ViewVC Help
Powered by ViewVC 1.1.23