Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TextLCD MbedJSONValue libMotiv picojson mbed-rtos mbed
Fork of Mbed_MotiVControllerBox by
library/Controller.h
- Committer:
- TimWoo
- Date:
- 2014-12-02
- Revision:
- 2:ad4509a9d051
- Parent:
- 1:d54aed10ddf3
File content as of revision 2:ad4509a9d051:
#ifndef MOTIV_CONTROLLER_H
#define MOTIV_CONTROLLER_H
//Controller
#include <string>
#include "mbed.h"
#include "MotiVAPI.h"
#include "Device.h"
#include "Flower.h"
#include "Table.h"
#include <stdlib.h>
#include <vector>
class Controller {
public:
enum cStatus {
READY,
WAITING,
BUSY,
ERROR,
INIT
};
Controller(TextLCD *lcd);
cStatus getStatus();
string statusString();
void setStatus(cStatus);
void displayStatus();
void lcdWriteLine(int row, string str);
void printDesc(int c);
//DEMO PURPOSES
void nextCommand();
void prevCommand();
void sendCommandDem();
/**
sendCommand() gets the first command from the command list and sends the command to the devices.
*/
void sendCommand();
TextLCD *lcd;
// MotiVAPI *mapi;
private:
cStatus status;
Flower* flower;
// std::vector<Device*> devices;
// vector <Table>tables
vector <Device::mCommand>commandList;
};
#endif
