The CommandProcessor is the interface to install a run-time menu into an embedded system.

Dependents:   A_CANAdapter USB2I2C

Revision:
15:5f30da93e3e2
Parent:
14:7971c8bd3f11
Child:
16:4ce4f55213ac
--- a/CommandProcessor.h	Sat Oct 01 20:01:44 2011 +0000
+++ b/CommandProcessor.h	Sun Oct 30 19:57:39 2011 +0000
@@ -5,7 +5,7 @@
 /// The CommandProcessor is the interface to install a run-time menu into an embedded system.
 /// This contains the complete interface to the CommandProcessor.
 ///
-/// @version 1.04
+/// @version 1.05
 ///
 /// @note The CommandProcessor is text-based, because it is intended to interact with a
 ///       user.
@@ -56,10 +56,10 @@
 ///
 /// RUNRESULT_T SignOnBanner(char *p)
 /// {
-/// 	puts("\r\nThis great program was built " __DATE__ " " __TIME__ ".");
+///     puts("\r\nThis great program was built " __DATE__ " " __TIME__ ".");
 ///     if (*p == '?')
 ///        puts("\r\nMore details shown here.\r\n");
-/// 	return runok;
+///     return runok;
 /// }
 /// RUNRESULT_T Who(char *p)
 /// {
@@ -100,6 +100,8 @@
 ///
 /// @note
 /// History
+/// v1.05 20111030
+/// \li Added support for VT100 cursor code for up/down history access
 /// v1.04 1 October 2011
 /// \li Added configurable command line history for easy recall of previous commands
 /// \li Clean up dead-code
@@ -120,6 +122,8 @@
 #ifndef COMMANDPROCESSOR_H
 #define COMMANDPROCESSOR_H
 
+#define VERSION "1.05"
+
 #ifndef TRUE
 #define TRUE 1        ///< Definition for TRUE, if not already provided
 #define FALSE 0        ///< Definition for FALSE, if not already provided
@@ -218,15 +222,15 @@
     ///
     /// This function has a number of parameters, which make the CommandProcessor quite flexible.
     ///
-	/// @param SignOnBanner function, which is used as a signon banner
+    /// @param SignOnBanner function, which is used as a signon banner
     /// @param config enables various default menu items, based on the bit values, combine the following:
-	///   \li CFG_ENABLE_TERMINATE - enables the Exit command
-	///   \li CFG_ENABLE_SYSTEM    - enables system commands Echo, Help, etc.
-	///   \li CFG_ECHO_ON          - initialize with echo on
-	///   \li CFG_CASE_INSENSITIVE - Command Parser is case insensitive
-	/// @param maxCmdLen sizes the buffer, and is the maximum number of characters in a single
-	///        command, including all command arguments
-	/// @param historyLen sets the number of items that can be recalled from history
+    ///   \li CFG_ENABLE_TERMINATE - enables the Exit command
+    ///   \li CFG_ENABLE_SYSTEM    - enables system commands Echo, Help, etc.
+    ///   \li CFG_ECHO_ON          - initialize with echo on
+    ///   \li CFG_CASE_INSENSITIVE - Command Parser is case insensitive
+    /// @param maxCmdLen sizes the buffer, and is the maximum number of characters in a single
+    ///        command, including all command arguments
+    /// @param historyLen sets the number of items that can be recalled from history
     /// @param kbhit is a user provided function to detect if a character is available for the CommandProcessor,
     ///        and when using standard io, you can typically use kbhit, or _kbhit as your system provides.
     /// @param getch is a user provided function that provides a single character to the CommandProcessor
@@ -234,12 +238,12 @@
     /// @param puts is a user provided function that permits the CommandProcessor to output a string
     ///        to which is automatically appended a \\n
     /// @returns INITRESULT_T to indicate if the init was successful or failed
-	///
+    ///
     INITRESULT_T (*Init)(
-		CMD_T *SignOnBanner,
+        CMD_T *SignOnBanner,
         CONFIG_T config,
         int maxCmdLen,
-		int historyLen,
+        int historyLen,
         int (*kbhit)(void),
         int (*getch)(void),
         int (*putch)(int ch),
@@ -293,7 +297,7 @@
 /// The CommandProcessor is the interface to install a run-time menu into an embedded system.
 /// This contains the complete interface to the CommandProcessor.
 ///
-/// @version 1.0
+/// @version 1.05
 ///
 /// @note The CommandProcessor is text-based, because it is intended to interact with a
 ///       user.