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.
Dependents: Interference_Simple StrCommandHandler_Demo SerialInputReactionHandler_DEMO
SerialInputReactionHandler Class Reference
SerialInputReactionHandler More...
#include <SerialInputReactionHandler.h>
Public Types | |
| enum | InputMode |
Constant representing input mode. More... | |
Public Member Functions | |
| SerialInputReactionHandler (Callback< void *(char const *const)> arg_callback_onCommand=&echoCommand, Callback< void(char const *const)> arg_commonPre_callback_onCommand=&doNothing, Callback< void(char const *const, void *)> arg_commonPost_callback_onCommand=&doNothing) | |
| Constructor. | |
| void | attach (Callback< void *(char const *const)> arg_callback_onCommand) |
| Register a callback supposed called when a command is ordered. | |
| void | attach_PreProc (Callback< void(char const *const)> arg_commonPre_callback_onCommand) |
| Register a callback supposed called just before a command be conducted. | |
| void | attach_PostProc (Callback< void(char const *const, void *)> arg_commonPost_callback_onCommand) |
| Register a callback supposed called just after a command be conducted. | |
| void | startReception (Serial *arg_serial_socket, InputMode arg_mode=KB_SINGLE_INPUT) |
| Register a serial object and start listening signal from it. | |
| void | quit () |
| stop listening | |
| void | changeMode (InputMode arg_mode) |
| Change input mode. | |
Detailed Description
Char string signal handler. This require a serial object, receiving signal from the serial object, executing callback which can receive serial as the argument
Definition at line 14 of file SerialInputReactionHandler.h.
Member Enumeration Documentation
| enum InputMode |
Constant representing input mode.
Definition at line 18 of file SerialInputReactionHandler.h.
Constructor & Destructor Documentation
| SerialInputReactionHandler | ( | Callback< void *(char const *const)> | arg_callback_onCommand = &echoCommand, |
| Callback< void(char const *const)> | arg_commonPre_callback_onCommand = &doNothing, |
||
| Callback< void(char const *const, void *)> | arg_commonPost_callback_onCommand = &doNothing |
||
| ) |
Constructor.
- Parameters:
-
arg_callback_onCommand Register a callback supposed called when a command is ordered arg_commonPre_callback_onCommand Register a callback supposed called just before a command be conducted arg_commonPost_callback_onCommand Register a callback supposed called just after a command be conducted
Definition at line 3 of file SerialInputReactionHandler.cpp.
Member Function Documentation
| void attach | ( | Callback< void *(char const *const)> | arg_callback_onCommand ) |
Register a callback supposed called when a command is ordered.
Definition at line 18 of file SerialInputReactionHandler.cpp.
| void attach_PostProc | ( | Callback< void(char const *const, void *)> | arg_commonPost_callback_onCommand ) |
Register a callback supposed called just after a command be conducted.
Definition at line 36 of file SerialInputReactionHandler.cpp.
| void attach_PreProc | ( | Callback< void(char const *const)> | arg_commonPre_callback_onCommand ) |
Register a callback supposed called just before a command be conducted.
Definition at line 27 of file SerialInputReactionHandler.cpp.
| void changeMode | ( | InputMode | arg_mode ) |
Change input mode.
Definition at line 71 of file SerialInputReactionHandler.cpp.
| void quit | ( | ) |
stop listening
Definition at line 57 of file SerialInputReactionHandler.cpp.
| void startReception | ( | Serial * | arg_serial_socket, |
| InputMode | arg_mode = KB_SINGLE_INPUT |
||
| ) |
Register a serial object and start listening signal from it.
Definition at line 45 of file SerialInputReactionHandler.cpp.
Generated on Tue Jul 12 2022 23:51:24 by
1.7.2