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.
CommandProcessor/CommandProcessor.h@179:935f9d78d936, 2018-02-08 (annotated)
- Committer:
- bwang
- Date:
- Thu Feb 08 02:42:16 2018 +0000
- Revision:
- 179:935f9d78d936
- Child:
- 196:7172e6e28867
02/07/2017 21:39 - updated BREMS*.h/cpp to include PreferenceWriter functionality, updated CommandProcessor to match current config variables
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bwang | 179:935f9d78d936 | 1 | #ifndef __COMMAND_PROCESSOR_H |
bwang | 179:935f9d78d936 | 2 | #define __COMMAND_PROCESSOR_H |
bwang | 179:935f9d78d936 | 3 | |
bwang | 179:935f9d78d936 | 4 | #include "mbed.h" |
bwang | 179:935f9d78d936 | 5 | #include "PreferenceWriter.h" |
bwang | 179:935f9d78d936 | 6 | |
bwang | 179:935f9d78d936 | 7 | void processCmd(Serial *pc, PreferenceWriter *pref, char *buf); |
bwang | 179:935f9d78d936 | 8 | |
bwang | 179:935f9d78d936 | 9 | /*---variable loading, setting, and flashing---*/ |
bwang | 179:935f9d78d936 | 10 | void cmd_ls(Serial *pc); |
bwang | 179:935f9d78d936 | 11 | void cmd_ls2(Serial *pc, char *buf); |
bwang | 179:935f9d78d936 | 12 | void cmd_set(Serial *pc, char *buf, char *val); |
bwang | 179:935f9d78d936 | 13 | void cmd_defaults(Serial *pc); |
bwang | 179:935f9d78d936 | 14 | void cmd_reload(Serial *pc, PreferenceWriter *pref); |
bwang | 179:935f9d78d936 | 15 | void cmd_flush(Serial *pc, PreferenceWriter *pref); |
bwang | 179:935f9d78d936 | 16 | void cmd_query(Serial *pc, char *buf); |
bwang | 179:935f9d78d936 | 17 | |
bwang | 179:935f9d78d936 | 18 | /*---mode switching---*/ |
bwang | 179:935f9d78d936 | 19 | void cmd_setp(Serial *pc, char *buf); |
bwang | 179:935f9d78d936 | 20 | void cmd_mode(Serial *pc, char *buf); |
bwang | 179:935f9d78d936 | 21 | void cmd_src(Serial *pc, char *buf); |
bwang | 179:935f9d78d936 | 22 | void cmd_op(Serial *pc, char *buf); |
bwang | 179:935f9d78d936 | 23 | |
bwang | 179:935f9d78d936 | 24 | /*---variable commands---*/ |
bwang | 179:935f9d78d936 | 25 | void cmd_exit(Serial *pc); |
bwang | 179:935f9d78d936 | 26 | |
bwang | 179:935f9d78d936 | 27 | /*---internal functions---*/ |
bwang | 179:935f9d78d936 | 28 | int tokenize(char *buf, char **out, int max); |
bwang | 179:935f9d78d936 | 29 | float *checkf(char *s); |
bwang | 179:935f9d78d936 | 30 | int *checkn(char *s); |
bwang | 179:935f9d78d936 | 31 | char *mode_to_str(int n); |
bwang | 179:935f9d78d936 | 32 | int str_to_mode(char *buf); |
bwang | 179:935f9d78d936 | 33 | char *src_to_str(int n); |
bwang | 179:935f9d78d936 | 34 | int str_to_src(char *buf); |
bwang | 179:935f9d78d936 | 35 | char *op_to_str(int n); |
bwang | 179:935f9d78d936 | 36 | int str_to_op(char *buf); |
bwang | 179:935f9d78d936 | 37 | |
bwang | 179:935f9d78d936 | 38 | #endif |