1 |
//where I am |
2 |
#include "R0_Init_State.h" |
3 |
//manager |
4 |
#include "StateManager.h" |
5 |
//home |
6 |
//#include "R0_Init_State.h" |
7 |
//a step after |
8 |
#include "R1_FA_State.h" |
9 |
|
10 |
namespace PamOffLineSW |
11 |
{ |
12 |
R0_Init_State R0_Init_State::instance; |
13 |
|
14 |
R0_Init_State::R0_Init_State() |
15 |
{ |
16 |
} |
17 |
|
18 |
R0_Init_State::~R0_Init_State() |
19 |
{ |
20 |
} |
21 |
|
22 |
void R0_Init_State::readInput(char inputbyte) |
23 |
{ |
24 |
//we don't have found nothing till now, searching byte 0xFA |
25 |
if((unsigned char)inputbyte==CODE_FA) |
26 |
{ |
27 |
//changing state to R1<<endl; |
28 |
StateManager::getInstance().changeState(&R1_FA_State::getInstance()); |
29 |
} |
30 |
else |
31 |
{ |
32 |
//do nothing remain in the current state, searching for 0xFA |
33 |
} |
34 |
} |
35 |
|
36 |
} |