ISys Command Line Interface Feature List
Lextel’s ISys Command Line Interface ( CLI ) for use in Embedded and Real Time systems provides a software library and API that makes it easy to develop a full featured command line interface for your product. The wealth of features in the ISys CLI assures that your project needs can be met.
User Extensible Command API
User commands are implemented using a simple C++ API, in which the programmer specifies the command line syntax, help strings, and actions to be taken when the command is executed. Samples are provided from which the programmer can ‘cut and paste’
Tab Command Completion
At any time while entering commands, the user can hit the TAB key, and the current command word will be automatically completed, if a unique completion exists.
Context Sensitive Help
At any time while entering commands, the user can hit the ? key, and a list of possible command word and command parameter completions, along with a description of each, will be displayed.
Position Independent Parameter Specification
Command parameters can be entered by the user either by entering the parameter values in the order they appear in the command syntax, or by entering a ‘-‘, then the parameter name, then the parameter value.
Command Line Editing
A full set of command line editing operations are available to the user while entering commands, including cursor movement such as forward/backward one character, forward/backward one word, move to beginning/end of line, delete char, delete word, delete line, insert/overstrike mode, and others.
Command History Buffer
A command history buffer of a programmable size allows the user to recall previous commands entered. Recalled commands can be edited prior to re-entry.
Extensible Parameter Types
Command Line Parameters are automatically converted from the user entered character string into a type determined by the command syntax. For example, if the syntax specification of a command indicates a parameter is of type ‘int’, then the text string entered by the user will be converted to an integer prior to it begin passed to the command action routine.
A number of built in parameter types are provided, such as ‘int’ ‘hex16’, ‘hex32’, ‘ipaddr’, ‘time’, etc. In addition,the programmer can easily create additional custom parameter types which may be specific to the application.
Parameter Type Checking
Command Line Parameters are automatically checked to be of the expected type. If they are not, an error message is automatically displayed indicating the parameter in error. This, along with automatic parameter type conversion, saves the programmer from having to perform these functions in each and every command action routine.
Command ‘Modes’
Commands can be grouped into ‘Modes’. A Mode has a name specified by the programmer, and a set of commands that are accessible from within the mode. The user ‘enters’ a mode simply by entering the mode’s name as a command.
Modes make it easy to group related commands. For example, if a set of diagnostic commands are to be provided, a mode called ‘diag’ can be created and the diagnostic commands provided there rather than cluttering up the top level of commands with diagnostic commands. In addition, specific users can be enabled and denied access to specific modes.
Verification Prompting
Commands can be set up to automatically ‘prompt’ the user for verification prior to taking the command action.
Username/Password Protection
Support is provided for specification of usernames, and a password can be provided for each user. When username/password protection is enabled, access to the cli commands will not be allowed until a user ‘logs in’. This is one of the simplest yet most effective ways of controlling access to the end product operation.
CLI Command Directories
CLI Commands are grouped into ‘Directories’. When a cli session ( see below ) is initiated, one or more directories are specified. Then, if username/password protection is in force, when a user logs on, one of the directories is selected for that user. This makes it easy to provide a different set of commands for various users.
For example, it is often necessary to provide a set of administrator commands which have full control of the product,and a separate ( usually a subset ) of commands that are accessible to ordinary users. There is no limit to the number of command directories or usernames that can be specified.
CLI Sessions
A CLI Session provides a task context which performs the complete job of user input, command line parsing, command lookup, parameter verification, context sensitive help, tab completion, command execution, username/password verification, etc.
A session is started by the programmer with a single function call. Many sessions may be started, and each may differ in commands provided, console device in use, etc. Therefore it is easy to provide the cli in a product with multiple console devices.