
ControllerBox directs electromechanical equipment in restaurants to display information.
Dependencies: TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed
Fork of Mbed_MotiVControllerBox by
Diff: libMotiv/Controller.h
- Revision:
- 5:e22a1ae893d2
- Parent:
- 3:21c8adb97c8f
--- a/libMotiv/Controller.h Sun Dec 07 13:18:27 2014 +0000 +++ b/libMotiv/Controller.h Tue Jan 06 22:18:27 2015 +0000 @@ -8,6 +8,9 @@ #include "Device.h" #include "Flower.h" #include "Table.h" +#include "picojson.h" +#include "EthernetInterface.h" +#include "HTTPClient.h" #include <stdlib.h> #include <vector> @@ -20,7 +23,14 @@ ERROR, INIT }; + Controller(); Controller(TextLCD *lcd); +// Controller(TextLCD *lcd, EthernetInterface *eth); + Controller& operator=(const Controller& c); + + + void init(); + void testRequest(); cStatus getStatus(); string statusString(); void setStatus(cStatus); @@ -34,7 +44,6 @@ void prevCommand(); void sendCommandDem(); - //DEBUG void printCommandList(); @@ -44,14 +53,21 @@ void sendCommand(); TextLCD *lcd; -// MotiVAPI *mapi; + MotiVAPI *mAPI; + + + + bool connectAPI(); private: + bool initialized; cStatus status; + void initTables(); - + HTTPClient httpClient; + string endpoint; // std::vector<Device*> devices; -// vector <Table>tables + vector <Table>tables; vector <MCommand> commandList; };