//where I am #include "R3_FAFEDE_State.h" //manager #include "StateManager.h" //home #include "R0_Init_State.h" //a step after #include "R4_HEADER_State.h" //to compute CRC #include "CRC.h" //to log something //#include "Logger.h" namespace PamOffLineSW { extern LogUtil* mainLogUtil; extern long int iNumCadres; //cadre's number extern unsigned long long int iByte_tot;// how many bytes I have read till now R3_FAFEDE_State R3_FAFEDE_State::instance; int R3_FAFEDE_State::posHeaderPKT=2; R3_FAFEDE_State::R3_FAFEDE_State() { initHeaderPKT(); } R3_FAFEDE_State::~R3_FAFEDE_State() { } void R3_FAFEDE_State::initHeaderPKT() { for(int j=0; jlogWarning(msg); //the 16 bytes analized cannot be considered a correct Header for a Pamela Packet. //I want to check if in this 16 bytes I can find a new candidate for a Pam Pkt Header, i.e. a new set of FA FE DE. //to do this I go back to the R0 state, and start look for 0xFA resetHeaderPKT();//here I don't clean the buffer with the header //change to state R0, it means searching 0xFA StateManager::getInstance().changeState(&R0_Init_State::getInstance()); for(int i=3;ireadInput(headerPKT[i]); } } } } }