CN109656741A - A kind of key-press status processing unit and processing method - Google Patents
A kind of key-press status processing unit and processing method Download PDFInfo
- Publication number
- CN109656741A CN109656741A CN201811569652.1A CN201811569652A CN109656741A CN 109656741 A CN109656741 A CN 109656741A CN 201811569652 A CN201811569652 A CN 201811569652A CN 109656741 A CN109656741 A CN 109656741A
- Authority
- CN
- China
- Prior art keywords
- key
- uid
- press
- management controller
- baseboard management
- 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.)
- Withdrawn
Links
- 238000012545 processing Methods 0.000 title claims abstract description 10
- 238000003672 processing method Methods 0.000 title claims abstract description 10
- 238000012544 monitoring process Methods 0.000 claims abstract description 16
- 238000000034 method Methods 0.000 claims description 13
- 238000003860 storage Methods 0.000 claims description 6
- 238000007726 management method Methods 0.000 description 25
- 238000004458 analytical method Methods 0.000 description 3
- 230000000712 assembly Effects 0.000 description 3
- 238000000429 assembly Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 239000003550 marker Substances 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- TWFZGCMQGLPBSX-UHFFFAOYSA-N carbendazim Chemical compound C1=CC=C2NC(NC(=O)OC)=NC2=C1 TWFZGCMQGLPBSX-UHFFFAOYSA-N 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
- G06F11/0772—Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Programmable Controllers (AREA)
Abstract
This application discloses a kind of key-press status processing unit and its processing method, described device includes: programmable controller, for connecting key, baseboard management controller and key indicator lamp;When monitoring key pushing operation, judge key presses duration;When it is described press duration more than preset threshold when, control the baseboard management controller and reset, and the first flag bit of set key-press status register;When it is described press duration less than or equal to the preset threshold when, control the key indicator lamp turns on/off state overturning, and the second flag bit of key-press status register described in set, solve the problems, such as that baseboard management controller can not record key-press status in the prior art, keep the system log of BMC more perfect, convenient for the long-range monitoring of server contention states, the user experience is improved, while more easily O&M.
Description
Technical field
The present invention relates to keystroke handling technology, espespecially a kind of key-press status processing unit and processing method.
Background technique
In the server, unit identification Unit identification (UID) key is commonly used in machine box for server position
UID lamp control and baseboard management controller Baseboard Management Controller (BMC).Short time presses UID
Key, UID lamp can be lit or extinguish, and be used to indicate node location server.UID key is pressed for a long time, then it is multiple to trigger BMC
Position event.In the prior art, the operation of UID key only will affect the light on and off instruction of UID lamp, or triggering BMC resets, not as
System log saves.
Summary of the invention
In view of the above technical problems, this application provides a kind of key-press status processing unit and its processing methods, to solve
Baseboard management controller BMC can not record the problem of key-press status, keep the system log of BMC more perfect.
According to the one aspect of the application, a kind of key-press status processing unit is disclosed, comprising:
Programmable controller, for connecting key, baseboard management controller and key indicator lamp;
When monitoring key pushing operation, judge key presses duration;
When it is described press duration more than preset threshold when, control the baseboard management controller and reset, and set key shape
First flag bit of state register;
When it is described press duration less than or equal to the preset threshold when, control the key indicator lamp turns on/off state
Overturning, and the second flag bit of key-press status register described in set.
Optionally, above-mentioned apparatus further include:
The programmable controller connects the baseboard management controller by serial line interface;
When receiving the read operation of the baseboard management controller, the information reporting of the key-press status register is given
The baseboard management controller.
Optionally, above-mentioned apparatus further include:
When receiving the clear operation of the baseboard management controller, the information of the key-press status register is removed.
Optionally, in above-mentioned apparatus,
The programmable controller is CPLD, and the key is that unit identifies UID key, and the key indicator lamp is UID
Lamp.
Optionally, in above-mentioned apparatus,
The serial line interface is iic bus interface.
Key-press status processing unit provided by the present application, by using programmable controller CPLD monitoring record UID key
State, and other related controller such as can be reported to baseboard management controller BMC solve substrate management in the prior art
Controller BMC can not record the problem of UID key-press status, keep the system log of BMC more perfect, be convenient for server contention states
Long-range monitoring, the user experience is improved, while more easily O&M.
According to the another aspect of the application, a kind of key-press status processing method is also disclosed, comprising:
Key pushing operation, which is monitored, by programmable controller judges pressing for key when monitoring key pushing operation
Lower duration;
When it is described press duration more than preset threshold when, control base board Management Controller resets, and set PLC technology
First flag bit of the key-press status register of device;
When it is described press duration less than or equal to the preset threshold when, control button indicator light turns on/off state overturning, and
Second flag bit of the key-press status register of bits program controller.
Optionally, the above method further include:
When receiving the read operation of the baseboard management controller, by serial line interface by the key-press status register
Information reporting give the baseboard management controller.
Optionally, the above method further includes,
When receiving the clear operation of the baseboard management controller, the information of the key-press status register is removed.
Optionally, in the above method,
The programmable controller is CPLD, and the key is that unit identifies UID key, and the key indicator lamp is UID
Lamp.
Optionally, in the above method,
The serial line interface is iic bus interface.
Key-press status processing method provided by the present application, by using programmable controller CPLD monitoring record UID key
State, and other related controller such as can be reported to baseboard management controller BMC solve substrate management in the prior art
Controller BMC can not record the problem of UID key-press status, keep the system log of BMC more perfect, be convenient for server contention states
Long-range monitoring, the user experience is improved, while more easily O&M.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
It obtains it is clear that understand through the implementation of the invention.The objectives and other advantages of the invention can be by specification, right
Specifically noted structure is achieved and obtained in claim and attached drawing.
Detailed description of the invention
Attached drawing is used to provide to further understand technical solution of the present invention, and constitutes part of specification, with this
The embodiment of application technical solution for explaining the present invention together, does not constitute the limitation to technical solution of the present invention.
Fig. 1 is the hardware circuit block diagram of key-press status processing unit provided by the embodiments of the present application;
Fig. 2 is the CPLD internal logic block diagram in the hardware circuit of the embodiment of the present application;
Fig. 3 is the exemplary embodiment schematic diagram of key-press status processing method provided by the present application.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions
It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable
Sequence executes shown or described step.
BMC plays an important role in the long-range monitoring of server contention states, and BMC record description system items log is
O&M engineer judges the foundation of server contention states, while providing weight for the analysis work that server works when breaking down
It instructs.
The state of UID key, short-press event-UID lamp including UID key light extinguishing event and UID by bond distance
It all should be recorded that in system log by event-BMC reseting event as the critical event of system operation.
In view of this, as shown in Figure 1, present applicant proposes a kind of key-press status processing units, it, should by taking UID key as an example
The hardware circuit of device may include programmable logic device, such as CPLD or other programming devices, by programmable
Logical device monitors the pushing operation of UID key, and according to the duration of pressing of UID key, and determination is long-pressing or short-press, control
It makes corresponding BMC reset or UID lamp turns on/off state overturning, while recording the down state of UID key, pass through serial ports for BMC
Iic bus inquiry.
As shown in Figure 1, BMC is connected to CPLD by serial line interface iic bus, UID push button signalling UID_BTN is as CPLD
Input, BMC reset signal BMC_RST, UID lamp control signal UID_LED as CPLD output.Between BMC and CPLD also
It is connected by serial line interface iic bus.
The internal logic structure of CPLD, can be as shown in Figure 2.It wherein mainly include three parts: IIC interface logic mould
Block, UID status register, timing CL Compare Logic module.
It is connected, is used for by Data_in signal and clear signal between IIC interface logic and UID status register logic
Parse the operation on iic bus.When the received operational order of IIC interface logic analysis judgment is to read UID status register behaviour
When making, send the data on Data_in on iic bus;When the operational order that IIC interface logic analysis judgment receives is
When removing the operation of UID status register, clear signal is exported, clear signal set maintains a clock length, to remove
UID status register.
Timing CL Compare Logic is connect with UID status register logic by UID_state signal.The monitoring of timing CL Compare Logic
UID key-press input signal UID_BTN, when detecting that UID key-press input signal UID_BTN effective time is less than or equal to threshold value
Between when, judge at this time to export UID_LED signal as UID key short-press, control UID lamp turns on/off state overturning;When detecting UID
When key-press input signal UID_BTN effective time is greater than threshold time, judge to export UID_RST letter at this time as UID key long-pressing
Number, control BMC resets.At the same time, timing CL Compare Logic also passes through UID_state signal to UID status register transmission UID
Key-press status, the corresponding flag bit of UID status register described in set.For example, can indicate that bit0 is long-pressing using 2bits
Flag bit, bit1 are short-press marker, and set is effective.
In foregoing circuit, UID status register is set inside programmable logic controller (PLC) CPLD.The signal of UID key is first
It is input to CPLD, whether being pressed for UID key is judged by CPLD detection, and will press by CPLD internal clocking CL Compare Logic
Time compared with pre-set threshold time T, to judge that this UID button operation is long-pressing or short-press, triggered with this
Corresponding event (i.e. UID indicator light turns on/off state overturning, or triggering BMC resets), and UID status register is accordingly indicated
Position position.Status register may include two, for example, bit0 is long-pressing flag bit, bit1 is short-press marker, and set has
Effect, can also use other flagging modes.
Baseboard management controller BMC can access the UID status register being arranged inside CPLD by iic bus and deposit
Device reads the state recording of UID key;After the state recording for running through UID key, clear operation order can be sent, removes UID
The current record of status register, so that CPLD records UID key-press status next time.
CPLD is monitored UID key-press event, can use polling mode, can also be using key-press event triggering response
Mode.
Foregoing circuit structure is not limited to UID key management, can be used in other and need to record the field of key-press status.
Embodiment provided by the present application, by using the state of programmable controller CPLD monitoring record UID key, and can
To be reported to other related controller such as baseboard management controller BMC, solve in the prior art baseboard management controller BMC without
Method records the problem of UID key-press status, keeps the system log of BMC more perfect, convenient for the long-range monitoring of server contention states,
The user experience is improved.Meanwhile more easily O&M.
Based on foregoing circuit structure, present invention also provides a kind of key-press status processing methods, as shown in figure 3, with poll
For mode, it may comprise steps of:
(1) programmable controller CPLD is initialized, UID status register resets;
(2) judge whether UID key is pressed, if pressed, execute (3), otherwise execute (4);
(3) judge UID key whether long-pressing? if it is long-pressing, then BMC is resetted, and by the long-pressing in UID status register
Flag bit set;It if it is short-press, then controls UID lamp and turns on/off overturning, and by the short-press mark position in UID status register
Position.
(4) judge whether there is from baseboard management controller BMC read operation? if so, then will be in UID status register
The zone bit information of preservation is reported to the BMC;If it is not, executing step (2).
(5) judge whether to receive from the effective UID status register clear signal of board management controller BMC? if
It is then to remove long and short by flag bit in UID status register, and starts new primary judgement circulation, execute (2);It is invalid then after
Continuous wait until receives effective UID status register clear signal, removes the mark in UID status register, so as to
CPLD records UID key-press status next time.
Wherein, effective UID status register clear signal can be the duration of one clock of high level and maintenance, with
Avoid false triggering.Correspondingly, after the IIC interface logic of CPLD receives clear command word, the clear signal in Fig. 2 can be set
" 1 ", duration keep a clock, set be it is effective, it is long and short by flag bit in UID status register to remove.
Embodiment provided by the present application works as inspection by using the state of programmable controller CPLD monitoring record UID key
When measuring UID key short-press, control UID lamp turns on/off state overturning;When detecting that UID key is long on time, control BMC resets.With
This is saved in UID status register simultaneously, by UID key state information, obtains correlation so that baseboard management controller BMC is inquired
UID key state information, asking for UID key-press status can not be recorded by efficiently solving baseboard management controller BMC in the prior art
Topic, keeps the system log of BMC more perfect, convenient for the long-range monitoring of server contention states, the user experience is improved, while more
Add and is easy to O&M.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove
Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment,
Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one
Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain groups
Part or all components may be implemented as by processor, such as the software that digital signal processor or microprocessor execute, or by
It is embodied as hardware, or is implemented as integrated circuit, such as specific integrated circuit.Such software can be distributed in computer-readable
On medium, computer-readable medium may include computer storage medium (or non-transitory medium) and communication media (or temporarily
Property medium).As known to a person of ordinary skill in the art, term computer storage medium is included in for storing information (such as
Computer readable instructions, data structure, program module or other data) any method or technique in the volatibility implemented and non-
Volatibility, removable and nonremovable medium.Computer storage medium include but is not limited to RAM, ROM, EEPROM, flash memory or its
His memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic holder, tape, disk storage or other
Magnetic memory apparatus or any other medium that can be used for storing desired information and can be accessed by a computer.This
Outside, known to a person of ordinary skill in the art to be, communication media generally comprises computer readable instructions, data structure, program mould
Other data in the modulated data signal of block or such as carrier wave or other transmission mechanisms etc, and may include any information
Delivery media.
Claims (10)
1. a kind of key-press status processing unit characterized by comprising
Programmable controller, for connecting key, baseboard management controller and key indicator lamp;
When monitoring key pushing operation, judge key presses duration;
When it is described press duration more than preset threshold when, control the baseboard management controller and reset, and set key-press status is posted
First flag bit of storage;
When it is described press duration less than or equal to the preset threshold when, control the key indicator lamp turns on/off state overturning,
And the second flag bit of key-press status register described in set.
2. the apparatus according to claim 1, which is characterized in that further include:
The programmable controller connects the baseboard management controller by serial line interface;
When receiving the read operation of the baseboard management controller, by the information reporting of the key-press status register to described
Baseboard management controller.
3. the apparatus of claim 2, which is characterized in that further include:
When receiving the clear operation of the baseboard management controller, the information of the key-press status register is removed.
4. device according to claim 1-3, which is characterized in that
The programmable controller is CPLD, and the key is that unit identifies UID key, and the key indicator lamp is UID lamp.
5. the apparatus of claim 2, which is characterized in that
The serial line interface is iic bus interface.
6. a kind of key-press status processing method, is characterized in that, comprising:
Key pushing operation, which is monitored, by programmable controller judges when pressing of key when monitoring key pushing operation
It is long;
When it is described press duration more than preset threshold when, control base board Management Controller resets, and set programmable controller
First flag bit of key-press status register;
When it is described press duration less than or equal to the preset threshold when, control button indicator light turns on/off state overturning, and set
Second flag bit of the key-press status register of programmable controller.
7. according to the method described in claim 6, it is characterized by further comprising:
When receiving the read operation of the baseboard management controller, by serial line interface by the letter of the key-press status register
Breath is reported to the baseboard management controller.
8. the method according to the description of claim 7 is characterized in that further include:
When receiving the clear operation of the baseboard management controller, the information of the key-press status register is removed.
9. according to the described in any item methods of claim 6-8, which is characterized in that
The programmable controller is CPLD, and the key is that unit identifies UID key, and the key indicator lamp is UID lamp.
10. the method according to the description of claim 7 is characterized in that
The serial line interface is iic bus interface.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811569652.1A CN109656741A (en) | 2018-12-21 | 2018-12-21 | A kind of key-press status processing unit and processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811569652.1A CN109656741A (en) | 2018-12-21 | 2018-12-21 | A kind of key-press status processing unit and processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109656741A true CN109656741A (en) | 2019-04-19 |
Family
ID=66116226
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811569652.1A Withdrawn CN109656741A (en) | 2018-12-21 | 2018-12-21 | A kind of key-press status processing unit and processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109656741A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110736923A (en) * | 2019-10-21 | 2020-01-31 | 珠海格力电器股份有限公司 | kinds of key detection circuits, touch screen and heating and ventilation equipment |
-
2018
- 2018-12-21 CN CN201811569652.1A patent/CN109656741A/en not_active Withdrawn
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110736923A (en) * | 2019-10-21 | 2020-01-31 | 珠海格力电器股份有限公司 | kinds of key detection circuits, touch screen and heating and ventilation equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112463689B (en) | OCP card hot plug device, method and computer readable storage medium | |
US10365840B2 (en) | System and method for providing a secure airborne network-attached storage node | |
CN108959031B (en) | NVME backboard lighting control method, system, medium and equipment | |
CN106789386A (en) | The method and the error detector for network system of mistake on detection communication bus | |
TW201243576A (en) | Debugging method and computer system using the same | |
RU2007126676A (en) | METHOD AND DEVICE FOR IMPLEMENTATION OF AUTOMATIC DISPLAY OF REFERENCE INFORMATION WITH DEFINITION OF ERROR WHEN CONNECTING A METER | |
CN107992399A (en) | A kind of memory bar condition detection method, apparatus and system | |
CN103593275B (en) | Disc information display methods and device | |
CN109656741A (en) | A kind of key-press status processing unit and processing method | |
US9223739B2 (en) | Detection method and apparatus for hot-swapping of SD card | |
US7096155B2 (en) | Method, system and apparatus for providing real-time led status of embedded controllers to system management software | |
CN111858178B (en) | Method, device and equipment for judging power supply starting type and readable medium | |
CN113590405A (en) | Hard disk error detection method and device, storage medium and electronic device | |
WO2018227475A1 (en) | Fingerprint chip detection method, device and system | |
CN106201801B (en) | electronic equipment and error reporting method | |
KR102137891B1 (en) | Server managing Method, Server, and Recording medium using User Specialized Operating Mechanism on BMC environment | |
CN111124785A (en) | Hard disk fault checking method, device, equipment and storage medium | |
US6854027B2 (en) | Hard disk device capable of detecting channels of a host to which hard disk controllers belong | |
CN115098342A (en) | System log collection method, system, terminal and storage medium | |
CN110599092A (en) | Instrument management system and method based on indicator light | |
US10282948B2 (en) | Device for indicating a datacenter rack among a plurality of datacenter racks | |
CN108965053A (en) | Upper computer software method for testing pressure, apparatus and system | |
CN115659426A (en) | Anti-counterfeiting method, device and medium for hard disk | |
US6910083B2 (en) | Method for detecting channels of a host to which hard disk controllers belong | |
CN207440953U (en) | A kind of autoalarm based on labview |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20190419 |
|
WW01 | Invention patent application withdrawn after publication |