The present invention relates generally to communication systems and in particular a help mechanism relating to commands available for a command line interface in a communication system.
Controlling a cable modem communication system is typically done with commands from a command line interface (CLI). The commands generally provide a lot of options and tend to be complicated. A CLI may provide general help information designed to aid the operator in selecting desired commands. Such help mechanisms typically provide a brief description of commands and each commands possible arguments. However, the general help information and implementation of the help information is typically only helpful to operators who have a significant amount of experience in providing commands. What is needed in the art is a user friendly system that operators with minimal experience can operate effectively.
For the reasons stated above, and for other reasons stated below that will become apparent to those skilled in the art upon reading and understanding the present specification, there is a need in the art for user friendly method of providing help information to an operator regarding command instructions in a cable modem communication system.
The above-mentioned problems and other problems are resolved by the present invention and will be understood by reading and studying the following specification.
In one embodiment, a method of operating a command line interface (CLI) in a communication system is disclosed. The method comprises displaying tokens and associated context specific descriptions for CLI commands in response to a first command key.
In another embodiment, a method of providing help in controlling a communication system is disclosed. The method comprises entering a first command key and displaying tokens and associated context specific descriptions relating to a command line interface (CLI) command in response to the first command key.
In further another embodiment, a computer-usable medium having computer-readable instructions stored thereon for execution by a processor to perform a method is disclosed. The method comprises processing a help request from a command line interface (CLI). Providing a list of context sensitive tokens in response to the help request. Linking associated definitions and applicable parameters for a particular command to each token and displaying the associated description and applicable parameters.
In yet further another embodiment, a management module in a communication system is disclosed. The management module comprises a completer and parser. The completer is adapted to pass a list of tokens to a display of a command line interface (CLI) in response to a first key command key received from the CLI and to pass the list of tokens to a parser in response to a second key command from the CLI.
In still yet another embodiment, a cable modem communication system is disclosed. The communication system comprises a command line interface (CLI) and management module. The CLI is adapted to provide commands to the cable modem communication system. The CLI has an operator interface and a display. The management module is in communication with the CLI. The management module includes a completer and a parser. The completer is adapted to provide a list of tokens to the parser and the parser is adapted to pass on to the CLI only tokens related to a specific mode of operation.
The present invention can be more easily understood and further advantages and uses thereof more readily apparent, when considered in view of the description of the preferred embodiments and the following figures in which:
In accordance with common practice, the various described features are not drawn to scale but are drawn to emphasize specific features relevant to the present invention. Reference characters denote like elements throughout Figures and text.
In the following detailed description of the present embodiments, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments may be utilized and that logical, electrical or mechanical changes may be made without departing from the scope of the present invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the appended claims and equivalents thereof.
Embodiments of the present invention provide a new command line interface (CLI) mechanism. The CLI mechanism of one embodiment of the present invention invokes a text based hyper text markup language (HTML) file browser (such as Lynx) and allows the operator to browse an online electronic version of a CLI command reference. These embodiments provide detailed help information that includes command explanation, command examples and links to all related commands. Referring to
As stated above, the present invention provides user friendly help options to an associated CLI to assist in providing commands to a communication system. Embodiments of the present invention provide a mechanism to support context sensitive short description for CLI commands. Further in one embodiment, the context sensitive short descriptions are invoked by pressing (activating) a “?” command key on an associated keyboard. Depending on the particular mode, available command tokens with short descriptions associated with the mode are displayed. Moreover, in one embodiment, if a user had already entered a partial command, all applicable parameter, parameter's description and possible range of the parameter are displayed.
Referring to
Referring to
As discussed above, some embodiments of the present invention use a JAVA completer. The following involves a detailed description of an embodiment of the present invention using a JAVA completer. In particular, the invocation of context sensitive short descriptions using a JAVA Completer is further described. Handling of the tab key and the “?” command key is implemented in Readline.C in this embodiment. The handling function in turn invokes the java completer function via editline JN1 library. In this embodiment, we notify the java completer that we are handling a “?” inquiry. Examples of modifications to modules of one embodiment of the present invention are as follows:
The request is then formulated. When the completer is called in this embodiment, it invokes the parser, which gives a parser exception since the parser's input stream is either empty or contains an incomplete command. The exception contains a list of available tokens in a current command-line context. If the completer is invoked by the TAB key, the token list will be displayed. In the case of the “?” key command, the token list is looped through and individual tokens are fed into the parser's input stream and the parser is invoked. This forces the parser to examine corresponding nodes for the tokens. The nodes hold the short descriptions which are collected when examined.
In one embodiment, tokens for such things as MAC addresses and IP addresses are represented as strings such as <mac address> and <ip address>. These strings of syntax are converted in this embodiment to values the parser understands before they are passed into the parser's input stream. For example, “<ip-address>” is converted to “1.1.1.1.” A pseudo code of one embodiment to formulate the input stream is as follows:
Moreover, there is another complication when dealing with value tokens. For many value tokens multiple syntax are allowed. For example, when setting upstream channel frequency, the value of the frequency can either be an integer or a float. To deal with this, one embodiment of the present invention combines the tokens into a single string representation. For example, instead of two separate tokens of <integer> and <float>, a single representation of <integer, float> is used. In a further embodiment, this conversion is done in the function of “replaceValueTokens.” Moreover, in the CLI parser's code (BasCli.jjt), we need to modify these composite tokens by invoking a “setTypoInfo” function to match the combined tokens names. This requires going through all composite value tokens in the parser file.
When the parser is invoked it goes through each node. This invokes a setHelpInfo and setBasType functions as defined in module SimpleNodejava. The setHelpINfo creates the short description and setBasType obtains range information for the parameters. If the token name in the node matches the token name expected, both the token name and its description will be stored into a vector for displaying. For example, if the “?” key is pressed when the command line contains a partial command such as “upstream 1,” the parser will produce a token list related to “Upstream 1” such as:
In one embodiment the token list is displayed in a table format. Moreover, in one embodiment this is done by following existing functions in BASCliFormatter. This will automatically take care of issues of paging, wrapping the column and etc. An example is as follows:
The methods and techniques described here may be implemented in digital electronic circuitry, or with a programmable processor (for example, a special-purpose processor or a general-purpose processor such as a computer) firmware, software, or in combinations of them. Apparatus embodying these techniques may include appropriate input and output devices, a programmable processor, and a storage medium tangibly embodying program instructions for execution by the programmable processor. A process embodying these techniques may be performed by a programmable processor executing a program of instructions to perform desired functions by operating on input data and generating appropriate output. The techniques may advantageously be implemented on a programmable system including at least one programmable processor coupled to receive data and instructions from, and to transmit data and instructions to, a data storage system, at least one input device, and at least one output device. Generally, a processor will receive instructions and data from a read-only memory and/or a random access memory. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks; and DVD disks. Any of the foregoing may be supplemented by, or incorporated in, specially-designed application-specific integrated circuits (ASICs).
Although specific embodiments been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that any arrangement that is calculated to achieve the same purpose may be substituted for the specific embodiments shown. Many adaptations of the invention will be apparent to those of ordinary skill in the art. Accordingly, this application is intended to cover any such adaptations or variations of the invention. It is manifestly intended that this invention be limited only by the following claims and equivalents thereof.