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: EthernetInterface mbed-rto mbed
Fork of ProjectVLC by
Interpreter.h
00001 #include "rtos.h" 00002 #include "TCPlistener.h" 00003 00004 #ifndef INTERPRETER_H 00005 #define INTERPRETER_H 00006 00007 /** 00008 * Class used to interpret text commands. 00009 */ 00010 class Interpreter{ 00011 private: 00012 /** 00013 * Convert a direction such as left, right, up, down to the corresponding number (0, 1, 2 or 3). 00014 * Invalid directions (or ignore) will return 4. 00015 * @param command A character array representing the direction. 00016 */ 00017 int directionToNumber(char* direction); 00018 Queue<int,8>* queue; 00019 int LED[8]; 00020 public: 00021 00022 /** 00023 * @param queue A pointer to the queue where the results will be written. 00024 */ 00025 Interpreter (Queue<int,8>* queue); 00026 00027 /** 00028 * Interprets a text command, and push the result on the queue. 00029 * Syntax: 00030 * The number of the LED 00031 * Dash (-) 00032 * The orientation (left,right,up,down or ignore). 00033 * Multiple LEDS can be set up in one command, by using a whitespace. 00034 * Example: 0-left 1-right 2-up 00035 * @param command A character array representing the command. 00036 */ 00037 void executeCommand(char* command); 00038 }; 00039 #endif
Generated on Wed Jul 13 2022 07:48:05 by
1.7.2
