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

Contents of /chewbacca/PamOffLineSW/R2_FAFE_State.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Sep 23 07:20:10 2008 UTC (16 years, 2 months ago) by mocchiut
Branch point for: v0r00, MAIN
Initial revision

1 //where I am
2 #include "R2_FAFE_State.h"
3 //manager
4 #include "StateManager.h"
5 //home
6 #include "R0_Init_State.h"
7 //a step after
8 #include "R3_FAFEDE_State.h"
9
10 namespace PamOffLineSW
11 {
12 R2_FAFE_State R2_FAFE_State::instance;
13
14 R2_FAFE_State::R2_FAFE_State()
15 {
16 }
17
18 R2_FAFE_State::~R2_FAFE_State()
19 {
20 }
21 void R2_FAFE_State::readInput(char inputbyte)
22 {
23 //the two bytes before this one are 0xFA 0xFE, searching byte 0xDE
24 if((unsigned char)inputbyte==CODE_DE)
25 {
26 //changing state to R3
27 StateManager::getInstance().changeState(&R3_FAFEDE_State::getInstance());
28 }
29 else
30 {
31 //Return to state R0, restart search
32 StateManager::getInstance().changeState(&R0_Init_State::getInstance());
33 }
34
35
36
37 }
38
39 }

  ViewVC Help
Powered by ViewVC 1.1.23