CN101193109B - A method for supporting interactive command in command line interface of communication device - Google Patents
A method for supporting interactive command in command line interface of communication device Download PDFInfo
- Publication number
- CN101193109B CN101193109B CN2006101607661A CN200610160766A CN101193109B CN 101193109 B CN101193109 B CN 101193109B CN 2006101607661 A CN2006101607661 A CN 2006101607661A CN 200610160766 A CN200610160766 A CN 200610160766A CN 101193109 B CN101193109 B CN 101193109B
- Authority
- CN
- China
- Prior art keywords
- command
- interactive
- interactive command
- line interface
- communication equipment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Abstract
The invention provides a method for a communications equipment to command a line interface to support an interactive command. The method includes the following steps: registering the interactive command in a command tree; executing command collocation and judging whether the command is an interactive command at the time of command analysis; executing flow of the original command if the executed command is not the interactive command; switching the interactive command into a Cisco-style command line if the executed command is the interactive command, and processing the command according to the original command flow; feeding back a result after the interactive command is processed. The method of the invention supports an interactive command line interface in the current command line interface of the communications equipment, namely, the command line interfaces of two styles are supported at the same time so that a user can conveniently maintain the equipment in the both ways, thus improving equipment maintainability.
Description
Technical field
The present invention relates to the communications field, relate in particular to the method for command line interface support interactive command in a kind of communication equipment.
Background technology
The command line interface configuration mode is the general configuration mode of communication equipment, and command line interface generally is to adopt the Cisco style in the communication equipment.
The order line form of Cisco style is:
<keyword 1〉and [<keyword 2〉[...]] [<parameter 1〉[<parameter 2〉[...]]]
The form of interactive command is:
<keyword 1〉[<parameter 1〉[<parameter 2〉[...]]]
The numerical value of the last configuration of command cue 1:() [<parameter 〉]
The numerical value of the last configuration of command cue 2:() [<parameter 〉]
With the configure user number of the account is example, and the order line of Cisco style is as follows:
Cisco(config)#subscriber?sub1
Cisco(config-sub)#password?pass1
Cisco(config-sub)#ip-address?1.1.1.1
Wherein, be command cue before # number, be the order of input after # number.
The interactive command row is as follows:
cisco(config)#subscriber?sub1
password:pass1
ip-address:1.1.1.1
Wherein: before number command cue: the command parameter that after number is input.
The order line of Cisco style is tended to parameter of a command configuration, and all parameters that the interactive command row then will be relevant with certain object use alternant way configuration step by step to finish.
As can be seen from the above, the order line of Cisco style is applicable to the situation that the configuration object parameter is fewer.When certain configuration object has a lot of configuration parameters, need to carry out many such orders, not only loaded down with trivial details but also consuming time like this, the parameter that easy again omission will be disposed.
And by using the interactive command line interface, the user can directly import the configuration order of a certain configuration object, communication equipment just progressively points out this configuration object configurable all parameters, the user can according to the prompting information dispose length by length, operate so fairly simple, convenient, save time.
But the existing command line interface on the communication equipment can not be supported the interactive command line interface at present, promptly can not support the command line interface of interactive command line interface and Cisco style simultaneously, has brought trouble for like this maintenance of communication equipment.
Summary of the invention
The object of the present invention is to provide the method for command line interface support interactive command in a kind of communication equipment, on the existing command line interface on the communication equipment, support the interactive command line interface, just support the command line interface of two kinds of styles simultaneously, can make the user can pass through dual mode service equipment easily, improve the maintainability of communication equipment.
Technical scheme of the present invention is as follows:
Command line interface is supported the method for interactive command in a kind of communication equipment, comprises the steps:
In the 1st step, in command tree, register interactive command;
In the 2nd step, the fill order configuration judges whether to be interactive command when command analysis;
In the 3rd step,, then carry out the flow process of original command execution if the order of carrying out is not an interactive command;
The 4th step is if this order of carrying out is an interactive command, after then that the command parameter composition of command cue and input is identical with the order line of the Cisco style input order line, according to the flow processing of original command execution;
The 5th step, after this interactive command is finished dealing with, return results.
When returning the interactive command result, also can comprise the steps:
The 6th step, judge whether this interactive command has follow-up interactive command, if this interactive command has follow-up interactive command, export next bar interactive command prompting to command terminal, repeat the 2nd then and go on foot the 6th processing that goes on foot;
In the 7th step,, recover original command cue if this interactive command does not have follow-up interactive command.
In command tree, register interactive command in described the 1st step, wherein registration in have command id, command cue and whether be the sign of interactive command, parameter.
In described the 2nd step, judge whether to the foundation of interactive command to be when command analysis: whether what register in command tree is the sign of interactive command.
In described the 5th step, judge whether this interactive command has the foundation of follow-up interactive command is whether to also have follow-up interactive command in command tree.
In described the 6th step, exporting next bar interactive command prompting to command terminal, is the command cue of registering in command tree in the 1st step.
The method of the invention is supported the interactive command line interface on the existing command line interface on the communication equipment, just support the command line interface of two kinds of styles simultaneously.Can make the user can pass through dual mode service equipment easily, improve the maintainability of communication equipment.
Description of drawings
Fig. 1 is original command execution flow chart of the present invention;
Fig. 2 is a flow chart of the present invention.
Embodiment
Below in conjunction with accompanying drawing the method for the invention is described in detail.
The present invention is used for being implemented in and supports the interactive command line interface on the existing command line interface on the communication equipment, just supports the command line interface of two kinds of styles simultaneously.Can make the user can pass through dual mode service equipment easily, improve the maintainability of communication equipment.
As shown in Figure 1, in original command execution flow chart of the present invention: command terminal can be serial ports, telnet client.Original command execution flow process is as follows:
Fill order configuration on command terminal, command terminal is submitted to the command analysis part with the order line of input.
Command analysis part is according to command tree resolve command row, then information such as the command id that parses and parameter is submitted to the command execution part.
The command execution part is submitted to concrete command execution body according to the executing location of order with order.
Concrete command execution body returns to the command execution part with the execution result of ordering after executing order.
The command execution part returns to execution result the command analysis part again.
The command analysis part with after the execution result format, is exported to command terminal again.
As shown in Figure 2, the method according to command line interface support interactive command in the realization communication equipment of the embodiment of the invention comprises:
The first step: in existing command tree, register interactive command;
Register the format information of order in the command tree, be used for command analysis.Have command id, command cue in the interactive command of registration, whether be the sign of interactive command, parameter.
Second step: the fill order configuration judges whether to be interactive command when command analysis;
Command analysis is that the order line of input is carried out commands match in command tree, finds out corresponding register information.Judge whether foundation for interactive command is whether what to register in the first step be the sign of interactive command in command tree.
The 3rd step:, then carry out the flow process of original command execution if this order of carrying out is not the interactive command row;
The flow process of original command execution comprises: carry out command execution, return execution result, the output command prompting.
The 4th step:, then this interactive command is converted to the order line of original style, according to original flow processing if this order of carrying out is the interactive command row;
This interactive command is converted to the processing procedure of original style command line: the command parameter of command cue and input is formed an order line, and the order line behind the composition is the same with the order line of Csico style input.
As ordering: password:pass1 is converted to password pass1.The processing of this order line is according to original flow processing then.Original command execution flow process is seen the explanation in the 3rd step.
The 5th step: after this interactive command is finished dealing with, during return results, judge whether this interactive command has follow-up interactive command.
This step partly carries out at command analysis, judges whether this interactive command has follow-up interactive command, and the foundation of judgement is whether to also have follow-up interactive command in command tree.
The 6th step: if this interactive command has follow-up interactive command, export next bar interactive command prompting, repeat top second then and go on foot the 6th processing that goes on foot to command terminal.
Export next bar interactive command prompting to command terminal, the command cue of output is the command cue of registering in command tree in the first step.
The 7th step:, recover original command cue if this interactive command does not have follow-up interactive command.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (6)
1. command line interface is supported to it is characterized in that the method for interactive command in the communication equipment, comprises the steps:
In the 1st step, in command tree, register interactive command;
In the 2nd step, the fill order configuration judges whether to be interactive command when command analysis;
In the 3rd step,, then carry out the flow process of original command execution if the order of carrying out is not an interactive command;
The 4th step is if this order of carrying out is an interactive command, after then that the command parameter composition of command cue and input is identical with the order line of the Cisco style input order line, according to the flow processing of original command execution;
The 5th step, after this interactive command is finished dealing with, return results.
2. command line interface is supported the method for interactive command in the communication equipment as claimed in claim 1, it is characterized in that, when returning the interactive command result, also can comprise the steps:
The 6th step, judge whether this interactive command has follow-up interactive command, if this interactive command has follow-up interactive command, export next bar interactive command prompting to command terminal, repeat the 2nd then and go on foot the 6th processing that goes on foot;
In the 7th step,, recover original command cue if this interactive command does not have follow-up interactive command.
3. command line interface is supported the method for interactive command in the communication equipment as claimed in claim 1 or 2, it is characterized in that:
In command tree, register interactive command in described the 1st step, wherein registration in have command id, command cue and whether be the sign of interactive command, parameter.
4. command line interface is supported the method for interactive command in the communication equipment as claimed in claim 3, it is characterized in that:
Judging whether when command analysis in described the 2nd step for the foundation of interactive command is: whether what register in command tree is the sign of interactive command.
5. command line interface is supported the method for interactive command in the communication equipment as claimed in claim 3, it is characterized in that:
Whether this interactive command of judging in described the 5th step has the foundation of follow-up interactive command, is whether to also have follow-up interactive command in command tree.
6. command line interface is supported the method for interactive command in the communication equipment as claimed in claim 2, it is characterized in that:
In described the 6th step, exporting next bar interactive command prompting to command terminal, is the command cue of registering in command tree in the 1st step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006101607661A CN101193109B (en) | 2006-12-01 | 2006-12-01 | A method for supporting interactive command in command line interface of communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2006101607661A CN101193109B (en) | 2006-12-01 | 2006-12-01 | A method for supporting interactive command in command line interface of communication device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101193109A CN101193109A (en) | 2008-06-04 |
CN101193109B true CN101193109B (en) | 2010-08-04 |
Family
ID=39487859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2006101607661A Expired - Fee Related CN101193109B (en) | 2006-12-01 | 2006-12-01 | A method for supporting interactive command in command line interface of communication device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101193109B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101546264B (en) * | 2009-04-27 | 2012-08-15 | 成都市华为赛门铁克科技有限公司 | Command line processing method, device and communication system |
CN101964923A (en) * | 2009-07-23 | 2011-02-02 | 中兴通讯股份有限公司 | Configuration system and method for interactive commands |
CN105099746A (en) * | 2014-05-21 | 2015-11-25 | 中兴通讯股份有限公司 | SHELL execution method and SHELL execution device |
CN107291459A (en) * | 2017-06-09 | 2017-10-24 | 深圳市金立通信设备有限公司 | A kind of method and server for arranging information |
CN108647043B (en) * | 2018-04-03 | 2021-03-16 | 烽火通信科技股份有限公司 | Method and system for realizing command line input |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1402559A (en) * | 2001-08-10 | 2003-03-12 | 华为技术有限公司 | Method for implementing simultaneously supporting two style command line configuration |
-
2006
- 2006-12-01 CN CN2006101607661A patent/CN101193109B/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1402559A (en) * | 2001-08-10 | 2003-03-12 | 华为技术有限公司 | Method for implementing simultaneously supporting two style command line configuration |
Non-Patent Citations (2)
Title |
---|
汪春阳,刘永.网管系统建设的思维转变.网管员世界 4.2005,(4),13-14. |
汪春阳,刘永.网管系统建设的思维转变.网管员世界 4.2005,(4),13-14. * |
Also Published As
Publication number | Publication date |
---|---|
CN101193109A (en) | 2008-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103729373B (en) | A kind of database broker method and apparatus | |
CN101193109B (en) | A method for supporting interactive command in command line interface of communication device | |
CN102739570B (en) | Method for opening home gateway through wireless fidelity (WiFi) of smart phone | |
CN103117960A (en) | System and method of broadband user speeding up access bandwidth in self-service mode | |
CN101317300A (en) | Parameter configuration method and device of antenna equipment | |
US20110310985A1 (en) | Method for implementing unstructured supplementary service data service | |
CN105319973B (en) | A kind of method and device that smart home device is replaced by scanning the two-dimensional code | |
CN103595717A (en) | Household appliance control protocol conversion method and control terminal | |
CN103532756A (en) | Command line system and command line operation method based on webmaster system | |
CN102387156B (en) | Equipment logging treatment method, device and system | |
CN103995191B (en) | The recognition methods of air-conditioner type and device | |
US20080153546A1 (en) | Methods and apparatuses for sim application toolkit (sat) management | |
CN107274587A (en) | The display methods and device, clothes washing system and storage medium of free time laundry machine information | |
CN101951576B (en) | Method for implementing USSD (Unstructured Supplementary Service Data) application service and USSD centre | |
CN109981360A (en) | Internet of things equipment website activating method, device, system and storage medium | |
CN106168793B (en) | A kind of method and system automatically generating control device | |
CN114328256A (en) | Test method, test device, computer-readable storage medium and electronic equipment | |
CN100561942C (en) | Order line echo message analytic method and device based on template set | |
CN104363325A (en) | Terminal calling method and system | |
CN102521318A (en) | General data exchange device based on extensible markup language (XML) | |
CN103079190B (en) | It is a kind of to realize method, system and main frame that wireless terminal browses webpage function | |
CN105722082A (en) | Method for intelligent equipment to obtain operation network configuration by using access point function | |
CN110007943A (en) | A kind of application program update management method and system based on android system | |
CN103780637B (en) | Information sharing apparatus and method | |
CN100384285C (en) | Method for testing apparatus management service system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100804 Termination date: 20151201 |
|
EXPY | Termination of patent right or utility model |