--- chewbacca/PamOffLineSW/PacketSemanticAnalyzer.cpp 2008/09/23 07:20:10 1.1.1.1 +++ chewbacca/PamOffLineSW/PacketSemanticAnalyzer.cpp 2009/08/04 13:58:09 1.6 @@ -1,5 +1,5 @@ //============================================================================ -// $Id: PacketSemanticAnalyzer.cpp,v 1.43 2008-04-01 13:24:06 messineo Exp $ +// $Id: PacketSemanticAnalyzer.cpp,v 1.5 2009/07/30 08:16:20 mocchiut Exp $ // Description : //============================================================================ #include "PacketSemanticAnalyzer.h" @@ -9,8 +9,8 @@ extern unsigned long int step_pkt_number; extern unsigned long int step_pkt_obt; -extern long max_pkt_number; -extern long max_pkt_obt; +extern unsigned long int max_pkt_number; +extern unsigned long int max_pkt_obt; extern bool is_new_route; extern bool do_cont_check; @@ -60,7 +60,7 @@ //all the check can also be done using pamela::techmodel::EventReader* reader; //PacketUser::getInstance().reader->PKT_UnpackPscuHeader(hpamPkt); //std::cout<Header->GetPscuHeader()->Print()<Header->GetCounter()->PrintCounters(); + //reader->Header->GetCounter()->PrintCounters(); //const PacketType* type = reader->Header->GetPscuHeader()->GetPacketType(); //int len= reader->Header->GetPscuHeader()->GetPacketLenght(); //if(reader){delete reader; reader = NULL;} @@ -117,14 +117,14 @@ long int delta_pt; bool cons=true; - //TODO check here ... MARCO + //TODO check here ... //USE ONLY PKT_NUMBER and not the OBT ... //correct value is step_pkt_number = 5 and step_pkt_obt =0 delta_pc = pkt_number-last_pkt_number; if((step_pkt_number==0)|| - ((delta_pc>0)&&(delta_pc<=step_pkt_number)) || - ((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)step_pkt_number)) || + ((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 ) { //cons=true; @@ -132,8 +132,8 @@ //delta_pt=0 is OK if((step_pkt_obt==0)|| - ((delta_pt>=0)&&(delta_pt<=step_pkt_obt)) || - ((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)step_pkt_obt)) || + ((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 ) { cons=true;