[go: up one dir, main page]

CN102185601B - Keystroke function realizing method and device for hand-held frequency spectrograph - Google Patents

Keystroke function realizing method and device for hand-held frequency spectrograph Download PDF

Info

Publication number
CN102185601B
CN102185601B CN 201110037366 CN201110037366A CN102185601B CN 102185601 B CN102185601 B CN 102185601B CN 201110037366 CN201110037366 CN 201110037366 CN 201110037366 A CN201110037366 A CN 201110037366A CN 102185601 B CN102185601 B CN 102185601B
Authority
CN
China
Prior art keywords
key
button
function
sub
processing module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN 201110037366
Other languages
Chinese (zh)
Other versions
CN102185601A (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.)
Beijing Aerospace Measurement and Control Technology Co Ltd
Original Assignee
Beijing Aerospace Measurement and Control Technology Co Ltd
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 Beijing Aerospace Measurement and Control Technology Co Ltd filed Critical Beijing Aerospace Measurement and Control Technology Co Ltd
Priority to CN 201110037366 priority Critical patent/CN102185601B/en
Publication of CN102185601A publication Critical patent/CN102185601A/en
Application granted granted Critical
Publication of CN102185601B publication Critical patent/CN102185601B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Input From Keyboards Or The Like (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种手持式频谱仪的按键功能实现方法和装置,用户看到的按键操作面板、主处理模块以及二级处理模块,共同形成自上而下的统一接口消息分发模式。采用本发明的技术方案,在对主功能按键或者子功能选择按键进行功能扩展和按键调整时,只需一次性修改按键信息的各项文本内容,无需作其他修改,可有效减少代码调试和系统调用的工作量,降低对物理内存的需求,不仅可以降低对硬件设计复杂程度和成本的要求,还可提高系统可靠性,利于系统功能调整和扩展。本方法具有较好的可移植性和易于调试的特点,将有效提高频谱仪或具有类似功能仪器的批生产能力。

Figure 201110037366

The invention discloses a key function realization method and device of a hand-held spectrum analyzer. The key operation panel, the main processing module and the secondary processing module seen by the user jointly form a top-down unified interface message distribution mode. By adopting the technical scheme of the present invention, when performing function expansion and button adjustment on the main function button or sub-function selection button, it is only necessary to modify the text content of the button information at one time without making other modifications, which can effectively reduce code debugging and system maintenance. The workload of calling and reducing the demand for physical memory can not only reduce the complexity and cost requirements of hardware design, but also improve system reliability and facilitate system function adjustment and expansion. The method has the characteristics of good portability and easy debugging, and will effectively improve the mass production capacity of spectrum analyzers or instruments with similar functions.

Figure 201110037366

Description

一种手持式频谱仪的按键功能实现方法和装置Method and device for realizing button function of handheld spectrum analyzer

技术领域 technical field

本发明涉及频谱仪技术领域,尤其涉及一种手持式频谱仪的按键功能实现方法和装置。The invention relates to the technical field of spectrum analyzers, in particular to a method and device for realizing key functions of a handheld spectrum analyzer.

背景技术 Background technique

手持式频谱仪具有体积小,按键少,功能多的特点,随着测试要求的增加,手持式频谱仪要处理的软功能呈日益增长的趋势。而手持式频谱仪的物理功能按键一般不超出20个,实际使用的多级菜单下的按键功能已多达近三百个,且尚未包括扩展的测量功能和潜在的应用功能,因此存在多级菜单下按键复用的情况。这对按键的显示、执行和进一步开发提出进更高的要求。使用何种按键功能实现方法,有效简化手持式频谱仪按键功能设计的复杂程度,减小代码调试工作量,减少占用物理内存,提高功能可扩展性,成为了本领域技术人员需解决的重要问题。The hand-held spectrum analyzer has the characteristics of small size, few buttons, and many functions. With the increase of test requirements, the soft functions to be processed by the hand-held spectrum analyzer are showing an increasing trend. However, the physical function keys of the handheld spectrum analyzer generally do not exceed 20, and the actual use of the key functions under the multi-level menu has reached nearly 300, and the expanded measurement functions and potential application functions have not yet been included, so there are multi-level functions. The situation of button reuse under the menu. This places higher demands on the display, execution and further development of the keys. What kind of button function implementation method should be used to effectively simplify the complexity of the handheld spectrum analyzer button function design, reduce the workload of code debugging, reduce the occupation of physical memory, and improve the scalability of functions, which has become an important problem to be solved by those skilled in the art. .

发明内容 Contents of the invention

本发明要解决的技术问题是,提供一种手持式频谱仪的按键功能实现方法和装置,有效简化手持式频谱仪按键功能设计的复杂程度,减小代码调试工作量,减少占用物理内存,提高功能可扩展性。The technical problem to be solved by the present invention is to provide a method and device for realizing the button function of a handheld spectrum analyzer, which can effectively simplify the design complexity of the button function of the handheld spectrum analyzer, reduce the workload of code debugging, reduce the occupation of physical memory, and improve Functional scalability.

本发明采用的技术方案是,所述手持式频谱仪的按键功能实现方法,所述手持式频谱仪按键操作面板上设有主功能按键、子功能选择按键、数字按键和方向导航按键,该方法包括:The technical solution adopted in the present invention is, the button function realization method of the handheld spectrum analyzer, the button operation panel of the handheld spectrum analyzer is provided with main function buttons, sub-function selection buttons, number buttons and direction navigation buttons, the method include:

步骤一、以数据结构的形式建立主功能按键和子功能选择按键的按键信息,保存在二级处理模块中;所述二级处理模块与所述主功能按键一一对应;Step 1, set up the key information of the main function key and the sub-function selection key in the form of a data structure, and store it in the secondary processing module; the secondary processing module corresponds to the main function key one by one;

步骤二,当主功能按键按下时,主处理模块将由所述主功能按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数查找所述主功能按键的按键信息,再根据按键信息执行按键响应;Step 2, when the main function key is pressed, the main processing module passes the key type and parameters analyzed by the key value of the main function key to the secondary processing module corresponding to the main function key, and the secondary processing module according to the key type and parameters to find the key information of the main function key, and then execute the key response according to the key information;

步骤三,在某一主功能按键下,当子功能选择按键按下时,主处理模块将由本步中被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数查找被按下按键的按键信息,再根据按键信息执行按键响应;Step 3, under a certain main function key, when the sub-function selection key is pressed, the main processing module will pass the key type and parameters analyzed from the key value of the pressed key in this step to the corresponding main function key. The second-level processing module, the second-level processing module looks up the key information of the pressed key according to the key type and parameters, and then executes the key response according to the key information;

步骤四,在某一子功能选择按键下,当数字按键或者方向导航按键按下时,主处理模块将由本步中被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数以及所述子功能选择按键的按键信息执行按键响应。Step 4, under a certain sub-function selection button, when a number button or a direction navigation button is pressed, the main processing module will pass the button type and parameters analyzed from the key value of the button pressed in this step to the main function The secondary processing module corresponding to the key, the secondary processing module executes the key response according to the key type and parameters and the key information of the sub-function selection key.

本发明还提出一种手持式频谱仪的按键功能实现装置,所述手持式频谱仪按键操作面板上设有主功能按键、子功能选择按键、数字按键和方向导航按键,其特征在于,该装置包括:The present invention also proposes a device for realizing key functions of a handheld spectrum analyzer. The key operation panel of the handheld spectrum analyzer is provided with a main function button, a sub-function selection button, a number button and a direction navigation button, and the device is characterized in that include:

按键信息建立模块,用于以数据结构的形式建立主功能按键和子功能选择按键的按键信息,保存在二级处理模块中;所述二级处理模块与所述主功能按键一一对应;The key information establishment module is used to establish the key information of the main function key and the sub-function selection key in the form of a data structure, which is stored in the secondary processing module; the secondary processing module is in one-to-one correspondence with the main function key;

主处理模块,用于当主功能按键按下时,将由所述主功能按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块;在某一主功能按键下,当子功能选择按键按下时,将被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块;在某一子功能选择按键下,当数字按键或者方向导航按键按下时,将被按下按键的键值解析出的按键类型和参数传递给与所述子功能选择按键关联的主功能按键对应的二级处理模块;The main processing module is used to pass the key type and parameters analyzed from the key value of the main function key to the secondary processing module corresponding to the main function key when the main function key is pressed; , when the sub-function selection button is pressed, the key type and parameters analyzed by the key value of the pressed button are passed to the secondary processing module corresponding to the main function button; under a certain sub-function selection button, when the number When the key or direction navigation key is pressed, the key type and parameters analyzed from the key value of the pressed key are passed to the secondary processing module corresponding to the main function key associated with the sub-function selection key;

二级处理模块,用于根据主处理模块发来的按键类型和参数以及相关主功能按键或者子功能选择按键的按键信息执行按键响应。The secondary processing module is used to perform key response according to the key type and parameters sent by the main processing module and the key information of the relevant main function key or sub-function selection key.

采用上述技术方案,本发明至少具有下列优点:Adopt above-mentioned technical scheme, the present invention has following advantage at least:

本发明所述手持式频谱仪的按键功能实现方法和装置,用户看到的按键操作面板、主处理模块以及二级处理模块,共同形成自上而下的统一接口消息分发模式。采用本发明的技术方案,在对主功能按键或者子功能选择按键进行功能扩展和按键调整时,只需一次性修改按键信息的各项文本内容,无需作其他修改,可有效减少代码调试和系统调用的工作量,降低对物理内存的需求,不仅可以降低对硬件设计复杂程度和成本的要求,还可提高系统可靠性,利于系统功能调整和扩展。本方法具有较好的可移植性和易于调试的特点,将有效提高频谱仪或具有类似功能仪器的批生产能力。The button function realization method and device of the handheld spectrum analyzer of the present invention, the button operation panel, the main processing module and the secondary processing module seen by the user jointly form a top-down unified interface message distribution mode. By adopting the technical scheme of the present invention, when performing function expansion and button adjustment on the main function button or sub-function selection button, it is only necessary to modify the text content of the button information at one time without making other modifications, which can effectively reduce code debugging and system maintenance. The workload of calling and reducing the demand for physical memory can not only reduce the complexity and cost requirements of hardware design, but also improve system reliability and facilitate system function adjustment and expansion. The method has the characteristics of good portability and easy debugging, and will effectively improve the mass production capacity of spectrum analyzers or instruments with similar functions.

附图说明 Description of drawings

图1为手持式频谱仪物理按键结构示意图;Figure 1 is a schematic diagram of the physical button structure of the handheld spectrum analyzer;

图2为本发明所述手持式频谱仪的按键功能实现装置组成示意图;Fig. 2 is a schematic diagram of the composition of the device for realizing the button function of the handheld spectrum analyzer according to the present invention;

图3为本发明按键自动显示流程图;Fig. 3 is a flow chart of the automatic display of buttons in the present invention;

图4为本发明第一功能实现流程图;Fig. 4 is a flow chart of realizing the first function of the present invention;

图5为用户按下“扫描”主功能按键时的菜单显示情况示意图;Fig. 5 is a schematic diagram of the menu display when the user presses the "scan" main function button;

图6为用户在图5的菜单显示状态时按下第一个子功能选择按键“扫描时间”时的菜单显示情况示意图;Fig. 6 is a schematic diagram of the menu display when the user presses the first sub-function selection button "scanning time" in the menu display state of Fig. 5;

图7为用户在图6的菜单显示状态时按下数值按键“1”时的菜单显示情况示意图;FIG. 7 is a schematic diagram of the menu display when the user presses the numeric key "1" in the menu display state of FIG. 6;

图8为用户在图6的菜单显示状态时按下方向导航右键的菜单显示情况示意图。FIG. 8 is a schematic diagram of the menu display situation when the user presses the right button of the direction navigation in the menu display state of FIG. 6 .

具体实施方式 Detailed ways

为更进一步阐述本发明为达成预定目的所采取的技术手段及功效,以下结合附图及较佳实施例,对本发明进行详细说明如后。In order to further explain the technical means and functions adopted by the present invention to achieve the intended purpose, the present invention will be described in detail below in conjunction with the accompanying drawings and preferred embodiments.

先介绍一下现有的手持式频谱仪物理按键结构,如图1所示,用户使用的按键操作面板上包括10个主功能按键、7个子功能选择按键、数字按键和方向导航按键。其中10个主功能按键包括频标、轨迹、测量、扫描、频率、扫宽、幅度、带宽、预置和系统等。7个子功能选择按键用于各主功能下的子功能选择或者有数字输入情况下的单位选择。方向导航按键用于对按键关联数值进行步进的调整,比如:以方向导航按键的方式,步进的增减数值。Let us first introduce the existing physical button structure of the handheld spectrum analyzer. As shown in Figure 1, the button operation panel used by the user includes 10 main function buttons, 7 sub-function selection buttons, number buttons and direction navigation buttons. The 10 main function keys include frequency marker, trace, measurement, sweep, frequency, span, amplitude, bandwidth, preset and system, etc. The 7 sub-function selection buttons are used for sub-function selection under each main function or unit selection in the case of digital input. The direction navigation button is used to adjust the value associated with the button step by step, for example: increase or decrease the value step by step in the way of the direction navigation button.

本发明第一实施例,一种手持式频谱仪的按键功能实现装置,如图2所示,包括如下组成部分:In the first embodiment of the present invention, a device for implementing button functions of a handheld spectrum analyzer, as shown in Figure 2, includes the following components:

1)按键信息建立模块1) Button information building module

以数据结构的形式为主功能按键和子功能选择按键的建立按键信息,保存在二级处理模块中。二级处理模块与主功能按键一一对应。按键信息包括:按键状态、按键ID标号、按键名称、按键的属性、数值标识、按键关联数值、状态显示标识、状态显示内容、上级菜单入口、本级菜单入口和下级菜单入口。其中,按键ID标号是与每个主功能按键或者子功能选择按键的具体操作对应的编号,不同情况下的子功能选择按键操作对应不同的按键ID标号,比如:在同一主功能按键下,按下不同的子功能选择按键均有不同的按键ID标号;在不同的主功能按键下,按下的相同的子功能选择按键也均有不同的按键ID标号。每个按键ID标号有与之对应的其他按键信息。The establishment key information of the main function key and the sub-function selection key in the form of data structure is stored in the secondary processing module. The secondary processing module is in one-to-one correspondence with the main function keys. The button information includes: button state, button ID label, button name, button attribute, value identifier, button associated value, status display identifier, status display content, upper-level menu entry, current-level menu entry, and lower-level menu entry. Among them, the button ID label is the number corresponding to the specific operation of each main function button or sub-function selection button, and the operation of the sub-function selection button in different situations corresponds to a different button ID number, for example: under the same main function button, press Different sub-function selection keys have different key ID labels; under different main function keys, the same sub-function selection keys also have different key ID labels. Each key ID label has other key information corresponding to it.

按键的属性包括:频率、电平、相对电平、带宽、时间和纯文本显示。由于主功能按键只有唯一的菜单入口,放置在其本级菜单入口项中,按下主功能按键的作用,实际上就是提供了子功能选择按键的按键信息中本级菜单入口。Key properties include: frequency, level, relative level, bandwidth, time and plain text display. Since the main function button has only one menu entry, it is placed in its own menu entry item, and the function of pressing the main function button is actually to provide the current level menu entry in the key information of the sub-function selection button.

2)主处理模块2) Main processing module

当主功能按键按下时,主处理模块将由该主功能按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块。When the main function key is pressed, the main processing module transmits the key type and parameters analyzed from the key value of the main function key to the secondary processing module corresponding to the main function key.

在某一主功能按键下,当子功能选择按键按下时,主处理模块将被按下按键的键值解析出的按键类型和参数传递给该主功能按键对应的二级处理模块。Under a certain main function key, when the sub-function selection key is pressed, the main processing module transmits the key type and parameters analyzed from the key value of the pressed key to the secondary processing module corresponding to the main function key.

在某一子功能选择按键下,当数字按键或者方向导航按键按下时,主处理模块将被按下按键的键值解析出的按键类型和参数传递给与该子功能选择按键关联的主功能按键对应的二级处理模块。Under a certain sub-function selection key, when a number key or direction navigation key is pressed, the main processing module will pass the key type and parameters analyzed from the key value of the pressed key to the main function associated with the sub-function selection key The secondary processing module corresponding to the button.

在本发明中,主处理模块作为与用户界面相连的唯一输入接口,当前按键按下时,硬件驱动将按键的键值以主消息的形式将这一操作传递给主处理模块,主处理模块对按键的键值进行解析,因为主处理模块保存有主功能按键、子功能选择按键、数字按键和方向导航按键与键值的对应关系,比如,主功能按键的键值是1-10,子功能选择按键的键值是11-17,数字按键的键值是18-28,方向导航按键的键值是29-32。当主处理模块从硬件驱动处获取到用户按键操作的键值是11时,根据对应关系就知道是第一个子功能按键被按下了。所以主处理模块通过对按键进行解析能够初步得到按键类型和参数,按键类型包括:菜单显示类型、子功能选择类型、数值输入类型、单位输入类型和导航输入类型,由于子功能选择类型和单位输入类型这两种的按键是复用子功能选择按键来实现的,主处理模块只能初步判断出该按键是子功能选择类型,后续还要由二级处理模块进一步判断该按键是否实际上是单位输入类型。In the present invention, the main processing module is used as the only input interface connected to the user interface. When the current button is pressed, the hardware driver passes the key value of the button to the main processing module in the form of a main message. The key value of the key is analyzed, because the main processing module saves the corresponding relationship between the main function key, sub-function selection key, number key and direction navigation key and key value, for example, the key value of the main function key is 1-10, and the sub-function key The key values of the selection keys are 11-17, the key values of the number keys are 18-28, and the key values of the direction navigation keys are 29-32. When the main processing module obtains from the hardware driver that the key value of the user's key operation is 11, it is known that the first sub-function key is pressed according to the corresponding relationship. Therefore, the main processing module can initially obtain the key types and parameters by analyzing the keys. The key types include: menu display type, sub-function selection type, numerical input type, unit input type, and navigation input type. Due to the sub-function selection type and unit input These two types of keys are realized by multiplexing sub-function selection keys. The main processing module can only initially determine that the key is a sub-function selection type, and the secondary processing module will further determine whether the key is actually a unit. Input type.

参数表示当前按键是某一类型里的第几个按键,比如:键值为11是子功能选择类型的按键里的第一个子功能按键。The parameter indicates that the current key is the number one in a certain type, for example: key value 11 is the first sub-function key in the sub-function selection type of key.

因为按键的键值能反映出具体是哪个主功能按键被按下,而二级处理模块又和主功能按键一一对应,所以主处理模块还要根据当前按键的键值调用相应的二级处理模块,并将该按键类型和参数以二级消息的形式传递给二级处理模块。当数值输入按键被按下时,按键的参数为输入的数值。Because the key value of the key can reflect which main function key is pressed, and the secondary processing module corresponds to the main function key one by one, so the main processing module also calls the corresponding secondary processing according to the key value of the current key module, and pass the key type and parameters to the secondary processing module in the form of a secondary message. When the value input button is pressed, the parameter of the button is the input value.

3)二级处理模块3) Secondary processing module

根据主功能按键的设置,分别建立频标、轨迹、测量、扫描、频率、扫宽、幅度、带宽、预置和系统共10个功能的二级处理模块。二级处理模块可以根据按键类型和参数查找到相关的主功能按键或者子功能选择按键的按键信息。According to the settings of the main function keys, a secondary processing module with 10 functions including frequency standard, trace, measurement, sweep, frequency, span, amplitude, bandwidth, preset and system is respectively established. The secondary processing module can find the key information of the relevant main function key or sub-function selection key according to the key type and parameters.

二级处理模块根据主处理模块发来的按键类型和参数以及相关主功能按键或者子功能选择按键的按键信息执行按键响应。The secondary processing module performs key response according to the key type and parameters sent by the main processing module and the key information of the relevant main function key or sub-function selection key.

每个二级处理模块又进一步包括:Each secondary processing module further includes:

复用按键判断处理模块,用于记录每次按键类型,在当前按键为子功能选择类型时,判断上一次按键是否为数值输入类型,若是,则表明当前按键实际为单位输入类型,调用的单位输入处理模块,否则调用子功能选择处理模块。因为单位输入类型按键是和7个子功能选择按键复用的,其对应的键值也是11-17,所以区分的重点是,上一次是否有数字按键被按下。The multiplex button judgment processing module is used to record the type of each button. When the current button is a sub-function selection type, it is judged whether the last button is a numerical input type. If so, it indicates that the current button is actually a unit input type, and the unit to be called Input the processing module, otherwise call the sub-function selection processing module. Because the unit input type key is multiplexed with 7 sub-function selection keys, and its corresponding key value is also 11-17, so the key point of distinction is whether a number key was pressed last time.

主菜单显示处理模块,与菜单显示类型对应,用于接收用户操作面板上的10个主功能按键的输入,对主功能按键对应的主菜单进行显示。The main menu display processing module corresponds to the menu display type, and is used to receive input from the 10 main function keys on the user operation panel, and display the main menu corresponding to the main function keys.

子功能选择处理模块,与子功能选择类型对应,用于接收用户操作面板上的7个子功能选择按键的输入,确定并显示当前子功能选择按键对应的菜单。The sub-function selection processing module corresponds to the type of sub-function selection, and is used to receive input from the seven sub-function selection keys on the user operation panel, determine and display the menu corresponding to the current sub-function selection key.

数值输入处理模块,与数值输入类型对应,用于接收数字按键的输入,在与数字按键关联的子功能选择按键的数值标识有效的情况下,保存输入的数值并显示供选择的数值单位。The numerical input processing module corresponds to the numerical input type, and is used to receive the input of the numerical key. When the numerical identification of the sub-function selection key associated with the numerical key is valid, the input numerical value is saved and the numerical unit for selection is displayed.

单位输入处理模块,与单位输入类型对应,用于接收子功能选择按键的输入,在其数值标识有效的情况下,根据主处理模块发送来的按键类型和参数确定数值单位,基于数值输入时保存的数值更新其所在按键的按键关联数值并显示。例如:处于频率菜单时,用户通过数值输入处理模块写入了数值10,然后从可供选择的数值单位中选择kHz,那么后台将按键关联数值更新为10000Hz,使之前输入的数值有了物理含义。The unit input processing module corresponds to the unit input type, and is used to receive the input of the sub-function selection button. If the value identifier is valid, determine the value unit according to the key type and parameters sent by the main processing module, and save it based on the value input The corresponding value of the button is updated and displayed. For example: when in the frequency menu, the user writes the value 10 through the numerical input processing module, and then selects kHz from the available numerical units, then the background will update the value associated with the key to 10000Hz, so that the previously entered value has a physical meaning .

导航输入处理模块,与导航输入类型对应,用于接收方向导航按键的输入,在与所述方向导航按键关联的子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的方向导航按键的按键类型和参数确定数值调整方式,更新所述子功能选择按键的按键关联数值。例如:与所述方向导航按键关联的子功能选择按键的按键关联数值原本为10,预先设置的方向导航按键的步进值为1,通过方向导航按键可进行步进为1的递增,那么按下方向导航右键时,后台将按键关联数值更新为11。The navigation input processing module corresponds to the navigation input type, and is used to receive the input of the direction navigation button. The key type and parameters of the key determine the value adjustment mode, and the key-associated value of the sub-function selection key is updated. For example: the key-associated value of the sub-function selection button associated with the direction navigation button is originally 10, and the step value of the preset direction navigation button is 1, and the step of 1 can be incremented by the direction navigation button, then press When the right button is used for down navigation, the background will update the value associated with the button to 11.

本发明的第二实施例,一种手持式频谱仪的按键功能实现方法,手持式频谱仪按键操作面板上设有主功能按键、子功能选择按键、数字按键和方向导航按键,具体包括如下步骤:The second embodiment of the present invention is a method for realizing the button function of a handheld spectrum analyzer. The button operation panel of the handheld spectrum analyzer is provided with a main function button, a sub-function selection button, a number button and a direction navigation button, which specifically includes the following steps :

步骤一、以数据结构的形式建立主功能按键和子功能选择按键的按键信息,保存在二级处理模块中。Step 1: Establish the key information of the main function key and the sub-function selection key in the form of a data structure, and store them in the secondary processing module.

按键信息包括:按键状态、按键ID标号、按键名称、按键的属性、数值标识、按键关联数值、状态显示标识、状态显示内容、上级菜单入口、本级菜单入口和下级菜单入口。按键的属性包括:频率、电平、相对电平、带宽、时间和纯文本显示。手持式频谱仪按键操作面板上的主功能按键分别对应该主功能按键的二级处理模块。The button information includes: button state, button ID label, button name, button attribute, value identifier, button associated value, status display identifier, status display content, upper-level menu entry, current-level menu entry, and lower-level menu entry. Key properties include: frequency, level, relative level, bandwidth, time and plain text display. The main function keys on the key operation panel of the handheld spectrum analyzer respectively correspond to the secondary processing modules of the main function keys.

步骤二、当主功能按键按下时,主处理模块将由所述主功能按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数查找所述主功能按键的按键信息,再根据按键信息执行按键响应。Step 2, when the main function key is pressed, the main processing module will pass the key type and parameters analyzed by the key value of the main function key to the secondary processing module corresponding to the main function key, and the secondary processing module will and parameters to find the key information of the main function key, and then execute the key response according to the key information.

按键类型包括:菜单显示类型、子功能选择类型、数值输入类型、单位输入类型和导航输入类型,参数表示当前按键是某一类型里的第几个按键,比如:键值为11是子功能选择类型的按键里的第一个子功能按键。当数值输入按键被按下时,按键的参数为输入的数值。Key types include: menu display type, sub-function selection type, numerical input type, unit input type and navigation input type. The parameter indicates the number of the current key in a certain type, for example: key value 11 is sub-function selection The first sub-function button in the type button. When the value input button is pressed, the parameter of the button is the input value.

二级处理模块根据所述主功能按键的按键信息执行按键响应,具体过程包括:根据主功能按键的本级菜单入口,依次对所有子功能选择按键执行按键自动显示流程。The secondary processing module executes the key response according to the key information of the main function key, and the specific process includes: according to the current-level menu entry of the main function key, executes the key automatic display process for all sub-function selection keys in turn.

按键自动显示流程,如图3所示,包括:Press the button to automatically display the process, as shown in Figure 3, including:

步骤A1,判断按键状态是否有效,若是,则跳转步骤A2,否则设置所述按键的显示内容为空,流程结束;Step A1, judging whether the state of the button is valid, if so, jump to step A2, otherwise set the display content of the button to be empty, and the process ends;

步骤A2,判断状态显示标识是否有效,若是,则显示状态显示内容,跳转步骤A3,否则直接跳转步骤A3;Step A2, judging whether the status display flag is valid, if so, display the content of the status display, and skip to step A3, otherwise directly skip to step A3;

步骤A3,判断数值标识是否有效,若是,跳转步骤A4,否则显示按键名称;Step A3, judge whether the value identifier is valid, if so, skip to step A4, otherwise display the key name;

步骤A4,根据按键的属性对按键关联数值进行显示,并显示按键名称。Step A4, display the value associated with the button according to the attribute of the button, and display the name of the button.

步骤三,在某一主功能按键下,当子功能选择按键按下时,主处理模块将由本步中被按下按键的键值解析出的按键类型和参数传递给主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数查找被按下按键的按键信息,再根据按键信息执行按键响应;Step 3: Under a certain main function key, when the sub-function selection key is pressed, the main processing module will pass the key type and parameters analyzed from the key value of the pressed key in this step to the secondary function key corresponding to the main function key. The processing module, the secondary processing module finds the key information of the pressed key according to the key type and parameters, and then executes the key response according to the key information;

二级处理模块执行按键响应的过程,依次包括:复用功能判断流程,第一功能实现流程,以及根据记录的菜单入口依次对所有子功能选择按键执行按键自动显示流程,其中:The secondary processing module executes the key response process, which sequentially includes: the multiplexing function judgment process, the first function realization process, and the key automatic display process for all sub-function selection keys in turn according to the recorded menu entry, wherein:

复用功能判断流程,具体包括:The multiplexing function judgment process includes:

判断上一次按键是否为数值输入类型,若是,则根据单位输入类型和按下的子功能选择按键的按键信息执行按键响应,否则跳转第一功能实现流程;Determine whether the last key press is a numerical input type, if so, then execute the key response according to the key information of the unit input type and the pressed sub-function selection key, otherwise jump to the first function realization process;

进一步的,根据单位输入类型和按下的子功能选择按键的按键信息执行按键响应的过程,依次包括:第二功能实现流程和按键自动显示流程;Further, the process of executing the key response according to the unit input type and the key information of the pressed sub-function selection key includes: the second function realization process and the key automatic display process;

第二功能实现流程具体包括:在步骤三中按下的子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的按键类型和参数确定数值单位,基于数值输入时保存的数值更新其所在按键的按键关联数值。The second function implementation process specifically includes: in the case that the value identification of the sub-function selection button pressed in step 3 is valid, determine the value unit according to the key type and parameters sent by the main processing module, and update the value based on the value saved when the value is entered The key-associated value of the key it is on.

进一步的,第一功能实现流程具体包括:Further, the first function realization process specifically includes:

步骤B1,记录按下的所述子功能选择按键的按键ID标号;Step B1, recording the button ID label of the pressed sub-function selection button;

步骤B2,判断按下的所述子功能选择按键的状态显示标识是否有效,若是,则根据所述按键ID标号更新状态显示内容,跳转步骤B3,否则直接跳转步骤B3;Step B2, judging whether the state display flag of the pressed sub-function selection button is valid, if so, updating the state display content according to the ID label of the button, and jumping to step B3, otherwise directly jumping to step B3;

步骤B3,判断按下的所述子功能选择按键的数值标识是否有效,若是,则维持按键ID标号的记录不变,记录本级菜单入口,本流程结束,否则跳转步骤B4;Step B3, judging whether the value identification of the pressed sub-function selection button is valid, if so, keep the record of the button ID label unchanged, record the menu entry of the current level, and the process ends, otherwise jump to step B4;

步骤B4,判断按下的所述子功能选择按键的下级菜单入口是否有效,若是,则记录下级菜单入口,并记录所述子功能选择按键在下级菜单中的按键ID标号,流程结束,否则跳转步骤B5;Step B4, judge whether the lower-level menu entry of the pressed sub-function selection button is valid, if so, record the lower-level menu entry, and record the key ID label of the sub-function selection button in the lower-level menu, the process ends, otherwise skip Go to step B5;

步骤B5,判断按下的所述子功能选择按键的上级菜单入口是否有效,若是,则记录上级菜单入口,并记录所述子功能选择按键在上级菜单中的按键ID标号,否则维持按键ID标号的记录不变,记录本级菜单入口的内容。Step B5, judging whether the upper menu entry of the pressed sub-function selection button is valid, if so, recording the upper-level menu entry, and recording the key ID label of the sub-function selection button in the upper menu, otherwise maintaining the button ID label The record of the menu remains unchanged, and the content of the menu entry of this level is recorded.

步骤四,在某一子功能选择按键下,当数字按键或者方向导航按键按下时,主处理模块将由本步中被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数以及当前子功能选择按键的按键信息执行按键响应。Step 4, under a certain sub-function selection button, when a number button or a direction navigation button is pressed, the main processing module will pass the button type and parameters analyzed from the key value of the button pressed in this step to the main function The secondary processing module corresponding to the key, the secondary processing module executes the key response according to the key type and parameters and the key information of the current sub-function selection key.

1)当数字按键按下时,二级处理模块根据按键类型和参数以及当前子功能选择按键的按键信息执行按键响应的过程包括:数值保存流程,该流程包括:1) When the number key is pressed, the secondary processing module executes the key response process according to the key type and parameters and the key information of the current sub-function selection key, including: the value saving process, which includes:

在步骤四中当前子功能选择按键的数值标识有效的情况下,保存通过数字按键输入的数值并根据当前子功能选择按键的属性,显示供选择的数值单位。具体可以通过按键显示流程显示按键名称的方式将数值单位依次显示在子功能选择按键上。In step 4, if the value identification of the current sub-function selection key is valid, save the value input through the number keys and display the numerical unit for selection according to the attribute of the current sub-function selection key. Specifically, the numerical units may be sequentially displayed on the sub-function selection buttons in the manner of displaying the names of the buttons through the button display process.

2)当方向导航按键按下时,二级处理模块根据按键类型和参数以及所述子功能选择按键的按键信息执行按键响应,依次包括:第三功能实现流程和按键自动显示流程,其中:2) When the direction navigation button is pressed, the secondary processing module executes the button response according to the button type and parameters and the button information of the sub-function selection button, including: the third function realization process and the button automatic display process, wherein:

第三功能实现流程具体包括:在步骤四中当前子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的方向导航按键的按键类型和参数确定数值调整方式,更新当前子功能选择按键的按键关联数值。The third function implementation process specifically includes: in step 4, when the numerical value identification of the current sub-function selection key is valid, determine the value adjustment method according to the key type and parameters of the direction navigation key sent by the main processing module, and update the current sub-function selection The key-associated value of the key.

本发明基于手持式频谱仪结构,提出一种和按键功能属性相对应的数据分类方法,并形成自上而下的统一接口消息分发模式。采用该种方法,可以在构建新的主功能按键时,遵循统一的按键信息文本初始化方法,简单明了,使按键菜单对硬件的存储要求降到最低;在对主功能按键或者子功能选择按键进行功能扩展或按键调整需求时,只需修改按键信息文本的初始化内容,无需作其他修改;从顶层应用者而言,简化了按键间复杂的逻辑关系,调用接口简单。达到提高系统可靠性,减少了代码量和调试工作量的目的。其基于c语言的编码具有更高的可移植性,可以很好的在多种开发平台中被应用。Based on the structure of the hand-held spectrum analyzer, the present invention proposes a data classification method corresponding to the function attributes of keys, and forms a top-down unified interface message distribution mode. With this method, when constructing a new main function button, a unified button information text initialization method can be followed, which is simple and clear, and the storage requirements for the hardware of the button menu are minimized; When function expansion or button adjustment is required, only the initialization content of the button information text needs to be modified, and no other modification is required; from the perspective of the top-level application, the complex logical relationship between buttons is simplified, and the calling interface is simple. To achieve the purpose of improving system reliability and reducing the amount of code and debugging workload. Its coding based on c language has higher portability and can be well applied in various development platforms.

下面以“扫描”主功能按键按下后的响应以及该主菜单下部分子功能选择按键的响应为例,介绍一下本申请的实现效果:Let’s take the response after pressing the main function button of “Scan” and the response of some sub-function selection buttons under the main menu as an example to introduce the implementation effect of this application:

设“扫描”主功能按键提供的唯一的菜单入口为sweep1,作为所有子功能选择按键的本级菜单入口,该主菜单下的第一子功能选择按键为“扫描时间”按键,频谱仪开机初始化时会默认显示频率主菜单。Assume that the only menu entry provided by the "sweep" main function button is sweep1, which is used as the menu entry of all sub-function selection buttons at this level. The first sub-function selection button under the main menu is the "sweep time" button, and the spectrum analyzer is initialized when it is turned on. The frequency main menu is displayed by default.

操作1:用户按下“扫描”主功能按键Operation 1: The user presses the "Scan" main function button

二级处理模块执行主菜单显示分支,则本级菜单入口为sweep1,调用按键自动显示流程后,左边一列7个子功能选择按键显示菜单入口为sweep1的本级菜单,因为可以通过最下面一个子功能选择按键对菜单进行翻页,右边一列是7个子功能选择按键的下级菜单入口显示的内容,如图5所示。若后续通过按下最下面一个子功能选择按键进行翻页后,对于右边一列来说,当前状态就是本级菜单入口显示的内容,而左边一列则是上级菜单入口显示的内容。The secondary processing module executes the main menu display branch, so the menu entry of this level is sweep1. After calling the key to automatically display the process, the 7 sub-function selection buttons on the left column display the menu entry of the current level menu of sweep1, because you can use the bottom sub-function Select the button to turn the page of the menu, and the column on the right is the content displayed at the lower-level menu entry of the 7 sub-function selection buttons, as shown in Figure 5. If the next page is turned by pressing the bottom sub-function selection button, for the right column, the current state is the content displayed at the current level menu entry, while the left column is the content displayed at the upper level menu entry.

操作2:用户按下第一个子功能选择按键“扫描时间”Operation 2: The user presses the first sub-function selection button "Scan Time"

二级处理模块执行子功能选择分支,“扫描时间”按键的按键ID标号为当前按键ID标号,状态显示内容由“自动*  手动”切换为“自动  手动*”,菜单入口仍为sweep1,执行按键自动显示流程后,则菜单显示情况如图6所示,当按下该按键时,状态显示内容发生了改变。The second-level processing module executes the sub-function selection branch, the button ID label of the "sweep time" button is the current button ID label, the status display content is switched from "automatic * manual" to "automatic manual *", the menu entry is still sweep1, execute the button After the process is automatically displayed, the menu display is shown in Figure 6. When the button is pressed, the status display content changes.

操作3:如果用户在操作2之后按下数值按键“1”Operation 3: If the user presses the numeric key "1" after operation 2

二级处理模块执行数值输入分支,保存并在界面显示数值“1”,则七个子功能选择按键显示为供选择的数值单位,如图7所示。The secondary processing module executes the numerical input branch, saves and displays the numerical value "1" on the interface, and then the seven sub-function selection buttons are displayed as numerical units for selection, as shown in Figure 7.

操作4:如果用户在操作3的基础上,按下第二个子功能选择按键Operation 4: If the user presses the second sub-function selection button on the basis of operation 3

二级处理模块执行单位输入分支,则表示选择了第二个单位“ms”,结合之前的保存数值,则“扫描时间”的按键关联数值被更新为1ms,后台保存为0.001s,扫描时间数值被更新。同时菜单入口为仍sweep1,执行按键自动显示流程后,则菜单显示情况与图6大致相同,只是将第一子功能选择按键的按键关联数值4ms改为1ms显示出来了。The second-level processing module executes the unit input branch, which means that the second unit "ms" is selected. Combined with the previously saved value, the associated value of the "scanning time" key is updated to 1ms, and the background saves it as 0.001s. The scanning time value Updated. At the same time, the menu entry is still sweep1, and after the automatic key display process is executed, the menu display is roughly the same as that in Figure 6, except that the key-associated value of the first sub-function selection key is changed from 4ms to 1ms and displayed.

操作5:如果用户在操作2之后紧接着按下方向导航(右)按键Operation 5: If the user presses the direction navigation (right) button immediately after operation 2

二级处理模块执行导航输入分支,由功能代码编写人员根据需求定义,假设扫描时间的步进值为1ms,则“扫描时间”的按键关联数值被更新为5ms,后台保存为0.005s,扫描时间数值被更新。同时菜单入口仍为sweep1,执行按键自动显示流程后,则菜单显示如图8所示。The secondary processing module executes the navigation input branch, which is defined by the function code writer according to the requirements. Assuming that the step value of the scan time is 1ms, the value associated with the key of the "scan time" is updated to 5ms, and the value saved in the background is 0.005s. The value is updated. At the same time, the menu entry is still sweep1, and after the automatic display process is executed by pressing the button, the menu display is shown in Figure 8.

通过具体实施方式的说明,应当可对本发明为达成预定目的所采取的技术手段及功效得以更加深入且具体的了解,然而所附图示仅是提供参考与说明之用,并非用来对本发明加以限制。Through the description of the specific implementation, it should be possible to gain a deeper and more specific understanding of the technical means and effects of the present invention to achieve the intended purpose. However, the attached drawings are only for reference and description, and are not used to explain the present invention. limit.

Claims (9)

1.一种手持式频谱仪的按键功能实现方法,所述手持式频谱仪按键操作面板上设有主功能按键、子功能选择按键、数字按键和方向导航按键,其特征在于,包括:1. a button function realization method of a handheld spectrum analyzer, said handheld spectrum analyzer button operation panel is provided with a main function button, a sub-function selection button, a number button and a direction navigation button, it is characterized in that, comprising: 步骤一、以数据结构的形式建立主功能按键和子功能选择按键的按键信息,保存在二级处理模块中;所述二级处理模块与所述主功能按键一一对应;Step 1, set up the key information of the main function key and the sub-function selection key in the form of a data structure, and store it in the secondary processing module; the secondary processing module corresponds to the main function key one by one; 步骤二,当主功能按键按下时,主处理模块将由所述主功能按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数查找所述主功能按键的按键信息,再根据按键信息执行按键响应;Step 2, when the main function key is pressed, the main processing module passes the key type and parameters analyzed by the key value of the main function key to the secondary processing module corresponding to the main function key, and the secondary processing module according to the key type and parameters to find the key information of the main function key, and then execute the key response according to the key information; 步骤三,在某一主功能按键下,当子功能选择按键按下时,主处理模块将由本步中被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数查找被按下按键的按键信息,再根据按键信息执行按键响应;Step 3, under a certain main function key, when the sub-function selection key is pressed, the main processing module will pass the key type and parameters analyzed from the key value of the pressed key in this step to the corresponding main function key. The second-level processing module, the second-level processing module looks up the key information of the pressed key according to the key type and parameters, and then executes the key response according to the key information; 步骤四,在某一子功能选择按键下,当数字按键或者方向导航按键按下时,主处理模块将由本步中被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块,二级处理模块根据按键类型和参数以及所述子功能选择按键的按键信息执行按键响应;Step 4, under a certain sub-function selection button, when a number button or a direction navigation button is pressed, the main processing module will pass the button type and parameters analyzed from the key value of the button pressed in this step to the main function A secondary processing module corresponding to the key, the secondary processing module executes a key response according to the key type and parameters and the key information of the sub-function selection key; 所述二级处理模块进一步包括:The secondary processing module further includes: 复用按键判断处理模块,用于记录每次按键类型,在当前按键为子功能选择类型时,判断上一次按键是否为数值输入类型,若是,则表明当前按键为单位输入类型,调用的单位输入处理模块,否则调用子功能选择处理模块;The multiplex button judgment processing module is used to record the type of each button. When the current button is a sub-function selection type, it is judged whether the last button is a numerical input type. processing module, otherwise call the sub-function selection processing module; 主菜单显示处理模块,与菜单显示类型对应,用于接收主功能按键的输入,对主功能按键对应的主菜单进行显示;The main menu display processing module corresponds to the menu display type, and is used to receive the input of the main function key and display the main menu corresponding to the main function key; 子功能选择处理模块,与子功能选择类型对应,用于接收子功能选择按键的输入,确定并显示当前子功能按键对应的菜单;The sub-function selection processing module corresponds to the sub-function selection type, and is used to receive the input of the sub-function selection key, determine and display the menu corresponding to the current sub-function key; 数值输入处理模块,与数值输入类型对应,用于接收数字按键的输入,在与数字按键关联的子功能选择按键的数值标识有效的情况下,保存输入的数值并显示供选择的数值单位;The numerical input processing module corresponds to the numerical input type, and is used to receive the input of the numerical key, and when the numerical identification of the sub-function selection key associated with the numerical key is valid, save the input numerical value and display the numerical unit for selection; 单位输入处理模块,与单位输入类型对应,用于接收子功能选择按键的输入,在其数值标识有效的情况下,根据主处理模块发送来的按键类型和参数确定数值单位,基于数值输入时保存的数值更新其所在按键的按键关联数值并显示;The unit input processing module corresponds to the unit input type, and is used to receive the input of the sub-function selection button. If the value identifier is valid, determine the value unit according to the key type and parameters sent by the main processing module, and save it based on the value input Update the value associated with the button where it is located and display it; 导航输入处理模块,与导航输入类型对应,用于接收方向导航按键的输入,在与所述方向导航按键关联的子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的方向导航按键的按键类型和参数确定数值调整方式,更新所述子功能选择按键的按键关联数值。The navigation input processing module corresponds to the navigation input type, and is used to receive the input of the direction navigation button. The key type and parameters of the key determine the value adjustment mode, and the key-associated value of the sub-function selection key is updated. 2.根据权利要求1所述手持式频谱仪的按键功能实现方法,其特征在于,2. according to the button function realization method of the said handheld spectrum analyzer of claim 1, it is characterized in that, 所述按键信息包括:按键状态、按键ID标号、按键名称、按键的属性、数值标识、按键关联数值、状态显示标识、状态显示内容、上级菜单入口、本级菜单入口和下级菜单入口,所述按键的属性包括:频率、电平、相对电平、带宽、时间和纯文本显示;The button information includes: button state, button ID label, button name, button attribute, value identifier, button associated value, status display identifier, status display content, upper-level menu entry, current-level menu entry, and lower-level menu entry. The properties of the key include: frequency, level, relative level, bandwidth, time and plain text display; 所述按键类型包括:主菜单显示类型、子功能选择类型、数值输入类型、单位输入类型和导航输入类型。The key types include: main menu display type, sub-function selection type, numerical input type, unit input type and navigation input type. 3.根据权利要求2所述手持式频谱仪的按键功能实现方法,其特征在于,步骤二中,当主功能按键按下时,二级处理模块根据所述主功能按键的按键信息执行按键响应,具体过程包括:根据主功能按键的本级菜单入口,依次对所有子功能选择按键执行按键自动显示流程;3. The key function realization method of the handheld spectrum analyzer according to claim 2, wherein in step 2, when the main function key is pressed, the secondary processing module executes the key response according to the key information of the main function key, The specific process includes: according to the menu entry of the main function key, execute the key automatic display process for all sub-function selection keys in turn; 按键自动显示流程,包括:Press the key to automatically display the process, including: 步骤A1,判断按键状态是否有效,若是,则跳转步骤A2,否则设置所述按键的显示内容为空,流程结束;Step A1, judging whether the state of the button is valid, if so, jump to step A2, otherwise set the display content of the button to be empty, and the process ends; 步骤A2,判断状态显示标识是否有效,若是,则显示状态显示内容,跳转步骤A3,否则直接跳转步骤A3;Step A2, judging whether the status display flag is valid, if so, display the content of the status display, and skip to step A3, otherwise directly skip to step A3; 步骤A3,判断数值标识是否有效,若是,跳转步骤A4,否则显示按键名称;Step A3, judge whether the value identifier is valid, if so, skip to step A4, otherwise display the key name; 步骤A4,根据按键的属性对按键关联数值进行显示,并显示按键名称。Step A4, display the value associated with the button according to the attribute of the button, and display the name of the button. 4.根据权利要求2所述手持式频谱仪的按键功能实现方法,其特征在于,步骤三中,当子功能选择按键按下时,二级处理模块根据所述子功能选择类型和所述子功能选择按键的按键信息执行按键响应的过程,依次包括:复用功能判断流程,第一功能实现流程,以及根据记录的菜单入口依次对所有子功能选择按键执行按键自动显示流程;4. according to the button function realization method of the described handheld spectrum analyzer of claim 2, it is characterized in that, in step 3, when the sub-function selection button is pressed, the secondary processing module selects the type and the sub-function according to the sub-function The process of executing the key response of the key information of the function selection key includes in turn: the multiplexing function judgment process, the first function realization process, and the key automatic display process for all sub-function selection keys in turn according to the recorded menu entry; 所述复用功能判断流程,具体包括:The multiplexing function judgment process specifically includes: 判断上一次按键是否为数值输入类型,若是,则根据单位输入类型和所述子功能选择按键的按键信息执行按键响应,否则跳转第一功能实现流程;Judging whether the last key is of the numerical input type, if so, then execute the key response according to the unit input type and the key information of the sub-function selection key, otherwise jump to the first function realization process; 所述第一功能实现流程具体包括:The first function realization process specifically includes: 步骤B1,记录按下的所述子功能选择按键的按键ID标号;Step B1, recording the button ID label of the pressed sub-function selection button; 步骤B2,判断按下的所述子功能选择按键的状态显示标识是否有效,若是,则根据所述按键ID标号更新状态显示内容,跳转步骤B3,否则直接跳转步骤B3;Step B2, judging whether the state display flag of the pressed sub-function selection button is valid, if so, updating the state display content according to the ID label of the button, and jumping to step B3, otherwise directly jumping to step B3; 步骤B3,判断按下的所述子功能选择按键的数值标识是否有效,若是,则维持按键ID标号的记录不变,记录本级菜单入口,本流程结束,否则跳转步骤B4;Step B3, judging whether the value identification of the pressed sub-function selection button is valid, if so, keep the record of the button ID label unchanged, record the menu entry of the current level, and the process ends, otherwise jump to step B4; 步骤B4,判断按下的所述子功能选择按键的下级菜单入口是否有效,若是,则记录下级菜单入口,并记录所述子功能选择按键在下级菜单中的按键ID标号,流程结束,否则跳转步骤B5;Step B4, judge whether the lower-level menu entry of the pressed sub-function selection button is valid, if so, record the lower-level menu entry, and record the key ID label of the sub-function selection button in the lower-level menu, the process ends, otherwise skip Go to step B5; 步骤B5,判断按下的所述子功能选择按键的上级菜单入口是否有效,若是,则记录上级菜单入口,并记录所述子功能选择按键在上级菜单中的按键ID标号,否则维持按键ID标号的记录不变,记录本级菜单入口的内容。Step B5, judging whether the upper menu entry of the pressed sub-function selection button is valid, if so, recording the upper-level menu entry, and recording the key ID label of the sub-function selection button in the upper menu, otherwise maintaining the button ID label The record of the menu remains unchanged, and the content of the menu entry of this level is recorded. 5.根据权利要求4所述手持式频谱仪的按键功能实现方法,其特征在于,根据单位输入类型和所述子功能选择按键的按键信息执行按键响应的过程,依次包括:第二功能实现流程和按键自动显示流程;5. The key function realization method of the handheld spectrum analyzer according to claim 4, characterized in that, according to the unit input type and the key information of the sub-function selection key, the process of performing the key response comprises in turn: the second function realization process and keys to automatically display the process; 所述第二功能实现流程具体包括:在步骤三中所述子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的按键类型和参数确定数值单位,基于数值输入时保存的数值更新其所在按键的按键关联数值。The implementation process of the second function specifically includes: in the case that the numerical identification of the sub-function selection key described in step 3 is valid, determine the numerical unit according to the key type and parameters sent by the main processing module, and determine the numerical unit based on the numerical value saved when the numerical value is entered. Update the key-associated value of the key it is on. 6.根据权利要求2或3或4或5所述手持式频谱仪的按键功能实现方法,其特征在于,步骤四中,当数字按键按下时,二级处理模块根据按键类型和参数以及所述子功能选择按键的按键信息执行按键响应的过程包括:数值保存流程,该流程包括:6. according to claim 2 or 3 or 4 or 5 described hand-held spectrum analyzer button function realization method, it is characterized in that, in step 4, when digital button is pressed, secondary processing module according to button type and parameter and the The process of executing the key response of the key information of the sub-function selection key includes: the process of saving the value, which includes: 在步骤四中所述子功能选择按键的数值标识有效的情况下,保存通过数字按键输入的数值并根据所述子功能选择按键的属性,显示供选择的数值单位。In step 4, if the numerical value identification of the sub-function selection key is valid, save the value input through the number key and display the numerical unit for selection according to the attribute of the sub-function selection key. 7.根据权利要求2或3或4或5所述手持式频谱仪的按键功能实现方法,其特征在于,步骤四中,当方向导航按键按下时,二级处理模块根据按键类型和参数以及所述子功能选择按键的按键信息执行按键响应,依次包括:第三功能实现流程和按键自动显示流程;7. The key function realization method of the handheld spectrum analyzer according to claim 2 or 3 or 4 or 5, characterized in that, in step 4, when the direction navigation key is pressed, the secondary processing module according to the key type and parameters and The key information of the sub-function selection key executes the key response, which includes in turn: the third function realization process and the key automatic display process; 所述第三功能实现流程具体包括:在步骤四中所述子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的方向导航按键的按键类型和参数确定数值调整方式,更新所述子功能选择按键的按键关联数值。The third function realization process specifically includes: when the numerical value identification of the sub-function selection key described in step 4 is valid, determine the numerical adjustment mode according to the key type and parameters of the direction navigation key sent by the main processing module, and update the Describe the key-associated value of the sub-function selection key. 8.一种手持式频谱仪的按键功能实现装置,所述手持式频谱仪按键操作面板上设有主功能按键、子功能选择按键、数字按键和方向导航按键,其特征在于,该装置包括:8. A device for realizing button functions of a handheld spectrum analyzer, the button operation panel of the handheld spectrum analyzer is provided with a main function button, a sub-function selection button, a number button and a direction navigation button, and it is characterized in that the device includes: 按键信息建立模块,用于以数据结构的形式建立主功能按键和子功能选择按键的按键信息,保存在二级处理模块中;所述二级处理模块与所述主功能按键一一对应;The key information establishment module is used to establish the key information of the main function key and the sub-function selection key in the form of a data structure, which is stored in the secondary processing module; the secondary processing module is in one-to-one correspondence with the main function key; 主处理模块,用于当主功能按键按下时,将由所述主功能按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块;在某一主功能按键下,当子功能选择按键按下时,将被按下按键的键值解析出的按键类型和参数传递给所述主功能按键对应的二级处理模块;在某一子功能选择按键下,当数字按键或者方向导航按键按下时,将被按下按键的键值解析出的按键类型和参数传递给与所述子功能选择按键关联的主功能按键对应的二级处理模块;The main processing module is used to pass the key type and parameters analyzed from the key value of the main function key to the secondary processing module corresponding to the main function key when the main function key is pressed; , when the sub-function selection button is pressed, the key type and parameters analyzed by the key value of the pressed button are passed to the secondary processing module corresponding to the main function button; under a certain sub-function selection button, when the number When the key or direction navigation key is pressed, the key type and parameters analyzed from the key value of the pressed key are passed to the secondary processing module corresponding to the main function key associated with the sub-function selection key; 二级处理模块,用于根据主处理模块发来的按键类型和参数以及相关主功能按键或者子功能选择按键的按键信息执行按键响应;The secondary processing module is used to perform key response according to the key type and parameters sent by the main processing module and the key information of the relevant main function key or sub-function selection key; 所述二级处理模块进一步包括:The secondary processing module further includes: 复用按键判断处理模块,用于记录每次按键类型,在当前按键为子功能选择类型时,判断上一次按键是否为数值输入类型,若是,则表明当前按键为单位输入类型,调用的单位输入处理模块,否则调用子功能选择处理模块;The multiplex button judgment processing module is used to record the type of each button. When the current button is a sub-function selection type, it is judged whether the last button is a numerical input type. processing module, otherwise call the sub-function selection processing module; 主菜单显示处理模块,与菜单显示类型对应,用于接收主功能按键的输入,对主功能按键对应的主菜单进行显示;The main menu display processing module corresponds to the menu display type, and is used to receive the input of the main function key and display the main menu corresponding to the main function key; 子功能选择处理模块,与子功能选择类型对应,用于接收子功能选择按键的输入,确定并显示当前子功能按键对应的菜单;The sub-function selection processing module corresponds to the sub-function selection type, and is used to receive the input of the sub-function selection key, determine and display the menu corresponding to the current sub-function key; 数值输入处理模块,与数值输入类型对应,用于接收数字按键的输入,在与数字按键关联的子功能选择按键的数值标识有效的情况下,保存输入的数值并显示供选择的数值单位;The numerical input processing module corresponds to the numerical input type, and is used to receive the input of the numerical key, and when the numerical identification of the sub-function selection key associated with the numerical key is valid, save the input numerical value and display the numerical unit for selection; 单位输入处理模块,与单位输入类型对应,用于接收子功能选择按键的输入,在其数值标识有效的情况下,根据主处理模块发送来的按键类型和参数确定数值单位,基于数值输入时保存的数值更新其所在按键的按键关联数值并显示;The unit input processing module corresponds to the unit input type, and is used to receive the input of the sub-function selection button. If the value identifier is valid, determine the value unit according to the key type and parameters sent by the main processing module, and save it based on the value input Update the value associated with the button where it is located and display it; 导航输入处理模块,与导航输入类型对应,用于接收方向导航按键的输入,在与所述方向导航按键关联的子功能选择按键的数值标识有效的情况下,根据主处理模块发送来的方向导航按键的按键类型和参数确定数值调整方式,更新所述子功能选择按键的按键关联数值。The navigation input processing module corresponds to the navigation input type, and is used to receive the input of the direction navigation button. The key type and parameters of the key determine the value adjustment mode, and the key-associated value of the sub-function selection key is updated. 9.根据权利要求8所述手持式频谱仪的按键功能实现装置,其特征在于,9. The device for realizing the button function of the handheld spectrum analyzer according to claim 8, characterized in that, 所述按键信息包括:按键状态、按键ID标号、按键名称、按键的属性、数值标识、按键关联数值、状态显示标识、状态显示内容、上级菜单入口、本级菜单入口和下级菜单入口;所述按键的属性包括:频率、电平、相对电平、带宽、时间和纯文本显示;The button information includes: button state, button ID label, button name, button attribute, value identifier, button associated value, status display identifier, status display content, upper-level menu entry, current-level menu entry and lower-level menu entry; The properties of the key include: frequency, level, relative level, bandwidth, time and plain text display; 所述按键类型包括:菜单显示类型、子功能选择类型、数值输入类型、单位输入类型和导航输入类型。The key types include: menu display type, sub-function selection type, numerical input type, unit input type and navigation input type.
CN 201110037366 2011-02-14 2011-02-14 Keystroke function realizing method and device for hand-held frequency spectrograph Expired - Fee Related CN102185601B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110037366 CN102185601B (en) 2011-02-14 2011-02-14 Keystroke function realizing method and device for hand-held frequency spectrograph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110037366 CN102185601B (en) 2011-02-14 2011-02-14 Keystroke function realizing method and device for hand-held frequency spectrograph

Publications (2)

Publication Number Publication Date
CN102185601A CN102185601A (en) 2011-09-14
CN102185601B true CN102185601B (en) 2013-02-20

Family

ID=44571680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110037366 Expired - Fee Related CN102185601B (en) 2011-02-14 2011-02-14 Keystroke function realizing method and device for hand-held frequency spectrograph

Country Status (1)

Country Link
CN (1) CN102185601B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104007837A (en) * 2014-05-09 2014-08-27 北京航天发射技术研究所 Keyboard input method of control system display control terminal
CN104317878B (en) * 2014-10-13 2018-07-27 中国电子科技集团公司第四十一研究所 Applied to the view elements hierarchical structure of measuring instrument, manager and management system
CN112524652B (en) * 2020-11-30 2022-12-27 云米互联科技(广东)有限公司 Control method of integrated cooker
CN112660040A (en) * 2021-02-01 2021-04-16 地晨环境技术(南京)有限公司 Walking straightness correction method for drilling machine

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3169775B2 (en) * 1994-08-29 2001-05-28 株式会社日立製作所 Semiconductor circuit, switch and communication device using the same
JP4015937B2 (en) * 2002-12-06 2007-11-28 松下電器産業株式会社 Duty ratio correction circuit
CN200953546Y (en) * 2006-06-12 2007-09-26 北京希格玛和芯微电子技术有限公司 Pulse sequence generating device
US7439787B2 (en) * 2006-07-27 2008-10-21 Freescale Semiconductor, Inc. Methods and apparatus for a digital pulse width modulator using multiple delay locked loops

Also Published As

Publication number Publication date
CN102185601A (en) 2011-09-14

Similar Documents

Publication Publication Date Title
US9134972B2 (en) User interface generation apparatus
JP5431321B2 (en) User interface generation device
JP5351165B2 (en) User interface generation device
US9497313B2 (en) User interface generation apparatus
CN102185601B (en) Keystroke function realizing method and device for hand-held frequency spectrograph
CN110275704A (en) Page data processing method and device, storage medium and electronic equipment
CN112839323A (en) Bluetooth device testing method and device, terminal and computer readable storage medium
CN109144356B (en) Device and method for controlling vehicle component
CN108804484A (en) The data measures and procedures for the examination and approval, equipment and computer readable storage medium
WO2012127627A1 (en) Information device, screen switching method, and screen switching program
US20140098291A1 (en) Display device, display system, mobile information terminal, and display device control method
CN110865718A (en) Method and device for supporting application of input method to multi-screen switching
WO2010052987A1 (en) Data processing device and program
CN107908679B (en) Script statement conversion method and device and computer readable storage medium
US20090064016A1 (en) Displaying device with user-defined display regions and method thereof
CN103246502B (en) A kind of implementation method of pop-up window and system
US20140259030A1 (en) Mobile information device
CN112000408B (en) Mobile terminal and display method thereof
CN102984583A (en) System and method for setting television parameters through handheld device and handheld device
CN113553017A (en) Terminal screen adapting method, system, equipment and medium
CN110308959A (en) Content displaying method and device, electronic equipment and readable storage medium storing program for executing
CN103713931A (en) Method and system for obtaining full-screen panel type mobile terminal desktop
WO2023000929A1 (en) Split screen control interaction method and apparatus on the basis of mobile device and storage medium
KR20060101963A (en) Mobile communication terminal with screen division function
CN113792244A (en) Webpage adaptation method and system, corresponding computer equipment and storage medium

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
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Xin Lixia

Inventor after: Zhao Yanquan

Inventor after: Wang Kai

Inventor after: Liu Jinchuan

Inventor after: Shi Hao

Inventor before: Xin Lixia

Inventor before: Zhao Yanquan

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: XIN LIXIA ZHAO YANQUAN TO: XIN LIXIA ZHAO YANQUAN WANG KAI LIU JINCHUAN SHI HAO

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

Granted publication date: 20130220