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
Controller.h@0:2279181caaa1, 2014-10-25 (annotated)
- Committer:
- TimWoo
- Date:
- Sat Oct 25 00:11:12 2014 +0000
- Revision:
- 0:2279181caaa1
Initial Version,; Bare classes made for the main application and the devices that will be controlled.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TimWoo | 0:2279181caaa1 | 1 | #ifndef MOTIV_CONTROLLER_H |
| TimWoo | 0:2279181caaa1 | 2 | #define MOTIV_CONTROLLER_H |
| TimWoo | 0:2279181caaa1 | 3 | |
| TimWoo | 0:2279181caaa1 | 4 | //Controller |
| TimWoo | 0:2279181caaa1 | 5 | #include <string> |
| TimWoo | 0:2279181caaa1 | 6 | #include "mbed.h" |
| TimWoo | 0:2279181caaa1 | 7 | |
| TimWoo | 0:2279181caaa1 | 8 | class Controller { |
| TimWoo | 0:2279181caaa1 | 9 | public: |
| TimWoo | 0:2279181caaa1 | 10 | enum cStatus { |
| TimWoo | 0:2279181caaa1 | 11 | READY, |
| TimWoo | 0:2279181caaa1 | 12 | WAITING, |
| TimWoo | 0:2279181caaa1 | 13 | BUSY, |
| TimWoo | 0:2279181caaa1 | 14 | ERROR |
| TimWoo | 0:2279181caaa1 | 15 | }; |
| TimWoo | 0:2279181caaa1 | 16 | Controller(TextLCD *lcd); |
| TimWoo | 0:2279181caaa1 | 17 | cStatus getStatus(); |
| TimWoo | 0:2279181caaa1 | 18 | string statusString(); |
| TimWoo | 0:2279181caaa1 | 19 | void setStatus(cStatus); |
| TimWoo | 0:2279181caaa1 | 20 | void displayStatus(); |
| TimWoo | 0:2279181caaa1 | 21 | |
| TimWoo | 0:2279181caaa1 | 22 | void displWriteLine(int row, char c); |
| TimWoo | 0:2279181caaa1 | 23 | |
| TimWoo | 0:2279181caaa1 | 24 | TextLCD *_lcd; |
| TimWoo | 0:2279181caaa1 | 25 | |
| TimWoo | 0:2279181caaa1 | 26 | private: |
| TimWoo | 0:2279181caaa1 | 27 | cStatus _status; |
| TimWoo | 0:2279181caaa1 | 28 | |
| TimWoo | 0:2279181caaa1 | 29 | |
| TimWoo | 0:2279181caaa1 | 30 | }; |
| TimWoo | 0:2279181caaa1 | 31 | |
| TimWoo | 0:2279181caaa1 | 32 | #endif |
