CN105335205A - Virtual instrument scripting language parser and method thereof - Google Patents

Virtual instrument scripting language parser and method thereof Download PDF

Info

Publication number
CN105335205A
CN105335205A CN201510663001.9A CN201510663001A CN105335205A CN 105335205 A CN105335205 A CN 105335205A CN 201510663001 A CN201510663001 A CN 201510663001A CN 105335205 A CN105335205 A CN 105335205A
Authority
CN
China
Prior art keywords
component
web member
information
configuration
configuration information
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.)
Pending
Application number
CN201510663001.9A
Other languages
Chinese (zh)
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.)
Shenzhen Institute of Information Technology
Original Assignee
Shenzhen Institute of Information Technology
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 Shenzhen Institute of Information Technology filed Critical Shenzhen Institute of Information Technology
Priority to CN201510663001.9A priority Critical patent/CN105335205A/en
Publication of CN105335205A publication Critical patent/CN105335205A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Abstract

The invention discloses a virtual instrument scripting language parser and a method thereof; the parse method comprises the following steps: reading configuration information of members and connectors of a first configuration file; respectively generating corresponding member embodiments and connector embodiments according to the configuration information of members and connectors; respectively adding all member embodiments and connector embodiments into a member embodiment set and a connector embodiment set; generating an application program. The parser comprises a parse module, a member and connector embodiment management module and a generation module. The virtual instrument scripting language parser and the method thereof allow a user to use the parser to dynamically load different configuration files in the application phase, thus online modifying and upgrading functions of a measuring system.

Description

A kind of virtual instrument scripting language parser and method thereof
Technical field
The present invention relates to computer software technical field, particularly relate to a kind of virtual instrument scripting language parser and method thereof.
Background technology
Industry 4.0 proposes following manufacturing business model and will change to customer-centric from product-centered, as manufacturing important component part, along with measuring improving constantly of application complexity, measure the application system development cycle constantly to accelerate, user, in order to meet changing measurement application demand, needs to develop special test Solution to meet online upgrading and function adjustment requirement.Therefore the function of User Defined test macro becomes the latest development trend.The function of traditional virtual instrument platform is defined by apparatus manufacture, user is according to the demand of measuring system, develop according to the assembly that platform provides, through links such as demand analysis, detailed design, coding exploitation, compiling and link, system testings, after measuring system completes, user cannot on-the-fly modify and adjust.
Summary of the invention
For solving the problems of the technologies described above, the present invention proposes a kind of virtual instrument scripting language parser and method thereof, make terminal user can use in the application stage configuration documentation that this resolver dynamic load is different, online amendment and the upgrading of function are carried out to measuring system, and do not need as traditional virtual instrument technique, through links such as compiling and links.
For achieving the above object, the present invention by the following technical solutions:
The invention discloses a kind of virtual instrument script analytic method, comprise: read the component of the first configuration documentation and the configuration information of web member, configuration information according to described component and described web member generates corresponding component example and web member example respectively, and add all component examples and web member example to component example collection and web member example collection respectively, generate application program.
Preferably, described analytic method also comprises: newly-built second configuration documentation, read described component example collection and described web member example collection, all component examples and web member example is added respectively in described second configuration documentation, and add the configuration information of component and web member respectively, generate the 3rd configuration documentation and preserve.
Preferably, the configuration information of described component comprises type information, display parameter information and multiple connection configuration information, wherein said type information comprises component ID and element type, described display parameter information comprises display horizontal ordinate, display ordinate, display width, display height, display text and background colour, and described connection configuration information comprises connection status, connection name, web member ID and connection data type.
Preferably, the configuration information of described web member comprises web member attribute information, and described web member attribute information comprises web member state, web member type, source component ID, source component port title, source member position, object component ID, object component port title and object member position.
Preferably, read the component of the first configuration documentation and the configuration information of web member, configuration information according to described component and described web member generates corresponding component and web member respectively, and add all component examples and web member example to component example collection and web member example collection respectively, the process generating application program specifically comprises:
Determining step: read the nodal information of described first configuration documentation successively and judge the information of present node;
Generating component case step: when judging that present node is component node in described determining step, the type information of reading element, generating component example according to element type; The display parameter information of reading element, arranges the display information of described component example according to display parameter information; The connection configuration information of reading element, arranges the FPDP of described component example, and is added in component example collection by component example, and be back to determining step according to the connection name of the component having connection status;
Generate web member case step: when judging that present node is web member node in described determining step, read the attribute information of web member, according to the ID of source component of web member and port title, the ID of object component and the input/output port of port title determination web member that have connection status, and the position of described web member is set according to the position of described source component and described object component, generate web member example and described web member example is added in described web member example collection, and being back to determining step;
Generate application program step: when judging in described determining step that present node is document ending, then generate application program, and process ends.
Preferably, described virtual instrument script is the virtual instrument configuration descriptive language based on XML.
The invention also discloses a kind of virtual instrument scripting language parser, comprising: parsing module, for the configuration information of the component and web member that read the first configuration documentation; Component and web member instance management module, generate corresponding component example and web member example for the configuration information according to described component and described web member, and add all component examples and web member example to component example collection and web member example collection respectively; Generation module, for generating application program according to described component example collection and described web member example collection.
Preferably, described resolver also comprises gets storing module, for reading the configuration information of component in described component instance management module and described web member instance management module and web member, the configuration information of described component and described web member is saved in the 3rd configuration documentation.
Preferably, the configuration information of described component comprises type information, display parameter information and multiple connection configuration information, wherein said type information comprises component ID and element type, described display parameter information comprises display horizontal ordinate, display ordinate, display width, display height, display text and background colour, described connection configuration information comprises connection status, connection name, web member ID and connection data type, further, the configuration information of described web member comprises web member attribute information, described web member attribute information comprises web member state, web member type, source component ID, source component port title, source member position, object component ID, object component port title and object member position.
Preferably, described virtual instrument script is the virtual instrument configuration descriptive language based on XML.
The present invention's beneficial effect is compared with prior art: the present invention proposes a kind of brand-new virtual instrument scripting language parser and method thereof, terminal user can use in the application stage the first configuration documentation that this resolver dynamic load is different, thus online amendment and the upgrading of function can be carried out to measuring system, and do not need as traditional virtual instrument technique through links such as compiling and links.
In further scheme, newly-built second configuration documentation can also be passed through in Stored Procedure in analytic method of the present invention, the second configuration documentation be added to the configuration information of self-defining component and web member, generate the 3rd configuration documentation and load; Wherein the second configuration documentation is the blank configuration documentation of newly-built one of system or an existing configuration documentation, user freely can be modified or upgrade generate the 3rd configuration documentation and preserve; 3rd configuration documentation be carry out adding on the basis of the second configuration documentation component and web member configuration information formed and preserve in systems in which.And the first configuration documentation refers to the configuration file for allowing resolver carry out resolving generation application program, wherein the first configuration documentation can be that user adds voluntarily or preserves the 3rd configuration documentation in systems in which.
Accompanying drawing explanation
Fig. 1 is the structural drawing of the XVIML configuration file in the preferred embodiment of the present invention;
Fig. 2 is the Description standard schematic diagram of the component group of XVIML configuration file in the preferred embodiment of the present invention;
Fig. 3 is the Description standard schematic diagram of the web member group of XVIML configuration file in the preferred embodiment of the present invention;
Fig. 4 is the comprising modules schematic diagram of the XVIML resolver in the preferred embodiment of the present invention;
Fig. 5 is the process of analysis figure of the XVIML resolver in the preferred embodiment of the present invention;
Fig. 6 is the Stored Procedure figure of the XVIML resolver in the preferred embodiment of the present invention.
Embodiment
Below contrast accompanying drawing and combine preferred embodiment the invention will be further described.
XML is the fixed one group of specification of W3C, is used for defining the framework of document markup language.It provide a kind of form of description scheme data, make can easily exchange data between the various application based on WEB.Simple as one, extendible descriptive language, XML series technique has from definition, describes, represents, inquires about, transmits until the standard in each stage such as process, and obtains extensive support.The present invention is the virtual instrument configuration descriptive language (XML-BasedVirtualInstrumentMarkupLanguage based on XML, be called for short XVIML) the uniform data exchange specification of defining virtual instrument, the data processing relevant by XML and Data Analysis technology, realize the exchange of the data of XVIML descriptive language in virtual instrument and integrated.
First the Description standard of the XVIML language that the present invention proposes is described below:
The configuration information of component group and web member group is mainly comprised in the XVIML configuration file that the present invention proposes, the configuration node information of multiple component is comprised below each structure group, comprise the configuration node information of multiple web member below each web member group, web member is used to the transmission channel that component provides data; Wherein the nodename of XVIML configuration file and structure thereof are as shown in Figure 1.
Wherein the Description standard of component group as shown in Figure 2, and the Description standard of each component group comprises the Description standard of multiple component, and the Description standard of each component mainly comprises type information, display parameter information and connection configuration information; Type information mainly describes the type of component and the ID of component; Display parameter information mainly describes the display information of component in actual motion, mainly comprises display horizontal ordinate, display ordinate, display width, display height, other easily extensible attributes such as display text, background colour etc.; Connect the annexation that configuration information mainly describes component and other components, mainly comprise connection status, connection name, web member ID, connection data type.
Wherein the Description standard of web member group as shown in Figure 3, the Description standard of each web member group comprises the Description standard of multiple web member, the Description standard of each web member comprises web member attribute information, and web member attribute information mainly comprises web member state, web member type, source component ID, source component port title, source member position, object component ID, object component port title, object member position.
As shown in Figure 4, the present invention proposes a kind of virtual instrument scripting language parser, i.e. XVIML resolver, mainly comprises XVIML parsing module, XVIML gets storing module, component instance management module, web member instance management module and generation module, and the function of modules is as follows:
XVIML parsing module: XVIML parsing module, mainly according to the document properties of XVIML definition, reads the component of XVIML document and the configuration information of web member, by component instance management module and web member instance management module, generates corresponding component and web member;
XVIML gets storing module: XVIML gets component and the web member configuration information of storing module main reading element instance management module and the preservation of web member instance management module, according to the document properties of XVIML definition, the title of component and web member and attribute information are saved in XVIML file;
Component instance management module: component instance management module, mainly according to the component configuration information in the XVIML file of XVIML parsing module parsing, according to title and the attribute of component, generates corresponding component example, and adds component example to component example collection; XVIML gets the storing module information of all components in reading element instance management module successively, and the title of component and attribute information are saved in XVIML file;
Web member instance management module: web member instance management module is mainly according to the web member configuration information in the XVIML file of XVIML parsing module parsing, according to title and the attribute of web member, generate corresponding web member example, add web member example to web member example collection; XVIML gets the information that storing module reads all web members in web member instance management module successively, and the title of web member and attribute information are saved in XVIML file;
Generation module: generate application program according to described component example collection and described web member example collection.
The virtual instrument script analytic method that the present invention proposes, i.e. the analytic method of XVIML resolver, comprises process of analysis and Stored Procedure.
As shown in Figure 5, be the process of analysis figure of virtual instrument scripting language parser of the present invention, comprise the following steps:
Step 500:XVIML parsing module reads the nodal information of XVIML configuration documentation (the first configuration documentation) and decision node title successively; If present node name is called component node, then enter step 511, if present node name is called web member node, then enter step 521, if present node name is called that document ends up, then enter step 531.
Step 511: judge that present node name is called component node, enter step 512;
Step 512: the type information node of reading element, and generate component example according to element type, enter step 513;
Step 513: the display parameter information node of reading element, and the information such as the position size of component are set according to component display parameter information, enter step 514;
Step 514: the connection configuration node information of reading element successively, enters step 515;
Step 515: determine whether sky, if be empty, enters step 518, if be not empty, enters step 516;
Step 516: read and connect configuration node information, judge whether connection status is true, if be true, enters step 517, if be not true, return step 514;
Step 516: according to the connection name setting data port of component, return step 514;
Step 517: component instance management module adds component example to component example collection, returns step 500;
Step 521: judge that present node name is called web member node, enter step 522;
Step 522: the attribute information reading web member, enters step 523;
Step 523: judge whether connection status is true, if be true, enters step 524, if be not true, return step 500;
Step 524: according to the input/output port of source component ID and port title, object component ID and port title determination web member, enter step 525;
Step 525: web member position is set according to source component and object member position, enters step 526;
Step 526: web member instance management CMOS macro cell web member example also adds web member example to web member example collection;
Step 531: judge that present node name is called that document ends up, enter step 532;
Step 532: generate application program, flow process terminates.
As shown in Figure 6, be the Stored Procedure figure of virtual instrument scripting language parser of the present invention, comprise the following steps:
Step 600: newly-built XVIML configuration file (the second configuration documentation);
Step 611: reading element example collection successively, adds component group node, enters step 612;
Step 612: judge whether the front member read is empty, if be not empty, then enters step 613; If be empty, then enter step 621;
Step 613: add component node, obtains component ID and element type, adds element type information attribute, enters step 614;
Step 614: obtain component display parameter information, adds display parameter attribute, enters step 615;
Step 615: the port set of reading element successively, enters step 616;
Step 616: judge whether the port read is empty, if be not empty, enters step 617, if be empty, returns step 611;
Step 617: the connection status of read port, judges whether connection status is true, if be true, enters step 618, if be not true, returns step 615;
Step 618: add and connect configuration node, the connection status of component node, connection name, web member ID, connection type are set, return step 615;
Step 621: read web member example collection successively, adds web member group node, enters step 622;
Step 622: judge whether the web member read is empty, if be not empty, enters step 623; If be empty, enter step 630;
Step 623: the connection status reading web member, enters step 624;
Step 624: judge whether connection status is true, if be true, enters step 625, if be not true, return step 621;
Step 625: add web member node, the web member state of web member, web member type, source component ID, source component port title, source member position, object component ID, object component port title, object member position are set;
Step 630: preserve XVIML configuration documentation (the 3rd configuration documentation), flow process terminates.
The present invention proposes a kind of brand-new virtual instrument scripting language parser and method thereof, terminal user can use in the application stage the first configuration documentation that this resolver dynamic load is different, thus online amendment and the upgrading of function can be carried out to measuring system, and do not need as traditional virtual instrument technique through links such as compiling and links.Further, newly-built second configuration documentation can also be passed through in Stored Procedure in analytic method of the present invention, the second configuration documentation be added to the configuration information of self-defining component and web member, generate the 3rd configuration documentation and load; Wherein the second configuration documentation is the blank configuration documentation of newly-built one of system or an existing configuration documentation, user freely can be modified or upgrade generate the 3rd configuration documentation and preserve; 3rd configuration documentation be carry out adding on the basis of the second configuration documentation component and web member configuration information formed and preserve in systems in which.And the first configuration documentation refers to the configuration file for allowing resolver carry out resolving generation application program, wherein the first configuration documentation can be that user adds voluntarily or preserves the 3rd configuration documentation in systems in which.
Above content is in conjunction with concrete preferred implementation further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For those skilled in the art, without departing from the inventive concept of the premise, some equivalent to substitute or obvious modification can also be made, and performance or purposes identical, all should be considered as belonging to protection scope of the present invention.

Claims (10)

1. a virtual instrument script analytic method, is characterized in that, comprising:
Read the component of the first configuration documentation and the configuration information of web member, configuration information according to described component and described web member generates corresponding component example and web member example respectively, and add all component examples and web member example to component example collection and web member example collection respectively, generate application program.
2. analytic method according to claim 1, is characterized in that, also comprises:
Newly-built second configuration documentation, read described component example collection and described web member example collection, add all component examples and web member example respectively in described second configuration documentation, and add the configuration information of component and web member respectively, generate the 3rd configuration documentation and preserve.
3. analytic method according to claim 1, it is characterized in that, the configuration information of described component comprises type information, display parameter information and multiple connection configuration information, wherein said type information comprises component ID and element type, described display parameter information comprises display horizontal ordinate, display ordinate, display width, display height, display text and background colour, and described connection configuration information comprises connection status, connection name, web member ID and connection data type.
4. analytic method according to claim 1, it is characterized in that, the configuration information of described web member comprises web member attribute information, and described web member attribute information comprises web member state, web member type, source component ID, source component port title, source member position, object component ID, object component port title and object member position.
5. analytic method according to claim 1, it is characterized in that, read the component of the first configuration documentation and the configuration information of web member, configuration information according to described component and described web member generates corresponding component and web member respectively, and add all component examples and web member example to component example collection and web member example collection respectively, the process generating application program specifically comprises:
Determining step: read the nodal information of described first configuration documentation successively and judge the information of present node;
Generating component case step: when judging that present node is component node in described determining step, the type information of reading element, generating component example according to element type; The display parameter information of reading element, arranges the display information of described component example according to display parameter information; The connection configuration information of reading element, arranges the FPDP of described component example, and is added in component example collection by component example, and be back to determining step according to the connection name of the component having connection status;
Generate web member case step: when judging that present node is web member node in described determining step, read the attribute information of web member, according to the ID of source component of web member and port title, the ID of object component and the input/output port of port title determination web member that have connection status, and the position of described web member is set according to the position of described source component and described object component, generate web member example and described web member example is added in described web member example collection, and being back to determining step;
Generate application program step: when judging in described determining step that present node is document ending, then generate application program, and process ends.
6. the analytic method according to any one of claim 1 to 5, is characterized in that, described virtual instrument script is the virtual instrument configuration descriptive language based on XML.
7. a virtual instrument scripting language parser, is characterized in that, comprising: parsing module, for the configuration information of the component and web member that read the first configuration documentation; Component and web member instance management module, generate corresponding component example and web member example for the configuration information according to described component and described web member, and add all component examples and web member example to component example collection and web member example collection respectively; Generation module, for generating application program according to described component example collection and described web member example collection.
8. resolver according to claim 7, it is characterized in that, also comprise and get storing module, for reading the configuration information of component in described component instance management module and described web member instance management module and web member, the configuration information of described component and described web member is saved in the 3rd configuration documentation.
9. resolver according to claim 7, it is characterized in that, the configuration information of described component comprises type information, display parameter information and multiple connection configuration information, wherein said type information comprises component ID and element type, described display parameter information comprises display horizontal ordinate, display ordinate, display width, display height, display text and background colour, described connection configuration information comprises connection status, connection name, web member ID and connection data type, further, the configuration information of described web member comprises web member attribute information, described web member attribute information comprises web member state, web member type, source component ID, source component port title, source member position, object component ID, object component port title and object member position.
10. the resolver according to any one of claim 7 to 9, is characterized in that, described virtual instrument script is the virtual instrument configuration descriptive language based on XML.
CN201510663001.9A 2015-10-14 2015-10-14 Virtual instrument scripting language parser and method thereof Pending CN105335205A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510663001.9A CN105335205A (en) 2015-10-14 2015-10-14 Virtual instrument scripting language parser and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510663001.9A CN105335205A (en) 2015-10-14 2015-10-14 Virtual instrument scripting language parser and method thereof

Publications (1)

Publication Number Publication Date
CN105335205A true CN105335205A (en) 2016-02-17

Family

ID=55285765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510663001.9A Pending CN105335205A (en) 2015-10-14 2015-10-14 Virtual instrument scripting language parser and method thereof

Country Status (1)

Country Link
CN (1) CN105335205A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273165A (en) * 2017-06-19 2017-10-20 郑州云海信息技术有限公司 A kind of system and method for realizing module dynamic call
CN108399084A (en) * 2017-02-08 2018-08-14 中科创达软件股份有限公司 A kind of operation method and system of application program
WO2022105461A1 (en) * 2020-11-19 2022-05-27 苏州浪潮智能科技有限公司 Connection analysis method for multi-port nesting model and storage medium
US11762674B2 (en) 2021-08-31 2023-09-19 Nutcracker Therapeutics, Inc. State machine based script applications and systems

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399084A (en) * 2017-02-08 2018-08-14 中科创达软件股份有限公司 A kind of operation method and system of application program
CN108399084B (en) * 2017-02-08 2021-02-12 中科创达软件股份有限公司 Application program running method and system
CN107273165A (en) * 2017-06-19 2017-10-20 郑州云海信息技术有限公司 A kind of system and method for realizing module dynamic call
WO2022105461A1 (en) * 2020-11-19 2022-05-27 苏州浪潮智能科技有限公司 Connection analysis method for multi-port nesting model and storage medium
US11829696B2 (en) 2020-11-19 2023-11-28 Inspur Suzhou Intelligent Technology Co., Ltd. Connection analysis method for multi-port nesting model and storage medium
US11762674B2 (en) 2021-08-31 2023-09-19 Nutcracker Therapeutics, Inc. State machine based script applications and systems

Similar Documents

Publication Publication Date Title
CA2675332C (en) Framework for automatically merging customizations to structured code that has been refactored
US7168077B2 (en) System and method of executing and controlling workflow processes
US7962919B2 (en) Apparatus and method for modifying an initial event queue for extending an XML processor's feature set
CN109657103A (en) Conversion method, device, computer equipment and the storage medium of data structure
CN105335205A (en) Virtual instrument scripting language parser and method thereof
CN110333863A (en) A kind of method and device for generating, showing the small routine page
CN107526676B (en) Cross-system test method and device
CN105446874A (en) Method and device for detecting resource configuration file
CN102929646B (en) Application program generation method and device
CN109814866A (en) Page application is converted into the treating method and apparatus of native applications
CN107506190A (en) XML file amending method and device based on Spring frameworks
CN111078217A (en) Brain graph generation method, apparatus and computer-readable storage medium
CN101859246A (en) System and method for converting corresponding scripts according to different browsers
US20080114797A1 (en) Importing non-native content into a document
CN116860286A (en) Page dynamic update method, device, electronic equipment and computer readable medium
CN105279032A (en) Method and apparatus for synchronizing interface message and javaBean
CN114757124B (en) CFD workflow modeling method and device based on XML, computer and storage medium
CN110019177A (en) The method and apparatus of rule storage
CN105450633B (en) A kind of document method for uploading, system and resolution server
US10402482B2 (en) Content management system
CN114115897A (en) Method for dynamically generating project local executable file based on nodejs script
CN101876901B (en) Method for realizing single disk block state of webmaster by using extensible markup language (XML)
CN116755684B (en) OAS Schema generation method, device, equipment and medium
CN113642295B (en) Page typesetting method, device and computer program product
KR20030010217A (en) Method for processing an application data in integration broker 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20160217

RJ01 Rejection of invention patent application after publication