[go: up one dir, main page]

CN102609252B - Based on the logic menu resource intelligent configuration method measuring instrument - Google Patents

Based on the logic menu resource intelligent configuration method measuring instrument Download PDF

Info

Publication number
CN102609252B
CN102609252B CN201210011922.3A CN201210011922A CN102609252B CN 102609252 B CN102609252 B CN 102609252B CN 201210011922 A CN201210011922 A CN 201210011922A CN 102609252 B CN102609252 B CN 102609252B
Authority
CN
China
Prior art keywords
menu
logical
logic
module
parameter
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.)
Active
Application number
CN201210011922.3A
Other languages
Chinese (zh)
Other versions
CN102609252A (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.)
CETC 41 Research Institute
Original Assignee
CETC 41 Research 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 Research Institute filed Critical CETC 41 Research Institute
Priority to CN201210011922.3A priority Critical patent/CN102609252B/en
Publication of CN102609252A publication Critical patent/CN102609252A/en
Application granted granted Critical
Publication of CN102609252B publication Critical patent/CN102609252B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

本发明提供了一种逻辑菜单资源智能配置方法,使用逻辑菜单“傻瓜式”定制工具,以交互方式定制逻辑菜单树及各个菜单项的属性;调用智能映射生成模块生成逻辑菜单资源脚本和逻辑菜单功能框架模块;把生成的逻辑菜单功能框架模块集成到测量仪器软件开发模块中,编译链接后生成测量仪器执行文件。本发明可以实现逻辑菜单资源“傻瓜”式定制;逻辑菜单资源智能生成和还原;逻辑菜单功能框架模块自动生成;若测量仪器需实现多套菜单,无需一次性把每套菜单资源都进行初始化,可以根据需要动态生成和配置所需菜单,节省资源。

The present invention provides an intelligent configuration method of logic menu resources, which uses logic menu "fool-style" customization tools to interactively customize the logic menu tree and the attributes of each menu item; calls the intelligent mapping generation module to generate logic menu resource scripts and logic menus Functional framework module; integrate the generated logical menu functional framework module into the measuring instrument software development module, and generate the measuring instrument execution file after compiling and linking. The invention can realize "fool" customization of logical menu resources; intelligent generation and restoration of logical menu resources; automatic generation of logical menu function frame modules; The required menus can be dynamically generated and configured according to the needs, saving resources.

Description

基于测量仪器的逻辑菜单资源智能配置方法Intelligent Configuration Method of Logic Menu Resources Based on Measuring Instruments

技术领域 technical field

本发明涉及测量仪器领域,尤其涉及一种基于测量仪器的逻辑菜单资源智能配置方法。The invention relates to the field of measuring instruments, in particular to a method for intelligently configuring logic menu resources based on measuring instruments.

背景技术 Background technique

目前,对测量仪器的逻辑菜单资源定制及维护一般有两种方式。一种是纯手工方式,由开发者按照逻辑菜单资源的相关结构定义,手工加入每项内容。另外一种是在没有解决逻辑菜单资源智能生成和还原技术的情况下,生成较简单的菜单资源管理工具,实现菜单资源的部分“傻瓜”式定制,其它很多相关数据还需手工配置。对逻辑菜单功能框架模块的编辑则普遍采用纯手工输入方式。仪器若需要实现多种测量模式,往往是在内存中一次性把所需的每套菜单资源都进行初始化,在使用中根据所选择的测量模式进行切换。At present, there are generally two ways to customize and maintain the logic menu resources of measuring instruments. One is a purely manual method, where the developer manually adds each item according to the relevant structure definition of the logical menu resource. The other is to generate a relatively simple menu resource management tool without solving the intelligent generation and restoration technology of logical menu resources, and realize partial "fool" customization of menu resources, and many other related data need to be manually configured. The editing of the logical menu function frame module is generally done by pure manual input. If the instrument needs to implement multiple measurement modes, it usually initializes each set of menu resources required in the memory at one time, and switches according to the selected measurement mode during use.

当前,在测量仪器领域普遍使用一种按钮式层次化菜单。由于测量仪器菜单种类较多,表现形式多样,层次较深,所关联的数据类型及范围很灵活,因此对应的逻辑菜单资源数据结构很复杂,手工维护该菜单资源需耗费大量的人力,且非常容易出错。随着技术的发展,测量仪器的功能越来越复杂,越来越多的仪器在一套硬件资源的基础上,可实现多种测量模式,而且每种测量模式的菜单需求都各不相同,因此要求对逻辑菜单能实现动态可配置。仪器功能越复杂,菜单项也越多,手动生成测量仪器逻辑菜单功能框架模块也是一个费时费力的任务。Currently, a push-button hierarchical menu is commonly used in the field of measuring instruments. Since there are many types of measuring instrument menus, various forms of expression, deep layers, and the associated data types and ranges are very flexible, the data structure of the corresponding logical menu resources is very complicated, and manual maintenance of the menu resources requires a lot of manpower and is very expensive. easy to make mistake. With the development of technology, the functions of measuring instruments are becoming more and more complex. More and more instruments can realize multiple measurement modes on the basis of a set of hardware resources, and the menu requirements of each measurement mode are different. Therefore, it is required that the logic menu can be dynamically configurable. The more complex the function of the instrument, the more menu items there will be. Manually generating the logical menu function framework module of the measuring instrument is also a time-consuming and labor-intensive task.

综上所述,现有技术有如下几个方面的不足:In summary, the prior art has the following deficiencies:

其一:生成逻辑菜单资源时,需要手工操作,工作量大,内容枯燥,且非常容易出错;生成逻辑菜单资源后,每次增减菜单项、调整菜单项位置和层级时,由于不能自动智能对所关联的其它参数自动映射,仍需手动调整很多关联内容,难以维护。One: when generating logical menu resources, manual operations are required, the workload is heavy, the content is boring, and it is very error-prone; For the automatic mapping of other associated parameters, it is still necessary to manually adjust a lot of associated content, which is difficult to maintain.

其二:逻辑菜单功能框架模块和关联预定义采用纯手工录入方式,效率低下,很耗费精力。Second: The logical menu function framework module and associated pre-definition are manually entered, which is inefficient and consumes a lot of energy.

其三:在一套硬件资源的基础上实现多种测量模式,需一次性把所需的每套菜单资源都进行初始化,比较耗费资源。Third: to implement multiple measurement modes on the basis of a set of hardware resources, it is necessary to initialize each set of menu resources required at one time, which consumes more resources.

因此,解决测量仪器逻辑菜单资源“傻瓜”式定制、逻辑菜单资源脚本智能生成和还原、逻辑菜单功能框架模块自动生成、逻辑菜单的动态可配置已经成为亟待解决的问题。Therefore, it has become an urgent problem to solve the "fool" customization of logic menu resources of measuring instruments, intelligent generation and restoration of logic menu resource scripts, automatic generation of logic menu function framework modules, and dynamic configurability of logic menus.

发明内容 Contents of the invention

本发明的目的在于克服上述技术问题的缺陷,提出一种高效率的逻辑菜单资源智能配置方法,其特征在于:使用逻辑菜单“傻瓜式”定制工具,以交互方式定制逻辑菜单树及各个菜单项的属性;调用智能映射生成模块生成逻辑菜单资源脚本和逻辑菜单功能框架模块;把生成的逻辑菜单资源脚本和逻辑菜单功能框架模块集成到测量仪器软件开发模块中,编译链接后生成测量仪器执行文件。The object of the present invention is to overcome the defects of the above-mentioned technical problems, and propose a highly efficient logical menu resource intelligent configuration method, which is characterized in that: use the logic menu "fool-like" custom tool to interactively customize the logical menu tree and each menu item properties; call the intelligent mapping generation module to generate the logic menu resource script and logic menu function framework module; integrate the generated logic menu resource script and logic menu function framework module into the measuring instrument software development module, and generate the measuring instrument execution file after compiling and linking .

根据本发明的优选实施例,其中所述测量仪器执行文件中集成有智能解析还原模块、逻辑菜单功能框架模块和菜单管理器模块,所述测量仪器执行文件运行时,对软件开发模块中包含的逻辑菜单资源脚本进行解析还原,得到菜单树和关联参数数据表,由菜单管理器模块管理,响应用户输入。According to a preferred embodiment of the present invention, an intelligent analysis and restoration module, a logic menu function frame module and a menu manager module are integrated in the execution file of the measuring instrument, and when the execution file of the measuring instrument is running, the software development module contains The logical menu resource script is parsed and restored to obtain the menu tree and associated parameter data table, which are managed by the menu manager module and respond to user input.

根据本发明的优选实施例,其中所述逻辑菜单资源“傻瓜”式定制工具是集成化工具,提供友好便捷的用户界面方便菜单资源的定制管理;并通过调用内部智能映射生成模块,生成逻辑菜单资源脚本和逻辑菜单功能框架模块;还可通过调用内部智能解析还原模块,调入历史逻辑菜单资源脚本,在旧的逻辑菜单资源基础上做进一步修改和完善。According to a preferred embodiment of the present invention, the logic menu resource "fool" type customization tool is an integrated tool, which provides a friendly and convenient user interface to facilitate the customization management of menu resources; and generates a logic menu by calling the internal intelligent mapping generation module Resource script and logic menu function framework module; it can also call in the historical logic menu resource script by calling the internal intelligent analysis and restoration module, and further modify and improve on the basis of the old logic menu resource.

根据本发明的优选实施例,其中所述逻辑菜单“傻瓜式”定制工具用于:According to a preferred embodiment of the present invention, wherein the logic menu "fool" customization tool is used for:

1)菜单树的建立,菜单树层次管理;1) Establishment of menu tree, menu tree hierarchical management;

2)菜单项属性设置;2) Menu item attribute setting;

3)菜单项关联的参数属性设置;3) Parameter attribute setting associated with the menu item;

4)调用逻辑菜单智能映射生成模块,生成菜单资源脚本文件、逻辑菜单功能框架模块;4) calling the logical menu intelligent mapping generation module to generate menu resource script files and logical menu function framework modules;

5)调用逻辑菜单资源脚本智能解析还原模块,可从逻辑菜单脚本文件中还原逻辑菜单的菜单树和所有关联的参数数据,并同步初始化交互操作界面的各控件,在此基础上对逻辑菜单资源做进一步修改和完善。5) Call the logical menu resource script intelligent parsing and restoration module, which can restore the menu tree of the logical menu and all associated parameter data from the logical menu script file, and initialize each control of the interactive operation interface synchronously. On this basis, the logical menu resource Make further revisions and improvements.

根据本发明的优选实施例,其中所述智能映射生成模块可自动对菜单项各属性、关联数据、辅助信息等进行分类,统计并计算它们的之间的映射关系,无论增加、删除菜单项,还是调整菜单项顺序、层次或其它属性,都可以自动实现自适应调整和匹配。According to a preferred embodiment of the present invention, the intelligent mapping generation module can automatically classify the attributes, associated data, auxiliary information, etc. of menu items, count and calculate the mapping relationship between them, no matter adding or deleting menu items, Whether you adjust the order, hierarchy or other attributes of menu items, you can automatically achieve adaptive adjustment and matching.

根据本发明的优选实施例,其中所述智能映射生成模块可用于:According to a preferred embodiment of the present invention, wherein the intelligent mapping generation module can be used for:

1)按照界面上定制的菜单树,生成逻辑菜单树的父、子、前兄弟、后兄弟的关联关系,写入逻辑菜单树的相关字段,同时将各固定的属性信息写入逻辑菜单树各菜单项的相关字段,如菜单项主字符串、菜单ID、菜单类型、关联参数类型等各菜单项属性信息,此时各菜单所关联的参数索引还没有生成;1) According to the menu tree customized on the interface, generate the relationship between parent, child, former brother and later brother of the logical menu tree, write it into the relevant fields of the logical menu tree, and write each fixed attribute information into each of the logical menu tree Relevant fields of menu items, such as menu item main string, menu ID, menu type, associated parameter type and other menu item attribute information. At this time, the parameter index associated with each menu has not been generated yet;

2)根据菜单关联参数类型遍历菜单树,对参数进行分类和统计,自动生成各参数在相关菜单项中的索引并写入逻辑菜单中参数索引字段;2) Traverse the menu tree according to the type of menu associated parameters, classify and count the parameters, automatically generate the index of each parameter in the relevant menu item and write it into the parameter index field in the logical menu;

各种数据类型的索引独立编号,互不干扰,增加或删除菜单所对应的各类型参数,该遍历生成过程都可以自动调整,保证各参数和逻辑菜单之间的映射关系完全匹配;Indexes of various data types are numbered independently without interfering with each other, adding or deleting various types of parameters corresponding to the menu, the traversal generation process can be automatically adjusted to ensure that the mapping relationship between each parameter and the logical menu is completely matched;

3)把逻辑菜单树格式化存储到逻辑菜单资源脚本文件中;3) format and store the logical menu tree into the logical menu resource script file;

4)根据逻辑菜单的参数类型,对参数进行分类和统计,把参数信息分类格式化存储到逻辑菜单资源脚本文件中;4) According to the parameter type of the logic menu, the parameters are classified and counted, and the parameter information is classified and formatted and stored in the logic menu resource script file;

5)根据菜单ID串生成菜单ID的宏定义,根据菜单ID和参数类型信息自动生成各参数索引的宏定义,存储到宏定义头文件中,供测量仪器主程序使用;5) Generate the macro definition of the menu ID according to the menu ID string, automatically generate the macro definition of each parameter index according to the menu ID and parameter type information, store it in the macro definition header file, and use it for the main program of the measuring instrument;

6)生成逻辑菜单功能框架模块,各菜单响应函数名称根据菜单ID串自动生成。6) Generate a logical menu function framework module, and the name of each menu response function is automatically generated according to the menu ID string.

根据本发明的优选实施例,所述智能解析还原模块负责对逻辑菜单资源脚本进行解析,动态生成运行态菜单树对象和菜单关联的数据表数据;在测量仪器软件中,这些数据供菜单管理器使用,满足软件的运行需求;在逻辑菜单资源“傻瓜”式定制工具中,可调入已生成的菜单资源,将信息还原到交互界面控件,对逻辑菜单资源做进一步修改和完善。According to a preferred embodiment of the present invention, the intelligent parsing and restoration module is responsible for parsing the logic menu resource script, and dynamically generating the data table data associated with the running state menu tree object and the menu; in the measuring instrument software, these data are provided to the menu manager Use to meet the running requirements of the software; In the logic menu resource "fool" type customization tool, the generated menu resources can be transferred, the information can be restored to the interactive interface control, and the logic menu resources can be further modified and improved.

根据本发明的优选实施例,其中:所述智能映射生成模块和智能解析还原模块,使得在定制逻辑菜单时,不必手动强制菜单项与某个参数索引硬绑定,只需指定该菜单关联的参数类型和参数自身的特性即可;该模块通过自动遍历菜单和自动生成参数索引的方式,解决菜单与数据的关联问题,无论何时增加参数、删除参数、改变参数类型等,都能自动实现相互的匹配。According to a preferred embodiment of the present invention, wherein: the intelligent mapping generating module and the intelligent parsing and restoring module make it unnecessary to manually force a menu item to be hard-bound to a certain parameter index when customizing a logical menu, and only need to specify the associated parameter index of the menu. The parameter type and the characteristics of the parameter itself are enough; the module solves the problem of the association between the menu and the data by automatically traversing the menu and automatically generating the parameter index. Whenever adding parameters, deleting parameters, changing parameter types, etc., it can be automatically realized mutual match.

根据本发明的优选实施例,所述菜单管理器负责管理逻辑菜单的遍历、菜单按钮缓冲区信息的刷新、关联参数的提取和管理,并与主框架通过消息进行交互,完成菜单按钮的刷新、参数的状态切换和输入管理;菜单管理器提供了配置接口,可以对菜单管理器所关联的逻辑菜单资源进行动态配置,运行时可以根据需要动态配置逻辑菜单资源,满足多模式测量下对多个逻辑菜单树的需求。According to a preferred embodiment of the present invention, the menu manager is responsible for managing the traversal of the logical menu, the refreshing of the menu button buffer information, the extraction and management of associated parameters, and interacts with the main frame through messages to complete the refreshing of the menu buttons, Parameter state switching and input management; the menu manager provides a configuration interface, which can dynamically configure the logical menu resources associated with the menu manager, and can dynamically configure the logical menu resources according to the needs during operation to meet the needs of multiple modes under multi-mode measurement. Logical menu tree requirements.

根据本发明的优选实施例,其中所述逻辑菜单资源脚本采用了通用的文本文件格式,方便跨平台使用;同时通过分段定义,分段描述的方式,使菜单资源脚本文件结构清晰,而且格式简单,便于解析。According to a preferred embodiment of the present invention, wherein the logic menu resource script adopts a common text file format, which is convenient for cross-platform use; at the same time, the structure of the menu resource script file is clear through segment definition and segment description, and the format Simple and easy to parse.

根据本发明的优选实施例,其特征还在于:自动生成逻辑菜单功能框架模块,在该模块中,与逻辑菜单关联的预定义代码均根据菜单ID自动生成;测量仪器软件中对逻辑菜单响应函数和关联参数均通过该预定义参数进行访问,保证逻辑菜单资源和测量仪器软件的协调统一;自动生成的逻辑菜单功能框架模块中,逻辑菜单响应函数名称也都根据菜单ID自动生成,从而使响应函数的风格完全统一。According to a preferred embodiment of the present invention, it is also characterized in that: automatically generate a logical menu function frame module, in this module, the predefined code associated with the logical menu is automatically generated according to the menu ID; in the measuring instrument software, the logical menu response function and related parameters are accessed through the predefined parameters to ensure the coordination and unity of logic menu resources and measuring instrument software; in the automatically generated logic menu function framework module, the logic menu response function names are also automatically generated according to the menu ID, so that the response The style of the function is completely unified.

根据本发明的逻辑菜单资源智能配置方法,可以实现逻辑菜单资源“傻瓜”式定制;逻辑菜单资源智能生成和还原;逻辑菜单功能框架模块自动生成;若测量仪器需实现多套菜单,无需一次性把每套菜单资源都进行初始化,可以根据需要动态生成和配置所需菜单,节省资源。According to the intelligent configuration method of logical menu resources of the present invention, "fool" customization of logical menu resources can be realized; intelligent generation and restoration of logical menu resources; automatic generation of logical menu function frame modules; if the measuring instrument needs to realize multiple sets of menus, no one-time operation is required Each set of menu resources is initialized, and the required menus can be dynamically generated and configured according to the needs, saving resources.

虽然在下文中将结合一些示例性实施及使用方法来描述本发明,但作为本领域技术人员应当理解,并不旨在将本发明限制于这些实施例。反之,旨在覆盖包含在所附的权利要求书所定义的本发明的精神与范围内的所有替代品、修正及等效物。Although the present invention will be described below in conjunction with some exemplary implementations and usage methods, those skilled in the art should understand that the present invention is not intended to be limited to these embodiments. On the contrary, it is intended to cover all alternatives, modifications and equivalents as included within the spirit and scope of the invention as defined by the appended claims.

本发明的其他优点、目标和特征在某种程度上将在随后的说明书中进行阐述,并且在某种程度上,基于对下文的考察研究对本领域技术人员而言将是显而易见的,或者可以从本发明的实践中得到教导。本发明的目标和其他优点可以通过下面的说明书,权利要求书,以及附图中所特别指出的结构来实现和获得。Other advantages, objects and features of the present invention will be set forth in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the investigation and research below, or can be obtained from Taught in the practice of the present invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明 Description of drawings

图1是常规测量仪器按钮式逻辑菜单的示意图;Fig. 1 is a schematic diagram of a button logic menu of a conventional measuring instrument;

图2示出了本发明的逻辑菜单定制工具、工具生成的文件、测量仪器执行文件的关系;Fig. 2 shows the logic menu customizing tool of the present invention, the file that tool generates, the relation of measuring instrument execution file;

图3示出了逻辑菜单“傻瓜”式定制工具执行流程;Figure 3 shows the execution flow of the logic menu "fool" custom tool;

图4是测量仪器执行文件生成示意图;Fig. 4 is a schematic diagram of measuring instrument execution file generation;

图5是测量仪器执行文件调用逻辑菜单资源脚本示意图;Fig. 5 is a schematic diagram of a resource script calling a logic menu of a measuring instrument execution file;

图6示出了测量仪器执行文件执行流程;Fig. 6 shows the execution flow of the measuring instrument execution file;

图7示出了逻辑菜单资源文件格式;Figure 7 shows the logical menu resource file format;

图8示出了逻辑菜单“傻瓜式”定制工具的交互界面。Fig. 8 shows the interactive interface of the logic menu "dumb" customization tool.

具体实施方式 detailed description

下面结合附图对本发明的具体实施方式作进一步的详细描述。需要注意的是,根据本发明的逻辑菜单资源智能配置方法的实施方式仅仅作为例子,但本发明不限于该具体实施方式。The specific implementation manners of the present invention will be further described in detail below in conjunction with the accompanying drawings. It should be noted that the implementation of the method for intelligent configuration of logical menu resources according to the present invention is only an example, but the present invention is not limited to this specific implementation.

接下来,将参照附图来详细说明本发明的具体实施方式。Next, specific embodiments of the present invention will be described in detail with reference to the drawings.

本发明的目的是提供一种高效率的逻辑菜单资源智能配置方法,这种方法可以实现逻辑菜单资源“傻瓜”式定制;逻辑菜单资源智能生成和还原;逻辑菜单功能框架模块自动生成;若测量仪器需实现多套菜单,无需一次性把每套菜单资源都进行初始化,可以根据需要动态生成和配置所需菜单,节省资源。The purpose of the present invention is to provide a high-efficiency intelligent configuration method of logical menu resources, which can realize "fool" customization of logical menu resources; intelligent generation and restoration of logical menu resources; automatic generation of logical menu function framework modules; The instrument needs to implement multiple sets of menus, and there is no need to initialize each set of menu resources at one time. The required menus can be dynamically generated and configured according to needs, saving resources.

总体上,先使用逻辑菜单“傻瓜式”定制工具,以便捷高效的交互方式定制逻辑菜单树及各个菜单项的属性,然后调用智能映射生成模块生成逻辑菜单资源脚本和逻辑菜单功能框架模块;然后把生成的资源及源码文件集成到测量仪器软件开发模块中,编译链接后生成测量仪器执行文件。In general, first use the logic menu "fool-style" customization tool to customize the logic menu tree and the attributes of each menu item in a convenient and efficient interactive way, and then call the intelligent mapping generation module to generate the logic menu resource script and logic menu function framework module; then Integrate the generated resources and source code files into the measuring instrument software development module, compile and link to generate the measuring instrument execution file.

测量仪器执行文件中集成有智能解析还原模块和菜单管理器模块,测量仪器执行文件运行时,对逻辑菜单资源脚本进行解析还原,得到菜单树对象和对应各参数数据表,供菜单管理器模块管理,响应用户输入。The execution file of the measuring instrument is integrated with an intelligent analysis and restoration module and a menu manager module. When the execution file of the measuring instrument is running, the logic menu resource script is parsed and restored to obtain the menu tree object and the corresponding parameter data table for the management of the menu manager module. , responding to user input.

如果需要对菜单进行修改,重新用逻辑菜单“傻瓜”式定制工具将逻辑菜单资源调入,修改完成后生成新的逻辑菜单资源脚本和逻辑菜单功能框架模块,无论增减菜单数目、调整菜单级别,还是修改菜单属性、改变关联参数等,智能映射生成模块和智能映射还原模块都能保证各部分完全对应,无需手动调整,效率和可靠性均得到大幅提高,不用再费时费力的手工处理与逻辑菜单资源相关的任务,使开发者可以集中精力进行仪器其它功能设计和开发。If you need to modify the menu, use the logic menu "fool" custom tool to import the logic menu resource, and generate a new logic menu resource script and logic menu function framework module after the modification is completed, regardless of the increase or decrease in the number of menus and the adjustment of the menu level , or modify menu attributes, change associated parameters, etc., the intelligent mapping generation module and intelligent mapping restoration module can ensure that each part is completely corresponding, no manual adjustment is required, the efficiency and reliability are greatly improved, and there is no need for time-consuming and laborious manual processing and logic. Tasks related to menu resources enable developers to concentrate on the design and development of other instrument functions.

图1是常规测量仪器按钮式逻辑菜单图,常规的测量仪器按钮式逻辑菜单以树形层次化结构呈现。就具体实现而言,基本上都是在仪器前面板上设置一些“硬菜单”按键和几个“软菜单”按键。点击“硬菜单”按键直接调出与之关联的逻辑菜单树分支,菜单管理器根据逻辑菜单项的属性,将同一级别的菜单显示在用户界面的菜单按钮上。如果同一级别的逻辑菜单项比菜单按钮多,则以分页的形式进行显示,保证菜单按钮与“软菜单”按键一一对应。如果要操作哪个菜单按钮,直接点击与之对应的“软菜单”按键即可,“软菜单”按键对应的菜单功能随着逻辑菜单的变化而变化。由于测量仪器菜单项种类较多、表现形式多样、关联的参数类型及范围灵活多变,因此对应的逻辑菜单资源数据结构很复杂。需要注意的是,图1仅仅是一个简单的举例。FIG. 1 is a diagram of a button-type logic menu of a conventional measuring instrument. The button-type logic menu of a conventional measuring instrument is presented in a tree-like hierarchical structure. As far as the specific implementation is concerned, basically some "hard menu" buttons and several "soft menu" buttons are set on the front panel of the instrument. Click the "hard menu" button to directly call out the logical menu tree branch associated with it, and the menu manager will display the menu of the same level on the menu button of the user interface according to the attributes of the logical menu item. If there are more logical menu items at the same level than menu buttons, they will be displayed in a page-by-page format to ensure a one-to-one correspondence between the menu buttons and the "soft menu" buttons. If you want to operate any menu button, just click the corresponding "soft menu" button directly, and the menu function corresponding to the "soft menu" button changes with the change of the logic menu. Due to the large variety of measuring instrument menu items, various forms of expression, and the flexible and changeable associated parameter types and ranges, the corresponding logical menu resource data structure is very complex. It should be noted that Fig. 1 is only a simple example.

本发明提出一种高效率的逻辑菜单资源智能配置方法,使用逻辑菜单“傻瓜式”定制工具,以交互方式定制逻辑菜单树及各个菜单项的属性;调用智能映射生成模块生成逻辑菜单资源脚本和逻辑菜单功能框架模块;把生成的逻辑菜单资源脚本和逻辑菜单功能框架模块集成到测量仪器软件开发模块中,编译链接后生成测量仪器执行文件。The present invention proposes a high-efficiency intelligent configuration method of logic menu resources, which uses logic menu "fool-style" customization tools to interactively customize the logic menu tree and the attributes of each menu item; calls the intelligent mapping generation module to generate logic menu resource scripts and Logic menu function framework module; integrate the generated logic menu resource script and logic menu function framework module into the measuring instrument software development module, and generate the measuring instrument execution file after compiling and linking.

在优选实施例中,所述测量仪器执行文件中集成有智能解析还原模块、逻辑菜单功能框架模块和菜单管理器模块,所述测量仪器执行文件运行时,对软件开发模块中包含的逻辑菜单资源脚本进行解析还原,得到菜单树和关联参数数据表,由菜单管理器模块管理,响应用户输入。In a preferred embodiment, an intelligent analysis and restoration module, a logical menu function framework module and a menu manager module are integrated in the execution file of the measuring instrument. When the execution file of the measuring instrument is running, the logic menu resource contained in the software development module The script is parsed and restored to obtain the menu tree and associated parameter data table, which are managed by the menu manager module and respond to user input.

在优选实施例中,所述逻辑菜单资源“傻瓜”式定制工具是集成化工具,提供友好便捷的用户界面方便菜单资源的定制管理;并通过调用内部智能映射生成模块,生成逻辑菜单资源脚本和逻辑菜单功能框架模块;还可通过调用内部智能解析还原模块,调入历史逻辑菜单资源脚本,在旧的逻辑菜单资源基础上做进一步修改和完善。In a preferred embodiment, the logic menu resource "fool" type customization tool is an integrated tool, which provides a friendly and convenient user interface to facilitate the customization management of menu resources; and generates logic menu resource scripts and scripts by calling the internal intelligent mapping generation module Logical menu function framework module; it can also call in the historical logical menu resource script by calling the internal intelligent analysis and restoration module, and further modify and improve on the basis of the old logical menu resource.

在优选实施例中,所述逻辑菜单“傻瓜式”定制工具用于:In a preferred embodiment, the logic menu "for dummies" customization tool is used for:

1)菜单树的建立,菜单树层次管理;1) Establishment of menu tree, menu tree hierarchical management;

2)菜单项属性设置;2) Menu item attribute setting;

3)菜单项关联的参数属性设置;3) Parameter attribute setting associated with the menu item;

4)调用逻辑菜单智能映射生成模块,生成菜单资源脚本文件、逻辑菜单功能框架模块;4) calling the logical menu intelligent mapping generation module to generate menu resource script files and logical menu function framework modules;

5)调用逻辑菜单资源脚本智能解析还原模块,可从逻辑菜单脚本文件中还原逻辑菜单的菜单树和所有关联的参数数据,并同步初始化交互操作界面的各控件,在此基础上对逻辑菜单资源做进一步修改和完善。5) Call the logical menu resource script intelligent parsing and restoration module, which can restore the menu tree of the logical menu and all associated parameter data from the logical menu script file, and initialize each control of the interactive operation interface synchronously. On this basis, the logical menu resource Make further revisions and improvements.

在优选实施例中,所述智能映射生成模块可自动对菜单项各属性、关联数据、辅助信息等进行分类,统计并计算它们的之间的映射关系,无论增加、删除菜单项,还是调整菜单项顺序、层次或其它属性,都可以自动实现自适应调整和匹配。In a preferred embodiment, the intelligent mapping generation module can automatically classify the attributes of menu items, associated data, auxiliary information, etc., count and calculate the mapping relationship between them, whether adding or deleting menu items, or adjusting menu items Item order, hierarchy or other attributes can be automatically adjusted and matched automatically.

在优选实施例中,所述智能映射生成模块可用于:In a preferred embodiment, the intelligent mapping generation module can be used for:

1)按照界面上定制的菜单树,生成逻辑菜单树的父、子、前兄弟、后兄弟的关联关系,写入逻辑菜单树的相关字段,同时将各固定的属性信息写入逻辑菜单树各菜单项的相关字段,如菜单项主字符串、菜单ID、菜单类型、关联参数类型等各菜单项属性信息,此时各菜单所关联的参数索引还没有生成;1) According to the menu tree customized on the interface, generate the relationship between parent, child, former brother and later brother of the logical menu tree, write it into the relevant fields of the logical menu tree, and write each fixed attribute information into each of the logical menu tree Relevant fields of menu items, such as menu item main string, menu ID, menu type, associated parameter type and other menu item attribute information. At this time, the parameter index associated with each menu has not been generated yet;

2)根据菜单关联参数类型遍历菜单树,对参数进行分类和统计,自动生成各参数在相关菜单项中的索引并写入逻辑菜单中参数索引字段;2) Traverse the menu tree according to the type of menu associated parameters, classify and count the parameters, automatically generate the index of each parameter in the relevant menu item and write it into the parameter index field in the logical menu;

各种数据类型的索引独立编号,互不干扰,增加或删除菜单所对应的各类型参数,该遍历生成过程都可以自动调整,保证各参数和逻辑菜单之间的映射关系完全匹配;Indexes of various data types are numbered independently without interfering with each other, adding or deleting various types of parameters corresponding to the menu, the traversal generation process can be automatically adjusted to ensure that the mapping relationship between each parameter and the logical menu is completely matched;

3)把逻辑菜单树格式化存储到逻辑菜单资源脚本文件中;3) format and store the logical menu tree into the logical menu resource script file;

4)根据逻辑菜单的参数类型,对参数进行分类和统计,把参数信息分类格式化存储到逻辑菜单资源脚本文件中;4) According to the parameter type of the logic menu, the parameters are classified and counted, and the parameter information is classified and formatted and stored in the logic menu resource script file;

5)根据菜单ID串生成菜单ID的宏定义,根据菜单ID和参数类型信息自动生成各参数索引的宏定义,存储到宏定义头文件中,供测量仪器主程序使用;5) Generate the macro definition of the menu ID according to the menu ID string, automatically generate the macro definition of each parameter index according to the menu ID and parameter type information, store it in the macro definition header file, and use it for the main program of the measuring instrument;

6)生成逻辑菜单功能框架模块,各菜单响应函数名称根据菜单ID串自动生成。6) Generate a logical menu function framework module, and the name of each menu response function is automatically generated according to the menu ID string.

在优选实施例中,所述智能解析还原模块负责对逻辑菜单资源脚本进行解析,动态生成运行态菜单树对象和菜单关联的数据表数据;在测量仪器软件中,这些数据供菜单管理器使用,满足软件的运行需求;在逻辑菜单资源“傻瓜”式定制工具中,可调入已生成的菜单资源,将信息还原到交互界面控件,对逻辑菜单资源做进一步修改和完善。In a preferred embodiment, the intelligent parsing and restoration module is responsible for parsing the logic menu resource script, dynamically generating the running state menu tree object and the data table data associated with the menu; in the measuring instrument software, these data are used by the menu manager, Meet the running requirements of the software; in the logic menu resource "fool" type customization tool, the generated menu resources can be transferred, the information can be restored to the interactive interface control, and the logic menu resources can be further modified and improved.

在优选实施例中,所述智能映射生成模块和智能解析还原模块,使得在定制逻辑菜单时,不必手动强制菜单项与某个参数索引硬绑定,只需指定该菜单关联的参数类型和参数自身的特性即可;该模块通过自动遍历菜单和自动生成参数索引的方式,解决菜单与数据的关联问题,无论何时增加参数、删除参数、改变参数类型等,都能自动实现相互的匹配。In a preferred embodiment, the intelligent mapping generating module and the intelligent parsing and restoring module make it unnecessary to manually force the menu item to be hard-bound to a certain parameter index when customizing the logical menu, and only need to specify the parameter type and parameter associated with the menu Its own characteristics are enough; the module solves the problem of association between menus and data by automatically traversing menus and automatically generating parameter indexes. Whenever adding parameters, deleting parameters, changing parameter types, etc., it can automatically achieve mutual matching.

在优选实施例中,所述菜单管理器负责管理逻辑菜单的遍历、菜单按钮缓冲区信息的刷新、关联参数的提取和管理,并与主框架通过消息进行交互,完成菜单按钮的刷新、参数的状态切换和输入管理;菜单管理器提供了配置接口,可以对菜单管理器所关联的逻辑菜单资源进行动态配置,运行时可以根据需要动态配置逻辑菜单资源,满足多模式测量下对多个逻辑菜单树的需求。In a preferred embodiment, the menu manager is responsible for managing the traversal of logical menus, the refreshing of menu button buffer information, the extraction and management of associated parameters, and interacts with the main frame through messages to complete the refreshing of menu buttons and the updating of parameters. State switching and input management; the menu manager provides a configuration interface, which can dynamically configure the logical menu resources associated with the menu manager, and the logical menu resources can be dynamically configured according to the needs during operation to meet the requirements for multiple logical menus under multi-mode measurement tree needs.

在优选实施例中,所述逻辑菜单资源脚本采用了通用的文本文件格式,方便跨平台使用;同时通过分段定义,分段描述的方式,使菜单资源脚本文件结构清晰,而且格式简单,便于解析。In a preferred embodiment, the logical menu resource script adopts a common text file format, which is convenient for cross-platform use; at the same time, the structure of the menu resource script file is clear, and the format is simple, and it is convenient to use by segment definition and segment description. parse.

在优选实施例中,自动生成逻辑菜单功能框架模块,在该模块中,与逻辑菜单关联的预定义代码均根据菜单ID自动生成;测量仪器软件中对逻辑菜单响应函数和关联参数均通过该预定义参数进行访问,保证逻辑菜单资源和测量仪器软件的协调统一;自动生成的逻辑菜单功能框架模块中,逻辑菜单响应函数名称也都根据菜单ID自动生成,从而使响应函数的风格完全统一。In a preferred embodiment, the logic menu function frame module is automatically generated, and in this module, the predefined codes associated with the logic menu are automatically generated according to the menu ID; Define parameters for access to ensure the coordination and unity of logic menu resources and measuring instrument software; in the automatically generated logic menu function framework module, the names of logic menu response functions are also automatically generated according to the menu ID, so that the styles of response functions are completely unified.

根据本发明的逻辑菜单资源智能配置方法,可以实现逻辑菜单资源“傻瓜”式定制;逻辑菜单资源智能生成和还原;逻辑菜单功能框架模块自动生成;若测量仪器需实现多套菜单,无需一次性把每套菜单资源都进行初始化,可以根据需要动态生成和配置所需菜单,节省资源。According to the intelligent configuration method of logical menu resources of the present invention, "fool" customization of logical menu resources can be realized; intelligent generation and restoration of logical menu resources; automatic generation of logical menu function frame modules; if the measuring instrument needs to realize multiple sets of menus, no one-time operation is required Each set of menu resources is initialized, and the required menus can be dynamically generated and configured according to the needs, saving resources.

图2给出了逻辑菜单资源智能配置系统组成结构及其调用关系,主要包括3个模块,分别是:“逻辑菜单(“傻瓜式”)定制工具”、“资源及功能框架模块”及“测量仪器执行文件”。下面具体说明各组成模块及其关系:Figure 2 shows the composition structure and calling relationship of the logical menu resource intelligent configuration system, which mainly includes three modules, namely: "logic menu ("fool style") customization tool", "resource and function framework module" and "measurement Instrument Execution File". The following is a detailed description of each component module and its relationship:

1)逻辑菜单定制工具:1) Logic menu customization tool:

由编辑管理模块、智能映射生成模块和智能解析还原模块构成。It consists of an editing management module, an intelligent mapping generation module and an intelligent analysis and restoration module.

编辑管理模块:通过交互界面编辑菜单树结构,设置菜单项属性,例如:菜单名称、菜单ID及菜单类型等,以及设置菜单项关联参数信息,例如:参数类型、参数精度、单位类型、默认值、最小值、最大值和步进值等。Editing management module: edit the menu tree structure through the interactive interface, set menu item attributes, such as: menu name, menu ID, menu type, etc., and set menu item associated parameter information, such as: parameter type, parameter precision, unit type, default value , minimum value, maximum value and step value etc.

智能映射生成模块:用于生成逻辑菜单资源脚本和逻辑菜单功能框架模块。具体步骤是:Smart mapping generation module: used to generate logic menu resource scripts and logic menu function framework modules. The specific steps are:

a)按照界面定制的菜单树,填写逻辑菜单树的父、子、前兄弟、后兄弟的关联关系到逻辑菜单树的相关字段;填写菜单项属性信息到逻辑菜单树各菜单项的相关字段,例如:菜单项字符串、菜单ID、菜单类型、关联参数类型等各菜单项属性信息,此时各菜单所关联的参数索引还没有生成;a) According to the menu tree customized by the interface, fill in the relationship between the parent, child, former brother, and later brother of the logical menu tree to the relevant fields of the logical menu tree; fill in the menu item attribute information to the relevant fields of each menu item in the logical menu tree, For example: menu item attribute information such as menu item string, menu ID, menu type, associated parameter type, etc. At this time, the parameter index associated with each menu has not yet been generated;

b)根据菜单关联参数类型遍历菜单树,对参数进行分类和统计,自动生成各参数在相关菜单项中的索引并写入逻辑菜单中参数索引字段。b) Traverse the menu tree according to the type of menu associated parameters, classify and count the parameters, automatically generate the index of each parameter in the relevant menu item and write it into the parameter index field in the logical menu.

c)基于填写好的菜单树结构信息,依次格式化存储逻辑菜单树到逻辑菜单资源脚本文件中;根据逻辑菜单的参数类型,对参数进行分类和统计,把参数信息分类格式化存储到逻辑菜单资源脚本文件中;并根据菜单ID串生成菜单ID的宏定义,根据菜单ID和参数类型信息自动生成各参数索引的宏定义,将生成的菜单和参数宏定义都存储到统一的宏定义头文件中,供测量仪器主程序使用;最终生成的逻辑菜单资源脚本文件包含两个:菜单树结构和参数信息文件(AvMenuData*.txt)和菜单索引、参数索引的宏定义头文件(AvMenuData*.h)。c) Based on the filled-in menu tree structure information, sequentially format and store the logical menu tree into the logical menu resource script file; classify and count the parameters according to the parameter type of the logical menu, and store the parameter information in the logical menu in a classified format In the resource script file; and generate the macro definition of the menu ID according to the menu ID string, automatically generate the macro definition of each parameter index according to the menu ID and parameter type information, and store the generated menu and parameter macro definitions in a unified macro definition header file It is used by the main program of the measuring instrument; the final generated logic menu resource script file contains two: the menu tree structure and parameter information file (AvMenuData*.txt) and the macro definition header file of the menu index and parameter index (AvMenuData*.h ).

d)最后根据菜单树结构中的菜单功能函数类名称字段、菜单功能消息宏定义字段及消息头文件名称字段,生成逻辑菜单功能框架模块,各菜单响应函数名称根据菜单ID串自动生成。逻辑菜单功能框架模块包含的文件是:菜单功能框架源文件(AvMenuFunc*.cpp)、菜单功能框架头文件(AvMenuFunc*.h)和菜单消息头文件(*MenuFuncMsg.h)。其中,菜单功能框架源文件中的各菜单项的功能函数实现,自动填充为向关联窗口视图发送消息,消息的宏定义在关联的消息头文件中(*MenuFuncMsg.h)。而具体函数实现算法在仪器主程序中实现,将来菜单更改时,只需在仪器主程序中的对应菜单项处理函数中做相关修改。d) Finally, according to the menu function function class name field, menu function message macro definition field and message header file name field in the menu tree structure, a logical menu function frame module is generated, and each menu response function name is automatically generated according to the menu ID string. The files included in the logical menu function frame module are: menu function frame source file (AvMenuFunc*.cpp), menu function frame header file (AvMenuFunc*.h) and menu message header file (*MenuFuncMsg.h). Among them, the function realization of each menu item in the menu function frame source file is automatically filled to send a message to the associated window view, and the macro definition of the message is in the associated message header file (*MenuFuncMsg.h). The specific function implementation algorithm is implemented in the main program of the instrument. When the menu is changed in the future, it only needs to be modified in the corresponding menu item processing function in the main program of the instrument.

智能解析还原模块,通过调用逻辑菜单脚本文件,还原逻辑菜单的菜单树和所有关联的参数数据,并同步初始化交互操作界面的各控件,可在此基础上对逻辑菜单资源做进一步修改和完善。The intelligent parsing and restoration module restores the menu tree and all associated parameter data of the logic menu by calling the logic menu script file, and synchronously initializes each control of the interactive operation interface. On this basis, the logic menu resources can be further modified and improved.

2)资源及功能框架模块2) Resource and functional framework modules

逻辑菜单定制工具的产物就是逻辑菜单资源脚本和逻辑菜单功能框架模块。其中,逻辑菜单资源脚本主要用于存储菜单及菜单关联参数信息,具体包含两个文件,分别是:菜单树结构和参数信息文件(AvMenuData*.txt)和菜单索引、参数索引的宏定义头文件(AvMenuData*.h);逻辑菜单功能框架是逻辑菜单定制工具自动生成的菜单功能处理函数的源文件和头文件及关联的消息宏定义头文件。菜单工具生成的所有文件都会包含在测量仪器软件的相关菜单路径中,若仪器包含多种测量功能,那么各功能对应的菜单资源脚本和菜单功能框架模块分类存储到相关路径下,最终由测量仪器执行文件运行时调用。The product of the logic menu customization tool is the logic menu resource script and the logic menu function frame module. Among them, the logic menu resource script is mainly used to store menu and menu-associated parameter information, specifically includes two files, namely: menu tree structure and parameter information file (AvMenuData*.txt) and macro definition header file of menu index and parameter index (AvMenuData*.h); The logic menu function framework is the source file and header file of the menu function processing function automatically generated by the logic menu customization tool and the associated message macro definition header file. All files generated by the menu tool will be included in the relevant menu path of the measuring instrument software. If the instrument contains multiple measurement functions, then the menu resource scripts and menu function frame modules corresponding to each function will be classified and stored in the relevant path, and finally the measuring instrument will Called when the executable is run.

3)测量仪器执行文件3) Measuring instrument execution file

测量仪器执行文件是一个大型的仪器控制软件的执行文件,其中只介绍与菜单相关的功能模块,主要包括智能解析还原模块、菜单管理模块和逻辑菜单功能框架模块。该部分的解析还原模块与逻辑菜单定制工具的还原模块类似,通过调用逻辑菜单脚本文件,还原逻辑菜单的菜单树和所有关联的参数数据,并分别存储到菜单结构体数组和对应数据类型数组中。将来菜单管理模块在此基础上并通过调用逻辑菜单功能框架模块,管理实现菜单的遍历、菜单按钮缓冲区信息的刷新、关联参数的提取和管理,并与主框架通过消息进行交互,完成菜单按钮的刷新、参数的状态切换和输入管理。The execution file of the measuring instrument is a large-scale instrument control software execution file, which only introduces the function modules related to the menu, mainly including the intelligent analysis and restoration module, the menu management module and the logic menu function framework module. The parsing and restoration module of this part is similar to the restoration module of the logic menu customization tool. By calling the logic menu script file, the menu tree and all associated parameter data of the logic menu are restored, and stored in the menu structure array and the corresponding data type array respectively. . On this basis, the future menu management module will manage and implement menu traversal, refresh of menu button buffer information, extraction and management of associated parameters by calling the logic menu function framework module, and interact with the main frame through messages to complete the menu button Refresh, parameter state switching and input management.

图3是逻辑菜单“傻瓜”式定制工具执行流程示意图。打开菜单工具后,若不调用存储的逻辑菜单资源脚本文件(AvMenuData*.txt),交互界面(图8)左侧的菜单树部分为空,右侧的菜单属性和参数属性部分为初始化状态。此时可手动编辑定制菜单树及关联菜单属性和参数信息,编辑完成后可通过工具栏的“保存”按键自动生成菜单树结构和关联参数数组,最终生成逻辑菜单资源脚本和逻辑菜单功能框架模块。若调用存储的逻辑菜单资源脚本文件(AvMenuData*.txt),首先工具通过调用智能解析还原模块将脚本文件中的菜单结构生成到逻辑菜单内存映像,并同步刷新设置交互界面的菜单树、菜单属性及参数信息等控件。接着用户可在此基础上编辑修改菜单树及关联菜单属性和参数信息,确认编辑完成后,通过调用智能映射生成模块最终生成逻辑菜单资源脚本和逻辑菜单功能框架模块。Fig. 3 is a schematic diagram of the execution flow of the logic menu "fool" custom tool. After opening the menu tool, if the stored logic menu resource script file (AvMenuData*.txt) is not called, the menu tree part on the left side of the interactive interface (Figure 8) is empty, and the menu attribute and parameter attribute part on the right side are in the initialization state. At this point, you can manually edit the custom menu tree and associated menu properties and parameter information. After editing, you can automatically generate the menu tree structure and associated parameter array through the "Save" button on the toolbar, and finally generate the logic menu resource script and logic menu function frame module. . If the stored logic menu resource script file (AvMenuData*.txt) is called, the tool first generates the menu structure in the script file to the memory image of the logic menu by calling the intelligent parsing and restoration module, and simultaneously refreshes the menu tree and menu attributes of the setting interface and parameter information and other controls. Then the user can edit and modify the menu tree and associated menu attributes and parameter information on this basis. After confirming that the editing is completed, the logic menu resource script and the logic menu function frame module are finally generated by calling the intelligent mapping generation module.

图4是测量仪器执行文件生成示意图。测量仪器软件开发模块包含众多的代码源文件和头文件,其中,菜单工具自动生成的逻辑菜单功能框架源文件、头文件及菜单消息宏定义头文件,与菜单解析还原模块、菜单管理模块及其它功能模块的源文件、头文件都包含在仪器软件开发模块(软件项目工程)中,通过执行开发工具的编译和链接,才生成最终的测量仪器执行文件,实现对仪器的软件控制。Fig. 4 is a schematic diagram of the execution file generation of the measuring instrument. The measuring instrument software development module includes many code source files and header files, among which, the logic menu function framework source files, header files and menu message macro definition header files automatically generated by the menu tool, and the menu analysis and restoration module, menu management module and others The source files and header files of the functional modules are included in the instrument software development module (software project engineering). After compiling and linking the development tools, the final execution file of the measuring instrument is generated to realize the software control of the instrument.

图5是测量仪器执行文件调用逻辑菜单资源脚本示意图。菜单工具生成的逻辑菜单资源脚本包含文本类型文件(*.txt),存储了菜单树结构及关联参数信息,测量仪器执行文件运行时需要调用该文件,并通过菜单解析还原模块将文本文件中的菜单树结构及参数信息还原到菜单内存映像中,以便初始化设置用户界面菜单。Fig. 5 is a schematic diagram of a script for calling a logic menu resource by a measuring instrument execution file. The logic menu resource script generated by the menu tool includes a text type file (*.txt), which stores the menu tree structure and associated parameter information. The menu tree structure and parameter information are restored to the menu memory image for initial setup of the user interface menu.

图6是测量仪器执行文件实现菜单功能的执行流程图。主程序运行时,首先打开逻辑菜单资源脚本文件,接着执行解析还原将菜单结构和参数信息还原生成到逻辑菜单内存映像中,最后由菜单管理器模块总体负责管理菜单操作,与主框架之间通过传递消息的方式,定位消息处理函数,通过调用逻辑菜单功能框架模块执行具体的菜单处理。Fig. 6 is a flow chart of the implementation of the menu function by the execution file of the measuring instrument. When the main program is running, firstly open the logic menu resource script file, then perform parsing and restoration to restore the menu structure and parameter information to the memory image of the logic menu, and finally the menu manager module is responsible for managing the menu operations as a whole, and communicates with the main frame through The method of message transmission locates the message processing function and executes specific menu processing by calling the logic menu function frame module.

图7是逻辑菜单资源文件格式,描述了逻辑菜单资源脚本文本文件的格式和内容。其中,分段主要存储了:Figure 7 is the logical menu resource file format, which describes the format and content of the logical menu resource script text file. Among them, the segment mainly stores:

[MENU]:以该标志开头存储了菜单结构树,逐项存储了菜单项属性信息,包括菜单父、子、兄弟关联关系,菜单项名称、菜单项ID、菜单类型、关联参数等各项信息。[MENU]: The menu structure tree is stored at the beginning of this mark, and the menu item attribute information is stored item by item, including menu parent, child, sibling relationship, menu item name, menu item ID, menu type, associated parameters and other information .

[DISCPARA]、[LONGPARA]、[DBLPARA]、[STRPARA]:以这些标志开头的信息段,逐项存储了离散数据类型、长整型数据类型、浮点型数据类型和字符串数据类型的参数信息,包括参数名称、参数ID、默认值、最小值、最大值、步进值等。随着参数类型不同,存储的参数信息也不同。[DISCPARA], [LONGPARA], [DBLPARA], [STRPARA]: The information segment beginning with these flags stores the parameters of the discrete data type, long integer data type, floating point data type, and string data type one by one Information, including parameter name, parameter ID, default value, minimum value, maximum value, step value, etc. With different parameter types, the stored parameter information is also different.

[SWITCHINFO]、[ASSINFO]、[INCRSTR]:以这些标志开头的信息段,逐项存储了开关类型菜单选项信息、多选一菜单选项信息、特殊规律步进信息。[SWITCHINFO], [ASSINFO], [INCRSTR]: The information segments starting with these symbols store the switch type menu option information, multi-choice menu option information, and special regular step information item by item.

图8是逻辑菜单“傻瓜式”定制工具的交互界面。菜单操作界面包含两部分:菜单树状结构图和菜单项属性编辑页。该菜单工具的具体实施方式将在下文中进一步描述。Figure 8 is the interactive interface of the logic menu "dumb" customization tool. The menu operation interface consists of two parts: the menu tree structure diagram and the menu item attribute editing page. The specific implementation of the menu tool will be further described below.

一、逻辑菜单资源“傻瓜”式定制工具是一个集成化工具,它的主要职责一是提供友好便捷的交互界面进行菜单资源的定制管理,其次调用智能映射生成模块生成逻辑菜单资源脚本和逻辑菜单功能框架模块,另外调用智能解析还原模块调入历史逻辑菜单资源脚本,在此基础上对逻辑菜单资源进行进一步修改和完善。负责的具体工作如下:1. The "fool" customization tool for logic menu resources is an integrated tool. Its main responsibilities are to provide a friendly and convenient interactive interface for custom management of menu resources, and secondly, to call the intelligent mapping generation module to generate logic menu resource scripts and logic menus. The functional frame module, in addition, calls the intelligent parsing and restoration module to call in the historical logic menu resource script, and further modifies and improves the logic menu resource on this basis. The specific tasks in charge are as follows:

1)菜单树的建立,菜单树层次管理。通过树形控件对菜单项可执行插入、删除、上移、下移、左移(层次提升)、右移(层次下降)等操作。除菜单项字符串需要手动输入外,其它全部用鼠标点选即可完成所有操作,操作简洁而直观。1) The establishment of the menu tree, the hierarchical management of the menu tree. Operations such as insert, delete, move up, move down, move left (level up), move right (level down), etc. can be performed on menu items through the tree control. Except for menu item strings that need to be manually input, all other operations can be completed by clicking with the mouse, and the operation is simple and intuitive.

2)菜单项属性设置。包括菜单ID、菜单类型、菜单使能/禁止/隐藏、是否是焦点菜单、关联参数的类型、是否生成响应函数等。2) Menu item attribute setting. Including menu ID, menu type, menu enable/disable/hide, whether it is the focus menu, type of associated parameters, whether to generate a response function, etc.

3)菜单项关联的参数属性设置。参数若是数值型参数,可以定制数值参数的默认值、最小值、最大值、步进值、最小步进值、输入时的文本长度限制、数值参数显示的精度、单位类型等;若是离散类型,可以定制各个离散字符串及默认取值等。3) The parameter attribute setting associated with the menu item. If the parameter is a numerical parameter, you can customize the default value, minimum value, maximum value, step value, minimum step value, text length limit when inputting, numerical parameter display precision, unit type, etc.; if it is a discrete type, Various discrete character strings and default values can be customized.

4)调用逻辑菜单智能映射生成模块,可生成菜单资源脚本文件、逻辑菜单功能框架模块(包括响应函数框架类头文件、响应函数框架类定义文件、菜单ID和参数索引等预定义头文件)。4) Call the logic menu intelligent mapping generation module to generate menu resource script files and logic menu function framework modules (including response function framework class header files, response function framework class definition files, menu IDs and parameter indexes, etc. predefined header files).

5)调用逻辑菜单资源脚本智能解析还原模块,可从逻辑菜单脚本文件中还原逻辑菜单的菜单树和所有关联的参数数据,由此可初始化交互操作界面的各控件,在此基础上对逻辑菜单资源进行进一步修改和完善。5) Call the logic menu resource script intelligent parsing and restoration module, which can restore the menu tree and all associated parameter data of the logic menu from the logic menu script file, thereby initializing each control of the interactive operation interface, and on this basis, the logic menu resources for further revision and refinement.

二、智能映射生成模块可自动对菜单项各属性、关联数据、辅助信息等进行分类,统计并计算它们的之间的映射关系,无论增加、删除菜单项,还是调整菜单项顺序、层次或其它属性,都可以自动实现自适应调整和匹配。负责的具体工作如下:2. The intelligent mapping generation module can automatically classify the attributes of menu items, associated data, auxiliary information, etc., count and calculate the mapping relationship between them, no matter adding or deleting menu items, or adjusting the order, level or other of menu items Attributes can be automatically adjusted and matched automatically. The specific tasks in charge are as follows:

1)按照界面上定制的菜单树,生成逻辑菜单树的父、子、前兄弟、后兄弟的关联关系,写入逻辑菜单树的相关字段,同时将各固定的属性信息写入逻辑菜单树各菜单项的相关字段,如菜单项主字符串、菜单ID、菜单类型、关联参数类型等各菜单项属性信息。此时各菜单所关联的参数索引还没有生成;1) According to the menu tree customized on the interface, generate the relationship between parent, child, former brother and later brother of the logical menu tree, write it into the relevant fields of the logical menu tree, and write each fixed attribute information into each of the logical menu tree Related fields of menu items, such as menu item main character string, menu ID, menu type, associated parameter type and other menu item attribute information. At this time, the parameter index associated with each menu has not been generated yet;

2)根据菜单关联参数类型遍历菜单树,对参数进行分类和统计,自动生成各参数在相关菜单项中的索引并写入逻辑菜单中参数索引字段。各种数据类型的索引独立编号,互不干扰,增加或删除菜单所对应的各类型参数,该遍历生成过程都可以自动调整,保证各参数和逻辑菜单之间的映射关系完全匹配;2) Traverse the menu tree according to the type of menu associated parameters, classify and count the parameters, automatically generate the index of each parameter in the relevant menu item and write it into the parameter index field in the logical menu. Indexes of various data types are numbered independently without interfering with each other, adding or deleting various types of parameters corresponding to the menu, the traversal generation process can be automatically adjusted to ensure that the mapping relationship between each parameter and the logical menu is completely matched;

3)把逻辑菜单树格式化存储到逻辑菜单资源脚本文件中。3) Formatting and storing the logical menu tree into the logical menu resource script file.

4)根据逻辑菜单的参数类型,对参数进行分类和统计,把参数信息分类格式化存储到逻辑菜单资源脚本文件中。4) According to the parameter type of the logic menu, the parameters are classified and counted, and the parameter information is classified and formatted and stored in the logic menu resource script file.

5)根据菜单ID串生成菜单ID的宏定义,根据菜单ID和参数类型信息自动生成各参数索引的宏定义,存储到宏定义头文件中,供测量仪器主程序使用;5) Generate the macro definition of the menu ID according to the menu ID string, automatically generate the macro definition of each parameter index according to the menu ID and parameter type information, store it in the macro definition header file, and use it for the main program of the measuring instrument;

6)生成逻辑菜单功能框架模块,各菜单响应函数名称根据菜单ID串自动生成。6) Generate a logical menu function framework module, and the name of each menu response function is automatically generated according to the menu ID string.

逻辑菜单资源“傻瓜”式定制工具通过调用智能映射生成模块,最终生成了完全协调一致的逻辑菜单资源脚本和逻辑菜单功能框架模块。Logic menu resource "fool" customization tool finally generates fully coordinated logic menu resource script and logic menu function framework module by calling the intelligent mapping generation module.

三、智能解析还原模块负责对逻辑菜单资源脚本进行解析,动态生成运行态菜单树对象和菜单关联的数据表数据。在测量仪器软件中,这些数据供菜单管理器使用,满足软件的运行需求;在逻辑菜单资源“傻瓜”式定制工具中,可调入已生成的菜单资源,将信息还原到交互界面控件,对逻辑菜单资源做进一步修改和完善。3. The intelligent parsing and restoration module is responsible for parsing the logic menu resource script, and dynamically generating the running state menu tree object and the data table data associated with the menu. In the measuring instrument software, these data are used by the menu manager to meet the running requirements of the software; in the logical menu resource "fool" custom tool, the generated menu resource can be transferred to restore the information to the interactive interface control, and the Logical menu resources are further revised and improved.

四、菜单管理器负责管理逻辑菜单的遍历、菜单按钮缓冲区信息的刷新、关联参数的提取和管理,并与主框架通过消息进行交互,完成菜单按钮的刷新、参数的状态切换和输入管理等。菜单管理器提供了配置接口,可以对菜单管理器所关联的逻辑菜单资源进行动态配置,运行时可以根据需要动态配置逻辑菜单资源,满足多模式测量下对多个逻辑菜单树的需求。4. The menu manager is responsible for managing the traversal of the logical menu, the refresh of the menu button buffer information, the extraction and management of associated parameters, and interacts with the main frame through messages to complete the menu button refresh, parameter state switching and input management, etc. . The menu manager provides a configuration interface, which can dynamically configure the logical menu resources associated with the menu manager. During runtime, the logical menu resources can be dynamically configured as needed to meet the requirements for multiple logical menu trees under multi-mode measurement.

五、本发明中逻辑菜单资源脚本是对比分析了多种资源格式后,优化设计的一种脚本格式,不但格式简单,而且解析方便,解析还原动态运行数据的效率高。5. The logic menu resource script in the present invention is a script format optimized and designed after comparing and analyzing multiple resource formats. It is not only simple in format, but also easy to analyze, and has high efficiency in analyzing and restoring dynamic operating data.

相比现有技术,本发明具有如下优点:Compared with the prior art, the present invention has the following advantages:

1)利用菜单资源“傻瓜”式定制工具,可轻松实现逻辑菜单定制,把开发人员从繁琐的菜单资源维护中解脱出来,大大提高生产效率,并提高了逻辑菜单定制的可靠性,避免人工修改定制逻辑菜单引入新的软件缺陷。1) Using menu resource "fool" customization tools, logic menu customization can be easily realized, which frees developers from cumbersome menu resource maintenance, greatly improves production efficiency, improves the reliability of logic menu customization, and avoids manual modification Custom logic menus introduce new software bugs.

2)智能映射生成模块和智能解析还原模块的应用,使得在定制逻辑菜单时,不必手动强制菜单项与某个参数索引硬绑定,只需指定该菜单关联的参数类型和参数自身的特性即可,不但减少了工作量,而且避免了手动操作引入的错误。该模块通过自动遍历菜单和自动生成参数索引的方式,很好的解决了菜单与数据的关联问题,无论何时增加参数、删除参数、改变参数类型等,都能自动实现相互的匹配。2) The application of the intelligent mapping generation module and the intelligent analysis and restoration module makes it unnecessary to manually force the menu item to be hard-bound to a certain parameter index when customizing the logic menu, and only needs to specify the parameter type associated with the menu and the characteristics of the parameter itself. Yes, it not only reduces the workload, but also avoids the errors introduced by manual operation. By automatically traversing menus and automatically generating parameter indexes, this module solves the problem of the association between menus and data. Whenever adding parameters, deleting parameters, changing parameter types, etc., they can automatically match each other.

3)菜单管理器不与任何菜单资源绑定,实现了动态配置接口,测量仪器软件在运行时可根据需要动态实现菜单资源的变更与配置,使测量仪器可以轻松实现多种测量模式对多逻辑菜单的需求。3) The menu manager is not bound to any menu resources, and realizes the dynamic configuration interface. The measuring instrument software can dynamically realize the change and configuration of menu resources according to the needs during operation, so that the measuring instrument can easily implement multiple measurement modes to multiple logic menu needs.

4)可自动生成与逻辑菜单相关联的预定义代码和逻辑菜单功能框架模块。测量仪器软件中对逻辑菜单响应函数和关联参数均通过该预定义参数进行访问,可保证逻辑菜单资源和仪器软件的协调统一。自动生成逻辑菜单功能框架模块,减少了开发人员的工作量,提高了工作效率,使响应函数的风格完全统一。4) The predefined code associated with the logic menu and the function frame module of the logic menu can be automatically generated. The logic menu response function and associated parameters in the measuring instrument software are accessed through the predefined parameters, which can ensure the coordination and unity of the logic menu resources and the instrument software. Automatically generate logical menu function framework modules, which reduces the workload of developers, improves work efficiency, and makes the styles of response functions completely unified.

不难发现,在本发明的优选实施例中,逻辑菜单傻瓜式定制工具和测量仪器软件中都有“智能解析还原模块”,是因为这是两个独立的软件,都有对逻辑菜单资源脚本进行解析的需求,这是一个公共模块,供两个程序共同使用。It is not difficult to find that in the preferred embodiment of the present invention, there are "intelligent parsing and restoration modules" in the logic menu fool-style customization tool and measuring instrument software, because these are two independent software, and they all have a resource script for the logic menu. Requirements for parsing, this is a common module for use by both programs.

智能解析还原模块在逻辑菜单傻瓜式定制工具中的作用是,把已生成的逻辑菜单资源脚本重新载入工具软件,还原逻辑菜单树及与逻辑菜单关联的各种数据,以便进行编辑修改。The role of the intelligent parsing and restoration module in the logic menu fool-style customization tool is to reload the generated logic menu resource script into the tool software, and restore the logic menu tree and various data associated with the logic menu for editing and modification.

智能解析还原模块在测量仪器软件中的作用是,在软件启动时,对逻辑菜单资源脚本进行解析,还原生成逻辑菜单树及与逻辑菜单关联的各种数据表,供菜单管理器模块使用。The role of the intelligent analysis and restoration module in the measuring instrument software is to analyze the logic menu resource script when the software is started, restore and generate a logic menu tree and various data tables associated with the logic menu, which are used by the menu manager module.

逻辑菜单傻瓜式定制工具生成的文件包括:菜单消息预定义.h文件、菜单ID和各类型参数预定义.h文件、菜单功能框架类.h文件和.cpp文件、菜单资源脚本.txt文件。The files generated by the logic menu fool-style customization tool include: menu message predefined .h file, menu ID and various types of parameter predefined .h file, menu function frame class .h file and .cpp file, menu resource script .txt file.

在测量仪器软件启动时,调用“智能解析还原模块”,对菜单资源脚本.txt文件进行解析,生成程序内部使用的菜单数据和各种数据表,供菜单管理器模块使用。When the measuring instrument software is started, the "intelligent parsing and restoration module" is invoked to parse the menu resource script.txt file, and generate menu data and various data tables used inside the program for use by the menu manager module.

在测量仪器软件开发模块中,需要集成菜单消息预定义.h文件、菜单ID和各类型参数预定义.h文件、菜单功能框架类.h文件和.cpp文件,程序员编程时,只要在自动生成的菜单功能函数中增加具体处理代码即可。In the measuring instrument software development module, it is necessary to integrate the menu message predefined .h file, the menu ID and each type of parameter predefined .h file, the menu function framework class. Add specific processing codes to the generated menu function.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and equivalent technologies thereof, the present invention also intends to include these modifications and variations.

Claims (9)

1.一种测量仪器的逻辑菜单资源智能配置方法,其特征在于:1. A logical menu resource intelligent configuration method of a measuring instrument, characterized in that: 使用逻辑菜单“傻瓜式”定制工具,以交互方式定制逻辑菜单树及各个菜单项的属性;Use the logic menu "fool-like" customization tool to interactively customize the logic menu tree and the properties of each menu item; 逻辑菜单定制工具由编辑管理模块、智能映射生成模块和智能解析还原模块构成;The logic menu customization tool is composed of an editing management module, an intelligent mapping generation module and an intelligent analysis and restoration module; 编辑管理模块:通过交互界面编辑菜单树结构,设置菜单项属性;Edit management module: edit the menu tree structure through the interactive interface, and set the menu item attributes; 智能映射生成模块:用于生成逻辑菜单资源脚本和逻辑菜单功能框架模块,具体步骤是:Intelligent mapping generation module: used to generate logic menu resource scripts and logic menu function framework modules, the specific steps are: a)按照界面定制的菜单树,填写逻辑菜单树的父、子、前兄弟、后兄弟的关联关系到逻辑菜单树的相关字段;填写菜单项属性信息到逻辑菜单树各菜单项的相关字段,此时各菜单所关联的参数索引还没有生成;a) According to the menu tree customized by the interface, fill in the relationship between the parent, child, former brother, and later brother of the logical menu tree to the relevant fields of the logical menu tree; fill in the menu item attribute information to the relevant fields of each menu item in the logical menu tree, At this time, the parameter index associated with each menu has not been generated yet; b)根据菜单关联参数类型遍历菜单树,对参数进行分类和统计,自动生成各参数在相关菜单项中的索引并写入逻辑菜单中参数索引字段;b) Traverse the menu tree according to the type of menu associated parameters, classify and count the parameters, automatically generate the index of each parameter in the relevant menu item and write it into the parameter index field in the logical menu; c)基于填写好的菜单树结构信息,依次格式化存储逻辑菜单树到逻辑菜单资源脚本文件中;根据逻辑菜单的参数类型,对参数进行分类和统计,把参数信息分类格式化存储到逻辑菜单资源脚本文件中;并根据菜单ID串生成菜单ID的宏定义,根据菜单ID和参数类型信息自动生成各参数索引的宏定义,将生成的菜单和参数宏定义都存储到统一的宏定义头文件中,供测量仪器主程序使用;最终生成的逻辑菜单资源脚本文件包含两个:菜单树结构和参数信息文件和菜单索引、参数索引的宏定义头文件;c) Based on the filled-in menu tree structure information, sequentially format and store the logical menu tree into the logical menu resource script file; classify and count the parameters according to the parameter type of the logical menu, and store the parameter information in the logical menu in a classified format In the resource script file; and generate the macro definition of the menu ID according to the menu ID string, automatically generate the macro definition of each parameter index according to the menu ID and parameter type information, and store the generated menu and parameter macro definitions in a unified macro definition header file , used for the main program of the measuring instrument; the final generated logic menu resource script file contains two: the menu tree structure and parameter information file and the macro definition header file of menu index and parameter index; d)最后根据菜单树结构中的菜单功能函数类名称字段、菜单功能消息宏定义字段及消息头文件名称字段,生成逻辑菜单功能框架模块,各菜单响应函数名称根据菜单ID串自动生成;逻辑菜单功能框架模块包含的文件是:菜单功能框架源文件、菜单功能框架头文件和菜单消息头文件;其中,菜单功能框架源文件中的各菜单项的功能函数实现,自动填充为向关联窗口视图发送消息,消息的宏定义在关联的消息头文件中;d) Finally, according to the menu function function class name field, the menu function message macro definition field and the message header file name field in the menu tree structure, a logical menu function frame module is generated, and each menu response function name is automatically generated according to the menu ID string; the logical menu The files included in the function frame module are: menu function frame source file, menu function frame header file and menu message header file; among them, the function realization of each menu item in the menu function frame source file is automatically filled as sending to the associated window view Message, the macro definition of the message is in the associated message header file; 智能解析还原模块,通过调用逻辑菜单脚本文件,还原逻辑菜单的菜单树和所有关联的参数数据,并同步初始化交互操作界面的各控件,在此基础上对逻辑菜单资源做进一步修改和完善;The intelligent parsing and restoration module restores the menu tree and all associated parameter data of the logic menu by calling the logic menu script file, and synchronously initializes each control of the interactive operation interface, and further modifies and improves the logic menu resources on this basis; 把生成的逻辑菜单资源脚本和逻辑菜单功能框架模块集成到测量仪器软件开发模块中,编译链接后生成测量仪器执行文件;Integrate the generated logic menu resource script and logic menu function frame module into the measuring instrument software development module, compile and link to generate the measuring instrument execution file; 所述测量仪器执行文件包括:智能解析还原模块、菜单管理模块和逻辑菜单功能框架模块;测量仪器执行文件的解析还原模块通过调用逻辑菜单资源脚本文件,还原逻辑菜单的菜单树和所有关联的参数数据,并分别存储到菜单结构体数组和对应数据类型数组中;菜单管理模块在此基础上通过调用逻辑菜单功能框架模块,管理实现菜单的遍历、菜单按钮缓冲区信息的刷新、关联参数的提取和管理,并与主框架通过消息进行交互,完成菜单按钮的刷新、参数的状态切换和输入管理。The execution file of the measuring instrument includes: an intelligent parsing and restoring module, a menu management module and a logical menu function frame module; the parsing and restoring module of the executing file of the measuring instrument restores the menu tree of the logical menu and all associated parameters by calling the logical menu resource script file data, and store them in the menu structure array and the corresponding data type array; on this basis, the menu management module manages and realizes the traversal of the menu, the refresh of the menu button buffer information, and the extraction of associated parameters by calling the logical menu function framework module and management, and interact with the main frame through messages to complete menu button refresh, parameter state switching and input management. 2.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,其中所述逻辑菜单资源“傻瓜”式定制工具是集成化工具,提供友好便捷的用户界面方便菜单资源的定制管理;2. The method for intelligently configuring logic menu resources of a measuring instrument according to claim 1, wherein the "fool" type customization tool for logic menu resources is an integrated tool that provides a friendly and convenient user interface to facilitate customization management of menu resources; 并通过调用内部智能映射生成模块,生成逻辑菜单资源脚本和逻辑菜单功能框架模块;And generate logic menu resource script and logic menu function framework module by calling the internal intelligent mapping generation module; 还通过调用内部智能解析还原模块,调入历史逻辑菜单资源脚本,在旧的逻辑菜单资源基础上做进一步修改和完善。Also by calling the internal intelligent analysis and restoration module, and calling in the historical logic menu resource script, further modification and improvement are made on the basis of the old logic menu resource. 3.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,其中所述智能映射生成模块自动对菜单项各属性、关联数据、辅助信息进行分类,统计并计算它们之间的映射关系,无论增加、删除菜单项,还是调整菜单项顺序、层次或其它属性,都可以自动实现自适应调整和匹配。3. The logical menu resource intelligent configuration method of the measuring instrument according to claim 1, wherein the intelligent mapping generation module automatically classifies the attributes, associated data, and auxiliary information of menu items, and counts and calculates the mapping relationship between them , regardless of adding or deleting menu items, or adjusting the order, hierarchy or other attributes of menu items, adaptive adjustment and matching can be automatically realized. 4.根据权利要求3所述的测量仪器的逻辑菜单资源智能配置方法,其中4. the logical menu resource intelligent configuration method of measuring instrument according to claim 3, wherein 各种数据类型的索引独立编号,互不干扰,增加或删除菜单所对应的各类型参数,遍历生成过程都可以自动调整,保证各参数和逻辑菜单之间的映射关系完全匹配。The indexes of various data types are numbered independently without interfering with each other. Adding or deleting various types of parameters corresponding to the menu, and traversing the generation process can be automatically adjusted to ensure that the mapping relationship between each parameter and the logical menu is completely matched. 5.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,所述智能解析还原模块负责对逻辑菜单资源脚本进行解析,动态生成运行态菜单树对象和菜单关联的数据表数据;5. The logical menu resource intelligent configuration method of the measuring instrument according to claim 1, the intelligent parsing and restoring module is responsible for parsing the logical menu resource script, dynamically generating the data table data associated with the running state menu tree object and the menu; 在测量仪器软件中,这些数据供菜单管理模块使用,满足软件的运行需求;在逻辑菜单资源“傻瓜”式定制工具中,调入已生成的菜单资源,将信息还原到交互界面控件,对逻辑菜单资源做进一步修改和完善。In the measuring instrument software, these data are used by the menu management module to meet the running requirements of the software; in the logical menu resource "fool" type customization tool, the generated menu resource is called in, and the information is restored to the interactive interface control, and the logical The menu resources are further modified and improved. 6.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,其中:6. The logical menu resource intelligent configuration method of the measuring instrument according to claim 1, wherein: 所述智能映射生成模块和智能解析还原模块,使得在定制逻辑菜单时,不必手动强制菜单项与某个参数索引硬绑定,只需指定该菜单关联的参数类型和参数自身的特性即可;The intelligent mapping generating module and the intelligent parsing and restoring module make it unnecessary to manually force a menu item to be hard-bound to a certain parameter index when customizing a logical menu, and only need to specify the parameter type associated with the menu and the characteristics of the parameter itself; 所述智能映射生成模块和智能解析还原模块通过自动遍历菜单和自动生成参数索引的方式,解决菜单与数据的关联问题,无论何时增加参数、删除参数、改变参数类型,都能自动实现相互的匹配。The intelligent mapping generating module and the intelligent parsing and restoring module solve the problem of association between menus and data by automatically traversing menus and automatically generating parameter indexes. Whenever adding parameters, deleting parameters, or changing parameter types, they can automatically realize mutual match. 7.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,所述菜单管理模块负责管理逻辑菜单的遍历、菜单按钮缓冲区信息的刷新、关联参数的提取和管理,并与主框架通过消息进行交互,完成菜单按钮的刷新、参数的状态切换和输入管理;7. The logical menu resource intelligent configuration method of the measuring instrument according to claim 1, the menu management module is responsible for managing the traversal of the logical menu, the refresh of the menu button buffer information, the extraction and management of associated parameters, and communicates with the main frame Interact through messages to complete menu button refresh, parameter status switching and input management; 菜单管理模块提供了配置接口,对菜单管理模块所关联的逻辑菜单资源进行动态配置,运行时根据需要动态配置逻辑菜单资源,满足多模式测量下对多个逻辑菜单树的需求。The menu management module provides a configuration interface to dynamically configure the logical menu resources associated with the menu management module, and dynamically configure the logical menu resources according to the needs during runtime to meet the needs of multiple logical menu trees under multi-mode measurement. 8.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,其中所述逻辑菜单资源脚本采用了通用的文本文件格式,方便跨平台使用;8. The logical menu resource intelligent configuration method of the measuring instrument according to claim 1, wherein the logical menu resource script adopts a general text file format, which is convenient for cross-platform use; 同时通过分段定义,分段描述的方式,使菜单资源脚本文件结构清晰,而且格式简单,便于解析。At the same time, the structure of the menu resource script file is clear, the format is simple, and it is easy to analyze through the method of segment definition and segment description. 9.根据权利要求1所述的测量仪器的逻辑菜单资源智能配置方法,其特征还在于:9. The logical menu resource intelligent configuration method of the measuring instrument according to claim 1, further characterized in that: 自动生成逻辑菜单功能框架模块,在该模块中,与逻辑菜单关联的预定义代码均根据菜单ID自动生成;Automatically generate the logic menu function frame module, in this module, the predefined codes associated with the logic menu are automatically generated according to the menu ID; 测量仪器软件中对逻辑菜单响应函数和关联参数均通过所述预定义代码进行访问,保证逻辑菜单资源和测量仪器软件的协调统一;The logical menu response function and associated parameters in the measuring instrument software are all accessed through the predefined code, ensuring the coordination and unity of the logical menu resources and the measuring instrument software; 自动生成的逻辑菜单功能框架模块中,逻辑菜单响应函数名称也都根据菜单ID自动生成,从而使响应函数的风格完全统一。In the automatically generated logic menu function framework module, the names of the logic menu response functions are also automatically generated according to the menu ID, so that the styles of the response functions are completely unified.
CN201210011922.3A 2012-01-16 2012-01-16 Based on the logic menu resource intelligent configuration method measuring instrument Active CN102609252B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210011922.3A CN102609252B (en) 2012-01-16 2012-01-16 Based on the logic menu resource intelligent configuration method measuring instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210011922.3A CN102609252B (en) 2012-01-16 2012-01-16 Based on the logic menu resource intelligent configuration method measuring instrument

Publications (2)

Publication Number Publication Date
CN102609252A CN102609252A (en) 2012-07-25
CN102609252B true CN102609252B (en) 2016-07-06

Family

ID=46526651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210011922.3A Active CN102609252B (en) 2012-01-16 2012-01-16 Based on the logic menu resource intelligent configuration method measuring instrument

Country Status (1)

Country Link
CN (1) CN102609252B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI690890B (en) 2017-09-04 2020-04-11 日商馬可企業股份有限公司 Menu display method, menu display device and menu display program

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103558912B (en) * 2013-10-24 2016-08-17 中国电子科技集团公司第四十一研究所 The personalized stepping of a kind of measuring instrument input parameter arranges device
CN103577191B (en) * 2013-10-31 2017-02-01 中国电子科技集团公司第四十一研究所 Configurable instrument menu system
CN103593188B (en) * 2013-11-14 2017-01-18 中国电子科技集团公司第四十一研究所 System and method for managing what-you-see-is-what-you-get menus of instrument
CN103631588B (en) * 2013-11-20 2016-10-05 中国电子科技集团公司第四十一研究所 A kind of menu configuration method based on modular instrument
CN103677570B (en) * 2013-12-16 2017-01-04 中国电子科技集团公司第四十一研究所 A kind of intelligent association input method of microwave measuring instrument software
CN104407828B (en) * 2014-10-31 2018-08-24 宁波三星医疗电气股份有限公司 Display control program for electric power acquisition terminal
CN104834374B (en) * 2015-04-30 2017-10-31 中国电子科技集团公司第四十一研究所 A kind of implementation method of universal input edit control suitable for intelligence instrument
CN106909359B (en) * 2015-12-23 2020-04-24 北京谊安医疗系统股份有限公司 Key layering implementation method for graphical interface of anesthesia machine user
CN107748663A (en) * 2017-10-24 2018-03-02 东信和平科技股份有限公司 A kind of development approach, device and the medium of the menu application based on STK
CN109165053B (en) * 2018-08-15 2022-04-01 康美健康云服务有限公司 Application software menu configuration method, mobile terminal and computer readable storage medium
CN110806823A (en) * 2019-10-30 2020-02-18 中电科仪器仪表有限公司 Method and system for dynamically configuring menu of test instrument
CN118572614B (en) * 2024-08-01 2025-01-21 南京国电南自维美德自动化有限公司 A flexible configuration method and system for multi-condition protection software

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1344392A (en) * 1999-03-16 2002-04-10 艾利森电话股份有限公司 Portable communication appts. having hierarchical menu system and dynamic menu
CN101150434A (en) * 2007-10-22 2008-03-26 中兴通讯股份有限公司 An object-oriented function deployment method in network management
CN101833444A (en) * 2010-03-11 2010-09-15 北京数码大方科技有限公司 Method and device for customizing functional menu
CN102291563A (en) * 2011-09-16 2011-12-21 中兴通讯股份有限公司 Dynamic menu interaction method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1344392A (en) * 1999-03-16 2002-04-10 艾利森电话股份有限公司 Portable communication appts. having hierarchical menu system and dynamic menu
CN101150434A (en) * 2007-10-22 2008-03-26 中兴通讯股份有限公司 An object-oriented function deployment method in network management
CN101833444A (en) * 2010-03-11 2010-09-15 北京数码大方科技有限公司 Method and device for customizing functional menu
CN102291563A (en) * 2011-09-16 2011-12-21 中兴通讯股份有限公司 Dynamic menu interaction method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI690890B (en) 2017-09-04 2020-04-11 日商馬可企業股份有限公司 Menu display method, menu display device and menu display program

Also Published As

Publication number Publication date
CN102609252A (en) 2012-07-25

Similar Documents

Publication Publication Date Title
CN102609252B (en) Based on the logic menu resource intelligent configuration method measuring instrument
CN106528129B (en) A kind of Web application interface generation system and method
CN101334728B (en) Interface creating method and platform based on XML document description
CN104731584B (en) A kind of customized configuration design method of Open Architecture CNC System of Display Interface
CN114461200A (en) A low-code development application and method based on cloud SaaS platform
CN103049251B (en) A kind of data base persistence layer device and database operation method
CN102915242A (en) Method for implementing code programming by graphical operations
CN114564199A (en) Method, device and equipment for generating use page and readable storage medium
CN103577191B (en) Configurable instrument menu system
CN102479079A (en) Method and device for generating application
CN107122171A (en) Automatically generate the method and system of data manipulation in operation flow
CN100487652C (en) Automaton method for script language
CN104503769A (en) Character dot matrix liquid crystal interface implementation method based on XML (extensive markup language) configuration file
CN115080016A (en) Method, device, device and medium for implementing extended function based on UE editor
CN103810292A (en) Method and device for configuring graphical interface
CN111880795B (en) A method and device for generating a front-end interface
CN103593188B (en) System and method for managing what-you-see-is-what-you-get menus of instrument
CN103049260A (en) Method and system for displaying user interface of software at client
CN110445644A (en) Method, equipment end and the page management system that the page and CLI command sequence automatic generation method, the page generate
CN116795347B (en) Map-oriented automatic comprehensive graphical programming system and device
CN112306622B (en) Construction method and device of VNF template
CN103530122B (en) Programmable instrument standard command generation method based on graphical interface
CN116107555A (en) GUI model driven low-code platform based on energy industry and use method
CN100474297C (en) Man-machine language generating system and method thereof
CN115964042A (en) Menu generation method and device, storage medium and electronic equipment

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