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: mbed SerialInputReactionHandler AMPulseTrain SwArr16MOSFET StrCommandHandler KajiLabES
Diff: SerialCom/CommandHandler.h
- Revision:
- 1:b97639dad576
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SerialCom/CommandHandler.h Wed Oct 23 20:08:31 2019 +0000
@@ -0,0 +1,25 @@
+#ifndef COMMAND_HANDLER_H
+#define COMMAND_HANDLER_H
+#include "mbed.h"
+#include <string>
+#include <unsorted_map>
+
+class CommandAnalyzer
+{
+public:
+ CommandAnalyzer(
+ int num_of_command = 10,
+ char response_mode = 0
+ );
+ int analyzeCommand(
+ const char* const command
+ );
+ int mapCommand(
+ const char* const command
+ int (*fanction)(void)
+ );
+private:
+ char (*m_command_name)[20];
+ int (**m_function)(void);
+}
+#endif
\ No newline at end of file