Commanders
Arduino buttons/bus library
TextInterpreter.hpp
1 //-------------------------------------------------------------------
2 #ifndef __textInterpreter_H__
3 #define __textInterpreter_H__
4 //-------------------------------------------------------------------
5 
6 #include <Commanders.h>
7 
8 #ifndef NO_SERIALCOMMANDER
9 
10 enum TEXTINTERPRETER_STEP
11 {
12  TEXTINTERPRETER_STEP_ID,
13  TEXTINTERPRETER_STEP_ID2,
14  TEXTINTERPRETER_STEP_TYPE,
15  TEXTINTERPRETER_STEP_DATA,
16  TEXTINTERPRETER_STEP_END
17 };
18 
45 class TextInterpreter
46 {
47 private:
48  unsigned long id;
49  uint8_t id2;
50  COMMANDERS_EVENT_TYPE lastEventType;
51  int data;
52 
53  bool neg_sign;
54  TEXTINTERPRETER_STEP step;
55 
56 public:
58  TextInterpreter();
59 
61  void Init();
65  unsigned long SendChar(char inCharacter);
69  unsigned long SendString(char *inpString);
70 };
71 
72 #endif
73 #endif
COMMANDERS_EVENT_TYPE
Definition: Events.h:25