/[PAMELA software]/chewbacca/PamOffLineSW/PacketSemanticAnalyzer.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/PacketSemanticAnalyzer.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mocchiut, Fri Jul 24 13:53:37 2009 UTC revision 1.6 by mocchiut, Tue Aug 4 13:58:09 2009 UTC
# Line 1  Line 1 
1  //============================================================================  //============================================================================
2  // $Id: PacketSemanticAnalyzer.cpp,v 1.3 2008/12/18 12:58:37 mocchiut Exp $  // $Id: PacketSemanticAnalyzer.cpp,v 1.5 2009/07/30 08:16:20 mocchiut Exp $
3  // Description :  // Description :
4  //============================================================================  //============================================================================
5  #include "PacketSemanticAnalyzer.h"  #include "PacketSemanticAnalyzer.h"
# Line 60  void PacketSemanticAnalyzer::extractValu Line 60  void PacketSemanticAnalyzer::extractValu
60          //all the check can also be done using  pamela::techmodel::EventReader* reader;          //all the check can also be done using  pamela::techmodel::EventReader* reader;
61          //PacketUser::getInstance().reader->PKT_UnpackPscuHeader(hpamPkt);                        //PacketUser::getInstance().reader->PKT_UnpackPscuHeader(hpamPkt);              
62          //std::cout<<PacketUser::getInstance().reader->Header->GetPscuHeader()->Print()<<std::endl;          //std::cout<<PacketUser::getInstance().reader->Header->GetPscuHeader()->Print()<<std::endl;
63          //reader->Header->GetCounter()->PrintCounters();    //reader->Header->GetCounter()->PrintCounters();
64          //const PacketType* type =      reader->Header->GetPscuHeader()->GetPacketType();          //const PacketType* type =      reader->Header->GetPscuHeader()->GetPacketType();
65          //int len= reader->Header->GetPscuHeader()->GetPacketLenght();          //int len= reader->Header->GetPscuHeader()->GetPacketLenght();
66          //if(reader){delete reader; reader = NULL;}          //if(reader){delete reader; reader = NULL;}
# Line 123  bool PacketSemanticAnalyzer::analysePKT( Line 123  bool PacketSemanticAnalyzer::analysePKT(
123          delta_pc = pkt_number-last_pkt_number;            delta_pc = pkt_number-last_pkt_number;  
124    
125          if((step_pkt_number==0)||          if((step_pkt_number==0)||
126                  ((delta_pc>0)&&(delta_pc<=step_pkt_number)) ||             ((delta_pc>0)&&(delta_pc<=(long long int)step_pkt_number)) ||
127                  ((delta_pc<0)&&(-delta_pc>=(max_pkt_number-step_pkt_number)))//delta_pc < 0 et pkt_number small and last_pkt_number big             ((delta_pc<0)&&(-delta_pc>=(long long int)(max_pkt_number-step_pkt_number)))//delta_pc < 0 et pkt_number small and last_pkt_number big
128          )                                )                      
129          {          {
130                  //cons=true;                  //cons=true;
# Line 132  bool PacketSemanticAnalyzer::analysePKT( Line 132  bool PacketSemanticAnalyzer::analysePKT(
132                    
133                  //delta_pt=0 is OK                  //delta_pt=0 is OK
134                  if((step_pkt_obt==0)||                  if((step_pkt_obt==0)||
135                          ((delta_pt>=0)&&(delta_pt<=step_pkt_obt)) ||                     ((delta_pt>=0)&&(delta_pt<=(long long int)step_pkt_obt)) ||
136                          ((delta_pt<0)&&(-delta_pt>=(max_pkt_obt-step_pkt_obt)))//delta_pt < 0 et pkt_obt small and last_pkt_obt big                     ((delta_pt<0)&&(-delta_pt>=(long long int)(max_pkt_obt-step_pkt_obt)))//delta_pt < 0 et pkt_obt small and last_pkt_obt big
137                  )                  )
138                  {                  {
139                          cons=true;                          cons=true;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23