![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
3rd year group project. Electronic and Electrical Engineering. Heriot-Watt University. This is the code for the mbed for the Automatic Little Object Organiser (ALOO).
Dependencies: MCP23017 TCS3472_I2C WattBob_TextLCD mbed
Diff: commander.h
- Revision:
- 12:f485796016f8
- Parent:
- 8:e1da2ae62885
- Child:
- 14:cf2f255b5560
--- a/commander.h Sat Nov 21 18:52:07 2015 +0000 +++ b/commander.h Sat Nov 21 20:19:54 2015 +0000 @@ -13,28 +13,28 @@ extern std::string CommandObjectCommandsValue [5][kMaxCommandCount]; -class Commander { -public: - Commander(); - - CommandTypeRaw typeRaw; - char typeChar; - CommandObjectRaw objectRaw; - std::string object; - std::string command; - std::string commandValue; - int commandValueIndex; - - void decodeCommand(CommandTypeRaw type); - std::string description(); - - virtual ~Commander(); - -private: - void readCommandObject(); - void readCommand(CommandObjectRaw objectRaw); - void executeCommand(); - void resetVariables(); +class Commander { +public: + Commander(); + + CommandTypeRaw typeRaw; + char typeChar; + CommandObjectRaw objectRaw; + std::string object; + std::string command[kMaxCommandCount - 1]; + std::string commandValue[kMaxCommandCount - 1]; + int commandIndex[kMaxCommandCount -1]; + + void decodeCommand(CommandTypeRaw type); + std::string description(); + + virtual ~Commander(); + +private: + void readCommandObject(); + bool readCommand(CommandObjectRaw objectRaw); + void executeCommand(); + void resetVariables(); }; #endif