Nothing Special   »   [go: up one dir, main page]

CN112905512B - DIO interface configuration method, device and equipment based on Windows system and storage medium - Google Patents

DIO interface configuration method, device and equipment based on Windows system and storage medium Download PDF

Info

Publication number
CN112905512B
CN112905512B CN202110158300.2A CN202110158300A CN112905512B CN 112905512 B CN112905512 B CN 112905512B CN 202110158300 A CN202110158300 A CN 202110158300A CN 112905512 B CN112905512 B CN 112905512B
Authority
CN
China
Prior art keywords
dio
interface
identification information
dio interface
configuration
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
CN202110158300.2A
Other languages
Chinese (zh)
Other versions
CN112905512A (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.)
Suzhou Yuankong Electronic Technology Co ltd
Original Assignee
Suzhou Yuankong Electronic 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 Suzhou Yuankong Electronic Technology Co ltd filed Critical Suzhou Yuankong Electronic Technology Co ltd
Priority to CN202110158300.2A priority Critical patent/CN112905512B/en
Publication of CN112905512A publication Critical patent/CN112905512A/en
Application granted granted Critical
Publication of CN112905512B publication Critical patent/CN112905512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a DIO interface configuration method, a device, equipment and a storage medium based on a Windows system, wherein the method comprises the following steps: responding to configuration triggering operation of the DIO interface, and displaying a DIO interface configuration interface on the electronic equipment; acquiring identification information of a main board and configuration information input in a DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information for the DIO interface configuration; according to the identification information of the main board, obtaining the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interfaces; obtaining a physical address of a corresponding DIO interface according to identification information of the DIO interface to be configured; and configuring the physical address of the DIO interface according to the configured state information of the DIO interface and the preset mapping relation between the state information and the address information. The DIO interface configuration operation is simple and convenient, and configuration errors are not easy to occur even for non-professional staff.

Description

DIO interface configuration method, device and equipment based on Windows system and storage medium
Technical Field
The embodiment of the application relates to the field of computer hardware interface configuration, in particular to a DIO interface configuration method, a device, equipment and a storage medium based on a Windows system.
Background
The industrial automation and the downstream device sets are generally interacted by connecting a DIO (DIGITAL IN AND out, digital input output) interface reserved by a master device with each downstream device set, and the master device generally reads and writes a physical address of the DIO interface through a Read-Write (RW) tool, so as to configure an input and output state of the DIO interface. In the process of implementing the present invention, the inventors have found that at least the following problems exist in the conventional technology: because the physical address of the DIO interface is generally composed of a 32-bit address, when the DIO interface is configured by the RW tool, the physical address composition structure of the DIO interface of the master control device needs to be known, and then some address bits in the physical address are changed, so that the operation is troublesome, and especially, the operation is easy for some non-professional staff.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a DIO interface configuration method, a device, equipment and a storage medium based on a Windows system, which have the advantage of conveniently configuring the DIO interface.
According to a first aspect of the embodiment of the present application, a DIO interface configuration method based on a Windows system is provided, and the DIO interface configuration method is applied to an electronic device, where a motherboard for implementing control of other devices is disposed in the electronic device; an application program is operated in the main board, the method is executed by the application program, and the method comprises the following steps:
responding to configuration triggering operation of the DIO interface, and displaying a DIO interface configuration interface on the electronic equipment;
Acquiring the identification information of the main board and the configuration information input in the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
According to the identification information of the main board, obtaining the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interfaces;
obtaining a physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured;
obtaining a virtual memory address distributed by a Windows system according to the physical address of the DIO interface;
changing the virtual memory address according to the state information configured by the DIO interface and the mapping relation between the preset state information and address information;
and calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the preset mapping relation between the virtual memory address and the physical address of the DIO interface.
According to a second aspect of an embodiment of the present application, there is provided a DIO interface configuration apparatus based on a Windows system, which is applied to an electronic device, where the electronic device includes a motherboard, and an application running in the motherboard, where the application includes the apparatus, and the apparatus includes:
The configuration interface display module is used for responding to the configuration triggering operation of the DIO interface and displaying the DIO interface configuration interface on the electronic equipment;
The first information acquisition module is used for acquiring the identification information of the main board and the configuration information input in the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
the second information acquisition module is used for acquiring the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interfaces according to the identification information of the main board;
The physical address acquisition module is used for acquiring the physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured;
And the virtual memory address acquisition module is used for acquiring the virtual memory address distributed by the Windows system according to the physical address of the DIO interface.
The first changing module is used for changing the virtual memory address according to the mapping relation between the state information configured for the DIO interface and the preset state information and address information.
And the second changing module is used for calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the preset mapping relation between the virtual memory address and the physical address of the DIO interface.
According to a third aspect of embodiments of the present application, there is provided an electronic device comprising a display, a processor and a memory; the memory stores a computer program adapted to be loaded by the processor and to perform the DIO interface configuration method based on the Windows system as described above.
According to a fourth aspect of an embodiment of the present application, there is provided a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a DIO interface configuration method based on a Windows system as described above.
According to the embodiment of the application, the DIO interface configuration interface is displayed on the electronic equipment, so that a user can conveniently input the identification information of the DIO interface to be configured and the state information configured for the DIO interface on the DIO interface configuration interface, the electronic equipment can automatically obtain the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interface according to the identification information of the DIO interface to be configured, obtain the corresponding physical address of the DIO interface according to the identification information of the DIO interface to be configured, and automatically configure the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information, the configuration operation of the DIO interface is realized, the configuration operation is simple and convenient, the special knowledge of the DIO interface is not required, and the problem of configuration errors is not easy to occur even by non-professional staff.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
For a better understanding and implementation, the present invention is described in detail below with reference to the drawings.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic block diagram of an application environment of a DIO interface configuration method based on a Windows system according to an embodiment of the present application;
FIG. 2 is a flow chart of a DIO interface configuration method based on Windows system according to one embodiment of the present application;
FIG. 3 is a flow chart illustrating a method of obtaining configuration information according to one embodiment of the present application;
FIG. 4 is a diagram showing a display effect of a DIO interface configuration interface according to an embodiment of the present application;
FIG. 5 is a diagram showing a display effect after configuration information is input through a configuration interface according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating a method for obtaining DIO interface identification information and physical addresses according to one embodiment of the application;
FIG. 7 is a flow chart illustrating a method of modifying a physical address of a DIO interface according to one embodiment of the application;
FIG. 8 is a flow chart illustrating the modification of virtual memory addresses according to one embodiment of the present application;
FIG. 9 is an effect diagram showing a state of a DIO interface of a reading configuration according to an embodiment of the present application;
FIG. 10 is a schematic block diagram of a DIO interface configuration apparatus based on Windows system according to an embodiment of the present application;
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as detailed in the accompanying claims.
In the description of the present application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The word "if"/"if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination". Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Referring to fig. 1, which is a schematic diagram of an application scenario of a DIO interface configuration method based on a Windows system according to an embodiment of the present application, the DIO interface configuration method based on a Windows system according to an embodiment of the present application is applied to an automation control scenario, and specifically includes a main control device 10 for sending a control instruction and at least one downstream device 20 for receiving the control instruction to perform a corresponding action; the main control device 10 is internally provided with a main board 11, the main board 11 is provided with a plurality of DIO interfaces, the downstream device 20 is connected with at least one DIO interface, and the main control device 10 controls the downstream device 20 through the DIO interfaces.
The main control device 10 may implement the DIO interface configuration method based on the Windows system according to the present application by software and/or hardware, where the main control device 10 may be configured by two or more physical entities, or may be configured by one physical entity, for example, may be a device with a DIO interface, such as a computer, a mobile phone, a tablet, or an intelligent interaction tablet, where the DIO (DIGITAL IN AND out, digital input/output) interface provided by the embodiment of the present application is mainly a GPIO (General purpose input/output) interface provided by an Intel PCH (Platform Controller Hub, platform controller center) bridge. Obviously, the master device 10 is installed with a Windows system. The master device 10 may be running an application for a DIO interface configuration method based on a Windows system, which may be presented in a form adapted to the processing unit, for example an APP application, and in some examples may also be presented in a form of e.g. a system plug-in, a web plug-in, etc. The downstream device 20 may be any device that can perform control, i.e., may be a PLC device. Specifically, the downstream device 20 may be a PLC (Programmable Logic Controller ) device used by a factory, and the master device 10 may be a computer, so that a factory worker may configure a DIO interface on the computer, thereby implementing control over the PLC device, for example, controlling on or off of the PLC device.
Example 1
The DIO interface configuration method based on the Windows system according to the embodiment of the present application will be described in detail with reference to fig. 2 to 9.
Referring to fig. 2, the DIO interface configuration method based on the Windows system provided by the embodiment of the application is applied to electronic equipment, where the electronic equipment can be a main control device with a DIO interface, such as a computer, a mobile phone, a tablet or an intelligent interaction tablet; a main board used for sending control instructions and controlling other devices is arranged in the electronic device; the DIO interface configuration method based on the Windows system comprises the following steps:
step S110: and responding to the configuration triggering operation of the DIO interface, and displaying the DIO interface configuration interface on the electronic equipment.
In the embodiment of the application, the application program of the DIO interface configuration method based on the Windows system is installed in the main control equipment, and the configuration of the DIO interface is triggered when the application program is opened by clicking, so that the DIO interface configuration interface is triggered to be displayed on the electronic equipment, and a user can conveniently input the identification information of the DIO interface to be configured and the state information configured for the DIO interface on the DIO interface configuration interface to configure the DIO interface.
Step S120: acquiring the identification information of the main board and the configuration information input in the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface.
The identification information of the main board is used for uniquely identifying the main board, and can be serial number information of the main board and the like. In the embodiment of the application, the identification information of the electronic motherboard is obtained by reading SMBIOS (SYSTEM MANAGEMENT BIOS) table information in the electronic device so as to uniquely identify the motherboard, wherein the SMBIOS is a unified specification required by a motherboard or a system manufacturer to display product management information in a standard format, is a set of structured tables about system information collected by BIOS (Basic Input Output System ) or UEFI (Unified Extensible FIRMWARE INTERFACE, unified extensible firmware interface) when initializing a system of the electronic device, and is stored in a memory, obviously, the identification information of the motherboard of the electronic device is stored in the SMBIOS, and the identification information of the motherboard can be obtained by reading the SMBIOS.
Step S130: and according to the identification information of the main board, obtaining the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interfaces.
In the embodiment of the application, the physical address of the DIO interface is the address of a register in the interface circuit, which can be directly accessed by the CPU of the electronic equipment, and the external equipment is carried out by reading and writing the register on the electronic equipment, and the electronic equipment sends a command to the register in the interface circuit through the addresses, namely the interface, so as to read data from the external equipment and transmit the data.
Step S140: and obtaining the physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured.
The identification information of the DIO interface is used to uniquely identify the DIO interface, which may be the DIO interface number, such as DIO Port1, DIO Port2, etc.
Step S150: and configuring the physical address of the DIO interface according to the configured state information of the DIO interface and the mapping relation between the preset state information and the address information.
According to the embodiment of the application, the DIO interface configuration interface is displayed on the electronic equipment, so that a user can conveniently input the identification information of the DIO interface to be configured and the state information configured for the DIO interface on the DIO interface configuration interface, the electronic equipment can automatically obtain the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interface according to the identification information of the DIO interface to be configured, obtain the corresponding physical address of the DIO interface according to the identification information of the DIO interface to be configured, and automatically configure the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information, the configuration operation of the DIO interface is realized, the configuration operation is simple and convenient, the special knowledge of the DIO interface is not required, and the problem of configuration errors is not easy to occur even by non-professional staff.
Referring to fig. 3 and fig. 4, in one embodiment, the interface configuration interface in step S110 includes a DIO interface identifier information input box, an input state trigger key, an output high-level state trigger key, and an output low-level state trigger key; the state information configured for the DIO interface in step S120 includes an input state, an output high level state, or an output low level state; the step S120 of obtaining configuration information input in the interface configuration interface includes:
Step S121: and determining the DIO interface identification information input in the DIO interface identification information input box as the identification information of the DIO interface to be configured.
Step S122: and determining the trigger key operation of the input state trigger key, the output high-level state trigger key or the output low-level state trigger key as the configuration of the DIO interface as the input state, the output high-level state or the output low-level state.
Referring to fig. 5, when DIO Port1 is input in the DIO interface identification information input box and the output high-level state trigger key is clicked, the configuration information of DIO Port1 is input.
The embodiment of the application can facilitate the user to input the DIO interface to be configured by setting the DIO interface identification information input box, and can facilitate the user to configure the DIO interface intuitively by inputting the state trigger key, outputting the high-level state trigger key and outputting the low-level state trigger key.
In another exemplary embodiment, before the electronic device displays the DIO interface configuration interface in step S110, the method further includes the following steps: acquiring the identification information of the main board; obtaining the identification information of all DIO interfaces of the main board according to the identification information of the main board; in step S110, when the DIO interface configuration interface is displayed on the electronic device, a DIO interface identification information input box is displayed on the DIO interface identification information input box, and identification information of all DIO interfaces of the motherboard is displayed on the DIO interface identification information input box; the step S120 of obtaining the configuration information input in the interface configuration interface includes: and determining the identification information of the DIO interface selected on the DIO interface identification information input box as the identification information of the DIO interface to be configured. Specifically, in the display of the identification information of all DIO interfaces of the main board in the DIO interface identification information input box, the operation of detecting that a user clicks one or more identification information of the DIO interfaces can be used for determining the clicked identification information of the DIO interfaces as the configuration information of the DIO interfaces to be configured, or a selection box can be provided in front of the displayed identification information of all DIO interfaces of the main board, and the detection of the user selects one or more selection boxes is used for determining the identification information of the DIO interfaces corresponding to the selection box as the identification information of the DIO interfaces to be configured. The embodiment of the application further facilitates the user to determine the DIO interfaces to be configured by displaying the identification information of all DIO interfaces of the main board, and simultaneously, the DIO interfaces can be configured in batches by selecting the DIO interfaces in batches, so that the configuration efficiency of the DIO interfaces is improved.
Referring to fig. 6, in one embodiment, in step S130, obtaining all DIO interfaces of the motherboard and physical addresses corresponding to the DIO interfaces according to the identification information of the motherboard includes:
Step S131: and matching in a preset main board identification information list according to the identification information of the main board.
According to the embodiment of the application, the identification information of a plurality of mainboards is stored in the database, a mainboard identification information list is formed, meanwhile, all DIO interface information of the mainboards and physical addresses corresponding to the DIO interfaces are also stored in the database, and the current mainboards used by the electronic equipment can be identified by matching the identification information of the mainboards in the mainboard identification information list, so that all DIO interface identification information of the mainboards and the physical addresses corresponding to the DIO interfaces can be obtained.
Step S132: and when the main board identification information is matched, acquiring all DIO interface identification information preset by the main board and a physical address corresponding to the DIO interface.
If the main board identification information cannot be matched, a message that configuration cannot be performed can be prompted.
According to the embodiment of the application, the matching is performed in the preset main board identification information list according to the main board identification information, and when the main board identification information is matched, all DIO interface identification information of the main board and the physical address corresponding to the DIO interface can be obtained quickly, so that a data source is provided for the physical address of the DIO interface for subsequent configuration.
Referring to fig. 7, in one embodiment, in step S150, changing the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relationship between the preset state information and the address information includes:
Step S151: and obtaining a virtual memory address distributed by the Windows system according to the physical address of the DIO interface.
In general, the Windows operating system manages the physical addresses accessed by application program processes by using a virtual memory management technology, each process is allocated with a 4GB virtual address space, and the virtual address space of each process is divided into a null pointer assignment partition, a user mode partition, a 64k forbidden partition and a kernel mode partition depending on the bottom layer implementation of the operating system; the null pointer assignment partition is used to help a programmer capture assignment of a null pointer, and cannot be assigned, accessed or used by a program dynamic memory allocator, and if a thread in a process tries to read or write a memory address located in the partition, an access violation is caused. The user mode partition is that all exes and dynamic link libraries in the Windows operating system are loaded into the region, and accessible resources of the process are loaded into the region. The purpose of the 64k forbidden partition is to isolate the user mode partition from the kernel mode partition, preventing user programs from crossing into kernel space. Kernel mode partitioning is where code resides for an operating system; the code for threads, memory management, file systems, network support, and driver related programs is loaded into this region, which is common to all processes. The physical address of the DIO interface is located in the kernel area, and the operation needs to be performed on the kernel address to change the state of the physical address of the DIO interface. Specifically, after the physical address of the DIO interface is obtained, the system of the electronic device uses the physical address of the DIO interface as a virtual memory address, and at this time, the virtual memory address can be directly changed.
Step S152: and changing the virtual memory address according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
Step S153: and calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the preset mapping relation between the virtual memory address and the physical address of the DIO interface.
After changing the virtual memory address, the physical address of the DIO interface may be synchronously changed, and mapping between the virtual memory address and the physical address of the DIO interface needs to be established, specifically, a kernel driver is loaded by calling a function ZwMapViewOfSection () provided in a system core file ntdll, and the kernel driver is notified of which virtual memory address the mapped address is specific, so that mapping between the virtual memory address and the physical address of the DIO interface is established, thereby changing the physical address of the DIO interface.
According to the embodiment of the application, the configuration of the DIO interface configuration interface to the state information of the DIO interface is realized through the mapping relation between the preset state information and the address information and the mapping relation between the preset virtual memory address and the physical address of the DIO interface, so that the physical address of the DIO interface can be configured, and the configuration of the DIO interface is realized rapidly.
Referring to fig. 8, in one embodiment, the address information includes address bits that need to be changed and values on corresponding address bits; in step S152, changing the virtual memory address according to the mapping relationship between the state information configured for the DIO interface and the preset state information and address information includes:
Step S1521: and determining the address bit of the virtual memory address to be changed and the value on the corresponding address bit according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
For the state of the DIO interface, the state change can be realized only according to the values of the main board model on certain address BITs, for example, for the main board model CIS-RKBU-LW01, if the DIO interface is to be changed into the input state, the values of the address BITs of the 0 th BIT, the 1 st BIT, the 8 th BIT and the 9 th BIT of the DIO interface are only required to be changed into x, x,1,0 respectively, that is, the change BIT [9,8,1,0] =value [0,1, x ] is set, and the DIO interface can be changed into the input filling.
Step S1522: and changing the virtual memory address according to the address bit which needs to be changed of the virtual memory address and the value on the corresponding address bit.
According to the embodiment of the application, through the preset mapping relation between the state information and the address information, the automatic change of the address can be automatically realized according to the state information configured for the DIO interface.
In one embodiment, the DIO interface configuration method based on the Windows system may further include the following steps:
step S160: calling a kernel driver to read the configured physical address of the DIO interface;
Step S170: acquiring the state information of the DIO interface according to the physical address of the DIO interface and the mapping relation between the preset state information and the address information;
Step S180: and displaying the identification information of the DIO interface and the state information of the DIO interface on the main control equipment.
After the display is completed, the kernel driver is unloaded through ZwUnmapViewOfSection () to reduce the memory occupation.
Referring to fig. 9, after DIO Port1 is input in the DIO interface identification information input box and the output high-level state trigger button is clicked, the DIO Port1 is configured, and then the DIO Port1 is configured successfully and the current state of the DIO Port1 is fed back in the DIO configuration interface.
According to the embodiment of the application, the configured physical address of the DIO interface is read, so that the state information of the DIO interface is fed back, and a user can learn the current configuration condition of the DIO interface in real time.
Example 2
The following are examples of the apparatus of the present application that may be used to perform the method of example 1 of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method in embodiment 1 of the present application.
Referring to fig. 10, a DIO interface configuration apparatus 200 based on a Windows system disclosed in an embodiment of the present application is applied to an electronic device, where the electronic device includes a motherboard, and includes:
A configuration interface display module 210, configured to display a DIO interface configuration interface on the electronic device in response to a configuration triggering operation of the DIO interface;
a first information obtaining module 220, configured to obtain the identification information of the motherboard and configuration information input at the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
the second information obtaining module 230 is configured to obtain, according to the identification information of the main board, identification information of all DIO interfaces of the main board and a physical address corresponding to the DIO interfaces;
A physical address obtaining module 240, configured to obtain a physical address of the DIO interface according to the identification information of the DIO interface to be configured;
The configuration module 250 is configured to configure a physical address of the DIO interface according to the state information configured for the DIO interface and a mapping relationship between preset state information and address information.
According to the embodiment of the application, the DIO interface configuration interface is displayed on the electronic equipment, so that a user can conveniently input the identification information of the DIO interface to be configured and the state information configured for the DIO interface on the DIO interface configuration interface, the electronic equipment can automatically obtain the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interface according to the identification information of the DIO interface to be configured, obtain the corresponding physical address of the DIO interface according to the identification information of the DIO interface to be configured, and automatically configure the physical address of the DIO interface according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information, the configuration operation of the DIO interface is realized, the configuration operation is simple and convenient, the special knowledge of the DIO interface is not required, and the problem of configuration errors is not easy to occur even by non-professional staff.
In one embodiment, the interface configuration interface includes a DIO interface identification information input box, an input state trigger key, an output high level state trigger key, and an output low level state trigger key; the state information configured for the DIO interface includes an input state, an output high level state, or an output low level state, and the first information obtaining module 220 includes:
and the identification information determining module is used for determining the DIO interface identification information input in the DIO interface identification information input box as the identification information of the DIO interface to be configured.
And the state information determining module is used for determining the trigger key operation of the input state trigger key, the output high-level state trigger key or the output low-level state trigger key as the configuration of the DIO interface as the input state, the output high-level state or the output low-level state.
In another exemplary embodiment, the DIO interface configuration device 200 based on the Windows system further includes a third information obtaining module, configured to obtain the identification information of the motherboard; obtaining the identification information of all DIO interfaces of the main board according to the identification information of the main board; the configuration interface display module 210 is configured to, when the electronic device displays a DIO interface configuration interface to display a DIO interface identifier information input box, include: displaying identification information of all DIO interfaces of the main board on the DIO interface identification information input box; the first information obtaining module 220, when obtaining configuration information input by the interface configuration interface, is configured to: and determining the identification information of the DIO interface selected on the DIO interface identification information input box as the identification information of the DIO interface to be configured.
In one embodiment, the second information obtaining module 230 includes:
and the matching module is used for matching in a preset main board identification information list according to the identification information of the main board.
And the main board information acquisition module is used for acquiring all DIO interface identification information preset by the main board and the physical address corresponding to the DIO interface when the main board identification information is matched.
In one embodiment, the configuration module 250 includes:
And the virtual memory address acquisition module is used for acquiring the virtual memory address distributed by the Windows system according to the physical address of the DIO interface.
The first changing module is used for changing the virtual memory address according to the mapping relation between the state information configured for the DIO interface and the preset state information and address information.
And the second changing module is used for calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the preset mapping relation between the virtual memory address and the physical address of the DIO interface.
In one embodiment, the address information includes address bits that need to be changed and values on corresponding address bits; the first modification module includes:
And determining the address bit of the virtual memory address to be changed and the value on the corresponding address bit according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information.
And changing the virtual memory address according to the address bit which needs to be changed of the virtual memory address and the value on the corresponding address bit.
In one embodiment, the DIO interface configuration device based on the Windows system may further include:
the reading configuration information module is used for calling a kernel driver to read the configured physical address of the DIO interface;
the state information acquisition module is used for acquiring the state information of the DIO interface according to the physical address of the DIO interface and the mapping relation between the preset state information and the address information;
and the state display module is used for displaying the identification information of the DIO interface and the state information of the DIO interface on the main control equipment.
Example 3
The following are examples of the apparatus of the present application that may be used to perform the method of example 1 of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method in embodiment 1 of the present application.
Referring to fig. 11, the present application further provides an electronic device 300, where the electronic device 300 may be any smart terminal including a touch display screen, for example, a computer, a mobile phone, a tablet computer, an interactive tablet, etc. The electronic device 300 may include: at least one processor 301, at least one memory 302, at least one display 303, at least one network interface 304, a user interface 305, and at least one communication bus 306.
The user interface 305 is mainly used for providing an input interface for a user, and acquiring data input by the user. Optionally, the user interface 305 may also include a standard wired interface, a wireless interface.
The network interface 303 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the communication bus 303 is used to enable connected communication between these components.
Wherein the processor 301 may comprise one or more processing cores. The processor 301 utilizes various interfaces and lines to connect various portions of the overall electronic device 300, perform various functions of the electronic device 300, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 302, and invoking data stored in the memory 302. Alternatively, the processor 301 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 301 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display layer; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 301 and may be implemented by a single chip.
The Memory 302 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 302 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 302 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 302 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described various method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 302 may also optionally be at least one storage device located remotely from the aforementioned processor 301. As shown in fig. 11, an operating system, a network communication module, a user may be included in the memory 302 as one type of computer storage medium.
The processor 301 may be configured to invoke an application program of the DIO interface configuration method based on the Windows system stored in the memory 302, and specifically execute the DIO interface configuration method based on the Windows system described in embodiment 1, which is not described herein.
Example 4
The present application also provides a computer readable storage medium, on which a computer program is stored, where the instructions are adapted to be loaded by a processor and execute the method steps of the above-described embodiment 1, and the specific execution process may refer to the specific description shown in embodiment 1, which is not repeated herein. The storage medium can be an electronic device such as a personal computer, a notebook computer, a smart phone, a tablet personal computer and the like.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The above-described apparatus embodiments are merely illustrative, wherein the components illustrated as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present application without undue burden.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (9)

1. The DIO interface configuration method based on the Windows system is applied to electronic equipment, and a main board for controlling other equipment is arranged in the electronic equipment; the method is characterized in that an application program is operated in the main board, the method is executed by the application program, and the method comprises the following steps:
responding to configuration triggering operation of the DIO interface, and displaying a DIO interface configuration interface on the electronic equipment;
Acquiring the identification information of the main board and the configuration information input in the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
According to the identification information of the main board, obtaining the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interfaces;
obtaining a physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured;
obtaining a virtual memory address distributed by a Windows system according to the physical address of the DIO interface;
changing the virtual memory address according to the state information configured by the DIO interface and the mapping relation between the preset state information and address information;
and calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the preset mapping relation between the virtual memory address and the physical address of the DIO interface.
2. The DIO interface configuration method based on Windows system according to claim 1, wherein,
The address information comprises address bits needing to be changed and values on the corresponding address bits; the changing the virtual memory address according to the mapping relation between the state information configured for the DIO interface and the preset state information and address information includes:
Determining address bits to be changed of the virtual memory address and values on the corresponding address bits according to the state information configured for the DIO interface and the mapping relation between the preset state information and the address information;
and changing the virtual memory address according to the address bit which needs to be changed of the virtual memory address and the value on the corresponding address bit.
3. The DIO interface configuration method based on Windows system according to claim 1, wherein,
The obtaining all DIO interfaces of the main board and physical addresses corresponding to the DIO interfaces according to the identification information of the main board includes:
Matching is carried out in a preset main board identification information list according to the identification information of the main board;
And when the main board identification information is matched, acquiring all DIO interface identification information preset by the main board and a physical address corresponding to the DIO interface.
4. The DIO interface configuration method based on Windows system according to claim 1, wherein,
The state information configured for the DIO interface comprises an input state, an output high level state or an output low level state;
The interface configuration interface comprises a DIO interface identification information input box, an input state trigger key, an output high-level state trigger key and an output low-level state trigger key;
the step of obtaining configuration information input in the interface configuration interface comprises the following steps:
the DIO interface identification information input in the DIO interface identification information input box is determined to be the identification information of the DIO interface to be configured;
And determining the trigger key operation of the input state trigger key, the output high-level state trigger key or the output low-level state trigger key as the configuration of the DIO interface as the input state, the output high-level state or the output low-level state.
5. The DIO interface configuration method based on Windows system according to claim 4, wherein,
Before the electronic device displays the DIO interface configuration interface, the method further comprises the following steps: acquiring the identification information of the main board; obtaining the identification information of all DIO interfaces of the main board according to the identification information of the main board;
Displaying identification information of all DIO interfaces of the main board on the DIO interface identification information input box when the DIO interface configuration interface is displayed on the electronic equipment;
The obtaining the configuration information input in the interface configuration interface comprises the following steps: and determining the identification information of the DIO interface selected on the DIO interface identification information input box as the identification information of the DIO interface to be configured.
6. The DIO interface configuration method based on the Windows system according to any one of claims 1 to 5, further comprising the steps of:
calling a kernel driver to read the configured physical address of the DIO interface;
Acquiring the state information of the DIO interface according to the physical address of the DIO interface and the mapping relation between the preset state information and the address information;
And displaying the identification information of the DIO interface and the state information of the DIO interface on the main control equipment.
7. A DIO interface configuration device based on a Windows system, which is applied to an electronic device, wherein the electronic device comprises a main board, and an application program is running in the main board, and the application program comprises the device, and the device comprises:
The configuration interface display module is used for responding to the configuration triggering operation of the DIO interface and displaying the DIO interface configuration interface on the electronic equipment;
The first information acquisition module is used for acquiring the identification information of the main board and the configuration information input in the DIO interface configuration interface; the configuration information comprises identification information of a DIO interface to be configured and state information configured for the DIO interface;
the second information acquisition module is used for acquiring the identification information of all DIO interfaces of the main board and the physical address corresponding to the DIO interfaces according to the identification information of the main board;
The physical address acquisition module is used for acquiring the physical address of the corresponding DIO interface according to the identification information of the DIO interface to be configured;
the virtual memory address acquisition module is used for acquiring a virtual memory address distributed by the Windows system according to the physical address of the DIO interface;
The first changing module is used for changing the virtual memory address according to the mapping relation between the state information configured for the DIO interface and the preset state information and address information;
And the second changing module is used for calling a kernel driver to change the physical address of the DIO interface according to the changed virtual memory address and the preset mapping relation between the virtual memory address and the physical address of the DIO interface.
8. An electronic device includes a display, a processor, and a memory; characterized in that the memory stores a computer program adapted to be loaded by the processor and to perform the DIO interface configuration method based on the Windows system according to any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the DIO interface configuration method based on the Windows system as claimed in any one of claims 1 to 6.
CN202110158300.2A 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium Active CN112905512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110158300.2A CN112905512B (en) 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110158300.2A CN112905512B (en) 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium

Publications (2)

Publication Number Publication Date
CN112905512A CN112905512A (en) 2021-06-04
CN112905512B true CN112905512B (en) 2024-05-14

Family

ID=76122610

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110158300.2A Active CN112905512B (en) 2021-02-05 2021-02-05 DIO interface configuration method, device and equipment based on Windows system and storage medium

Country Status (1)

Country Link
CN (1) CN112905512B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113721765B (en) * 2021-08-26 2023-07-25 苏州浪潮智能科技有限公司 Control method, device and equipment for input/output port of equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5564052A (en) * 1991-06-27 1996-10-08 Integrated Device Technology, Inc. Logically disconnectable virtual-to-physical address translation unit and method for such disconnection
WO2011107053A2 (en) * 2011-04-20 2011-09-09 华为终端有限公司 Configuration method for data interface and terminal device
US9128742B1 (en) * 2010-11-19 2015-09-08 Symantec Corporation Systems and methods for enhancing virtual machine backup image data
CN104950741A (en) * 2014-03-26 2015-09-30 洛克威尔自动控制技术股份有限公司 Multiple controllers configuration management interface for system connectivity
WO2016082755A1 (en) * 2014-11-25 2016-06-02 Hangzhou H3C Technologies Co., Ltd. Displaying setup interface
CN108334465A (en) * 2018-02-06 2018-07-27 深圳壹账通智能科技有限公司 Configuration method, device, equipment and the computer readable storage medium of communication interface
CN109614157A (en) * 2018-12-27 2019-04-12 联想(北京)有限公司 A kind of configuration method of system, device and storage medium
CN110399165A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 A kind of display methods, device and the equipment of Onboard NIC network interface parameter
CN110770708A (en) * 2017-06-16 2020-02-07 阿里巴巴集团控股有限公司 Method and apparatus for hardware virtualization
CN110895518A (en) * 2019-07-01 2020-03-20 研祥智能科技股份有限公司 GPIO (general purpose input/output) interface configuration method and system
CN111786825A (en) * 2020-06-23 2020-10-16 京东数字科技控股有限公司 Method, device, system and storage medium for dynamically configuring interface service
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6823283B2 (en) * 2001-08-14 2004-11-23 National Instruments Corporation Measurement system including a programmable hardware element and measurement modules that convey interface information
CN100454266C (en) * 2005-10-26 2009-01-21 鸿富锦精密工业(深圳)有限公司 Method for checking correct of assembling position of computer assembly
PL2817723T3 (en) * 2012-02-21 2017-11-30 Zih Corp. Electrically configurable option board interface
CN107807839B (en) * 2016-09-09 2022-01-28 阿里巴巴集团控股有限公司 Method and device for modifying memory data of virtual machine and electronic equipment
KR101950636B1 (en) * 2017-12-27 2019-02-20 주식회사 팍스에스앤티 Terminal, method for processing signal of the terminal and total management system of address

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5564052A (en) * 1991-06-27 1996-10-08 Integrated Device Technology, Inc. Logically disconnectable virtual-to-physical address translation unit and method for such disconnection
US9128742B1 (en) * 2010-11-19 2015-09-08 Symantec Corporation Systems and methods for enhancing virtual machine backup image data
WO2011107053A2 (en) * 2011-04-20 2011-09-09 华为终端有限公司 Configuration method for data interface and terminal device
CN102216917A (en) * 2011-04-20 2011-10-12 华为终端有限公司 Configuration method for data interface and terminal device
CN104950741A (en) * 2014-03-26 2015-09-30 洛克威尔自动控制技术股份有限公司 Multiple controllers configuration management interface for system connectivity
WO2016082755A1 (en) * 2014-11-25 2016-06-02 Hangzhou H3C Technologies Co., Ltd. Displaying setup interface
CN110770708A (en) * 2017-06-16 2020-02-07 阿里巴巴集团控股有限公司 Method and apparatus for hardware virtualization
CN108334465A (en) * 2018-02-06 2018-07-27 深圳壹账通智能科技有限公司 Configuration method, device, equipment and the computer readable storage medium of communication interface
CN109614157A (en) * 2018-12-27 2019-04-12 联想(北京)有限公司 A kind of configuration method of system, device and storage medium
CN110399165A (en) * 2019-06-25 2019-11-01 苏州浪潮智能科技有限公司 A kind of display methods, device and the equipment of Onboard NIC network interface parameter
CN110895518A (en) * 2019-07-01 2020-03-20 研祥智能科技股份有限公司 GPIO (general purpose input/output) interface configuration method and system
CN111786825A (en) * 2020-06-23 2020-10-16 京东数字科技控股有限公司 Method, device, system and storage medium for dynamically configuring interface service
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment

Also Published As

Publication number Publication date
CN112905512A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN107515759B (en) Screen capture method and device, electronic equipment and readable storage medium
CN108549532A (en) Webpage construction method, device, electronic equipment and storage medium
CN112068911B (en) Electronic form generation method, device, system, equipment and medium
CN114153779B (en) I2C communication method, system, equipment and storage medium
CN113626102A (en) Data processing method and device, electronic equipment and storage medium
CN110781067A (en) Method, device, equipment and storage medium for calculating starting time consumption
CN112905512B (en) DIO interface configuration method, device and equipment based on Windows system and storage medium
KR20150069311A (en) A vehicle data control system and a control method
CN112597049A (en) Interrupt response time testing method, device and medium
CN114693226A (en) Approval process construction method, device, equipment and storage medium
CN112068828A (en) Title control generation method, device, system, equipment and medium
CN114610557B (en) Method and device for testing equipment driving unit
CN105468527B (en) The test method and device of component in a kind of application
CN114780081A (en) Animation display method, electronic device and storage medium
CN115169294A (en) Data conversion method, device and medium
CN114692581A (en) Electronic form sub-table display method, device, equipment and storage medium
CN112885403A (en) Function test method, device and equipment of Flash controller
CN114594945A (en) Method, device, system, equipment and medium for generating advanced popup selection frame
CN111651194A (en) iOS-based adaptation method and device
CN112783562B (en) Display equipment selection method and device
CN111258474B (en) Interaction method and device based on GUI and electronic equipment
CN114594946A (en) Method, device, system, equipment and medium for generating check box control
CN112817668B (en) Interaction method and device of date selector
CN114594926A (en) Radio box control generating method, device, system, equipment and medium
CN114594948A (en) Method, device, system, equipment and medium for generating dynamic drop-down box control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant