CN103530122A - Programmable instrument standard command generation method based on graphical interface - Google Patents

Programmable instrument standard command generation method based on graphical interface Download PDF

Info

Publication number
CN103530122A
CN103530122A CN201310491673.7A CN201310491673A CN103530122A CN 103530122 A CN103530122 A CN 103530122A CN 201310491673 A CN201310491673 A CN 201310491673A CN 103530122 A CN103530122 A CN 103530122A
Authority
CN
China
Prior art keywords
command
window
programmable instrument
type
file
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.)
Granted
Application number
CN201310491673.7A
Other languages
Chinese (zh)
Other versions
CN103530122B (en
Inventor
周俊杰
左永锋
王鹏
徐明哲
卢凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Electronics Technology Instruments Co Ltd CETI
Original Assignee
CETC 41 Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CETC 41 Institute filed Critical CETC 41 Institute
Priority to CN201310491673.7A priority Critical patent/CN103530122B/en
Publication of CN103530122A publication Critical patent/CN103530122A/en
Application granted granted Critical
Publication of CN103530122B publication Critical patent/CN103530122B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a programmable instrument standard command generation method based on a graphical interface. The programmable instrument standard command generation method includes the steps of (1) generating a display window, (2) generating different programmable instrument command sets according to a menu provided by a main window, (3) manually configuring a command type, a mnemonic symbol type and a parameter type of each subsystem, and (4) automatically generating a programmable instrument command processing function according to different subsystem commands. By means of the scheme, different command generation modes can be provided according to the different demands of users to meet the different requirements of the users, an editing interface is clear in display, and an editing mode is simple.

Description

A kind of programmable instrument standard commands generation method based on graphical interfaces
Technical field
The invention belongs to the technical field of processing based on graphical interfaces in intelligent instrument software, in particular a kind of programmable instrument standard commands generation method based on graphical interfaces.
Background technology
Along with scientific and technical develop rapidly, the complexity of various intelligent instruments improves day by day, and Auto-Test System is progressively applied to each stages such as various product development, generation, maintenance.Programmable function has become the requisite important interface functional module of all modern universal testers.Therefore,, in each quasi-instrument, reliable and stable programmable function is very important.But the complicacy of modern instrument function has brought problems must to the design of program control module, as order interpolation command job amount of a great variety to be made mistakes greatly and easily, instrumental function faces the additions and deletions of program control order etc. after changing, so the generating mode of the program control order of appropriate design becomes the important step that modern intelligent instrument Software for Design is paid close attention to gradually.
At present, the program control command generating method of existing instrument mainly contains following two kinds: a kind of is to adopt program control order to be embedded in the mode in application software, this method generates program control order to take the part that the form design of chained list is SCPI command interpreter, by complicated linked list data structure, SCPI standard commands key word, parameter node and bottom layer treatment function link are got up, idiographic flow is: each node layer information-parameter nodal information-processing function information of command chaining list structure-order root node information-order.
Another kind method is that all SCPI orders are comprised to parameter information arranges to a file, instrument software while carrying out reads in this command file, utilize tree to preserve input command information, for order with parameter, adopt the mode of parameter chained list to preserve each parameter state, each command processing function is generated by application programming, and idiographic flow is: generate document (txt/doc etc.)-order is inputted to document-parameter information is inputted to document-command processing function generate in application program.
For program control order being embedded in to the method for application software, major defect is:
1, data structure is complicated, while setting up command list (CLIST), during command node information, by different levels, command node information not at the same level is inserted respectively in chained list, more loaded down with trivial details.
2, when increase or delete command information, need again to data structure, carry out combing, increase new nodal information or delete original chained list node information, easily make mistakes, not meet the principle of application software modifiability and ease for maintenance.
3, because chained list node is numerous, complex structure, the method ease for use is not strong, portable poor.
For adopting command file mode to preserve the method for SCPI order, major defect is:
1, need deviser by all command informations, the manual input file of parameter information, increase very large workload, and easily make mistakes.
2, command documentation increases or deletes after document, also wants corresponding command processing function in corresponding additions and deletions application program, and efficiency is lower.
Therefore, there is defect in prior art, needs to improve.
Summary of the invention
Based on the deficiencies in the prior art, fundamental purpose of the present invention is to provide a kind of new SCPI standard commands editing interface and command generating method, the method is based on window, control, menu: first create the window writing routine of a Windows back warp allusion quotation, guarantee to provide a software interface that user's cognition degree is very high; Secondly, interface according to user need to provide commard editor, order to generate, the window such as order is browsed, it is abundant that information shows, prominent function; Finally, user is all right according to the command file of own required generation different-format, and requires to generate according to user the ability of processing function file.
Technical scheme of the present invention is as follows: it is characterized in that, it comprises the following steps:
Step 1: generate display window;
Step 2: the menu setecting providing according to main window generates SCPI command set;
Step 3: each subsystem command type of manual configuration, memonic symbol type, parameter type;
Step 4: according to different sub-systems order, automatically generate SCPI command processing function;
Preferably, described step 1 specifically comprises:
11: main window, for data initialization is provided, generates command tree class, for applying with the attribute of memory command, processing function information.
12: commard editor window, for receiving and showing that manually order, the interpolation of parameter nodal information, the order of input show service etc., and store in imperative structures body array user;
13: command tree window is used for showing all SCPI standard commands, comprises memonic symbol, command type, parameter type etc.
Preferably, described step 2 specifically comprises:
21: the standard commands that automatically generates instrument different function units subsystem according to SCPI99 code requirement, and generate command tree structure according to its function, and command type, left child nodes sequence number, adjacent brotgher of node sequence number, parameter type, nodal information are deposited in node class pointer object;
22: user can create voluntarily node by mouse in command tree window, and by message response function, realize communicating by letter of command tree window and commard editor window;
Preferably, described step 3 specifically comprises:
31: by realizing the message response function of control class ON_EN_CHANGE, TVN_SELCHANGED, realize the nodal informations such as memonic symbol type, parameter type that command tree window is communicated by letter with commard editor window and shown in real time and process, store user input;
32: fill in node class data structure the information such as command index, type, extending marking.
Preferably, described step 4 specifically comprises:
41: it is header file and source file that described programmable instrument standard commands is processed function file, and described header file has comprised function and the macro definition of using in described source file; Described header file is can not compiling file; Described source file is can compiling file;
42 utilize the CString object that microsoft foundation class storehouse (MFC) provides that every order memonic symbol character string in command tree is connected to become to function name, and complete writing of function definition and statement, fill command processing function array of pointers, realize the generation of programmable instrument command processing function.
Adopt such scheme, first, demand that can be different according to user, provide different order generating mode to meet the needs that user is different, and editing interface signal is clear, and edit mode is simple.Secondly, the generation method of programmable instrument standard commands, can require automatic generating portion code according to user, to reduce software development workload estimate.In addition, the present invention can also import the command documentation that user has gathered, and offers the function that user's document is edited again.Finally, compare with existing programmable instrument order generating mode, in intuitive and efficiency, be improved before.
Accompanying drawing explanation
Fig. 1 is structural representation of the present invention.
Fig. 2 is the process flow diagram that the present invention is based on the programmable instrument standard commands generation embodiment of the method for graphical interfaces.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
As shown in Figure 1, creating, configuration frequency subsystem command integrates as example explanation the technical program implementation process, the programmable instrument standard commands generation method that the present invention is based on graphical interfaces comprises the following steps:
1: generate display window, wherein main window 101 creates as the parent window of commard editor window 103, command tree window 102, and interactive interface as shown in Figure 1.
2: according to current, need to create configuration frequency subsystem, in command tree window 102, utilize as shown in Figure 2 the CTreeCtrl class that MFC provides to add frequency subsystem lower node information.Concrete, under frequency subsystem, add set-point frequently, various scan type is initial, stop the nodal informations such as frequency, frequency offset, frequency step.Furthermore, in Fig. 2,201 reading order documents; 202 select generated frequency subsystem manually or automatically, as select manually to enter 203, as select automatically to enter 204; 203 manual configuration frequency subsystem command and/or parameters; 204 production form command documentations and generation programmable instrument standard commands are processed function file.
3: in commard editor window 103, the information that each leaf node is corresponding is edited.Concrete, to its command type, parameter type (comprising the discrete value that discrete parameter is concrete), function number, memonic symbol, could omit the information such as sign.
4: utilize main window 101 that menu creation command processing function is provided.
Preferably, step 1 specifically comprises:
11: create subwindow, complete various window fractionation work, create various menus, create SCPI order class object array, and complete class object array data member initialization.
12: and judge currently whether have available command document, if having, use the CArchive class that MFC provides to be associated by its taking-up and with CTreeCtrl class control, and deposited in node array.
Preferably, step 3 specifically comprises:
31: in commard editor window 103, add the controls such as edit box, radio box, check box, and create corresponding control variable and event variable.
32: add EN_CHANGE, the BN_CLICKED of control, the message response function of TVN_SELCHANGED, realize and receive user inputs character, click the functions such as button and mouse click commands tree node.Concrete, in the selected command tree window of user during nodal information, control response TVN_SELCHANGED message, and from node array, take out this nodal information and be presented in commard editor frame, if user is input message and click radio box in commard editor window by mouse or keyboard, control sends EN_CHANGE and BN_CLICKED message, by corresponding event variable, is deposited in node array.
Preferably, step 4 specifically comprises:
41: generate command processing function, after clicking " generating function " menu, the object that utilizes CString to define removes rear recycling character string linkage function by symbols such as colon, brackets in every one-level memonic symbol in node array and is combined into function name, and the information such as type function name, rreturn value are connected in data object.
42: utilize the complete command tree node of searching loop array, and by data message writing in files, generating function defines and header file respectively.
Particularly:
1) commard editor window 103: provide user manually to carry out the function of order, the interpolation of parameter nodal information, data demonstration;
2) command tree window 102: user can all can show the command file document of importing, the order of editing, browse at command tree window, user uses mouse to click can show the details of the command node of current click at commard editor window, comprise memonic symbol, command type, parameter type etc.
3) window is browsed in order: the command documentation that the document that user has edited or user import all can show at this window, comprise order memonic symbol, command type and parameter type, and the file layout output that can require according to user, existing this software support doc, xls, txt, dat file layout.
4) subsystem types that can select according to user is given tacit consent to the standard SCPI command set that generates this subsystem automatically.
5) can automatically generate .cpp file and the .h file of each SCPI command processing function, and the .cpp file that the user of importing has been edited and .h file add or delete corresponding subcommand and process function.
Comprise particularly:
11) described commard editor window 103 provides two kinds of users the manually mode of input, and a kind of is by the complete form input edit box of order and import in file; Another kind of mode is used in conjunction with command tree window, by mouse click commands tree node commard editor window show present node information, user can revise order memonic symbol type, parameter type etc. at this.
12) mode being used in conjunction with command tree window 102 also supports user that the processing function number to ordering is set, and the mode of the complete form of input command can only be by the automatic distributively generated of software.
Particularly, described 4) in: because the versatility of standard SCPI, provide and according to SCPI99 code requirement, instrument difference is given to the automatic function generating of standard commands of system, user can operate these default commands in command tree window or commard editor window, can increase, delete, revise order, parameter nodal information.
Comprise particularly:
51) provide according to order and browse the shown order of window, can automatically generate .cpp file and the .h file of SCPI command processing function, reduce user's workload.
52) the .cpp file that user can have been editted and .h file import in software, according to certain rule, order is reduced in command tree window 102, commard editor window 103, and the code line that user is editted is preserved, after person to be used remodifies, the .cpp file that regeneration is new and .h file.
The present invention is based on window and menu, configuration information shows abundant, all command information What You See Is What You Get, can be convenient to use mouse, keyboard operation, there is larger degree of freedom, SCPI order and concrete instrument are separated completely simultaneously, for completing SCPI order, be created in convenience and efficiency and be improved.The command generating method that the present invention realizes, user can conveniently browse, edits, modification, additions and deletions order, and be totally independent of concrete instrument, can generate the framework of variety classes command set, thereby improve ease for maintenance and the modifiability of instrument software, shorten the program development time, improve system availability lowering apparatus use and maintenance cost.
Should be understood that, for those of ordinary skills, can be improved according to the above description or convert, and all these improvement and conversion all should belong to the protection domain of claims of the present invention.

Claims (5)

1. the programmable instrument standard commands generation method based on graphical interfaces, is characterized in that, comprises the following steps:
Step 1: generate display window;
Step 2: the different programmable instrument command set of menu setecting providing according to main window;
Step 3: command type, memonic symbol type, the parameter type of the functional unit of manual configuration programmable instrument standard commands (SCPI) model (being each subsystem);
Step 4: the order memonic symbol according to each subsystem, generates programmable instrument command processing function automatically.
2. programmable instrument standard commands generation method as claimed in claim 1, is characterized in that, described step 1 specifically comprises:
Step 11: generate main window, for data initialization is provided, generate command tree class, for applying with the attribute of memory command, processing function information;
Step 12: generate commard editor window, for receiving and showing that manually order, the interpolation of parameter nodal information, the order of input show service, and store in imperative structures body array user;
Step 13: generate command tree window, for showing the order of all programming standard of instruments, comprise memonic symbol, command type, parameter type.
3. programmable instrument standard commands generation method as claimed in claim 1, is characterized in that, described step 2 specifically comprises:
21: automatically generate the standard commands of each subsystem, and generate command tree structure, and command type, left child nodes sequence number, adjacent brotgher of node sequence number, parameter type, nodal information are deposited in node class pointer object;
22: in command tree window, create voluntarily node, and by message response function, realize communicating by letter of command tree window and commard editor window.
4. as claim 1 programmable instrument standard commands generation method, it is characterized in that, described step 3 specifically comprises:
31: by adding the ON_EN_CHANGE of control class,, the message response function of TVN_SELCHANGED, realize command tree window and communicate by letter with commard editor window and show in real time and process, store the nodal informations such as memonic symbol type that user inputs, parameter type;
32: fill command index, type, extending marking information in node class data structure.
5. programmable instrument standard commands generation method as claimed in claim 1, is characterized in that, described step 4 specifically comprises:
41: it is header file and source file that described programmable instrument standard commands is processed function file, and described header file has comprised function and the macro definition of using in described source file; Described header file is can not compiling file; Described source file is can compiling file;
42 are connected to become function name by every order memonic symbol character string in command tree, and complete writing of function definition and statement, fill command processing function array of pointers, realize the generation of programmable instrument command processing function.
CN201310491673.7A 2013-10-11 2013-10-11 Programmable instrument standard command generation method based on graphical interface Expired - Fee Related CN103530122B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310491673.7A CN103530122B (en) 2013-10-11 2013-10-11 Programmable instrument standard command generation method based on graphical interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310491673.7A CN103530122B (en) 2013-10-11 2013-10-11 Programmable instrument standard command generation method based on graphical interface

Publications (2)

Publication Number Publication Date
CN103530122A true CN103530122A (en) 2014-01-22
CN103530122B CN103530122B (en) 2017-02-08

Family

ID=49932162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310491673.7A Expired - Fee Related CN103530122B (en) 2013-10-11 2013-10-11 Programmable instrument standard command generation method based on graphical interface

Country Status (1)

Country Link
CN (1) CN103530122B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260223A (en) * 2015-10-27 2016-01-20 中国电子科技集团公司第四十一研究所 Method for defining, analyzing, executing and testing SCPI (standard commands for programmable instruments)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838319A (en) * 1994-12-13 1998-11-17 Microsoft Corporation System provided child window control for displaying items in a hierarchical fashion
CN101459739A (en) * 2008-12-31 2009-06-17 广东协联科贸发展有限公司 Expandable interactive voice service system based on wideband network
CN102467370A (en) * 2010-11-03 2012-05-23 北京普源精电科技有限公司 Measurement resource control system and measurement resource control method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5838319A (en) * 1994-12-13 1998-11-17 Microsoft Corporation System provided child window control for displaying items in a hierarchical fashion
CN101459739A (en) * 2008-12-31 2009-06-17 广东协联科贸发展有限公司 Expandable interactive voice service system based on wideband network
CN102467370A (en) * 2010-11-03 2012-05-23 北京普源精电科技有限公司 Measurement resource control system and measurement resource control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李海龙: "《SCPI命令解释器设计》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260223A (en) * 2015-10-27 2016-01-20 中国电子科技集团公司第四十一研究所 Method for defining, analyzing, executing and testing SCPI (standard commands for programmable instruments)
CN105260223B (en) * 2015-10-27 2018-10-16 中国电子科技集团公司第四十一研究所 A kind of SCPI command definitions, the method for parsing, execution and test

Also Published As

Publication number Publication date
CN103530122B (en) 2017-02-08

Similar Documents

Publication Publication Date Title
CN110597506B (en) Front-end application visualization development tool and use method
CN105786526B (en) A kind of efficient flow figure drawing system and method based on Web
CN100562846C (en) Text by hierarchical structure tabulation editor arbitrary graphic
RU2537776C2 (en) Markup-based extensibility for user interfaces
US8468492B1 (en) System and method for creation and modification of software applications
CN104020997B (en) Extensible graphical rule application system
CN107844297A (en) A kind of data visualization realizes system and method
CN104317587A (en) Automatic android mobile device oriented application generation method
CN105094832A (en) WYSIWYG method and system for dynamically generating user interface
CN104823158B (en) Method and system for simplified knowledge engineering
CN102968306A (en) Method and system for automatically generating code based on data model drive
US7899846B2 (en) Declarative model editor generation
CN116225429A (en) Pulling type component frame-based ipage webpage type low-code development platform
CN105701183A (en) User personalized template implementation method and apparatus
CN103309659A (en) User interface dynamic generation method and device based on rich client platform
CN102609252A (en) Intelligent configuration method for logic menu resources on basis of measurement instruments
CN111625226A (en) Prototype-based human-computer interaction design implementation method and system
US20230102947A1 (en) Providing operations in accordance with worksheet relationships and data object relationships
CN110750254A (en) Flowchart editor implementation method based on Angular
CN112650966A (en) Method, generator and medium for generating dynamic list page of online design
WO2005094500A2 (en) Document development platform
CN103810292A (en) Method and device for configuring graphical interface
CN104834715A (en) Website generating method and system based on components and container
CN109086040A (en) A kind of method and system quickly generating html code
CN109284488A (en) Based on the method, apparatus and medium that modification front end table column data is locally stored

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
TR01 Transfer of patent right

Effective date of registration: 20190314

Address after: 266000 No. 98 Xiangjiang Road, Huangdao District, Qingdao City, Shandong Province

Patentee after: CHINA ELECTRONICS TECHNOLOGY INSTRUMENTS Co.,Ltd.

Address before: 266555 No. 98 Xiangjiang Road, Qingdao economic and Technological Development Zone, Shandong

Patentee before: THE 41ST INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY Group Corp.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170208

Termination date: 20211011

CF01 Termination of patent right due to non-payment of annual fee