From 832338b521a2ec7b6a6610870415c696d0a9d133 Mon Sep 17 00:00:00 2001 From: silvio3105 <104866334+silvio3105@users.noreply.github.com> Date: Tue, 17 Jan 2023 21:50:48 +0100 Subject: [PATCH 1/5] VS Code stuff update. --- .vscode/c_cpp_properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 1309512..71a3d66 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -14,7 +14,7 @@ "cStandard": "c17", "cppStandard": "c++17", "intelliSenseMode": "gcc-arm", - "compilerPath": "${ARM-GCC}\\arm-none-eabi-g++.exe", + "compilerPath": "${ARM-GCC}\\arm-none-eabi-gcc.exe", "compilerArgs": [] } ], From e9443615159e5313d4284e4b2fac23f069bf72c0 Mon Sep 17 00:00:00 2001 From: silvio3105 <104866334+silvio3105@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:16:15 +0100 Subject: [PATCH 2/5] Edited README.md. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 22c9736..2dd2cae 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,15 @@ Example: `CMD<4> cmd = CMD<4>(list, 2, fallback, ';', ':', ',');` where: - `:` is command to arguments delimiter. - `,` is argument to argument delimiter. +`list` is an array with commands, handlers and command descriptions. +``` +CMDList cmdList[] = { + SCMD_ADD(help, ""), // No description + SCMD_ADD(reset, "Reset the device"), + SCMD_ADD(info, "Get device info") +}; +``` + Check library documentation and example codes for more information. Library documentation is available at `.docs/html/index.html`. Example applications are available at `examples` folder. All examples are made with STM HAL framework. From 642b460eea1d0a502d1eb1ea21ce1243e5446139 Mon Sep 17 00:00:00 2001 From: silvio3105 <104866334+silvio3105@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:19:40 +0100 Subject: [PATCH 3/5] Removed sCMD.cpp file; Changed delimiter types to enum; Added code snippets; Added description to command list struct; findCmd is now part of sCMD class; CMDHandler renamed to sCMD. --- sCMD.cpp | 58 --------------------------- sCMD.h | 117 +++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 83 insertions(+), 92 deletions(-) delete mode 100644 sCMD.cpp diff --git a/sCMD.cpp b/sCMD.cpp deleted file mode 100644 index 71e8472..0000000 --- a/sCMD.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @file sCMD.cpp - * @author silvio3105 (www.github.com/silvio3105) - * @brief Simple Command Handler source file. - * - * @copyright Copyright (c) 2022, silvio3105 - * - */ - - -/* -License - -Copyright (c) 2022, silvio3105 (www.github.com/silvio3105) - -Access and use of this Project and its contents are granted free of charge to any Person. -The Person is allowed to copy, modify and use The Project and its contents only for non-commercial use. -Commercial use of this Project and its contents is prohibited. -Modifying this License and/or sublicensing is prohibited. - -THE PROJECT AND ITS CONTENT ARE PROVIDED "AS IS" WITH ALL FAULTS AND WITHOUT EXPRESSED OR IMPLIED WARRANTY. -THE AUTHOR KEEPS ALL RIGHTS TO CHANGE OR REMOVE THE CONTENTS OF THIS PROJECT WITHOUT PREVIOUS NOTICE. -THE AUTHOR IS NOT RESPONSIBLE FOR DAMAGE OF ANY KIND OR LIABILITY CAUSED BY USING THE CONTENTS OF THIS PROJECT. - -This License shall be included in all methodal textual files. -*/ - - -// ----- INCLUDE FILES -#include "sCMD.h" - - -// ----- FUNCTION DECLARATIONS -/** - * @brief Find \c input command in \c cmdList - * - * @param input Pointer to command C-string. - * @param cmdList Pointer to external command list. - * @param len Length of \c cmdList - * @return \c -1 if command is not found. - * @return Index of command in \c cmdList if command is found. - */ -int16_t findCmd(const char* input, const CMDList* cmdList, const uint16_t len); - - -// ----- FUNCTION DEFINITIONS -int16_t findCmd(const char* input, const CMDList* cmdList, const uint16_t len) -{ - for (uint16_t i = 0; i < len; i++) - { - // If command is found, return index - if (sStd::cmp(input, cmdList[i].cmd) == SSTD_OK) return i; - } - - return -1; -} - -// END WITH NEW LINE diff --git a/sCMD.h b/sCMD.h index 64c164e..38b07ec 100644 --- a/sCMD.h +++ b/sCMD.h @@ -44,11 +44,33 @@ This License shall be included in all methodal textual files. */ -// ----- MACRO DEFINITIONS -// DELIMITER TYPES -#define sCMD_CC 0 /**< @brief Delimiter between commands. */ -#define sCMD_CA 1 /**< @brief Delimiter between command and arguments. */ -#define sCMD_AA 2 /**< @brief Delimiter between arguments. */ +// ----- CODE SNIPPETS +/** + * @brief Get command handler function for \c _cmd + * + * @param _cmd Command name. + */ +#define SCMD_GET(_cmd) \ + sCMD##_cmd + +/** + * @brief Code snippet for adding command into command list. + * + * @param _cmd Command name. + * @param _description Command description. + */ +#define SCMD_ADD(_cmd, _description) \ + { #_cmd, SCMD_GET(_cmd), _description } + +/** + * @brief Code snippet for creating command handler declaration and definition. + * + * @param _cmd Command name. + * + * @note Command handler is static. + */ +#define SCMD_HANDLER(_cmd) \ + static void SCMD_GET(_cmd)(const char** args, const uint8_t argCnt) // ----- TYPEDEFS @@ -61,34 +83,40 @@ This License shall be included in all methodal textual files. */ typedef void (*cmdH)(const char** args, const uint8_t argCnt); +/** + * @brief Typedef for command index. + * + */ +typedef int16_t cmdIdx; + -// ----- STRUCTS +// ----- ENUMS /** - * @brief Struct for command. + * @brief Enum for delimiter types. * */ -struct CMDList { - const char* cmd; /**< @brief Command C-string. */ - const cmdH cmdHandler; /**< @brief Pointer to command function. See \ref cmdH */ +enum sCMD_del_t : uint8_t { + sCMD_CC = 0, /**< @brief Delimiter between commands. */ + sCMD_CA, /**< @brief Delimiter between command and argument. */ + sCMD_AA /**< @brief Delimiter between arguments inside command. */ }; -// ----- FUNCTION DECLARATIONS +// ----- STRUCTS /** - * @brief Find \c input command in \c cmdList + * @brief Struct for command list. * - * @param input Pointer to command C-string. - * @param cmdList Pointer to external command list. - * @param len Length of \c cmdList - * @return \c -1 if command is not found. - * @return Index of command in \c cmdList if command is found. */ -int16_t findCmd(const char* input, const CMDList* cmdList, const uint16_t len); +struct CMDList { + const char* cmd; /**< @brief Command C-string. */ + const cmdH cmdHandler; /**< @brief Pointer to command function. See \ref cmdH */ + const char* cmdDescription = ""; /**< @brief Command description. */ +}; // ----- CLASSES /** - * @brief Class for command hanlder. + * @brief Class for command handler. * * @tparam max Maximum number of arguments command handler can handle for one command. */ @@ -118,9 +146,9 @@ class CMDHandler { cmdFallback = fallback; // Set delimiters - setDelimiter(sCMD_CC, ccDelimiter); - setDelimiter(sCMD_CA, caDelimiter); - setDelimiter(sCMD_AA, aaDelimiter); + setDelimiter(sCMD_del_t::sCMD_CC, ccDelimiter); + setDelimiter(sCMD_del_t::sCMD_CA, caDelimiter); + setDelimiter(sCMD_del_t::sCMD_AA, aaDelimiter); } /** @@ -138,11 +166,12 @@ class CMDHandler { cmdFallback = nullptr; // Reset delimiters - setDelimiter(sCMD_CC, '\0'); - setDelimiter(sCMD_CA, '\0'); - setDelimiter(sCMD_AA, '\0'); + setDelimiter(sCMD_del_t::sCMD_CC, '\0'); + setDelimiter(sCMD_del_t::sCMD_CA, '\0'); + setDelimiter(sCMD_del_t::sCMD_AA, '\0'); } + // METHOD DECLARATIONS /** * @brief Parse and execute input C-string. @@ -160,7 +189,7 @@ class CMDHandler { char* nextArg = nullptr; char* currCmd = nullptr; char* currArg = nullptr; - int16_t cmdIdx = -1; + cmdIdx idx = -1; uint8_t argCnt = 0; uint8_t cmdCnt = 0; @@ -214,14 +243,14 @@ class CMDHandler { if (*currCmd) { // Find command index in command list - cmdIdx = findCmd(currCmd, cmdList, cmdListLen); + idx = findCmd(currCmd); // Call fallback handler if command was not found - if (cmdIdx == -1) cmdFallback((const char**)currCmd, 0); + if (idx == -1) cmdFallback((const char**)currCmd, 0); else // Command is found { // Call command arguments - cmdList[cmdIdx].cmdHandler((const char**)args, argCnt); + cmdList[idx].cmdHandler((const char**)args, argCnt); // Increase command counter cmdCnt++; @@ -237,11 +266,11 @@ class CMDHandler { /** * @brief Set delimiter character. * - * @param type Delimiter type. - * @param del Delimiter character. + * @param type Delimiter type. See \ref sCMD_del_t + * @param del New delimiter. * @return No return value. */ - inline void setDelimiter(uint8_t type, char del) + inline void setDelimiter(sCMD_del_t type, char del) { // Set delimiter for the type delimiter[type] = del; @@ -250,10 +279,10 @@ class CMDHandler { /** * @brief Get delimiter character. * - * @param type Delimiter type. + * @param type Delimiter type. See \ref sCMD_del_t * @return Configured delimiter. */ - inline char getDelimiter(uint8_t type) const + inline char getDelimiter(sCMD_del_t type) const { // Get delimiter for the type return delimiter[type]; @@ -275,6 +304,26 @@ class CMDHandler { char delimiter[3] = { '\0', '\0', '\0' }; /**< @brief Array with CC, CA and AA delimiters. */ char* args[max]; /**< @brief Pointer to all command's arguments. */ uint16_t cmdListLen = 0; /**< @brief Length of \ref cmdList */ + + // METHODS + /** + * @brief Find command \c cmd in \ref cmdList + * + * @param cmd Command to find. Must end with \c NULL char + * @return \c -1 if command is not found. + * @return Command index in \ref cmdList + */ + cmdIdx findCmd(const char* cmd) const + { + for (uint16_t i = 0; i < cmdListLen; i++) + { + // If command is found, return index + if (sStd::cmp(cmd, cmdList[i].cmd) == SSTD_OK) return i; + } + + // Command is not found + return -1; + } }; From 40a81b6427375ddabdb0ad0c1f1d8d708c09f543 Mon Sep 17 00:00:00 2001 From: silvio3105 <104866334+silvio3105@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:25:01 +0100 Subject: [PATCH 4/5] Fixed now. Up-to-date! --- sCMD.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sCMD.h b/sCMD.h index 38b07ec..51c8873 100644 --- a/sCMD.h +++ b/sCMD.h @@ -87,7 +87,7 @@ typedef void (*cmdH)(const char** args, const uint8_t argCnt); * @brief Typedef for command index. * */ -typedef int16_t cmdIdx; +typedef int16_t sCMDIdx; // ----- ENUMS @@ -107,7 +107,7 @@ enum sCMD_del_t : uint8_t { * @brief Struct for command list. * */ -struct CMDList { +struct sCMDList { const char* cmd; /**< @brief Command C-string. */ const cmdH cmdHandler; /**< @brief Pointer to command function. See \ref cmdH */ const char* cmdDescription = ""; /**< @brief Command description. */ @@ -121,7 +121,7 @@ struct CMDList { * @tparam max Maximum number of arguments command handler can handle for one command. */ template -class CMDHandler { +class sCMD { // PUBLIC STUFF public: // CONSTRUCTOR & DECONSTRUCTOR METHOD DECLARATIONS @@ -136,7 +136,7 @@ class CMDHandler { * @param aaDelimiter Delimiter character between arguments. Default delimiter is \c , * @return No return value. */ - CMDHandler(const CMDList* list, uint16_t len, cmdH fallback, char ccDelimiter = ';', char caDelimiter = ',', char aaDelimiter = ',') + sCMD(const sCMDList* list, uint16_t len, cmdH fallback, char ccDelimiter = ';', char caDelimiter = ',', char aaDelimiter = ',') { // Set command list cmdList = list; @@ -156,7 +156,7 @@ class CMDHandler { * * @return No return value. */ - ~CMDHandler(void) + ~sCMD(void) { // Reset command list cmdList = nullptr; @@ -189,7 +189,7 @@ class CMDHandler { char* nextArg = nullptr; char* currCmd = nullptr; char* currArg = nullptr; - cmdIdx idx = -1; + sCMDIdx idx = -1; uint8_t argCnt = 0; uint8_t cmdCnt = 0; @@ -299,7 +299,7 @@ class CMDHandler { * Function parameter \c args points to command C-string that does not exist. See \ref cmdH */ cmdH cmdFallback = nullptr; - const CMDList* cmdList; /**< @brief Pointer to external list of commands. */ + const sCMDList* cmdList; /**< @brief Pointer to external list of commands. */ uint8_t maxArgs = max; /**< @brief Length of \ref args array. */ char delimiter[3] = { '\0', '\0', '\0' }; /**< @brief Array with CC, CA and AA delimiters. */ char* args[max]; /**< @brief Pointer to all command's arguments. */ @@ -313,7 +313,7 @@ class CMDHandler { * @return \c -1 if command is not found. * @return Command index in \ref cmdList */ - cmdIdx findCmd(const char* cmd) const + sCMDIdx findCmd(const char* cmd) const { for (uint16_t i = 0; i < cmdListLen; i++) { From 5d5e9a4d82bd8bf703536cb196e5cf715176182b Mon Sep 17 00:00:00 2001 From: silvio3105 <104866334+silvio3105@users.noreply.github.com> Date: Wed, 22 Feb 2023 20:25:56 +0100 Subject: [PATCH 5/5] v1.1r1 doxygen. --- .docs/html/annotated.html | 8 +- .docs/html/annotated_dup.js | 4 +- .docs/html/class_c_m_d_handler-members.html | 8 +- .docs/html/class_c_m_d_handler.html | 67 ++- .docs/html/class_c_m_d_handler.js | 4 +- ...ef63e2e190efe814b5cfadc1e8c781_icgraph.map | 5 + ...ef63e2e190efe814b5cfadc1e8c781_icgraph.md5 | 1 + ...ef63e2e190efe814b5cfadc1e8c781_icgraph.png | Bin 0 -> 5272 bytes ...e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.map | 2 +- ...e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.md5 | 2 +- ...0dff8dad9b29c91453a4f8c689a9c47_cgraph.map | 2 +- ...0dff8dad9b29c91453a4f8c689a9c47_cgraph.md5 | 2 +- .docs/html/classes.html | 10 +- .docs/html/classs_c_m_d-members.html | 114 +++++ .docs/html/classs_c_m_d.html | 430 ++++++++++++++++++ .docs/html/classs_c_m_d.js | 8 + ...9218c24b2459beff37a2c44cc3db1a9_cgraph.map | 4 + ...9218c24b2459beff37a2c44cc3db1a9_cgraph.md5 | 1 + ...9218c24b2459beff37a2c44cc3db1a9_cgraph.png | Bin 0 -> 2425 bytes ...af423609c21bb0fbae6f6e3f0814b8_icgraph.map | 5 + ...af423609c21bb0fbae6f6e3f0814b8_icgraph.md5 | 1 + ...af423609c21bb0fbae6f6e3f0814b8_icgraph.png | Bin 0 -> 4281 bytes ...8c56a4e32cafb932af755d169f170b5_cgraph.map | 4 + ...8c56a4e32cafb932af755d169f170b5_cgraph.md5 | 1 + ...8c56a4e32cafb932af755d169f170b5_cgraph.png | Bin 0 -> 2425 bytes ...dd867db6da2169039d0adad7ce6ac1e_cgraph.map | 4 + ...dd867db6da2169039d0adad7ce6ac1e_cgraph.md5 | 1 + ...dd867db6da2169039d0adad7ce6ac1e_cgraph.png | Bin 0 -> 2508 bytes .docs/html/files.html | 7 +- .docs/html/files_dup.js | 1 - .docs/html/functions.html | 19 +- .docs/html/functions_func.html | 14 +- .docs/html/functions_vars.html | 9 +- .docs/html/globals.html | 16 +- .docs/html/globals_defs.html | 10 +- .docs/html/globals_enum.html | 8 +- .docs/html/globals_eval.html | 12 +- .docs/html/globals_type.html | 5 +- .docs/html/graph_legend.html | 4 +- .docs/html/group__s_c_m_d.html | 209 +++++---- .docs/html/group__s_c_m_d.js | 32 +- .docs/html/index.html | 4 +- .docs/html/md__r_e_a_d_m_e.html | 11 +- .docs/html/menudata.js | 3 +- .docs/html/modules.html | 4 +- .docs/html/navtreedata.js | 3 +- .docs/html/navtreeindex0.js | 44 +- .docs/html/pages.html | 4 +- .docs/html/s_c_m_d_8h.html | 57 ++- .docs/html/s_c_m_d_8h.js | 13 +- .docs/html/s_c_m_d_8h_source.html | 382 +++++++++------- .docs/html/search/all_0.js | 10 +- .docs/html/search/all_1.js | 2 +- .docs/html/search/all_2.js | 2 +- .docs/html/search/all_3.js | 15 +- .docs/html/search/all_4.js | 9 +- .docs/html/search/classes_0.js | 4 +- .docs/html/search/classes_1.js | 4 + .docs/html/search/enums_0.js | 2 +- .docs/html/search/enumvalues_0.js | 6 +- .docs/html/search/files_0.js | 3 +- .docs/html/search/functions_0.js | 2 +- .docs/html/search/functions_1.js | 2 +- .docs/html/search/functions_2.js | 3 +- .docs/html/search/functions_3.js | 2 +- .docs/html/search/functions_4.js | 2 +- .docs/html/search/searchdata.js | 24 +- .docs/html/search/typedefs_1.js | 4 + .docs/html/search/variables_0.js | 5 +- .docs/html/struct_c_m_d_list-members.html | 7 +- .docs/html/struct_c_m_d_list.html | 35 +- .docs/html/struct_c_m_d_list.js | 1 + .docs/html/structs_c_m_d_list-members.html | 112 +++++ .docs/html/structs_c_m_d_list.html | 190 ++++++++ .docs/html/structs_c_m_d_list.js | 6 + Doxyfile | 2 +- 76 files changed, 1504 insertions(+), 509 deletions(-) create mode 100644 .docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.map create mode 100644 .docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.md5 create mode 100644 .docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.png create mode 100644 .docs/html/classs_c_m_d-members.html create mode 100644 .docs/html/classs_c_m_d.html create mode 100644 .docs/html/classs_c_m_d.js create mode 100644 .docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.map create mode 100644 .docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.md5 create mode 100644 .docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.png create mode 100644 .docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.map create mode 100644 .docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.md5 create mode 100644 .docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.png create mode 100644 .docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.map create mode 100644 .docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.md5 create mode 100644 .docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.png create mode 100644 .docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.map create mode 100644 .docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.md5 create mode 100644 .docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.png create mode 100644 .docs/html/search/classes_1.js create mode 100644 .docs/html/search/typedefs_1.js create mode 100644 .docs/html/structs_c_m_d_list-members.html create mode 100644 .docs/html/structs_c_m_d_list.html create mode 100644 .docs/html/structs_c_m_d_list.js diff --git a/.docs/html/annotated.html b/.docs/html/annotated.html index 9523ec3..6f5bb41 100644 --- a/.docs/html/annotated.html +++ b/.docs/html/annotated.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -96,8 +96,8 @@
Here are the classes, structs, unions and interfaces with brief descriptions:
- - + +
 CCMDHandlerClass for command hanlder
 CCMDListStruct for command
 CsCMDClass for command handler
 CsCMDListStruct for command list
@@ -105,7 +105,7 @@ diff --git a/.docs/html/annotated_dup.js b/.docs/html/annotated_dup.js index 5ea5d82..b6a1c68 100644 --- a/.docs/html/annotated_dup.js +++ b/.docs/html/annotated_dup.js @@ -1,5 +1,5 @@ var annotated_dup = [ - [ "CMDHandler", "class_c_m_d_handler.html", "class_c_m_d_handler" ], - [ "CMDList", "struct_c_m_d_list.html", "struct_c_m_d_list" ] + [ "sCMD", "classs_c_m_d.html", "classs_c_m_d" ], + [ "sCMDList", "structs_c_m_d_list.html", "structs_c_m_d_list" ] ]; \ No newline at end of file diff --git a/.docs/html/class_c_m_d_handler-members.html b/.docs/html/class_c_m_d_handler-members.html index a65c9cd..34af937 100644 --- a/.docs/html/class_c_m_d_handler-members.html +++ b/.docs/html/class_c_m_d_handler-members.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.0r2
Frameworkless simple command handler written in C++.
@@ -99,15 +99,15 @@ - - + +
CMDHandler(const CMDList *list, uint16_t len, cmdH fallback, char ccDelimiter=';', char caDelimiter=',', char aaDelimiter=',')CMDHandler< max >inline
exe(char *input, uint8_t nullAsArg=0)CMDHandler< max >inline
getDelimiter(uint8_t type) constCMDHandler< max >inline
setDelimiter(uint8_t type, char del)CMDHandler< max >inline
getDelimiter(sCMD_del_t type) constCMDHandler< max >inline
setDelimiter(sCMD_del_t type, char del)CMDHandler< max >inline
~CMDHandler(void)CMDHandler< max >inline
diff --git a/.docs/html/class_c_m_d_handler.html b/.docs/html/class_c_m_d_handler.html index 757a7f1..32a615c 100644 --- a/.docs/html/class_c_m_d_handler.html +++ b/.docs/html/class_c_m_d_handler.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.0r2
Frameworkless simple command handler written in C++.
@@ -98,7 +98,7 @@
-

Class for command hanlder. +

Class for command handler. More...

#include <sCMD.h>

@@ -114,16 +114,16 @@ uint8_t exe (char *input, uint8_t nullAsArg=0)  Parse and execute input C-string. More...
  -void setDelimiter (uint8_t type, char del) - Set delimiter character. More...
-  -char getDelimiter (uint8_t type) const - Get delimiter character. More...
-  +void setDelimiter (sCMD_del_t type, char del) + Set delimiter character. More...
+  +char getDelimiter (sCMD_del_t type) const + Get delimiter character. More...

Detailed Description

template<uint8_t max>
-class CMDHandler< max >

Class for command hanlder.

+class CMDHandler< max >

Class for command handler.

Template Parameters
@@ -131,7 +131,7 @@ -

Definition at line 96 of file sCMD.h.

+

Definition at line 124 of file sCMD.h.

Constructor & Destructor Documentation

◆ CMDHandler()

@@ -207,14 +207,14 @@

Returns
No return value.
-

Definition at line 111 of file sCMD.h.

+

Definition at line 139 of file sCMD.h.

Here is the call graph for this function:
- +
@@ -249,14 +249,14 @@

Returns
No return value.
-

Definition at line 131 of file sCMD.h.

+

Definition at line 159 of file sCMD.h.

Here is the call graph for this function:
- +
@@ -311,21 +311,12 @@

Warning
This function modifies input C-string!
Note
This function parses input C-string from left to right.
-

Definition at line 157 of file sCMD.h.

-
-Here is the call graph for this function:
-
-
- - - - -
+

Definition at line 186 of file sCMD.h.

- -

◆ getDelimiter()

+ +

◆ getDelimiter()

@@ -338,7 +329,7 @@

char CMDHandler< max >::getDelimiter

- + @@ -353,18 +344,18 @@

Parameters

maxMaximum number of arguments command handler can handle for one command.
(uint8_t sCMD_del_t  type) const
- +
typeDelimiter type.
typeDelimiter type. See sCMD_del_t
Returns
Configured delimiter.
-

Definition at line 256 of file sCMD.h.

+

Definition at line 285 of file sCMD.h.

- -

◆ setDelimiter()

+ +

◆ setDelimiter()

@@ -377,7 +368,7 @@

void CMDHandler< max >::setDelimiter ( - uint8_t  + sCMD_del_t  type, @@ -402,19 +393,19 @@

Parameters
- - + +
typeDelimiter type.
delDelimiter character.
typeDelimiter type. See sCMD_del_t
delNew delimiter.
Returns
No return value.
-

Definition at line 244 of file sCMD.h.

+

Definition at line 273 of file sCMD.h.

Here is the caller graph for this function:
-
- +
+ @@ -432,7 +423,7 @@

    - +

diff --git a/.docs/html/class_c_m_d_handler.js b/.docs/html/class_c_m_d_handler.js index da26987..34278b9 100644 --- a/.docs/html/class_c_m_d_handler.js +++ b/.docs/html/class_c_m_d_handler.js @@ -3,6 +3,6 @@ var class_c_m_d_handler = [ "CMDHandler", "class_c_m_d_handler.html#a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a", null ], [ "~CMDHandler", "class_c_m_d_handler.html#ab0dff8dad9b29c91453a4f8c689a9c47", null ], [ "exe", "class_c_m_d_handler.html#a81e71d6d511bd21237c40366bc31cf59", null ], - [ "getDelimiter", "class_c_m_d_handler.html#aa8501ee9fae636c4d0fc2311cab3a54b", null ], - [ "setDelimiter", "class_c_m_d_handler.html#a296dc2f654b585e7cb29caa69452d432", null ] + [ "getDelimiter", "class_c_m_d_handler.html#ae9ba05153e1ceda678e45ac52f151102", null ], + [ "setDelimiter", "class_c_m_d_handler.html#a54ef63e2e190efe814b5cfadc1e8c781", null ] ]; \ No newline at end of file diff --git a/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.map b/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.map new file mode 100644 index 0000000..1c0c40b --- /dev/null +++ b/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.md5 b/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.md5 new file mode 100644 index 0000000..a19fbe9 --- /dev/null +++ b/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.md5 @@ -0,0 +1 @@ +6562f5e8abd5da85fe8c227480fdf567 \ No newline at end of file diff --git a/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.png b/.docs/html/class_c_m_d_handler_a54ef63e2e190efe814b5cfadc1e8c781_icgraph.png new file mode 100644 index 0000000000000000000000000000000000000000..a3abd553cd2c00a347fa537011530a8586096817 GIT binary patch literal 5272 zcmbVQcTkhvvj&tdO%$o-0|Z36^r}P=K{`?d1f?n+gir&5A|0fONR{3(6j4F|0VzW0 zErce$g%FSu>hJi?+_`h-&fGt4GIQSKk9W`6v%Al;&qnI$sMFD~(~yvm&}lrpZ$Lsq znhky%QBi>P!}8h=cu-hBQom1f{`Z@MDoP?DxuUIcU-hwX25#C#%VIpOg>cRmGybiv z^Zmrg7KyaIh&lG7tL18~fwgpHIvF`$^M*Djw$$2^<+oT$o{QeS%OYMCTlAU*6Q#Zy zW_%tG4c$y4nK#?RL^a0sI4@H)hU(o@5SMsv(8egxQP-Vu`m7&)NmBd`oBeC0JJhlG z%vXKzEyS|Q!OSbGyHwn78KM8Z2*YkY4ry(LMjNbS2dN%J5DiRB4h+g|7@>i#Pm0Mj zOWcGCf|z5Uz5S@382HxoE|ecq_36_mV$8h=Kf*rN&CtZ;+J^XBM#GQRT(23S5n|Uh zRDk(hoy2(XuQ+Lu_bnsO`VAu3F`~imkqQi%85Kp7Y;d!nxVZS4yZgYQrJ!0+P|!fb zjDlei{Cs_VofQH(5L&=CnRt6kqtR$4i<*8cCnx8hXvv{`hA_rQqm4JRmzV8t-MTe_ z^bs?2svTQgUQYb*VY%KzG3Z1N4u=PM<6w$@etx7b3Y_$LBK25wsZp8lVuJcI?+Ll; zkscKySxt!;6CYn=(@9ScQR!Vqr^gbF%TmV1jQcVb9eQgp&W*c$ia~qvT#6lA(?|!4 zcNpj8vtvAEPDO>t=ETv_(M=H%={VNLfZZ9C8**AFC`d(9Fb;CZb)*K1dw^PBcbszd z8Q6a+n(C2nU}hFI?aDBDHaGVVaOkm#35PelsDPnu;~sbWW#h+>y{tSu5cJ~#cvMly z`z4ZT45nmvXD7zbwcdPXX^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handler_a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.map +++ b/.docs/html/class_c_m_d_handler_a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.map @@ -1,4 +1,4 @@ - + diff --git a/.docs/html/class_c_m_d_handler_a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.md5 b/.docs/html/class_c_m_d_handler_a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.md5 index 1d46a27..4fbdffd 100644 --- a/.docs/html/class_c_m_d_handler_a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.md5 +++ b/.docs/html/class_c_m_d_handler_a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a_cgraph.md5 @@ -1 +1 @@ -6eacd90b4179b600a164bd7e3eb3e76e \ No newline at end of file +afa7ea01a28013c4b64e742929bad2a2 \ No newline at end of file diff --git a/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.map b/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.map index 7c42c2b..69c8888 100644 --- a/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.map +++ b/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.map @@ -1,4 +1,4 @@ - + diff --git a/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.md5 b/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.md5 index 6aa73f4..99b3bf0 100644 --- a/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.md5 +++ b/.docs/html/class_c_m_d_handler_ab0dff8dad9b29c91453a4f8c689a9c47_cgraph.md5 @@ -1 +1 @@ -1fa36b547b44e75b2301310b6060d3d9 \ No newline at end of file +3077159dfadd9a82ac8a459a89a0889b \ No newline at end of file diff --git a/.docs/html/classes.html b/.docs/html/classes.html index b162d85..45617a8 100644 --- a/.docs/html/classes.html +++ b/.docs/html/classes.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -94,18 +94,18 @@
Class Index

diff --git a/.docs/html/classs_c_m_d-members.html b/.docs/html/classs_c_m_d-members.html new file mode 100644 index 0000000..edbce89 --- /dev/null +++ b/.docs/html/classs_c_m_d-members.html @@ -0,0 +1,114 @@ + + + + + + + +sCMD: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
sCMD v1.1r1 +
+
Frameworkless simple command handler written in C++.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
sCMD< max > Member List
+
+
+ +

This is the complete list of members for sCMD< max >, including all inherited members.

+ + + + + + +
exe(char *input, uint8_t nullAsArg=0)sCMD< max >inline
getDelimiter(sCMD_del_t type) constsCMD< max >inline
sCMD(const sCMDList *list, uint16_t len, cmdH fallback, char ccDelimiter=';', char caDelimiter=',', char aaDelimiter=',')sCMD< max >inline
setDelimiter(sCMD_del_t type, char del)sCMD< max >inline
~sCMD(void)sCMD< max >inline
+
+ + + + diff --git a/.docs/html/classs_c_m_d.html b/.docs/html/classs_c_m_d.html new file mode 100644 index 0000000..fc7b82f --- /dev/null +++ b/.docs/html/classs_c_m_d.html @@ -0,0 +1,430 @@ + + + + + + + +sCMD: sCMD< max > Class Template Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
sCMD v1.1r1 +
+
Frameworkless simple command handler written in C++.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
sCMD< max > Class Template Reference
+
+
+ +

Class for command handler. + More...

+ +

#include <sCMD.h>

+ + + + + + + + + + + + + + + + + +

+Public Member Functions

 sCMD (const sCMDList *list, uint16_t len, cmdH fallback, char ccDelimiter=';', char caDelimiter=',', char aaDelimiter=',')
 CMD handler constructor. More...
 
 ~sCMD (void)
 CMD handler deconstructor. More...
 
uint8_t exe (char *input, uint8_t nullAsArg=0)
 Parse and execute input C-string. More...
 
void setDelimiter (sCMD_del_t type, char del)
 Set delimiter character. More...
 
char getDelimiter (sCMD_del_t type) const
 Get delimiter character. More...
 
+

Detailed Description

+
template<uint8_t max>
+class sCMD< max >

Class for command handler.

+
Template Parameters
+ + +
maxMaximum number of arguments command handler can handle for one command.
+
+
+ +

Definition at line 124 of file sCMD.h.

+

Constructor & Destructor Documentation

+ +

◆ sCMD()

+ +
+
+
+template<uint8_t max>
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
sCMD< max >::sCMD (const sCMDListlist,
uint16_t len,
cmdH fallback,
char ccDelimiter = ';',
char caDelimiter = ',',
char aaDelimiter = ',' 
)
+
+inline
+
+ +

CMD handler constructor.

+
Parameters
+ + + + + + + +
listPointer to list of commands.
lenLength of list
fallbackPointer to external function that is called when unknown command is found.
ccDelimiterDelimiter character between commands. Default delimiter is ;
caDelimiterDelimiter character between command and arguments. Default delimiter is ,
aaDelimiterDelimiter character between arguments. Default delimiter is ,
+
+
+
Returns
No return value.
+ +

Definition at line 139 of file sCMD.h.

+
+Here is the call graph for this function:
+
+
+ + + + +
+ +
+
+ +

◆ ~sCMD()

+ +
+
+
+template<uint8_t max>
+ + + + + +
+ + + + + + + + +
sCMD< max >::~sCMD (void )
+
+inline
+
+ +

CMD handler deconstructor.

+
Returns
No return value.
+ +

Definition at line 159 of file sCMD.h.

+
+Here is the call graph for this function:
+
+
+ + + + +
+ +
+
+

Member Function Documentation

+ +

◆ exe()

+ +
+
+
+template<uint8_t max>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
uint8_t sCMD< max >::exe (char * input,
uint8_t nullAsArg = 0 
)
+
+inline
+
+ +

Parse and execute input C-string.

+
Parameters
+ + + +
inputPointer to C-string.
nullAsArgSet to 1 to include \0 as argument. By default, this parameter is set to 0
+
+
+
Returns
Number of executed commands.
+
Warning
This function modifies input C-string!
+
Note
This function parses input C-string from left to right.
+ +

Definition at line 186 of file sCMD.h.

+ +
+
+ +

◆ getDelimiter()

+ +
+
+
+template<uint8_t max>
+ + + + + +
+ + + + + + + + +
char sCMD< max >::getDelimiter (sCMD_del_t type) const
+
+inline
+
+ +

Get delimiter character.

+
Parameters
+ + +
typeDelimiter type. See sCMD_del_t
+
+
+
Returns
Configured delimiter.
+ +

Definition at line 285 of file sCMD.h.

+ +
+
+ +

◆ setDelimiter()

+ +
+
+
+template<uint8_t max>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void sCMD< max >::setDelimiter (sCMD_del_t type,
char del 
)
+
+inline
+
+ +

Set delimiter character.

+
Parameters
+ + + +
typeDelimiter type. See sCMD_del_t
delNew delimiter.
+
+
+
Returns
No return value.
+ +

Definition at line 273 of file sCMD.h.

+
+Here is the caller graph for this function:
+
+
+ + + + + +
+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/.docs/html/classs_c_m_d.js b/.docs/html/classs_c_m_d.js new file mode 100644 index 0000000..4a9eee8 --- /dev/null +++ b/.docs/html/classs_c_m_d.js @@ -0,0 +1,8 @@ +var classs_c_m_d = +[ + [ "sCMD", "classs_c_m_d.html#ab8c56a4e32cafb932af755d169f170b5", null ], + [ "~sCMD", "classs_c_m_d.html#acdd867db6da2169039d0adad7ce6ac1e", null ], + [ "exe", "classs_c_m_d.html#a6073a3d8ecf99fb983d72e5532ea1f95", null ], + [ "getDelimiter", "classs_c_m_d.html#a91dc61752b4712622c3c49e393338c86", null ], + [ "setDelimiter", "classs_c_m_d.html#ab4af423609c21bb0fbae6f6e3f0814b8", null ] +]; \ No newline at end of file diff --git a/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.map b/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.map new file mode 100644 index 0000000..8aafb50 --- /dev/null +++ b/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.md5 b/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.md5 new file mode 100644 index 0000000..78dff4b --- /dev/null +++ b/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.md5 @@ -0,0 +1 @@ +a08636199d507986a1b4b122c09679a5 \ No newline at end of file diff --git a/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.png b/.docs/html/classs_c_m_d_a79218c24b2459beff37a2c44cc3db1a9_cgraph.png new file mode 100644 index 0000000000000000000000000000000000000000..f2f9fe3360adba42b7aad7778caa977817a7dd85 GIT binary patch literal 2425 zcmV-<35NEGP)AOAvmdV1bc073{Mgb+dqA%qY@))(_Up;Dg(Ly*X#9e$F7Qti?MItK7@sZeUy1O+R@v5 z2j}?elR4b{>+e`VFDshOW*7_x=yW;&Kut{z)M_#cN*IksufB}UzYUOc z?sn{|si_GC1qBd`#p`t!gt^DY#@uqRG|Tw-IAUXC!8v#PdO1A%dFI%M{-8X7`d zTN@M#1@wA7^m;v#laogt5C&YwSz(9lra zym|AZ%o_+>wqP4$X!$t=lV!JgyXp=eZK z`1rWcuD!h-!^6XFea&VwluD)7m}6sO!dNpiGl+)!*Nbix)3KqtT$Ns|&NUvj70Q-HvnT&Y`fd5K&Q4Li_mmc$_$K0#>V4IG2}~ z=k}li0F%iCxm>>F++ks1*uQ^20AO@<6u^9u>FVkd+ISuZTiy>AM+gJHbZ}gW*p8{A zxA_mMPM%f%4<52sQ?$3YBPS;Zj4?DcGzdQfo6UxU2M?mLu@MOg2|{~?LV*Vl9^lE7 zC&Ib<`g-*B^|_5}Fc?r&RJ7#WVzC%UjvN61^z`%qm@kSA4GlsY&*R1N0)W+OM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zmX?-BAGbn0X*3#e&JQ;?H~aT_P=xrz@RoDj5iwl0*-HZJ=|I&5u6KfDjV2s6Y`yf)*7hLP*e}0!0W3T2!D2 zAwg@=t9T}pX(Mxxk3?TzAN^lE;y14X#X0{G^Z((K1R;?~^gPfRR!Sri{n_Dg+z50I r5}e-G9zqBqgb+dqA%qY@Hq`$C?1n5YbXGJa00000NkvXXu0mjfr`wm@ literal 0 HcmV?d00001 diff --git a/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.map b/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.map new file mode 100644 index 0000000..f42b4c6 --- /dev/null +++ b/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.md5 b/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.md5 new file mode 100644 index 0000000..feacb67 --- /dev/null +++ b/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.md5 @@ -0,0 +1 @@ +da60ac4f37d4ee1984433b001c2b492f \ No newline at end of file diff --git a/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.png b/.docs/html/classs_c_m_d_ab4af423609c21bb0fbae6f6e3f0814b8_icgraph.png new file mode 100644 index 0000000000000000000000000000000000000000..9ceb09ece54a2635e98e592eb475659e363f2090 GIT binary patch literal 4281 zcmb7|cT^MKw#P%0-m4%Yoe)42Lj)mc1f>fqEz(t5Xo55;35XyFQUye+NRbv0LocC& zfPkSW0ck=MOaPG{$erJM>)p5BANP;DX00T%-5|6;&F~W3#Vfq^)CA6oFQM17UAS) zE-y$wtiHY0mcnv_BX5*+g@YRWahb>Y5=R!k`SO{UiwW0fnPR&m3BS&eRij0qeQwO> zqIrUh__BDUJPqji5z)#9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170b5_cgraph.map b/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.map new file mode 100644 index 0000000..8aafb50 --- /dev/null +++ b/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.md5 b/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.md5 new file mode 100644 index 0000000..78dff4b --- /dev/null +++ b/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.md5 @@ -0,0 +1 @@ +a08636199d507986a1b4b122c09679a5 \ No newline at end of file diff --git a/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.png b/.docs/html/classs_c_m_d_ab8c56a4e32cafb932af755d169f170b5_cgraph.png new file mode 100644 index 0000000000000000000000000000000000000000..f2f9fe3360adba42b7aad7778caa977817a7dd85 GIT binary patch literal 2425 zcmV-<35NEGP)AOAvmdV1bc073{Mgb+dqA%qY@))(_Up;Dg(Ly*X#9e$F7Qti?MItK7@sZeUy1O+R@v5 z2j}?elR4b{>+e`VFDshOW*7_x=yW;&Kut{z)M_#cN*IksufB}UzYUOc z?sn{|si_GC1qBd`#p`t!gt^DY#@uqRG|Tw-IAUXC!8v#PdO1A%dFI%M{-8X7`d zTN@M#1@wA7^m;v#laogt5C&YwSz(9lra zym|AZ%o_+>wqP4$X!$t=lV!JgyXp=eZK z`1rWcuD!h-!^6XFea&VwluD)7m}6sO!dNpiGl+)!*Nbix)3KqtT$Ns|&NUvj70Q-HvnT&Y`fd5K&Q4Li_mmc$_$K0#>V4IG2}~ z=k}li0F%iCxm>>F++ks1*uQ^20AO@<6u^9u>FVkd+ISuZTiy>AM+gJHbZ}gW*p8{A zxA_mMPM%f%4<52sQ?$3YBPS;Zj4?DcGzdQfo6UxU2M?mLu@MOg2|{~?LV*Vl9^lE7 zC&Ib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v1Z{^M2*&CSgL{XD4hE*>*CC#<06`1}*y8wT8D96yLYMOV{4_SUnXTCKj3 zmX?-BAGbn0X*3#e&JQ;?H~aT_P=xrz@RoDj5iwl0*-HZJ=|I&5u6KfDjV2s6Y`yf)*7hLP*e}0!0W3T2!D2 zAwg@=t9T}pX(Mxxk3?TzAN^lE;y14X#X0{G^Z((K1R;?~^gPfRR!Sri{n_Dg+z50I r5}e-G9zqBqgb+dqA%qY@Hq`$C?1n5YbXGJa00000NkvXXu0mjfr`wm@ literal 0 HcmV?d00001 diff --git a/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.map b/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.map new file mode 100644 index 0000000..c07a9be --- /dev/null +++ b/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.map @@ -0,0 +1,4 @@ + + + + diff --git a/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.md5 b/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.md5 new file mode 100644 index 0000000..678a117 --- /dev/null +++ b/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.md5 @@ -0,0 +1 @@ +76fa662251a462acea94e8f80a436ec2 \ No newline at end of file diff --git a/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.png b/.docs/html/classs_c_m_d_acdd867db6da2169039d0adad7ce6ac1e_cgraph.png new file mode 100644 index 0000000000000000000000000000000000000000..08d373275a56be34bee0ee807fd0bd492997b576 GIT binary patch literal 2508 zcmV;-2{ZPIP)!}tU`0OG0%69(PiJb(e=kr3&z4x5+JI>9IbI-lG0Yy<1MNt$*Q4~c{6h&Fu zMC=Bu)oKtzJii#hD9O|5bfXT3BI}GI!Gu=6%Ti`epMNv{lB``%%(w0hKilU?~mB185Nn0v` zDTW1$=I2?|sa-@oi z3Z8xTSu!#*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
 sCMD.cppSimple Command Handler source file
 sCMD.hSimple Command Handler header file
 sCMD.hSimple Command Handler header file
@@ -105,7 +104,7 @@ diff --git a/.docs/html/files_dup.js b/.docs/html/files_dup.js index 73bdca4..6a4d9bd 100644 --- a/.docs/html/files_dup.js +++ b/.docs/html/files_dup.js @@ -1,5 +1,4 @@ var files_dup = [ - [ "sCMD.cpp", "s_c_m_d_8cpp.html", "s_c_m_d_8cpp" ], [ "sCMD.h", "s_c_m_d_8h.html", "s_c_m_d_8h" ] ]; \ No newline at end of file diff --git a/.docs/html/functions.html b/.docs/html/functions.html index 861faca..5038a4c 100644 --- a/.docs/html/functions.html +++ b/.docs/html/functions.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -92,20 +92,21 @@
Here is a list of all documented class members with links to the class documentation for each member:
diff --git a/.docs/html/functions_func.html b/.docs/html/functions_func.html index 1eefcf0..27c7394 100644 --- a/.docs/html/functions_func.html +++ b/.docs/html/functions_func.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -92,18 +92,18 @@
 
diff --git a/.docs/html/functions_vars.html b/.docs/html/functions_vars.html index b053f5d..e254e05 100644 --- a/.docs/html/functions_vars.html +++ b/.docs/html/functions_vars.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -92,15 +92,16 @@
 
diff --git a/.docs/html/globals.html b/.docs/html/globals.html index 5678610..d59791c 100644 --- a/.docs/html/globals.html +++ b/.docs/html/globals.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -93,17 +93,21 @@
Here is a list of all documented file members with links to the documentation:
diff --git a/.docs/html/globals_defs.html b/.docs/html/globals_defs.html index acd4e5e..66f901f 100644 --- a/.docs/html/globals_defs.html +++ b/.docs/html/globals_defs.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -92,16 +92,16 @@
 
diff --git a/.docs/html/globals_enum.html b/.docs/html/globals_enum.html index d1583f7..634cba6 100644 --- a/.docs/html/globals_enum.html +++ b/.docs/html/globals_enum.html @@ -26,9 +26,9 @@ -
sCMD v0.1 +
sCMD v1.1r1
-
Simple Command handler written in C++.
+
Frameworkless simple command handler written in C++.
@@ -92,14 +92,14 @@
 
diff --git a/.docs/html/globals_eval.html b/.docs/html/globals_eval.html index c917235..92302b9 100644 --- a/.docs/html/globals_eval.html +++ b/.docs/html/globals_eval.html @@ -26,9 +26,9 @@ -
sCMD v0.1 +
sCMD v1.1r1
-
Simple Command handler written in C++.
+
Frameworkless simple command handler written in C++.
@@ -92,16 +92,16 @@
 
diff --git a/.docs/html/globals_type.html b/.docs/html/globals_type.html index e365c5a..8733478 100644 --- a/.docs/html/globals_type.html +++ b/.docs/html/globals_type.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -93,13 +93,14 @@
 
diff --git a/.docs/html/graph_legend.html b/.docs/html/graph_legend.html index 24c77b1..4060e6f 100644 --- a/.docs/html/graph_legend.html +++ b/.docs/html/graph_legend.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -159,7 +159,7 @@ diff --git a/.docs/html/group__s_c_m_d.html b/.docs/html/group__s_c_m_d.html index 2bc8401..6139485 100644 --- a/.docs/html/group__s_c_m_d.html +++ b/.docs/html/group__s_c_m_d.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -95,100 +95,148 @@ Classes | Macros | Typedefs | -Functions
+Enumerations
SCMD
- - + + - - + +

Classes

struct  CMDList
 Struct for command. More...
struct  sCMDList
 Struct for command list. More...
 
class  CMDHandler< max >
 Class for command hanlder. More...
class  sCMD< max >
 Class for command handler. More...
 
- - - - - - - - - + + + + + + + + +

Macros

#define sCMD_CC   0
 Delimiter between commands. More...
 
#define sCMD_CA   1
 Delimiter between command and arguments. More...
 
#define sCMD_AA   2
 Delimiter between arguments. More...
 
#define SCMD_GET(_cmd)    sCMD##_cmd
 Get command handler function for _cmd. More...
 
#define SCMD_ADD(_cmd, _description)    { #_cmd, SCMD_GET(_cmd), _description }
 Code snippet for adding command into command list. More...
 
#define SCMD_HANDLER(_cmd)    static void SCMD_GET(_cmd)(const char** args, const uint8_t argCnt)
 Code snippet for creating command handler declaration and definition. More...
 
+ + +

Typedefs

typedef void(* cmdH) (const char **args, const uint8_t argCnt)
 Typedef for command handler. More...
 
typedef int16_t sCMDIdx
 Typedef for command index. More...
 
- - - - + + + +

-Functions

int16_t findCmd (const char *input, const CMDList *cmdList, const uint16_t len)
 Find input command in cmdList. More...
 

+Enumerations

enum  sCMD_del_t : uint8_t { sCMD_CC = 0 +, sCMD_CA +, sCMD_AA + }
 Enum for delimiter types. More...
 

Detailed Description

Simple Command Handler.

Command format is: cmd1:param1,...,paramN;...;cmdN:param1,...,paramN where ; is coomand to command delimiter, : command to argument delimiter and , argument to argument delimiter. Command can be without arguments.

-

Create command list with CMDList struct and command handler object using CMD<max> class template. max is maximum number of arguments that command handler can accept. Command handler supports multiple command delimiters(coomand to command, command to arguments and argument to argument). Search for command is case sensitive(cmd != Cmd). See examples for beter understanding.

+

Create command list with CMDList struct and command handler object using CMD<max> class template. max is maximum number of arguments that command handler can accept. Command handler supports multiple command delimiters(coomand to command, command to arguments and argument to argument). Search for command is case sensitive(cmd != Cmd). See examples for beter understanding.

Macro Definition Documentation

- -

◆ sCMD_AA

+ +

◆ SCMD_ADD

- + + + + + + + + + + + + + + +
#define sCMD_AA   2#define SCMD_ADD( _cmd,
 _description 
)    { #_cmd, SCMD_GET(_cmd), _description }
-

Delimiter between arguments.

+

Code snippet for adding command into command list.

+
Parameters
+ + + +
_cmdCommand name.
_descriptionCommand description.
+
+
-

Definition at line 51 of file sCMD.h.

+

Definition at line 62 of file sCMD.h.

- -

◆ sCMD_CA

+ +

◆ SCMD_GET

- + + + + +
#define sCMD_CA   1#define SCMD_GET( _cmd)    sCMD##_cmd
-

Delimiter between command and arguments.

+

Get command handler function for _cmd.

+
Parameters
+ + +
_cmdCommand name.
+
+
-

Definition at line 50 of file sCMD.h.

+

Definition at line 53 of file sCMD.h.

- -

◆ sCMD_CC

+ +

◆ SCMD_HANDLER

- + + + + +
#define sCMD_CC   0#define SCMD_HANDLER( _cmd)    static void SCMD_GET(_cmd)(const char** args, const uint8_t argCnt)
-

Delimiter between commands.

+

Code snippet for creating command handler declaration and definition.

+
Parameters
+ + +
_cmdCommand name.
+
+
+
Note
Command handler is static.
-

Definition at line 49 of file sCMD.h.

+

Definition at line 72 of file sCMD.h.

@@ -215,77 +263,52 @@

Returns
No return value.
-

Definition at line 62 of file sCMD.h.

+

Definition at line 84 of file sCMD.h.

-

Function Documentation

- -

◆ findCmd()

+ +

◆ sCMDIdx

- - - - - - - - - - - - - - - - + +
int16_t findCmd (const char * input,
const CMDListcmdList,
const uint16_t len typedef int16_t sCMDIdx
+
+ +

Typedef for command index.

+ +

Definition at line 90 of file sCMD.h.

+ +
+
+

Enumeration Type Documentation

+ +

◆ sCMD_del_t

+ +
+
+ - - - +
)enum sCMD_del_t : uint8_t
-

Find input command in cmdList.

-
Parameters
- - - - -
inputPointer to command C-string.
cmdListPointer to external command list.
lenLength of cmdList
-
-
-
Returns
-1 if command is not found.
-
-Index of command in cmdList if command is found.
-
Parameters
- - - - -
inputPointer to command C-string.
cmdListPointer to external command list.
lenLength of cmdList
-
-
-
Returns
-1 if command is not found.
-
-Index of command in cmdList if command is found.
+

Enum for delimiter types.

+ + + + +
Enumerator
sCMD_CC 

Delimiter between commands.

+
sCMD_CA 

Delimiter between command and argument.

+
sCMD_AA 

Delimiter between arguments inside command.

+
-

Definition at line 47 of file sCMD.cpp.

-
-Here is the caller graph for this function:
-
-
- - - - -
+

Definition at line 98 of file sCMD.h.

@@ -294,7 +317,7 @@

diff --git a/.docs/html/group__s_c_m_d.js b/.docs/html/group__s_c_m_d.js index 2ab8f3d..5419a08 100644 --- a/.docs/html/group__s_c_m_d.js +++ b/.docs/html/group__s_c_m_d.js @@ -1,19 +1,25 @@ var group__s_c_m_d = [ - [ "CMDList", "struct_c_m_d_list.html", [ - [ "cmd", "struct_c_m_d_list.html#abdbdb8c1725681c7af26692f4e7c7d78", null ], - [ "cmdHandler", "struct_c_m_d_list.html#a9caafd87cedc702f14a47a3a4089301c", null ] + [ "sCMDList", "structs_c_m_d_list.html", [ + [ "cmd", "structs_c_m_d_list.html#a314d8c24851f01228b2d018ce9d95a9d", null ], + [ "cmdDescription", "structs_c_m_d_list.html#af3af9bd604038bf7bb98b89d7a302b58", null ], + [ "cmdHandler", "structs_c_m_d_list.html#ae2d1f15338e4bcc0537e67ea73ed8607", null ] ] ], - [ "CMDHandler< max >", "class_c_m_d_handler.html", [ - [ "CMDHandler", "class_c_m_d_handler.html#a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a", null ], - [ "~CMDHandler", "class_c_m_d_handler.html#ab0dff8dad9b29c91453a4f8c689a9c47", null ], - [ "exe", "class_c_m_d_handler.html#a81e71d6d511bd21237c40366bc31cf59", null ], - [ "getDelimiter", "class_c_m_d_handler.html#aa8501ee9fae636c4d0fc2311cab3a54b", null ], - [ "setDelimiter", "class_c_m_d_handler.html#a296dc2f654b585e7cb29caa69452d432", null ] + [ "sCMD< max >", "classs_c_m_d.html", [ + [ "sCMD", "classs_c_m_d.html#ab8c56a4e32cafb932af755d169f170b5", null ], + [ "~sCMD", "classs_c_m_d.html#acdd867db6da2169039d0adad7ce6ac1e", null ], + [ "exe", "classs_c_m_d.html#a6073a3d8ecf99fb983d72e5532ea1f95", null ], + [ "getDelimiter", "classs_c_m_d.html#a91dc61752b4712622c3c49e393338c86", null ], + [ "setDelimiter", "classs_c_m_d.html#ab4af423609c21bb0fbae6f6e3f0814b8", null ] ] ], - [ "sCMD_AA", "group__s_c_m_d.html#gabf41a56387b606234547248a5cf74164", null ], - [ "sCMD_CA", "group__s_c_m_d.html#ga00d3cd602b53555150c73418befaa613", null ], - [ "sCMD_CC", "group__s_c_m_d.html#ga95b2953eaf3446e41eaa41b8f03e9ca3", null ], + [ "SCMD_ADD", "group__s_c_m_d.html#ga9ba5942496337bb287bf7b98ec7c39ff", null ], + [ "SCMD_GET", "group__s_c_m_d.html#ga1411ceab8e4cd2f3c874bc395bd4732a", null ], + [ "SCMD_HANDLER", "group__s_c_m_d.html#gaae7661e6307c398240ab2c8520bd6c51", null ], [ "cmdH", "group__s_c_m_d.html#gab7d31f894b743026908bea0c58929204", null ], - [ "findCmd", "group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621", null ] + [ "sCMDIdx", "group__s_c_m_d.html#ga7cdf4eb22a208b705937117dab6cdf51", null ], + [ "sCMD_del_t", "group__s_c_m_d.html#gab7b50b228ddfc95179ddc0b5f3541c78", [ + [ "sCMD_CC", "group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78adbdda4209e48d49b43f4d0b2d22c820a", null ], + [ "sCMD_CA", "group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a5d9da4ac1ad0489f77edfe4df7cb4983", null ], + [ "sCMD_AA", "group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a15ac9688c0578182cf393b0a9d04ddb7", null ] + ] ] ]; \ No newline at end of file diff --git a/.docs/html/index.html b/.docs/html/index.html index 581b44b..401651c 100644 --- a/.docs/html/index.html +++ b/.docs/html/index.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -99,7 +99,7 @@ diff --git a/.docs/html/md__r_e_a_d_m_e.html b/.docs/html/md__r_e_a_d_m_e.html index 6442b3d..3dfc4f9 100644 --- a/.docs/html/md__r_e_a_d_m_e.html +++ b/.docs/html/md__r_e_a_d_m_e.html @@ -26,7 +26,7 @@ -
sCMD v1.0r1 +
sCMD v1.1r1
Frameworkless simple command handler written in C++.
@@ -112,7 +112,12 @@
  • : is command to arguments delimiter.
  • , is argument to argument delimiter.
  • -

    Check library documentation and example codes for more information. Library documentation is available at .docs/html/index.html. Example applications are available at examples folder. All examples are made with STM HAL framework.

    +

    list is an array with commands, handlers and command descriptions.

    CMDList cmdList[] = {
    +
    SCMD_ADD(help, ""), // No description
    +
    SCMD_ADD(reset, "Reset the device"),
    +
    SCMD_ADD(info, "Get device info")
    +
    };
    +

    Check library documentation and example codes for more information. Library documentation is available at .docs/html/index.html. Example applications are available at examples folder. All examples are made with STM HAL framework.

    License

    Copyright (c) 2022, silvio3105 (www.github.com/silvio3105)

    @@ -127,7 +132,7 @@

    diff --git a/.docs/html/menudata.js b/.docs/html/menudata.js index f6e4695..a9bf53c 100644 --- a/.docs/html/menudata.js +++ b/.docs/html/menudata.js @@ -37,6 +37,7 @@ var menudata={children:[ {text:"File List",url:"files.html"}, {text:"File Members",url:"globals.html",children:[ {text:"All",url:"globals.html"}, -{text:"Functions",url:"globals_func.html"}, {text:"Typedefs",url:"globals_type.html"}, +{text:"Enumerations",url:"globals_enum.html"}, +{text:"Enumerator",url:"globals_eval.html"}, {text:"Macros",url:"globals_defs.html"}]}]}]} diff --git a/.docs/html/modules.html b/.docs/html/modules.html index f36079c..6893c46 100644 --- a/.docs/html/modules.html +++ b/.docs/html/modules.html @@ -26,7 +26,7 @@ -
    sCMD v1.0r1 +
    sCMD v1.1r1
    Frameworkless simple command handler written in C++.
    @@ -104,7 +104,7 @@ diff --git a/.docs/html/navtreedata.js b/.docs/html/navtreedata.js index 1916614..f0d0161 100644 --- a/.docs/html/navtreedata.js +++ b/.docs/html/navtreedata.js @@ -42,8 +42,9 @@ var NAVTREE = [ "File List", "files.html", "files_dup" ], [ "File Members", "globals.html", [ [ "All", "globals.html", null ], - [ "Functions", "globals_func.html", null ], [ "Typedefs", "globals_type.html", null ], + [ "Enumerations", "globals_enum.html", null ], + [ "Enumerator", "globals_eval.html", null ], [ "Macros", "globals_defs.html", null ] ] ] ] ] diff --git a/.docs/html/navtreeindex0.js b/.docs/html/navtreeindex0.js index 34efcb0..6e1ce3a 100644 --- a/.docs/html/navtreeindex0.js +++ b/.docs/html/navtreeindex0.js @@ -1,37 +1,41 @@ var NAVTREEINDEX0 = { "annotated.html":[2,0], -"class_c_m_d_handler.html":[1,0,1], -"class_c_m_d_handler.html#a296dc2f654b585e7cb29caa69452d432":[1,0,1,4], -"class_c_m_d_handler.html#a81e71d6d511bd21237c40366bc31cf59":[1,0,1,2], -"class_c_m_d_handler.html#a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a":[1,0,1,0], -"class_c_m_d_handler.html#aa8501ee9fae636c4d0fc2311cab3a54b":[1,0,1,3], -"class_c_m_d_handler.html#ab0dff8dad9b29c91453a4f8c689a9c47":[1,0,1,1], "classes.html":[2,1], +"classs_c_m_d.html":[1,0,1], +"classs_c_m_d.html#a6073a3d8ecf99fb983d72e5532ea1f95":[1,0,1,2], +"classs_c_m_d.html#a91dc61752b4712622c3c49e393338c86":[1,0,1,3], +"classs_c_m_d.html#ab4af423609c21bb0fbae6f6e3f0814b8":[1,0,1,4], +"classs_c_m_d.html#ab8c56a4e32cafb932af755d169f170b5":[1,0,1,0], +"classs_c_m_d.html#acdd867db6da2169039d0adad7ce6ac1e":[1,0,1,1], "files.html":[3,0], "functions.html":[2,2,0], "functions_func.html":[2,2,1], "functions_vars.html":[2,2,2], "globals.html":[3,1,0], -"globals_defs.html":[3,1,3], -"globals_func.html":[3,1,1], -"globals_type.html":[3,1,2], +"globals_defs.html":[3,1,4], +"globals_enum.html":[3,1,2], +"globals_eval.html":[3,1,3], +"globals_type.html":[3,1,1], "group__s_c_m_d.html":[1,0], -"group__s_c_m_d.html#ga00d3cd602b53555150c73418befaa613":[1,0,3], -"group__s_c_m_d.html#ga95b2953eaf3446e41eaa41b8f03e9ca3":[1,0,4], +"group__s_c_m_d.html#ga1411ceab8e4cd2f3c874bc395bd4732a":[1,0,3], +"group__s_c_m_d.html#ga7cdf4eb22a208b705937117dab6cdf51":[1,0,6], +"group__s_c_m_d.html#ga9ba5942496337bb287bf7b98ec7c39ff":[1,0,2], +"group__s_c_m_d.html#gaae7661e6307c398240ab2c8520bd6c51":[1,0,4], +"group__s_c_m_d.html#gab7b50b228ddfc95179ddc0b5f3541c78":[1,0,7], "group__s_c_m_d.html#gab7d31f894b743026908bea0c58929204":[1,0,5], -"group__s_c_m_d.html#gabf41a56387b606234547248a5cf74164":[1,0,2], -"group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621":[1,0,6], +"group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a15ac9688c0578182cf393b0a9d04ddb7":[1,0,7,2], +"group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a5d9da4ac1ad0489f77edfe4df7cb4983":[1,0,7,1], +"group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78adbdda4209e48d49b43f4d0b2d22c820a":[1,0,7,0], "index.html":[], "md__r_e_a_d_m_e.html":[0], "md__r_e_a_d_m_e.html#autotoc_md1":[0,0], "modules.html":[1], "pages.html":[], -"s_c_m_d_8cpp.html":[3,0,0], -"s_c_m_d_8cpp_source.html":[3,0,0], -"s_c_m_d_8h.html":[3,0,1], -"s_c_m_d_8h_source.html":[3,0,1], -"struct_c_m_d_list.html":[1,0,0], -"struct_c_m_d_list.html#a9caafd87cedc702f14a47a3a4089301c":[1,0,0,1], -"struct_c_m_d_list.html#abdbdb8c1725681c7af26692f4e7c7d78":[1,0,0,0] +"s_c_m_d_8h.html":[3,0,0], +"s_c_m_d_8h_source.html":[3,0,0], +"structs_c_m_d_list.html":[1,0,0], +"structs_c_m_d_list.html#a314d8c24851f01228b2d018ce9d95a9d":[1,0,0,0], +"structs_c_m_d_list.html#ae2d1f15338e4bcc0537e67ea73ed8607":[1,0,0,2], +"structs_c_m_d_list.html#af3af9bd604038bf7bb98b89d7a302b58":[1,0,0,1] }; diff --git a/.docs/html/pages.html b/.docs/html/pages.html index c04eddf..617cf08 100644 --- a/.docs/html/pages.html +++ b/.docs/html/pages.html @@ -26,7 +26,7 @@ -
    sCMD v1.0r1 +
    sCMD v1.1r1
    Frameworkless simple command handler written in C++.
    @@ -104,7 +104,7 @@ diff --git a/.docs/html/s_c_m_d_8h.html b/.docs/html/s_c_m_d_8h.html index 77832cb..9bdba2f 100644 --- a/.docs/html/s_c_m_d_8h.html +++ b/.docs/html/s_c_m_d_8h.html @@ -26,7 +26,7 @@ -
    sCMD v1.0r1 +
    sCMD v1.1r1
    Frameworkless simple command handler written in C++.
    @@ -95,7 +95,7 @@ Classes | Macros | Typedefs | -Functions
    +Enumerations
    sCMD.h File Reference
    @@ -112,50 +112,47 @@
    -

    -This graph shows which files directly or indirectly include this file:
    -
    -
    - - - - -

    Go to the source code of this file.

    - - + + - - + +

    Classes

    struct  CMDList
     Struct for command. More...
    struct  sCMDList
     Struct for command list. More...
     
    class  CMDHandler< max >
     Class for command hanlder. More...
    class  sCMD< max >
     Class for command handler. More...
     
    - - - - - - - - - + + + + + + + + +

    Macros

    #define sCMD_CC   0
     Delimiter between commands. More...
     
    #define sCMD_CA   1
     Delimiter between command and arguments. More...
     
    #define sCMD_AA   2
     Delimiter between arguments. More...
     
    #define SCMD_GET(_cmd)    sCMD##_cmd
     Get command handler function for _cmd. More...
     
    #define SCMD_ADD(_cmd, _description)    { #_cmd, SCMD_GET(_cmd), _description }
     Code snippet for adding command into command list. More...
     
    #define SCMD_HANDLER(_cmd)    static void SCMD_GET(_cmd)(const char** args, const uint8_t argCnt)
     Code snippet for creating command handler declaration and definition. More...
     
    + + +

    Typedefs

    typedef void(* cmdH) (const char **args, const uint8_t argCnt)
     Typedef for command handler. More...
     
    typedef int16_t sCMDIdx
     Typedef for command index. More...
     
    - - - - + + + +

    -Functions

    int16_t findCmd (const char *input, const CMDList *cmdList, const uint16_t len)
     Find input command in cmdList. More...
     

    +Enumerations

    enum  sCMD_del_t : uint8_t { sCMD_CC = 0 +, sCMD_CA +, sCMD_AA + }
     Enum for delimiter types. More...
     

    Detailed Description

    Simple Command Handler header file.

    @@ -169,7 +166,7 @@ diff --git a/.docs/html/s_c_m_d_8h.js b/.docs/html/s_c_m_d_8h.js index 01baba4..05cfe8f 100644 --- a/.docs/html/s_c_m_d_8h.js +++ b/.docs/html/s_c_m_d_8h.js @@ -1,8 +1,13 @@ var s_c_m_d_8h = [ - [ "sCMD_AA", "group__s_c_m_d.html#gabf41a56387b606234547248a5cf74164", null ], - [ "sCMD_CA", "group__s_c_m_d.html#ga00d3cd602b53555150c73418befaa613", null ], - [ "sCMD_CC", "group__s_c_m_d.html#ga95b2953eaf3446e41eaa41b8f03e9ca3", null ], + [ "SCMD_ADD", "group__s_c_m_d.html#ga9ba5942496337bb287bf7b98ec7c39ff", null ], + [ "SCMD_GET", "group__s_c_m_d.html#ga1411ceab8e4cd2f3c874bc395bd4732a", null ], + [ "SCMD_HANDLER", "group__s_c_m_d.html#gaae7661e6307c398240ab2c8520bd6c51", null ], [ "cmdH", "group__s_c_m_d.html#gab7d31f894b743026908bea0c58929204", null ], - [ "findCmd", "group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621", null ] + [ "sCMDIdx", "group__s_c_m_d.html#ga7cdf4eb22a208b705937117dab6cdf51", null ], + [ "sCMD_del_t", "group__s_c_m_d.html#gab7b50b228ddfc95179ddc0b5f3541c78", [ + [ "sCMD_CC", "group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78adbdda4209e48d49b43f4d0b2d22c820a", null ], + [ "sCMD_CA", "group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a5d9da4ac1ad0489f77edfe4df7cb4983", null ], + [ "sCMD_AA", "group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a15ac9688c0578182cf393b0a9d04ddb7", null ] + ] ] ]; \ No newline at end of file diff --git a/.docs/html/s_c_m_d_8h_source.html b/.docs/html/s_c_m_d_8h_source.html index 1966c3c..5764f29 100644 --- a/.docs/html/s_c_m_d_8h_source.html +++ b/.docs/html/s_c_m_d_8h_source.html @@ -26,7 +26,7 @@ -
    sCMD v1.0r1 +
    sCMD v1.1r1
    Frameworkless simple command handler written in C++.
    @@ -119,192 +119,220 @@
    32// ----- INCLUDE FILES
    33#include "sStd.h"
    34
    -
    47// ----- MACRO DEFINITIONS
    -
    48// DELIMITER TYPES
    -
    49#define sCMD_CC 0
    -
    50#define sCMD_CA 1
    -
    51#define sCMD_AA 2
    -
    54// ----- TYPEDEFS
    -
    62typedef void (*cmdH)(const char** args, const uint8_t argCnt);
    -
    63
    +
    47// ----- CODE SNIPPETS
    +
    53#define SCMD_GET(_cmd) \
    +
    54 sCMD##_cmd
    +
    55
    +
    62#define SCMD_ADD(_cmd, _description) \
    +
    63 { #_cmd, SCMD_GET(_cmd), _description }
    64
    -
    65// ----- STRUCTS
    -
    70struct CMDList {
    -
    71 const char* cmd;
    - -
    73};
    +
    72#define SCMD_HANDLER(_cmd) \
    +
    73 static void SCMD_GET(_cmd)(const char** args, const uint8_t argCnt)
    74
    75
    -
    76// ----- FUNCTION DECLARATIONS
    -
    86int16_t findCmd(const char* input, const CMDList* cmdList, const uint16_t len);
    -
    87
    -
    88
    -
    89// ----- CLASSES
    -
    95template <uint8_t max>
    - -
    97 // PUBLIC STUFF
    -
    98 public:
    -
    99 // CONSTRUCTOR & DECONSTRUCTOR METHOD DECLARATIONS
    -
    111 CMDHandler(const CMDList* list, uint16_t len, cmdH fallback, char ccDelimiter = ';', char caDelimiter = ',', char aaDelimiter = ',')
    -
    112 {
    -
    113 // Set command list
    -
    114 cmdList = list;
    -
    115 cmdListLen = len;
    +
    76// ----- TYPEDEFS
    +
    84typedef void (*cmdH)(const char** args, const uint8_t argCnt);
    +
    85
    +
    90typedef int16_t sCMDIdx;
    +
    91
    +
    92
    +
    93// ----- ENUMS
    +
    98enum sCMD_del_t : uint8_t {
    +
    99 sCMD_CC = 0,
    + +
    101 sCMD_AA
    + +
    103
    +
    104
    +
    105// ----- STRUCTS
    +
    110struct sCMDList {
    +
    111 const char* cmd;
    + +
    113 const char* cmdDescription = "";
    +
    114};
    +
    115
    116
    -
    117 // Set fallback function
    -
    118 cmdFallback = fallback;
    -
    119
    -
    120 // Set delimiters
    -
    121 setDelimiter(sCMD_CC, ccDelimiter);
    -
    122 setDelimiter(sCMD_CA, caDelimiter);
    -
    123 setDelimiter(sCMD_AA, aaDelimiter);
    -
    124 }
    -
    125
    - -
    132 {
    -
    133 // Reset command list
    -
    134 cmdList = nullptr;
    -
    135 cmdListLen = 0;
    -
    136
    -
    137 // Reset fallback
    -
    138 cmdFallback = nullptr;
    -
    139
    -
    140 // Reset delimiters
    -
    141 setDelimiter(sCMD_CC, '\0');
    -
    142 setDelimiter(sCMD_CA, '\0');
    -
    143 setDelimiter(sCMD_AA, '\0');
    -
    144 }
    -
    145
    -
    146 // METHOD DECLARATIONS
    -
    157 uint8_t exe(char* input, uint8_t nullAsArg = 0)
    -
    158 {
    -
    159 char* nextCmd = nullptr;
    -
    160 char* nextArg = nullptr;
    -
    161 char* currCmd = nullptr;
    -
    162 char* currArg = nullptr;
    -
    163 int16_t cmdIdx = -1;
    -
    164 uint8_t argCnt = 0;
    -
    165 uint8_t cmdCnt = 0;
    -
    166
    -
    167 // Set pointer to first command
    -
    168 nextCmd = input;
    -
    169
    -
    170 // While next command is found
    -
    171 do
    -
    172 {
    -
    173 // Reset argument counter
    -
    174 argCnt = 0;
    -
    175
    -
    176 // Copy command start address
    -
    177 currCmd = nextCmd;
    -
    178
    -
    179 // Find next command
    -
    180 nextCmd = sStd::tok(nextCmd, delimiter[sCMD_CC]);
    -
    181
    -
    182 // Find start address of first argument
    -
    183 nextArg = sStd::tok(currCmd, delimiter[sCMD_CA]);
    -
    184
    -
    185 // If argument part is found
    -
    186 if (nextArg)
    -
    187 {
    -
    188 // While command to argument delimiter is found
    -
    189 do
    -
    190 {
    -
    191 // Stop parsing arguments if argument limit is reached
    -
    192 if (argCnt == maxArgs) break;
    -
    193
    -
    194 // Copy argument start address
    -
    195 currArg = nextArg;
    -
    196
    -
    197 // Find next argument
    -
    198 nextArg = sStd::tok(nextArg, delimiter[sCMD_AA]);
    -
    199
    -
    200 // If current argument is not \0 or if nullAsArg is set to 1
    -
    201 if (*currArg || nullAsArg)
    -
    202 {
    -
    203 // Copy argument's start address to argument array
    -
    204 args[argCnt] = currArg;
    -
    205
    -
    206 // Increase argument counter
    -
    207 argCnt++;
    -
    208 }
    -
    209 }
    -
    210 while (nextArg);
    -
    211 }
    -
    212
    -
    213 // If current command is not \0
    -
    214 if (*currCmd)
    -
    215 {
    -
    216 // Find command index in command list
    -
    217 cmdIdx = findCmd(currCmd, cmdList, cmdListLen);
    -
    218
    -
    219 // Call fallback handler if command was not found
    -
    220 if (cmdIdx == -1) cmdFallback((const char**)currCmd, 0);
    -
    221 else // Command is found
    -
    222 {
    -
    223 // Call command arguments
    -
    224 cmdList[cmdIdx].cmdHandler((const char**)args, argCnt);
    -
    225
    -
    226 // Increase command counter
    -
    227 cmdCnt++;
    -
    228 }
    -
    229 }
    -
    230 }
    -
    231 while (nextCmd);
    -
    232
    -
    233 // Return number of executed commands
    -
    234 return cmdCnt;
    -
    235 }
    -
    236
    -
    244 inline void setDelimiter(uint8_t type, char del)
    -
    245 {
    -
    246 // Set delimiter for the type
    -
    247 delimiter[type] = del;
    -
    248 }
    -
    249
    -
    256 inline char getDelimiter(uint8_t type) const
    -
    257 {
    -
    258 // Get delimiter for the type
    -
    259 return delimiter[type];
    -
    260 }
    -
    261
    -
    262
    -
    263 // PRIVATE STUFF
    -
    264 private:
    -
    265 // VARIABLES
    -
    272 cmdH cmdFallback = nullptr;
    -
    273 const CMDList* cmdList;
    -
    274 uint8_t maxArgs = max;
    -
    275 char delimiter[3] = { '\0', '\0', '\0' };
    -
    276 char* args[max];
    -
    277 uint16_t cmdListLen = 0;
    -
    278};
    -
    279
    -
    280
    -
    283#endif // _SCMD_H_
    -
    284
    -
    285// END WITH NEW LINE
    -
    Class for command hanlder.
    Definition: sCMD.h:96
    -
    void setDelimiter(uint8_t type, char del)
    Set delimiter character.
    Definition: sCMD.h:244
    -
    uint8_t exe(char *input, uint8_t nullAsArg=0)
    Parse and execute input C-string.
    Definition: sCMD.h:157
    -
    CMDHandler(const CMDList *list, uint16_t len, cmdH fallback, char ccDelimiter=';', char caDelimiter=',', char aaDelimiter=',')
    CMD handler constructor.
    Definition: sCMD.h:111
    -
    char getDelimiter(uint8_t type) const
    Get delimiter character.
    Definition: sCMD.h:256
    -
    ~CMDHandler(void)
    CMD handler deconstructor.
    Definition: sCMD.h:131
    -
    #define sCMD_CA
    Delimiter between command and arguments.
    Definition: sCMD.h:50
    -
    #define sCMD_CC
    Delimiter between commands.
    Definition: sCMD.h:49
    -
    void(* cmdH)(const char **args, const uint8_t argCnt)
    Typedef for command handler.
    Definition: sCMD.h:62
    -
    #define sCMD_AA
    Delimiter between arguments.
    Definition: sCMD.h:51
    -
    int16_t findCmd(const char *input, const CMDList *cmdList, const uint16_t len)
    Find input command in cmdList.
    Definition: sCMD.cpp:47
    -
    Struct for command.
    Definition: sCMD.h:70
    -
    const cmdH cmdHandler
    Pointer to command function. See cmdH.
    Definition: sCMD.h:72
    -
    const char * cmd
    Command C-string.
    Definition: sCMD.h:71
    +
    117// ----- CLASSES
    +
    123template <uint8_t max>
    +
    124class sCMD {
    +
    125 // PUBLIC STUFF
    +
    126 public:
    +
    127 // CONSTRUCTOR & DECONSTRUCTOR METHOD DECLARATIONS
    +
    139 sCMD(const sCMDList* list, uint16_t len, cmdH fallback, char ccDelimiter = ';', char caDelimiter = ',', char aaDelimiter = ',')
    +
    140 {
    +
    141 // Set command list
    +
    142 cmdList = list;
    +
    143 cmdListLen = len;
    +
    144
    +
    145 // Set fallback function
    +
    146 cmdFallback = fallback;
    +
    147
    +
    148 // Set delimiters
    +
    149 setDelimiter(sCMD_del_t::sCMD_CC, ccDelimiter);
    +
    150 setDelimiter(sCMD_del_t::sCMD_CA, caDelimiter);
    +
    151 setDelimiter(sCMD_del_t::sCMD_AA, aaDelimiter);
    +
    152 }
    +
    153
    +
    159 ~sCMD(void)
    +
    160 {
    +
    161 // Reset command list
    +
    162 cmdList = nullptr;
    +
    163 cmdListLen = 0;
    +
    164
    +
    165 // Reset fallback
    +
    166 cmdFallback = nullptr;
    +
    167
    +
    168 // Reset delimiters
    +
    169 setDelimiter(sCMD_del_t::sCMD_CC, '\0');
    +
    170 setDelimiter(sCMD_del_t::sCMD_CA, '\0');
    +
    171 setDelimiter(sCMD_del_t::sCMD_AA, '\0');
    +
    172 }
    +
    173
    +
    174
    +
    175 // METHOD DECLARATIONS
    +
    186 uint8_t exe(char* input, uint8_t nullAsArg = 0)
    +
    187 {
    +
    188 char* nextCmd = nullptr;
    +
    189 char* nextArg = nullptr;
    +
    190 char* currCmd = nullptr;
    +
    191 char* currArg = nullptr;
    +
    192 sCMDIdx idx = -1;
    +
    193 uint8_t argCnt = 0;
    +
    194 uint8_t cmdCnt = 0;
    +
    195
    +
    196 // Set pointer to first command
    +
    197 nextCmd = input;
    +
    198
    +
    199 // While next command is found
    +
    200 do
    +
    201 {
    +
    202 // Reset argument counter
    +
    203 argCnt = 0;
    +
    204
    +
    205 // Copy command start address
    +
    206 currCmd = nextCmd;
    +
    207
    +
    208 // Find next command
    +
    209 nextCmd = sStd::tok(nextCmd, delimiter[sCMD_CC]);
    +
    210
    +
    211 // Find start address of first argument
    +
    212 nextArg = sStd::tok(currCmd, delimiter[sCMD_CA]);
    +
    213
    +
    214 // If argument part is found
    +
    215 if (nextArg)
    +
    216 {
    +
    217 // While command to argument delimiter is found
    +
    218 do
    +
    219 {
    +
    220 // Stop parsing arguments if argument limit is reached
    +
    221 if (argCnt == maxArgs) break;
    +
    222
    +
    223 // Copy argument start address
    +
    224 currArg = nextArg;
    +
    225
    +
    226 // Find next argument
    +
    227 nextArg = sStd::tok(nextArg, delimiter[sCMD_AA]);
    +
    228
    +
    229 // If current argument is not \0 or if nullAsArg is set to 1
    +
    230 if (*currArg || nullAsArg)
    +
    231 {
    +
    232 // Copy argument's start address to argument array
    +
    233 args[argCnt] = currArg;
    +
    234
    +
    235 // Increase argument counter
    +
    236 argCnt++;
    +
    237 }
    +
    238 }
    +
    239 while (nextArg);
    +
    240 }
    +
    241
    +
    242 // If current command is not \0
    +
    243 if (*currCmd)
    +
    244 {
    +
    245 // Find command index in command list
    +
    246 idx = findCmd(currCmd);
    +
    247
    +
    248 // Call fallback handler if command was not found
    +
    249 if (idx == -1) cmdFallback((const char**)currCmd, 0);
    +
    250 else // Command is found
    +
    251 {
    +
    252 // Call command arguments
    +
    253 cmdList[idx].cmdHandler((const char**)args, argCnt);
    +
    254
    +
    255 // Increase command counter
    +
    256 cmdCnt++;
    +
    257 }
    +
    258 }
    +
    259 }
    +
    260 while (nextCmd);
    +
    261
    +
    262 // Return number of executed commands
    +
    263 return cmdCnt;
    +
    264 }
    +
    265
    +
    273 inline void setDelimiter(sCMD_del_t type, char del)
    +
    274 {
    +
    275 // Set delimiter for the type
    +
    276 delimiter[type] = del;
    +
    277 }
    +
    278
    +
    285 inline char getDelimiter(sCMD_del_t type) const
    +
    286 {
    +
    287 // Get delimiter for the type
    +
    288 return delimiter[type];
    +
    289 }
    +
    290
    +
    291
    +
    292 // PRIVATE STUFF
    +
    293 private:
    +
    294 // VARIABLES
    +
    301 cmdH cmdFallback = nullptr;
    +
    302 const sCMDList* cmdList;
    +
    303 uint8_t maxArgs = max;
    +
    304 char delimiter[3] = { '\0', '\0', '\0' };
    +
    305 char* args[max];
    +
    306 uint16_t cmdListLen = 0;
    +
    308 // METHODS
    +
    316 sCMDIdx findCmd(const char* cmd) const
    +
    317 {
    +
    318 for (uint16_t i = 0; i < cmdListLen; i++)
    +
    319 {
    +
    320 // If command is found, return index
    +
    321 if (sStd::cmp(cmd, cmdList[i].cmd) == SSTD_OK) return i;
    +
    322 }
    +
    323
    +
    324 // Command is not found
    +
    325 return -1;
    +
    326 }
    +
    327};
    +
    328
    +
    329
    +
    332#endif // _SCMD_H_
    +
    333
    +
    334// END WITH NEW LINE
    +
    Class for command handler.
    Definition: sCMD.h:124
    +
    uint8_t exe(char *input, uint8_t nullAsArg=0)
    Parse and execute input C-string.
    Definition: sCMD.h:186
    +
    char getDelimiter(sCMD_del_t type) const
    Get delimiter character.
    Definition: sCMD.h:285
    +
    void setDelimiter(sCMD_del_t type, char del)
    Set delimiter character.
    Definition: sCMD.h:273
    +
    sCMD(const sCMDList *list, uint16_t len, cmdH fallback, char ccDelimiter=';', char caDelimiter=',', char aaDelimiter=',')
    CMD handler constructor.
    Definition: sCMD.h:139
    +
    ~sCMD(void)
    CMD handler deconstructor.
    Definition: sCMD.h:159
    +
    int16_t sCMDIdx
    Typedef for command index.
    Definition: sCMD.h:90
    +
    sCMD_del_t
    Enum for delimiter types.
    Definition: sCMD.h:98
    +
    void(* cmdH)(const char **args, const uint8_t argCnt)
    Typedef for command handler.
    Definition: sCMD.h:84
    +
    @ sCMD_AA
    Delimiter between arguments inside command.
    Definition: sCMD.h:101
    +
    @ sCMD_CA
    Delimiter between command and argument.
    Definition: sCMD.h:100
    +
    @ sCMD_CC
    Delimiter between commands.
    Definition: sCMD.h:99
    +
    Struct for command list.
    Definition: sCMD.h:110
    +
    const char * cmd
    Command C-string.
    Definition: sCMD.h:111
    +
    const cmdH cmdHandler
    Pointer to command function. See cmdH.
    Definition: sCMD.h:112
    +
    const char * cmdDescription
    Command description.
    Definition: sCMD.h:113
    diff --git a/.docs/html/search/all_0.js b/.docs/html/search/all_0.js index 15f27af..1f2b2df 100644 --- a/.docs/html/search/all_0.js +++ b/.docs/html/search/all_0.js @@ -1,9 +1,7 @@ var searchData= [ - ['cmd_0',['cmd',['../struct_c_m_d_list.html#abdbdb8c1725681c7af26692f4e7c7d78',1,'CMDList']]], - ['cmdh_1',['cmdH',['../group__s_c_m_d.html#gab7d31f894b743026908bea0c58929204',1,'sCMD.h']]], - ['cmdhandler_2',['CMDHandler',['../class_c_m_d_handler.html',1,'']]], - ['cmdhandler_3',['cmdHandler',['../struct_c_m_d_list.html#a9caafd87cedc702f14a47a3a4089301c',1,'CMDList']]], - ['cmdhandler_4',['CMDHandler',['../class_c_m_d_handler.html#a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a',1,'CMDHandler']]], - ['cmdlist_5',['CMDList',['../struct_c_m_d_list.html',1,'']]] + ['cmd_0',['cmd',['../structs_c_m_d_list.html#a314d8c24851f01228b2d018ce9d95a9d',1,'sCMDList']]], + ['cmddescription_1',['cmdDescription',['../structs_c_m_d_list.html#af3af9bd604038bf7bb98b89d7a302b58',1,'sCMDList']]], + ['cmdh_2',['cmdH',['../group__s_c_m_d.html#gab7d31f894b743026908bea0c58929204',1,'sCMD.h']]], + ['cmdhandler_3',['cmdHandler',['../structs_c_m_d_list.html#ae2d1f15338e4bcc0537e67ea73ed8607',1,'sCMDList']]] ]; diff --git a/.docs/html/search/all_1.js b/.docs/html/search/all_1.js index 883476f..19cc21a 100644 --- a/.docs/html/search/all_1.js +++ b/.docs/html/search/all_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['exe_0',['exe',['../class_c_m_d_handler.html#a81e71d6d511bd21237c40366bc31cf59',1,'CMDHandler']]] + ['exe_0',['exe',['../classs_c_m_d.html#a6073a3d8ecf99fb983d72e5532ea1f95',1,'sCMD']]] ]; diff --git a/.docs/html/search/all_2.js b/.docs/html/search/all_2.js index 9331477..ea0aff6 100644 --- a/.docs/html/search/all_2.js +++ b/.docs/html/search/all_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['findcmd_0',['findCmd',['../group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621',1,'findCmd(const char *input, const CMDList *cmdList, const uint16_t len): sCMD.cpp'],['../group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621',1,'findCmd(const char *input, const CMDList *cmdList, const uint16_t len): sCMD.cpp']]] + ['getdelimiter_0',['getDelimiter',['../classs_c_m_d.html#a91dc61752b4712622c3c49e393338c86',1,'sCMD']]] ]; diff --git a/.docs/html/search/all_3.js b/.docs/html/search/all_3.js index c3509f8..3fd7601 100644 --- a/.docs/html/search/all_3.js +++ b/.docs/html/search/all_3.js @@ -1,4 +1,17 @@ var searchData= [ - ['getdelimiter_0',['getDelimiter',['../class_c_m_d_handler.html#aa8501ee9fae636c4d0fc2311cab3a54b',1,'CMDHandler']]] + ['scmd_0',['sCMD',['../classs_c_m_d.html',1,'sCMD< max >'],['../classs_c_m_d.html#ab8c56a4e32cafb932af755d169f170b5',1,'sCMD::sCMD()']]], + ['scmd_1',['SCMD',['../group__s_c_m_d.html',1,'']]], + ['scmd_2eh_2',['sCMD.h',['../s_c_m_d_8h.html',1,'']]], + ['scmd_5faa_3',['sCMD_AA',['../group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a15ac9688c0578182cf393b0a9d04ddb7',1,'sCMD.h']]], + ['scmd_5fadd_4',['SCMD_ADD',['../group__s_c_m_d.html#ga9ba5942496337bb287bf7b98ec7c39ff',1,'sCMD.h']]], + ['scmd_5fca_5',['sCMD_CA',['../group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a5d9da4ac1ad0489f77edfe4df7cb4983',1,'sCMD.h']]], + ['scmd_5fcc_6',['sCMD_CC',['../group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78adbdda4209e48d49b43f4d0b2d22c820a',1,'sCMD.h']]], + ['scmd_5fdel_5ft_7',['sCMD_del_t',['../group__s_c_m_d.html#gab7b50b228ddfc95179ddc0b5f3541c78',1,'sCMD.h']]], + ['scmd_5fget_8',['SCMD_GET',['../group__s_c_m_d.html#ga1411ceab8e4cd2f3c874bc395bd4732a',1,'sCMD.h']]], + ['scmd_5fhandler_9',['SCMD_HANDLER',['../group__s_c_m_d.html#gaae7661e6307c398240ab2c8520bd6c51',1,'sCMD.h']]], + ['scmdidx_10',['sCMDIdx',['../group__s_c_m_d.html#ga7cdf4eb22a208b705937117dab6cdf51',1,'sCMD.h']]], + ['scmdlist_11',['sCMDList',['../structs_c_m_d_list.html',1,'']]], + ['setdelimiter_12',['setDelimiter',['../classs_c_m_d.html#ab4af423609c21bb0fbae6f6e3f0814b8',1,'sCMD']]], + ['simple_20command_20handler_13',['Simple Command Handler',['../md__r_e_a_d_m_e.html',1,'']]] ]; diff --git a/.docs/html/search/all_4.js b/.docs/html/search/all_4.js index 597bbdd..5592e67 100644 --- a/.docs/html/search/all_4.js +++ b/.docs/html/search/all_4.js @@ -1,11 +1,4 @@ var searchData= [ - ['scmd_0',['SCMD',['../group__s_c_m_d.html',1,'']]], - ['scmd_2ecpp_1',['sCMD.cpp',['../s_c_m_d_8cpp.html',1,'']]], - ['scmd_2eh_2',['sCMD.h',['../s_c_m_d_8h.html',1,'']]], - ['scmd_5faa_3',['sCMD_AA',['../group__s_c_m_d.html#gabf41a56387b606234547248a5cf74164',1,'sCMD.h']]], - ['scmd_5fca_4',['sCMD_CA',['../group__s_c_m_d.html#ga00d3cd602b53555150c73418befaa613',1,'sCMD.h']]], - ['scmd_5fcc_5',['sCMD_CC',['../group__s_c_m_d.html#ga95b2953eaf3446e41eaa41b8f03e9ca3',1,'sCMD.h']]], - ['setdelimiter_6',['setDelimiter',['../class_c_m_d_handler.html#a296dc2f654b585e7cb29caa69452d432',1,'CMDHandler']]], - ['simple_20command_20handler_7',['Simple Command Handler',['../md__r_e_a_d_m_e.html',1,'']]] + ['_7escmd_0',['~sCMD',['../classs_c_m_d.html#acdd867db6da2169039d0adad7ce6ac1e',1,'sCMD']]] ]; diff --git a/.docs/html/search/classes_0.js b/.docs/html/search/classes_0.js index 77d7a3a..1291839 100644 --- a/.docs/html/search/classes_0.js +++ b/.docs/html/search/classes_0.js @@ -1,5 +1,5 @@ var searchData= [ - ['cmdhandler_0',['CMDHandler',['../class_c_m_d_handler.html',1,'']]], - ['cmdlist_1',['CMDList',['../struct_c_m_d_list.html',1,'']]] + ['scmd_0',['sCMD',['../classs_c_m_d.html',1,'']]], + ['scmdlist_1',['sCMDList',['../structs_c_m_d_list.html',1,'']]] ]; diff --git a/.docs/html/search/classes_1.js b/.docs/html/search/classes_1.js new file mode 100644 index 0000000..8d516a9 --- /dev/null +++ b/.docs/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['scmd_0',['sCMD',['../classs_c_m_d.html',1,'']]] +]; diff --git a/.docs/html/search/enums_0.js b/.docs/html/search/enums_0.js index 86122e3..ee2900b 100644 --- a/.docs/html/search/enums_0.js +++ b/.docs/html/search/enums_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['scmd_5fdelimiter_5ft_0',['sCMD_delimiter_t',['../group__s_c_m_d.html#gaa0fcdbeaec020e98af1c24f2f9fa199d',1,'sCMD.h']]] + ['scmd_5fdel_5ft_0',['sCMD_del_t',['../group__s_c_m_d.html#gab7b50b228ddfc95179ddc0b5f3541c78',1,'sCMD.h']]] ]; diff --git a/.docs/html/search/enumvalues_0.js b/.docs/html/search/enumvalues_0.js index d68f20a..d1567e7 100644 --- a/.docs/html/search/enumvalues_0.js +++ b/.docs/html/search/enumvalues_0.js @@ -1,6 +1,6 @@ var searchData= [ - ['scmd_5fcc_0',['sCMD_CC',['../group__s_c_m_d.html#ggaa0fcdbeaec020e98af1c24f2f9fa199dadbdda4209e48d49b43f4d0b2d22c820a',1,'sCMD.h']]], - ['scmd_5fcp_1',['sCMD_CP',['../group__s_c_m_d.html#ggaa0fcdbeaec020e98af1c24f2f9fa199dabdac55d99a08174f11384d30c3a5384f',1,'sCMD.h']]], - ['scmd_5fpp_2',['sCMD_PP',['../group__s_c_m_d.html#ggaa0fcdbeaec020e98af1c24f2f9fa199daa464219d1a3cbcdb1f4ba85d8e9477bf',1,'sCMD.h']]] + ['scmd_5faa_0',['sCMD_AA',['../group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a15ac9688c0578182cf393b0a9d04ddb7',1,'sCMD.h']]], + ['scmd_5fca_1',['sCMD_CA',['../group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78a5d9da4ac1ad0489f77edfe4df7cb4983',1,'sCMD.h']]], + ['scmd_5fcc_2',['sCMD_CC',['../group__s_c_m_d.html#ggab7b50b228ddfc95179ddc0b5f3541c78adbdda4209e48d49b43f4d0b2d22c820a',1,'sCMD.h']]] ]; diff --git a/.docs/html/search/files_0.js b/.docs/html/search/files_0.js index 90355e3..9949c31 100644 --- a/.docs/html/search/files_0.js +++ b/.docs/html/search/files_0.js @@ -1,5 +1,4 @@ var searchData= [ - ['scmd_2ecpp_0',['sCMD.cpp',['../s_c_m_d_8cpp.html',1,'']]], - ['scmd_2eh_1',['sCMD.h',['../s_c_m_d_8h.html',1,'']]] + ['scmd_2eh_0',['sCMD.h',['../s_c_m_d_8h.html',1,'']]] ]; diff --git a/.docs/html/search/functions_0.js b/.docs/html/search/functions_0.js index 4b89e0a..19cc21a 100644 --- a/.docs/html/search/functions_0.js +++ b/.docs/html/search/functions_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['cmdhandler_0',['CMDHandler',['../class_c_m_d_handler.html#a9e7ca0b6f0b25fbf1fb0a125f0f4cc8a',1,'CMDHandler']]] + ['exe_0',['exe',['../classs_c_m_d.html#a6073a3d8ecf99fb983d72e5532ea1f95',1,'sCMD']]] ]; diff --git a/.docs/html/search/functions_1.js b/.docs/html/search/functions_1.js index 883476f..ea0aff6 100644 --- a/.docs/html/search/functions_1.js +++ b/.docs/html/search/functions_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['exe_0',['exe',['../class_c_m_d_handler.html#a81e71d6d511bd21237c40366bc31cf59',1,'CMDHandler']]] + ['getdelimiter_0',['getDelimiter',['../classs_c_m_d.html#a91dc61752b4712622c3c49e393338c86',1,'sCMD']]] ]; diff --git a/.docs/html/search/functions_2.js b/.docs/html/search/functions_2.js index 9331477..89c8f1b 100644 --- a/.docs/html/search/functions_2.js +++ b/.docs/html/search/functions_2.js @@ -1,4 +1,5 @@ var searchData= [ - ['findcmd_0',['findCmd',['../group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621',1,'findCmd(const char *input, const CMDList *cmdList, const uint16_t len): sCMD.cpp'],['../group__s_c_m_d.html#gaf825bf80ddd1a52d68d737ea93e0f621',1,'findCmd(const char *input, const CMDList *cmdList, const uint16_t len): sCMD.cpp']]] + ['scmd_0',['sCMD',['../classs_c_m_d.html#ab8c56a4e32cafb932af755d169f170b5',1,'sCMD']]], + ['setdelimiter_1',['setDelimiter',['../classs_c_m_d.html#ab4af423609c21bb0fbae6f6e3f0814b8',1,'sCMD']]] ]; diff --git a/.docs/html/search/functions_3.js b/.docs/html/search/functions_3.js index c3509f8..5592e67 100644 --- a/.docs/html/search/functions_3.js +++ b/.docs/html/search/functions_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['getdelimiter_0',['getDelimiter',['../class_c_m_d_handler.html#aa8501ee9fae636c4d0fc2311cab3a54b',1,'CMDHandler']]] + ['_7escmd_0',['~sCMD',['../classs_c_m_d.html#acdd867db6da2169039d0adad7ce6ac1e',1,'sCMD']]] ]; diff --git a/.docs/html/search/functions_4.js b/.docs/html/search/functions_4.js index 7092da0..f350802 100644 --- a/.docs/html/search/functions_4.js +++ b/.docs/html/search/functions_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['setdelimiter_0',['setDelimiter',['../class_c_m_d_handler.html#a296dc2f654b585e7cb29caa69452d432',1,'CMDHandler']]] + ['_7ecmdhandler_0',['~CMDHandler',['../class_c_m_d_handler.html#ab0dff8dad9b29c91453a4f8c689a9c47',1,'CMDHandler']]] ]; diff --git a/.docs/html/search/searchdata.js b/.docs/html/search/searchdata.js index e3e630c..5803ffc 100644 --- a/.docs/html/search/searchdata.js +++ b/.docs/html/search/searchdata.js @@ -1,13 +1,15 @@ var indexSectionsWithContent = { - 0: "cefgs~", - 1: "c", + 0: "cegs~", + 1: "s", 2: "s", - 3: "cefgs~", + 3: "egs~", 4: "c", - 5: "c", + 5: "cs", 6: "s", - 7: "s" + 7: "s", + 8: "s", + 9: "s" }; var indexSectionNames = @@ -18,8 +20,10 @@ var indexSectionNames = 3: "functions", 4: "variables", 5: "typedefs", - 6: "groups", - 7: "pages" + 6: "enums", + 7: "enumvalues", + 8: "groups", + 9: "pages" }; var indexSectionLabels = @@ -30,7 +34,9 @@ var indexSectionLabels = 3: "Functions", 4: "Variables", 5: "Typedefs", - 6: "Modules", - 7: "Pages" + 6: "Enumerations", + 7: "Enumerator", + 8: "Modules", + 9: "Pages" }; diff --git a/.docs/html/search/typedefs_1.js b/.docs/html/search/typedefs_1.js new file mode 100644 index 0000000..b4d52b8 --- /dev/null +++ b/.docs/html/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['scmdidx_0',['sCMDIdx',['../group__s_c_m_d.html#ga7cdf4eb22a208b705937117dab6cdf51',1,'sCMD.h']]] +]; diff --git a/.docs/html/search/variables_0.js b/.docs/html/search/variables_0.js index 19122da..3f584eb 100644 --- a/.docs/html/search/variables_0.js +++ b/.docs/html/search/variables_0.js @@ -1,5 +1,6 @@ var searchData= [ - ['cmd_0',['cmd',['../struct_c_m_d_list.html#abdbdb8c1725681c7af26692f4e7c7d78',1,'CMDList']]], - ['cmdhandler_1',['cmdHandler',['../struct_c_m_d_list.html#a9caafd87cedc702f14a47a3a4089301c',1,'CMDList']]] + ['cmd_0',['cmd',['../structs_c_m_d_list.html#a314d8c24851f01228b2d018ce9d95a9d',1,'sCMDList']]], + ['cmddescription_1',['cmdDescription',['../structs_c_m_d_list.html#af3af9bd604038bf7bb98b89d7a302b58',1,'sCMDList']]], + ['cmdhandler_2',['cmdHandler',['../structs_c_m_d_list.html#ae2d1f15338e4bcc0537e67ea73ed8607',1,'sCMDList']]] ]; diff --git a/.docs/html/struct_c_m_d_list-members.html b/.docs/html/struct_c_m_d_list-members.html index 763318f..fb43b0a 100644 --- a/.docs/html/struct_c_m_d_list-members.html +++ b/.docs/html/struct_c_m_d_list-members.html @@ -26,7 +26,7 @@ -
    sCMD v1.0r1 +
    sCMD v1.0r2
    Frameworkless simple command handler written in C++.
    @@ -98,13 +98,14 @@

    This is the complete list of members for CMDList, including all inherited members.

    - + +
    cmdCMDList
    cmdHandlerCMDList
    cmdDescriptionCMDList
    cmdHandlerCMDList
    diff --git a/.docs/html/struct_c_m_d_list.html b/.docs/html/struct_c_m_d_list.html index 6ecde0a..2e36c28 100644 --- a/.docs/html/struct_c_m_d_list.html +++ b/.docs/html/struct_c_m_d_list.html @@ -26,7 +26,7 @@ -
    sCMD v1.0r1 +
    sCMD v1.0r2
    Frameworkless simple command handler written in C++.
    @@ -98,7 +98,7 @@
    -

    Struct for command. +

    Struct for command list. More...

    #include <sCMD.h>

    @@ -111,11 +111,14 @@ const cmdH cmdHandler  Pointer to command function. See cmdH. More...
      +const char * cmdDescription = "" + Command description. More...

    Detailed Description

    -

    Struct for command.

    +

    Struct for command list.

    -

    Definition at line 70 of file sCMD.h.

    +

    Definition at line 110 of file sCMD.h.

    Member Data Documentation

    ◆ cmd

    @@ -131,7 +134,25 @@

    Definition at line 71 of file sCMD.h.

    +

    Definition at line 111 of file sCMD.h.

    + +

    +
    + +

    ◆ cmdDescription

    + +
    +
    + + + + +
    const char* CMDList::cmdDescription = ""
    +
    + +

    Command description.

    + +

    Definition at line 113 of file sCMD.h.

    @@ -149,7 +170,7 @@

    cmdH.

    -

    Definition at line 72 of file sCMD.h.

    +

    Definition at line 112 of file sCMD.h.

    @@ -162,7 +183,7 @@

      - +
    diff --git a/.docs/html/struct_c_m_d_list.js b/.docs/html/struct_c_m_d_list.js index a044237..333eaa5 100644 --- a/.docs/html/struct_c_m_d_list.js +++ b/.docs/html/struct_c_m_d_list.js @@ -1,5 +1,6 @@ var struct_c_m_d_list = [ [ "cmd", "struct_c_m_d_list.html#abdbdb8c1725681c7af26692f4e7c7d78", null ], + [ "cmdDescription", "struct_c_m_d_list.html#af9e8f7efc222908a587b3cc9d5f7a2ae", null ], [ "cmdHandler", "struct_c_m_d_list.html#a9caafd87cedc702f14a47a3a4089301c", null ] ]; \ No newline at end of file diff --git a/.docs/html/structs_c_m_d_list-members.html b/.docs/html/structs_c_m_d_list-members.html new file mode 100644 index 0000000..37a1e1e --- /dev/null +++ b/.docs/html/structs_c_m_d_list-members.html @@ -0,0 +1,112 @@ + + + + + + + +sCMD: Member List + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    sCMD v1.1r1 +
    +
    Frameworkless simple command handler written in C++.
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    sCMDList Member List
    +
    +
    + +

    This is the complete list of members for sCMDList, including all inherited members.

    + + + + +
    cmdsCMDList
    cmdDescriptionsCMDList
    cmdHandlersCMDList
    +
    + + + + diff --git a/.docs/html/structs_c_m_d_list.html b/.docs/html/structs_c_m_d_list.html new file mode 100644 index 0000000..6fbdbac --- /dev/null +++ b/.docs/html/structs_c_m_d_list.html @@ -0,0 +1,190 @@ + + + + + + + +sCMD: sCMDList Struct Reference + + + + + + + + + + + + + + +
    +
    + + + + + + +
    +
    sCMD v1.1r1 +
    +
    Frameworkless simple command handler written in C++.
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    sCMDList Struct Reference
    +
    +
    + +

    Struct for command list. + More...

    + +

    #include <sCMD.h>

    + + + + + + + + + + + +

    +Public Attributes

    const char * cmd
     Command C-string. More...
     
    const cmdH cmdHandler
     Pointer to command function. See cmdH. More...
     
    const char * cmdDescription = ""
     Command description. More...
     
    +

    Detailed Description

    +

    Struct for command list.

    + +

    Definition at line 110 of file sCMD.h.

    +

    Member Data Documentation

    + +

    ◆ cmd

    + +
    +
    + + + + +
    const char* sCMDList::cmd
    +
    + +

    Command C-string.

    + +

    Definition at line 111 of file sCMD.h.

    + +
    +
    + +

    ◆ cmdDescription

    + +
    +
    + + + + +
    const char* sCMDList::cmdDescription = ""
    +
    + +

    Command description.

    + +

    Definition at line 113 of file sCMD.h.

    + +
    +
    + +

    ◆ cmdHandler

    + +
    +
    + + + + +
    const cmdH sCMDList::cmdHandler
    +
    + +

    Pointer to command function. See cmdH.

    + +

    Definition at line 112 of file sCMD.h.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/.docs/html/structs_c_m_d_list.js b/.docs/html/structs_c_m_d_list.js new file mode 100644 index 0000000..e633f1d --- /dev/null +++ b/.docs/html/structs_c_m_d_list.js @@ -0,0 +1,6 @@ +var structs_c_m_d_list = +[ + [ "cmd", "structs_c_m_d_list.html#a314d8c24851f01228b2d018ce9d95a9d", null ], + [ "cmdDescription", "structs_c_m_d_list.html#af3af9bd604038bf7bb98b89d7a302b58", null ], + [ "cmdHandler", "structs_c_m_d_list.html#ae2d1f15338e4bcc0537e67ea73ed8607", null ] +]; \ No newline at end of file diff --git a/Doxyfile b/Doxyfile index f3ff4f8..cba5639 100644 --- a/Doxyfile +++ b/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = sCMD # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = v1.0r1 +PROJECT_NUMBER = v1.1r1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a