1 |
//============================================================================ |
2 |
// $Id: PacketSemanticAnalyzer.h,v 1.13 2008-02-18 14:38:54 messineo Exp $ |
3 |
// Description : |
4 |
//============================================================================ |
5 |
#ifndef PACKETSEMANTICANALYZER_H_ |
6 |
#define PACKETSEMANTICANALYZER_H_ |
7 |
#include "PacketUser.h" |
8 |
|
9 |
namespace PamOffLineSW |
10 |
{ |
11 |
|
12 |
class PacketSemanticAnalyzer |
13 |
{ |
14 |
public: |
15 |
virtual ~PacketSemanticAnalyzer(); |
16 |
void managePKT(char*& headerPkt, char* &pamPkt, long int length, bool isPKTGood); |
17 |
static PacketSemanticAnalyzer& getInstance(); |
18 |
private: |
19 |
PacketSemanticAnalyzer(); |
20 |
PacketSemanticAnalyzer(PacketSemanticAnalyzer& pkta); |
21 |
void setStepValue(unsigned long int delta_pkt_num, unsigned long int delta_pkt_obt); |
22 |
void setLastValue(); |
23 |
void setCurrentValues(unsigned long int ex_pkt_number, unsigned long int ex_pkt_obt); |
24 |
void extractValuesfromPKT(char * pkt); |
25 |
bool analysePKT(); |
26 |
|
27 |
const PacketType* pktType;//the packet type |
28 |
const PacketType* GetPacketType(unsigned char pktType); |
29 |
|
30 |
unsigned char pkt_type;//the packet type |
31 |
|
32 |
unsigned long int pkt_number;//Packet Number of the current PAMELA packet |
33 |
unsigned long int pkt_obt;//OBT of the current PAMELA packet |
34 |
|
35 |
unsigned long int last_pkt_number;//Packet Number of the previous PAMELA packet |
36 |
unsigned long int last_pkt_obt;//OBT of the previous PAMELA packet |
37 |
|
38 |
static PacketSemanticAnalyzer instance; |
39 |
}; |
40 |
|
41 |
} |
42 |
|
43 |
#endif /*PACKETSEMANTICANALYZER_H_*/ |