Method and system for realizing CLI command interface on single-chip microcomputer

A command interface, single chip technology, applied in user interface execution, program control design, instruments, etc., can solve problems such as insufficient single chip, and achieve the effect of efficient and convenient scripting

Active Publication Date: 2020-07-24
山东华辰连科通信网络有限公司
View PDF16 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention proposes a method and system for realizing a CLI command interface on a single-chip microcomputer, and realizes a human-computer interaction interface of a command line interface on the single-chip microcomputer, so that configuration, management and testing of the embedded single-chip microcomputer are more efficient and convenient, and script automation is solved. The problem of insufficient single-chip microcomputer in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for realizing CLI command interface on single-chip microcomputer
  • Method and system for realizing CLI command interface on single-chip microcomputer

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0048] Embodiment 1 of the present invention proposes a method for realizing a CLI command interface on a single-chip microcomputer, which can realize a human-computer interaction interface of a command line interface, such as figure 1 Shown is a flow chart of a method for implementing a CLI command interface on a single-chip microcomputer.

[0049] In step S101, first define the global variable CLI_SCAN, which is used to describe the session window of the CLI, and record the information of one startup; in the future, attributes such as destination IP and port can be added for common use in telnet.

[0050] The specific content is:

[0051] typedef struct

[0052] {

[0053] UINT32 key; / * use each character temporarily stored in get_input * /

[0054]int cmd_len; / * cmd_input uses the final length position pointed to by cmd_line * /

[0055] int cur_pos; / * cmd_input points to the current cursor position * /

[0056] int login_level; / * login level * /

[0057] char login_na...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method for realizing a CLI command interface on a single chip microcomputer. The method comprises the following steps: firstly, defining a global variable CLI _ SCAN and calling a performance function information recording structural body USRCMD _ PARA _ STRUCT; receiving login information of the user; identifying an interrupted reading character input from the keyboard and outputting processing information; reading a whole command output result character according to the output processing information; judging the type of the action executed in the next step accordingto the result symbol and returning; responding to the action, executing a performance function matched with the action, and outputting a result; the command is added to a historical command. Based onthe method, the invention further provides a system for realizing the CLI command interface on the single-chip microcomputer, and the auxiliary functions which can be realized by the method comprise user permission setting and TAB key or-key supporting. Completing the commands, checking historical commands and the like. A man-machine interaction interface of a command line interface is realized, so that the configuration, management and test of the embedded single-chip microcomputer are more efficient, and scripts are automated.

Description

technical field [0001] The invention belongs to the technical field of command line interface management of embedded equipment, and in particular relates to a method and a system for realizing a CLI command interface on a single-chip microcomputer. Background technique [0002] Command Line Interface CLI is a way of interacting with a device in text mode. This program allows the user to type in text commands that instruct the computer to perform specific tasks. The CLI consists of several components: User Input / Output, Command Line Editing, History Commands, Completion commands, input parsing, parameter validation and command scheduling / execution, error handling and reporting. CLI has lower system requirements and is more suitable for embedded systems; it also has higher execution efficiency, and only needs to type some characters to complete the configuration and management of the device. [0003] In the prior art, there is no human-computer interaction interface of a comm...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/38G06F9/451G06F9/445
CPCG06F8/38G06F9/451G06F9/4451Y02D10/00
Inventor 聂丽红马中骏严丽
Owner 山东华辰连科通信网络有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products