CN111679957B - Indicator lamp control method and device, terminal equipment and storage medium - Google Patents

Indicator lamp control method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN111679957B
CN111679957B CN202010466082.4A CN202010466082A CN111679957B CN 111679957 B CN111679957 B CN 111679957B CN 202010466082 A CN202010466082 A CN 202010466082A CN 111679957 B CN111679957 B CN 111679957B
Authority
CN
China
Prior art keywords
indicator light
mode
indicator
configuration information
communication
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
CN202010466082.4A
Other languages
Chinese (zh)
Other versions
CN111679957A (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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202010466082.4A priority Critical patent/CN111679957B/en
Publication of CN111679957A publication Critical patent/CN111679957A/en
Application granted granted Critical
Publication of CN111679957B publication Critical patent/CN111679957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/325Display of status information by lamps or LED's
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/328Computer systems status display

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)

Abstract

The application is suitable for the technical field of control, and provides an indicator light control method, an indicator light control device, terminal equipment and a storage medium, wherein the indicator light control method is applied to intelligent equipment, the intelligent equipment comprises a main application program and an indicator light control program which respectively run independently, and the indicator light control method comprises the following steps of executing indicator light control through the indicator light control program: acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the mode state conversion is detected by the main application program; and controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file. The embodiment of the application can improve the efficiency and accuracy of the control of the indicator lamp.

Description

Indicator lamp control method and device, terminal equipment and storage medium
Technical Field
The application belongs to the technical field of control, and particularly relates to an indicator light control method and device, terminal equipment and a storage medium.
Background
In the prior art, the operation state of the intelligent device is often reflected by the on-off state of the indicator lamp. Specifically, the intelligent device with the indicator lamp is added with an indicator lamp control step in a main application program of the intelligent device, and after the main application program runs the step of switching the device state, the indicator lamp control step is run to control the indicator lamp to present a preset on-off state. However, in this method, when the main application program is in error, the indicator light is easily out of control, so that the on/off state of the indicator light is disordered, and the current operating state of the smart device cannot be reflected.
Disclosure of Invention
In view of this, embodiments of the present application provide an indicator light control method and apparatus, a terminal device, and a storage medium, so as to solve the problem in the prior art how to ensure effective control of an indicator light.
A first aspect of an embodiment of the present application provides an indicator light control method, where the method is applied to an intelligent device, and is characterized in that the intelligent device includes a main application program and an indicator light control program that operate independently, and the indicator light control method includes an indicator light control step executed by the indicator light control program:
acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the mode state conversion is detected by the main application program;
and controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file.
Optionally, the method further comprises: executing, by the host application, the steps of:
creating communication threads, wherein the communication threads comprise a WiFi communication thread, a Bluetooth communication thread and/or a USB communication thread;
if a communication connection signal is detected, awakening the communication thread corresponding to the communication connection signal;
and if the mode state change is detected in the communication thread corresponding to the communication connection signal, writing corresponding indicator lamp configuration information into the indicator lamp configuration file according to the target mode after the mode state change.
Optionally, the target mode includes a normal mode, a communication abnormality alarm mode, a firmware upgrade mode, and a tool test mode, the indicator configuration information at least includes a mode identification number corresponding to the target mode one to one, and if the mode state change is detected in the communication thread corresponding to the communication connection signal, the indicator configuration information is written into the indicator configuration file according to the target mode after the mode state change, including:
if the mode state change which is specifically the established communication connection or the disconnected communication connection is detected, determining that the current target mode is the normal mode, and writing first indicator lamp configuration information corresponding to the normal mode into the indicator lamp configuration file, wherein the first indicator lamp configuration information comprises a first mode identification number, communication mode identification information and on-off identification information;
if the mode state change of the communication abnormity is detected, determining that the current target mode is the abnormal communication alarm mode, and writing second indicator lamp configuration information corresponding to the abnormal communication alarm mode into the indicator lamp configuration file, wherein the second indicator lamp configuration information comprises a second mode identification number and the communication mode identification information;
if the mode state change is detected to be specifically the mode state change of the acquired firmware upgrading instruction frame, determining that the current target mode is the firmware upgrading mode, and writing third indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file, wherein the third indicator lamp configuration information comprises a third mode identification number;
and if the mode state change is detected to be specifically the mode state change of the obtained tool test instruction frame, determining that the current target mode is the tool test mode, and writing fourth indicator lamp configuration information corresponding to the tool test mode into the indicator lamp configuration file, wherein the fourth indicator lamp configuration information comprises a fourth mode identification number.
Optionally, the indicator light configuration information at least includes a mode identification number corresponding to the target mode one to one, the indicator light includes one or more of a WiFi signal indicator light, a bluetooth signal indicator light, and a USB signal indicator light, and correspondingly, the controlling of the on/off operation of the indicator light according to the indicator light configuration information of the indicator light configuration file includes:
and executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file so as to control one or more of the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to execute on-off actions.
Optionally, the indicator light includes one or more of a WiFi signal indicator light, a bluetooth signal indicator light, and a USB signal indicator light, and correspondingly, the on/off action of the indicator light is controlled according to the indicator light configuration information of the indicator light configuration file, including:
and executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file so as to control one or more of the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to execute on-off actions.
Optionally, the indicator light includes one or more of a WiFi signal indicator light, a bluetooth signal indicator light, and a USB signal indicator light, and correspondingly, the on/off action of the indicator light is controlled according to the indicator light configuration information of the indicator light configuration file, including:
and executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file so as to control one or more of the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to execute on-off actions.
Optionally, before the indicator light control step is executed by the indicator light control program, the method further includes:
and loading the main application program and the indicator lamp control program.
A second aspect of the embodiments of the present application provides an indicator lamp control device, the indicator lamp control device includes a main application program running unit and an indicator lamp control program running unit that are independent of each other, the main application program unit is used for running a main application program, the indicator lamp control program running unit is used for running an indicator lamp control program, the indicator lamp control program running unit includes:
the acquisition module is used for acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the main application program operation unit detects mode state conversion;
and the control module is used for controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file.
Optionally, the main application program running unit includes a thread creating module, a detecting module, and a writing module:
the thread creating module is used for creating communication threads, and the communication threads comprise WiFi communication threads, Bluetooth communication threads and/or USB communication threads;
the detection module is used for awakening the communication thread corresponding to the communication connection signal if the communication connection signal is detected;
and the writing module is used for writing corresponding indicator lamp configuration information into the indicator lamp configuration file according to the target mode after the mode state is changed if the mode state change is detected in the communication thread corresponding to the communication connection signal.
Optionally, the target mode includes a normal mode, a communication abnormality alarm mode, a firmware upgrade mode, and a tool test mode, the indicator configuration information at least includes a mode identification number corresponding to the target mode one to one, and the write-in module is specifically configured to:
if the mode state change that is specifically the communication connection is established or the communication connection is disconnected is detected, determining that the current target mode is the normal mode, and writing first indicator lamp configuration information corresponding to the normal mode into the indicator lamp configuration file, wherein the first indicator lamp configuration information comprises a first mode identification number, communication mode identification information and on-off identification information;
if the mode state change of the communication abnormity is detected, determining that the current target mode is the abnormal communication alarm mode, and writing second indicator lamp configuration information corresponding to the abnormal communication alarm mode into the indicator lamp configuration file, wherein the second indicator lamp configuration information comprises a second mode identification number and the communication mode identification information;
if the mode state change is detected to be specifically the mode state change of the acquired firmware upgrading instruction frame, determining that the current target mode is the firmware upgrading mode, and writing third indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file, wherein the third indicator lamp configuration information comprises a third mode identification number;
and if the mode state change is detected to be specifically the mode state change of the obtained tool test instruction frame, determining that the current target mode is the tool test mode, and writing fourth indicator lamp configuration information corresponding to the tool test mode into the indicator lamp configuration file, wherein the fourth indicator lamp configuration information comprises a fourth mode identification number.
Optionally, the indicator light includes a WiFi signal indicator light, a bluetooth signal indicator light and a USB signal indicator light, correspondingly:
the control module is specifically configured to execute an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file, so as to control one or more of the WiFi signal indicator light, the bluetooth signal indicator light, and the USB signal indicator light to execute a lighting-off action.
Optionally, if the target mode is the normal mode, then:
the control module is specifically configured to execute a first indicator light control sub-process corresponding to the first mode identification number according to the first indicator light configuration information included in the indicator light configuration file, where the first indicator light control sub-process includes controlling the WiFi signal indicator light, the bluetooth signal indicator light, or the USB signal indicator light to execute a light-on action or a light-off action according to the communication mode identification information and the light-on/off identification information.
Optionally, if the target mode is a communication abnormality alarm mode, then:
the control module is specifically configured to execute a second indicator light control sub-process corresponding to the second mode identification number according to the second indicator light configuration information included in the indicator light configuration file, where the second indicator light control sub-process includes controlling the WiFi signal indicator light, the bluetooth signal indicator light, or the USB signal indicator light to execute a preset on/off action according to the communication mode identification information.
Optionally, the indicator light control device further comprises:
and the loading unit is used for loading the main application program and the indicator lamp control program.
A third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to enable the terminal device to implement the steps of the indicator light control method.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, causes a terminal device to implement the steps of the indicator light control method as described.
A fifth aspect of embodiments of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to perform the steps of the indicator light control method according to any one of the first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, the intelligent device comprises a main application program and an indicator light control program which respectively and independently run, and the indicator light control program accurately controls the indicator light according to the indicator light configuration file containing the indicator light configuration information written by the main application program. The control method has the advantages that the configuration file of the indicating lamp is used as a medium, and the control step of the indicating lamp is realized through the indicating lamp control program independent of the main application program, so that the stability and the accuracy of the indicating lamp control can be ensured, the condition that the operation of the main application program is wrong to cause the disorder of the indicating lamp control is avoided, the effective control of the indicating lamp is ensured, and the efficiency and the accuracy of the indicating lamp control are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of an implementation of a first indicator light control method provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of an implementation of a second indicator light control method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of an indicator light control apparatus provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application 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.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
In the existing intelligent device, an indicator light control logic is usually added in a main application program of the intelligent device to reflect the operating state of the intelligent device, however, when the main application program has operation errors such as downtime, the indicator light control logic is also out of control, so that the indicator light cannot reflect the operating state of the current intelligent device. The embodiment of the application provides an indicator light control method, an indicator light control device, a terminal device and a storage medium, and the indicator light control step is realized through an indicator light control program independent of a main application program and an indicator light configuration file, so that the stability and the accuracy of the indicator light control can be ensured, the condition that the indicator light control is disordered due to the fact that the main application program is in operation errors is avoided, the effective control of the indicator light is ensured, and the efficiency and the accuracy of the indicator light control are improved.
The first embodiment is as follows:
fig. 1 shows a schematic flow chart of a first indicator light control method provided in an embodiment of the present application, which is detailed as follows:
the execution main body of the embodiment of the application is intelligent equipment provided with an indicator light, and the intelligent equipment comprises a main application program and an indicator light control program which respectively and independently run. The main application program is used for executing main application functions of the intelligent equipment, and the indicator light control program is specially used for executing the indicator light control steps.
Optionally, the smart device in the embodiment of the present application includes, but is not limited to, a Vehicle Connection Interface (VCI) box, an OBD connector, and other smart Vehicle-mounted devices, and may further include various terminal devices with indicator lights, which are applied to other fields. The intelligent device as the execution main body in the embodiment of the application is specifically a VCI box, the main application function of the VCI box is a vehicle data transmission function, that is, the main application program of the VCI box is used for the vehicle data transmission function, and the indicator light control program independent of the main application program is specially used for executing the indicator light control step.
The indication lamp control method in the embodiment of the application is realized by executing an indication lamp control step through an indication lamp control program, and the indication lamp control step comprises the following steps:
s101: and acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the mode state conversion is detected by the main application program.
The indicator lamp configuration file in the embodiment of the application comprises indicator lamp configuration information, wherein the indicator lamp configuration information is written by a main application program and comprises unique identification information of the indicator lamp and corresponding on-off action identification information.
Specifically, each mode of the intelligent device corresponds to one type of indicator light configuration information, and the mode of the current intelligent device after mode state conversion is called a target mode in the embodiment of the application. And in the running process of the main application program, when the mode state change of the current intelligent equipment is detected, the indicating lamp configuration information corresponding to the target mode is written into the indicating lamp configuration file.
The indicator light control program obtains the indicator light configuration file, and specifically, the indicator light control program may automatically read the indicator light configuration file every preset time period.
S102: and controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file.
And after the indicator lamp control program acquires the indicator lamp configuration file, if the indicator lamp configuration file is detected to have updated indicator lamp configuration information, controlling the on-off action of the indicator lamp according to the updated indicator lamp configuration information. Optionally, only one indicator configuration information is stored in the indicator configuration file, that is, the indicator configuration information newly written by the main application program each time covers the previous indicator configuration information, and the latest indicator configuration information is cached in the cache unit of the indicator control program, and the indicator configuration information is cached after the indicator configuration information is obtained each time; after the indicator light control program acquires the indicator light configuration file, if the indicator light control program is detected to read the indicator light configuration information for the first time currently, or the indicator light configuration information in the indicator light configuration file is detected to be inconsistent with the indicator light configuration information cached by the indicator light control program, controlling the on-off action of the indicator light according to the indicator light configuration information, and updating the indicator light configuration information cached by the indicator light control program. Optionally, a plurality of historical indicator light configuration information and corresponding timestamp information are stored in the indicator light configuration file, that is, the indicator light configuration information newly written by the main application program each time does not cover the historical indicator light configuration information, and the timestamp information when written is recorded while the indicator light configuration information is written each time; correspondingly, the indicator light control program may determine whether the indicator light configuration file has updated indicator light configuration information according to the timestamp information, for example, when a time difference between the timestamp information of the indicator light configuration information and a current system timestamp is smaller than a preset threshold, or the timestamp information of the indicator light configuration information is not consistent with the timestamp information of the last indicator light configuration information cached by the indicator light control program, determine that the indicator light configuration information is the indicator light configuration information that has just been updated.
Specifically, the indicator lights in the embodiment of the present application may include one or more indicator lights, and the on/off actions of the indicator lights may include an on action, an off action, and a cyclic blinking action of one indicator light, and may further include a combination of an on action, an off action, and a cyclic blinking action of a plurality of indicator lights. The method comprises the steps of determining an indicator lamp which needs to be controlled currently according to unique identification information of the indicator lamp contained in indicator lamp configuration information, and determining the on-off action which needs to be executed by the indicator lamp currently according to on-off action identification information contained in the indicator lamp configuration information, so that the specific indicator lamp is controlled to execute the specific on-off action to indicate that the intelligent equipment is in a target mode currently.
Optionally, before the indicator light control step is executed by the indicator light control program, the method further includes:
and loading the main application program and the indicator lamp control program.
In the embodiment of the application, after the intelligent device acquires the starting signal, the intelligent device is powered on and started, and the main application program and the indicator light control program are loaded to the running unit from the storage unit of the intelligent device, so that the main application program and the indicator light control program can be simultaneously and independently run. Optionally, before the main application program and the indicator light control program are loaded, the method further includes executing a specific on-off action by the system control indicator light to indicate that the smart device is currently in the power-on starting state.
In the embodiment of the application, the intelligent device comprises a main application program and an indicator light control program which respectively and independently run, and the indicator light control program accurately controls the indicator light according to the indicator light configuration file containing the indicator light configuration information written by the main application program. The control method has the advantages that the configuration file of the indicating lamp is used as a medium, and the control step of the indicating lamp is realized through the indicating lamp control program independent of the main application program, so that the stability and the accuracy of the indicating lamp control can be ensured, the condition that the operation of the main application program is wrong to cause the disorder of the indicating lamp control is avoided, the effective control of the indicating lamp is ensured, and the efficiency and the accuracy of the indicating lamp control are improved.
Example two:
fig. 2 shows a schematic flow chart of a second indicator light control method provided in an embodiment of the present application, where an execution subject in the embodiment of the present application is an intelligent device, and the intelligent device includes a main application program and an indicator light control program that operate independently. The main application program is used for executing main application functions of the intelligent equipment, and the main application functions comprise communication functions; the indicator light control program is dedicated to performing the indicator light control step.
The indicator light control method according to the embodiment of the present application includes executing step S201 to step S203 shown in fig. 2 by the main application program, and executing step S204 to step S205 shown in fig. 2 by the indicator light control program, which is detailed as follows:
s201: creating a communication thread, wherein the communication thread comprises a WiFi communication thread, a Bluetooth communication thread and/or a USB communication thread.
Specifically, when the main application program is initially operated, all the indicator lights are initially turned off, and then a communication thread is created, wherein the communication thread may include one or more of a WiFi communication thread, a bluetooth communication thread and a USB communication thread.
S202: and if the communication connection signal is detected, awakening the communication thread corresponding to the communication connection signal.
After the communication thread is created, the main application program continuously detects whether a communication connection signal exists currently, where the communication connection signal may include a WiFi connection signal, a bluetooth connection signal, and a USB connection signal, and corresponds to a WiFi communication thread, a bluetooth communication thread, and a Universal Serial Bus (USB) communication thread, respectively. And when the communication connection signal is detected, awakening the communication thread corresponding to the communication connection signal.
S203: and if the mode state change is detected in the communication thread corresponding to the communication connection signal, writing corresponding indicator lamp configuration information into the indicator lamp configuration file according to the target mode after the mode state change.
And after the communication thread corresponding to the communication connection signal is awakened, continuously detecting whether the intelligent equipment has mode state change in the corresponding communication thread. And if the mode state is changed, writing the indicator lamp configuration information corresponding to the target mode after the mode state is changed into the indicator lamp configuration file.
S204: and acquiring the indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the mode state conversion is detected by the main application program.
Step S204 in the embodiment of the present application is the same as step S101 in the first embodiment, and please refer to the related description of step S101 in the first embodiment, which is not repeated herein.
S205: and controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file.
Step S205 in the embodiment of the present application is the same as step S102 in the first embodiment, and please refer to the related description of step S102 in the first embodiment, which is not repeated herein.
In the embodiment of the application, the operation of writing the indicator lamp configuration information into the indicator lamp configuration file is specifically executed in the communication thread of the main application program, so that the indicator lamp control program which runs independently in the following can accurately control the indicator lamp according to the indicator lamp configuration file, and the communication state of the current intelligent device can be reflected by accurately controlling the indicator lamp.
Optionally, the target mode includes a normal mode, a communication abnormality alarm mode, a firmware upgrade mode, and a tool test mode, the indicator light configuration information at least includes a mode identification number corresponding to the target mode one to one, and the step S203 includes:
s20301: if the mode state change that is specifically the communication connection is established or the communication connection is disconnected is detected, determining that the current target mode is the normal mode, and writing first indicator lamp configuration information corresponding to the normal mode into the indicator lamp configuration file, wherein the first indicator lamp configuration information comprises a first mode identification number, communication mode identification information and on-off identification information;
s20302: if the mode state change of the communication abnormity is detected, determining that the current target mode is the abnormal communication alarm mode, and writing second indicator lamp configuration information corresponding to the abnormal communication alarm mode into the indicator lamp configuration file, wherein the second indicator lamp configuration information comprises a second mode identification number and the communication mode identification information;
s20303: if the mode state change is detected to be specifically the mode state change of the acquired firmware upgrading instruction frame, determining that the current target mode is the firmware upgrading mode, and writing third indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file, wherein the third indicator lamp configuration information comprises a third mode identification number;
s20304: and if the mode state change is detected to be specifically the mode state change of the obtained tool test instruction frame, determining that the current target mode is the tool test mode, and writing fourth indicator lamp configuration information corresponding to the tool test mode into the indicator lamp configuration file, wherein the fourth indicator lamp configuration information comprises a fourth mode identification number.
The target mode of the embodiment of the application comprises the following steps: a normal mode, i.e. a mode in which the intelligent device normally executes a communication function; a communication abnormity alarm mode, namely a mode that communication data transmission errors occur in the intelligent equipment; a firmware upgrading mode, namely a mode for performing bottom layer software modification and upgrading on the intelligent equipment; tool test mode: i.e. the mode in which the smart device hardware is tested. The four target patterns are respectively corresponding to a pattern identification number, and for example, the numbers "1", "2", "3", "4" or the letters "a", "B", "C", and "D" can be respectively used as the pattern identification numbers of the four target patterns.
In step S2031, if it is detected that the communication connection is established or the communication connection is disconnected in the current communication thread, the mode state is considered to be changed once, and the target mode after the mode state change is determined as the normal mode, and at this time, the first indicator light configuration information corresponding to the normal mode is written into the indicator light configuration file. Specifically, the first indicator light configuration information includes a first mode identification number, current communication mode identification information, and on-off identification information. The first mode identification number is used for identifying that the current mode is a normal mode. The communication mode identification information is used for identifying a communication mode corresponding to the current communication thread; specifically, if the current communication thread is a WiFi communication thread, the communication identification information is identification information (for example, "WiFi") identifying a WiFi communication mode; if the current thread is a bluetooth communication thread, the communication identification information is identification information (such as "BT") for identifying a bluetooth communication mode; if the current communication thread is a USB communication thread, the communication identification information is identification information of a USB communication mode (for example, "USB"). The lighting and extinguishing identification information specifically comprises lighting identification information and extinguishing identification information, the lighting identification information identifies that the control action to be executed is a lighting action, and the extinguishing identification information identifies that the control action to be executed is an extinguishing action; for example, the lighting identification information may be "1", indicating that a lighting action needs to be performed; the light-out identification information may be "0" indicating that a light-out action needs to be performed. Specifically, if the current mode state is changed to specifically be that communication connection is established, the on/off identification information is specifically lighting identification information; if the current mode state is changed to be communication disconnection, the lighting identification information is lighting identification information. Optionally, when the communication thread is just woken up, it is regarded as that mode state change of the established communication connection is detected once, it is determined that the current target mode is a normal mode and the current action to be executed is a light-on action, and first indicator light configuration information carrying the first mode identification number, the current communication mode identification information and the light-on identification information is written into the indicator light configuration file.
Exemplarily, in a WiFi communication thread, immediately after waking up the WiFi communication thread, it is determined that mode state transformation of an established communication connection currently occurs, a target mode is a normal mode, and a first mode identification number "1" corresponding to the normal mode, communication mode identification information "WiFi" corresponding to the WiFi communication mode, and lighting identification information "1" corresponding to a lighting action are combined into indicator configuration information: 1, WiFi, 1, writing into an indicator light configuration file; then, if the disconnection of the WiFi is detected, determining that the current mode state of the communication disconnection is changed, wherein the target mode is the normal mode, and combining a first mode identification number "1" corresponding to the normal mode, communication mode identification information "WiFi" corresponding to the WiFi communication mode, and light-off identification information "0" corresponding to the light-off action into indicator light configuration information: "1, WiFi, 0" is written into the configuration file of the indicator light.
In an exemplary case, in a bluetooth communication thread, immediately after waking up the bluetooth communication thread, it is determined that a mode state change of an established communication connection currently occurs, and a target mode is a normal mode, and a first mode identification number "1" corresponding to the normal mode, communication mode identification information "BT" corresponding to the bluetooth communication mode, and lighting identification information "1" corresponding to a lighting action are combined into indicator configuration information: "1, BT, 1", written in the configuration file of the indicator light; then, if the disconnection of the bluetooth is detected, determining that the current mode state of the communication disconnection is changed, wherein the target mode is a normal mode, and combining a first mode identification number '1' corresponding to the normal mode, communication mode identification information 'BT' corresponding to the bluetooth communication mode and light-off identification information '0' corresponding to the light-off action into indicator light configuration information: "1, BT, 0" is written into the indicator light configuration file.
Exemplarily, in the USB communication thread, immediately after waking up the USB communication thread, it is determined that mode state transformation of the established communication connection currently occurs, the target mode is a normal mode, and a first mode identification number "1" corresponding to the normal mode, communication mode identification information "USB" corresponding to the USB communication mode, and lighting identification information "1" corresponding to the lighting action are combined into indicator configuration information: "1, USB, 1", write into the configuration file of the pilot lamp; then, if the disconnection of the USB is detected, it is determined that the current mode state of the communication disconnection is changed, the target mode is the normal mode, at this time, the first mode identification number "1" corresponding to the normal mode, the communication mode identification information "USB" corresponding to the USB communication mode, and the light-off identification information "0" corresponding to the light-off action are combined into the indicator light configuration information: "1, USB, 0" is written into the indicator light configuration file.
In S20302, when a communication abnormality is detected in the current communication thread, it is regarded as a mode state transition, and the target mode after the mode state transition is determined as a communication abnormality alert mode, and at this time, second indicator lamp configuration information corresponding to the communication abnormality alert mode is written into the indicator lamp configuration file. Specifically, the communication abnormality may include a case where an error exists in the format of the transmitted communication data, a packet is lost, or a packet is garbled. Specifically, the second indicator light configuration information may include a second mode identification number and the communication mode identification information described in step S20301. Wherein the second mode identification number is used to identify the current mode as a communication abnormality alert mode (which may be identified by the number "2", for example).
Exemplarily, in a WiFi communication thread, if it is checked that there are communication abnormal conditions such as errors, data packet loss, or data packet confusion in a WiFi communication data format, it is determined that the current communication abnormal alarm mode is, and a second mode identification number "2" for identifying the communication abnormal alarm mode and current communication mode identification information "WiFi" constitute indicator light configuration information: "2, WiFi", written in the configuration file of the indicator light.
Exemplarily, in the bluetooth communication thread, if it is checked that there are communication abnormal conditions such as errors, data packet loss, or data packet confusion in the bluetooth communication data format, it is determined that the current communication abnormal alarm mode is, and the second mode identification number "2" and the current communication mode identification information "BT" for identifying the communication abnormal alarm mode are combined into the indicator configuration information: "2, BT", written in the indicator light profile.
Exemplarily, in the USB communication thread, if it is checked that there is a communication abnormal situation such as an error, a data packet loss, or a data packet disorder in the USB communication data format, it is determined that the current communication abnormal alarm mode is, and the second mode identification number "2" for identifying the communication abnormal alarm mode and the current communication mode identification information "USB" constitute the indicator light configuration information: "2, USB", written in the indicator light configuration file.
In S20303, in the current communication thread, after the communication data is acquired, it is detected whether the communication data is a configuration data frame for performing system configuration of the intelligent device; if the configuration data frame is the configuration data frame, further detecting whether the configuration data frame is a firmware upgrading instruction frame for indicating the intelligent equipment to carry out firmware upgrading; and if the instruction frame is a firmware upgrading instruction frame, judging that mode state conversion currently exists, determining a target mode after the mode state conversion as a firmware upgrading mode, and writing third indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file. The third indicator light configuration information includes a third mode identification number. The third mode identification number is used to identify that the current mode is a firmware upgrade mode, and may be, for example, the number "3".
In S20304, in the current communication thread, after the communication data is acquired, it is detected whether the communication data is a configuration data frame for performing system configuration of the intelligent device; if the configuration data frame is the configuration data frame, further detecting whether the configuration data frame is a tool test instruction frame for indicating the intelligent equipment to perform tool test; and if the command frame is a tool test command frame, judging that mode state conversion currently exists, determining a target mode after the mode state conversion as a tool test mode, and writing fourth indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file. The fourth indicator light configuration information includes a fourth mode identification number. The fourth mode identification number is used to identify that the current mode is a firmware upgrade mode, and may be, for example, the number "4".
In the embodiment of the application, four target modes which may occur when the intelligent device executes a communication thread through a main application program are further considered, and the determination of the four target modes and the indicator lamp configuration information in different target modes are further described, so that the indicator lamp configuration information written in the indicator lamp configuration file can more accurately reflect the four target modes, and a subsequent indicator lamp control program can more accurately control the on-off action of the indicator lamp according to the indicator lamp configuration file.
Optionally, the indicator light includes one or more of a WiFi signal indicator light, a bluetooth signal indicator light, and a USB signal indicator light, and correspondingly, the step S205 includes:
and executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file so as to control one or more of the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to execute on-off actions.
In the embodiment of the present application, the indicator light of the smart device generally includes a signal indicator light corresponding to the current communication mode, and specifically includes one or more of a WiFi signal indicator light, a bluetooth signal indicator light, and a USB signal indicator light. The indicating lamp configuration information in the indicating lamp configuration file specifically comprises a mode identification number, the indicating lamp control program identifies the mode identification number and executes an indicating lamp control sub-process corresponding to the mode identification number, and the target mode of the VCI box is represented by controlling one or more of the WiFi signal indicating lamp, the Bluetooth signal indicating lamp and the USB signal indicating lamp to execute lighting and extinguishing actions.
In the embodiment of the application, one or more of a WiFi signal indicator lamp, a Bluetooth signal indicator lamp and a USB signal indicator lamp which are normally arranged on the intelligent equipment can be used as the indicator lamp for indicating the target mode, so that the current target mode can be conveniently and effectively reflected by controlling the on-off action of the normally arranged signal indicator lamp. And the execution of the corresponding indicator light control sub-process is controlled according to the mode identification number corresponding to the target mode, so that the indicator light control processes of different target modes run independently without mutual interference, and the effectiveness and stability of the indicator light control can be further improved.
Optionally, if the target mode is the normal mode, the executing, according to the mode identifier in the indicator configuration file, an indicator control sub-process corresponding to the mode identifier to control one or more of the WiFi signal indicator, the bluetooth signal indicator, and the USB signal indicator to execute an on/off action includes:
and executing a first indicator light control sub-process corresponding to the first mode identification number according to indicator light configuration information contained in the indicator light configuration file, wherein the first indicator light control sub-process comprises controlling the WiFi signal indicator light, the Bluetooth signal indicator light or the USB signal indicator light to execute a light-on action or a light-off action according to the current communication mode identification information and the light-on and light-off identification information.
In the embodiment of the application, the target mode is specifically a normal mode, the indicator configuration information included in the indicator configuration file is specifically first indicator configuration information, and the first indicator configuration information sequentially includes three fields of a first mode identification number, communication mode identification information, and on/off identification information. And after the indicator light control program acquires the first indicator light configuration information, executing a first indicator light control sub-process corresponding to the normal mode through a first field of the first indicator light configuration information, namely a first mode identification number. In the first indicator light control sub-process, the indicator light which needs to be controlled currently is determined according to the second field of the first indicator light configuration information, namely the communication mode identification information, and the current control brake is determined to be a light-on action or a light-off action according to the third field of the indicator light configuration information, namely the light-on and light-off identification information. Exemplarily, if the current indicator light configuration information is "1, WiFi, 1", executing a first indicator light control sub-process corresponding to the normal mode, determining that the indicator light to be controlled currently is a WiFi signal indicator light, and controlling the WiFi signal indicator light to execute a lighting action; and if the current configuration information of the indicator light is '1, WiFi, 0', executing a first indicator light control sub-process corresponding to the normal mode, determining that the indicator light needing to be controlled currently is a WiFi signal indicator light, and controlling the WiFi signal indicator light to execute a light-out action. Exemplarily, if the current indicator light configuration information is "1, BT, 1", executing a first indicator light control sub-process corresponding to the normal mode, determining that the indicator light which needs to be controlled currently is a bluetooth signal indicator light, and controlling the bluetooth signal indicator light to execute a light-on action; and if the current configuration information of the indicator light is '1, BT, 0', executing a first indicator light control sub-process corresponding to the normal mode, determining that the indicator light needing to be controlled currently is a Bluetooth signal indicator light, and controlling the Bluetooth signal indicator light to execute a light-out action. Exemplarily, if the current configuration information of the indicator light is "1, USB, 1", executing a first indicator light control sub-process corresponding to the normal mode, determining that the indicator light to be controlled currently is a USB signal indicator light, and controlling the USB signal indicator light to execute a lighting action; and if the current configuration information of the indicator light is '1, USB, 0', executing a first indicator light control sub-process corresponding to the normal mode, determining that the indicator light needing to be controlled currently is a USB signal indicator light, and controlling the USB signal indicator light to execute a light-off action.
In the embodiment of the application, the indicator light configuration information specifically includes a first mode identification number, communication mode identification information and lighting identification information corresponding to the normal mode, and the WiFi signal indicator light, the bluetooth signal indicator light or the USB signal indicator light is correspondingly controlled to perform a lighting action or a lighting-out action according to the indicator light configuration information, so that the current VCI box can be accurately reflected to be in the normal mode, the communication mode and the communication connection state of the current VCI box can be reflected, the content of information represented by the indicator light is enlarged, and the richness and accuracy of the information indicated by the indicator light are improved.
Optionally, if the target mode is the abnormal communication alarm mode, according to the mode identification number in the indicator light configuration file, executing an indicator light control sub-process corresponding to the mode identification number to control one or more of the WiFi signal indicator light, the bluetooth signal indicator light, and the USB signal indicator light to execute an on/off action, including:
and executing a second indicator light control sub-process corresponding to the second mode identification number according to the second indicator light configuration information contained in the indicator light configuration file, wherein the second indicator light control sub-process comprises controlling the WiFi signal indicator light, the Bluetooth signal indicator light or the USB signal indicator light to execute a preset on-off action according to the current communication mode identification information.
In the embodiment of the application, the target mode is specifically a communication abnormality alarm mode, the indicator configuration information included in the indicator configuration file is specifically second indicator configuration information, and the second indicator configuration information sequentially includes two fields of a second mode identification number and communication mode identification information.
Optionally, the preset turning-on and turning-off action in this embodiment may be turning off after a signal indicator corresponding to the communication mode of the current communication thread is turned on for a preset time (e.g., 1 second) (e.g., a WiFi signal indicator corresponding to the WiFi communication thread, a bluetooth signal indicator corresponding to the bluetooth communication thread, and a USB signal indicator corresponding to the USB communication thread).
And the indicator light control program acquires second indicator light configuration information contained in the indicator light configuration file, and executes a second indicator light control sub-process corresponding to the abnormal communication alarm mode according to a first field, namely a second mode identification number, in the indicator light configuration information contained in the indicator light configuration file. In the second indicator light control sub-process, according to the second subfield in the indicator light configuration information, namely the current communication mode identification information, the indicator light which needs to be controlled currently is determined, and the indicator light is controlled to execute the preset on-off action. Exemplarily, if the current indicator light configuration information is "2, WiFi", it is determined that the indicator light which is currently in the abnormal communication alarm mode and needs to be controlled is a WiFi signal indicator light, and the WiFi signal indicator light is controlled to execute a preset on-off action (for example, the WiFi signal indicator light is controlled to be turned off after being turned on for 1 s). Exemplarily, if the current indicator light configuration information is "2, BT", it is determined that the current indicator light is in the communication abnormal alarm mode and the indicator light required to be controlled is the bluetooth signal indicator light, and the bluetooth signal indicator light is controlled to execute the preset on-off action. Exemplarily, if the current indicator light configuration information is "2, USB", it is determined that the current indicator light is in the abnormal communication alarm mode and the indicator light to be controlled is the USB signal indicator light, and the USB signal indicator light is controlled to execute the preset on-off action.
Optionally, if the target mode is a firmware upgrade mode, the step of executing, according to the mode identifier in the indicator configuration file, an indicator control sub-process corresponding to the mode identifier to control one or more of the WiFi signal indicator, the bluetooth signal indicator, and the USB signal indicator to execute an on/off action includes:
and executing a third indicator light control sub-process corresponding to the third mode identification number according to the third indicator light configuration information contained in the indicator light configuration file, wherein the third indicator light control sub-process comprises controlling the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to sequentially and alternately flash at a first preset interval duration.
In this embodiment of the application, the target mode is specifically a firmware upgrade mode, the indicator configuration information included in the indicator configuration file is specifically third indicator configuration information, and the third indicator configuration information includes a third mode identification number.
And the indicating lamp control program acquires the indicating lamp configuration file and executes a third indicating lamp control sub-process corresponding to the third mode identification number according to the third mode identification number contained in the indicating lamp configuration file. Specifically, the third indicator light control sub-process includes controlling the WiFi signal indicator light, the bluetooth signal indicator light, and the USB signal indicator light to blink alternately in sequence at a first preset interval duration, respectively, to indicate that the current smart device is in the firmware upgrade mode.
Illustratively, the first preset interval duration is 0.5 seconds, the third indicator light control sub-flow includes:
a1: controlling the WiFi signal indicator lamp to keep on for 0.5 second, and controlling the Bluetooth signal indicator lamp and the USB signal indicator lamp to be in a light-off state;
a2: controlling the Bluetooth signal indicator lamp to keep on for 0.5 second, and controlling the WiFi signal indicator lamp and the USB signal indicator lamp to be in a light-off state;
a3: and controlling the USB signal indicator lamp to keep in a light-on state for 0.5 second, and controlling the WiFi signal indicator lamp and the Bluetooth signal indicator lamp to be in a light-off state.
And alternately flashing the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light by circularly executing the steps A1 to A3.
Optionally, if the target mode is a tool test mode, the method, according to the mode identification number in the indicator light configuration file, executes an indicator light control sub-process corresponding to the mode identification number to control one or more of the WiFi signal indicator light, the bluetooth signal indicator light, and the USB signal indicator light to execute a lighting-off action, including:
and executing a fourth indicator light control sub-process corresponding to the fourth mode identification number according to the fourth indicator light configuration information contained in the indicator light configuration file, wherein the fourth indicator light control sub-process comprises controlling the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to circularly flash at a second preset interval time simultaneously.
In the embodiment of the application, the target mode is specifically a tool test mode, the indicator light configuration information included in the indicator light configuration file is specifically fourth indicator light configuration information, and the fourth indicator light configuration information includes a fourth mode identification number.
And the indicating lamp control program acquires the indicating lamp configuration file and executes a fourth indicating lamp control sub-process corresponding to the fourth mode identification number according to the fourth mode identification number contained in the indicating lamp configuration file. Specifically, the fourth indicator light control sub-process includes controlling the WiFi signal indicator light, the bluetooth signal indicator light and the USB signal indicator light to flash cyclically at a second preset interval duration simultaneously to indicate that the current smart device is in a tool testing mode.
Illustratively, the second preset interval duration is 0.5 second, the fourth indicator light control sub-flow includes:
b1: controlling the WiFi signal indicator lamp, the Bluetooth signal indicator lamp and the USB signal indicator lamp and keeping the lighting state for 0.5 second;
b2: and controlling the WiFi signal indicator lamp, the Bluetooth signal indicator lamp and the USB signal indicator lamp while keeping the lamp-out state for 0.5 second.
And circularly executing the steps B1-B2 to realize the simultaneous circular flashing of the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light.
In the embodiment of the application, one or more of the WiFi signal indicator lamp, the Bluetooth signal indicator lamp and the USB signal indicator lamp which control the intelligent equipment through the indicator lamp control program independent of the running of the main application program in the intelligent equipment perform on-off actions, so that the normal mode, the communication abnormity alarm mode, the firmware upgrading mode and the tool testing mode of the current intelligent equipment can be stably and accurately displayed through the three signal indicator lamps, the control efficiency of the indicator lamps is improved, and the richness and the accuracy of information indicated by the indicator lamps are improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by functions and internal logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example three:
fig. 3 shows a schematic structural diagram of an indicator light control device provided in an embodiment of the present application, and for convenience of description, only parts related to the embodiment of the present application are shown:
the indicator lamp control device comprises a main application program running unit 31 and an indicator lamp control program running unit 32 which are respectively independent:
the main application running unit 31 is configured to run a main application.
The indicator light control program running unit 32 is configured to run an indicator light control program.
The indicator light control program operating unit 32 specifically includes:
an obtaining module 321, configured to obtain an indicator light configuration file, where the indicator light configuration file includes indicator light configuration information, and the indicator light configuration information is information that is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after a mode state conversion is detected by the primary application program running unit;
and the control module 322 is used for controlling the module to control the on-off action of the indicator light according to the indicator light configuration information of the indicator light configuration file.
Optionally, the main application running unit 31 includes a thread creating module, a detecting module, and a writing module:
the thread creating module is used for creating communication threads, and the communication threads comprise WiFi communication threads, Bluetooth communication threads and/or USB communication threads;
the detection module is used for awakening the communication thread corresponding to the communication connection signal if the communication connection signal is detected;
and the writing module is used for writing corresponding indicator lamp configuration information into the indicator lamp configuration file according to the target mode after the mode state is changed if the mode state change is detected in the communication thread corresponding to the communication connection signal.
Optionally, the target mode includes a normal mode, a communication abnormality alarm mode, a firmware upgrade mode, and a tool test mode, the indicator configuration information at least includes a mode identification number corresponding to the target mode one to one, and the write-in module is specifically configured to:
if the mode state change that is specifically the communication connection is established or the communication connection is disconnected is detected, determining that the current target mode is the normal mode, and writing first indicator lamp configuration information corresponding to the normal mode into the indicator lamp configuration file, wherein the first indicator lamp configuration information comprises a first mode identification number, communication mode identification information and on-off identification information;
if the mode state change of the communication abnormity is detected, determining that the current target mode is the abnormal communication alarm mode, and writing second indicator lamp configuration information corresponding to the abnormal communication alarm mode into the indicator lamp configuration file, wherein the second indicator lamp configuration information comprises a second mode identification number and the communication mode identification information;
if the mode state change is detected to be specifically the mode state change of the acquired firmware upgrading instruction frame, determining that the current target mode is the firmware upgrading mode, and writing third indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file, wherein the third indicator lamp configuration information comprises a third mode identification number;
and if the mode state change is detected to be specifically the mode state change of the obtained tool test instruction frame, determining that the current target mode is the tool test mode, and writing fourth indicator lamp configuration information corresponding to the tool test mode into the indicator lamp configuration file, wherein the fourth indicator lamp configuration information comprises a fourth mode identification number.
Optionally, the indicator light includes a WiFi signal indicator light, a bluetooth signal indicator light and a USB signal indicator light, correspondingly:
the control module 322 is specifically configured to execute an indicator light control sub-process corresponding to the mode identifier according to the mode identifier in the indicator light configuration file, so as to control one or more of the WiFi signal indicator light, the bluetooth signal indicator light, and the USB signal indicator light to execute an on/off action.
Optionally, if the target mode is the normal mode, then:
the control module 322 is specifically configured to execute a first indicator light control sub-process corresponding to the first mode identification number according to the first indicator light configuration information included in the indicator light configuration file, where the first indicator light control sub-process includes controlling the WiFi signal indicator light, the bluetooth signal indicator light, or the USB signal indicator light to execute a light-on action or a light-off action according to the communication mode identification information and the light-on/off identification information.
Optionally, if the target mode is a communication abnormality alarm mode, then:
the control module 322 is specifically configured to execute a second indicator light control sub-process corresponding to the second mode identification number according to the second indicator light configuration information included in the indicator light configuration file, where the second indicator light control sub-process includes controlling the WiFi signal indicator light, the bluetooth signal indicator light, or the USB signal indicator light to execute a preset on/off action according to the communication mode identification information.
Optionally, the indicator light control device further comprises:
and the loading unit is used for loading the main application program and the indicator lamp control program.
It should be noted that, for the information interaction, execution process, and other contents between the above devices/units, the specific functions and technical effects thereof based on the same concept as those of the method embodiment of the present application can be specifically referred to the method embodiment portion, and are not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Example four:
fig. 4 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4, the terminal device 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42, such as a pilot light control program, stored in said memory 41 and executable on said processor 40. The processor 40 implements the steps in the above-described respective indicator light control method embodiments, such as steps S101 to S102 shown in fig. 1, when executing the computer program 42. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above device embodiments, such as the functions of the modules 321 to 322 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units, which are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 42 in the terminal device 4. For example, the computer program 42 may be divided into a main application program running unit and an indicator light control program running unit which are independent of each other, the indicator light control program running unit includes an obtaining module and a control module, and the specific functions of the modules are as follows:
the acquisition module is used for acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the main application program operation unit detects mode state conversion;
and the control module is used for controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file.
The terminal device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of a terminal device 4 and does not constitute a limitation of terminal device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. The memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing the computer program and other programs and data required by the terminal device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (9)

1. An indicator light control method is applied to intelligent equipment, and is characterized in that the intelligent equipment comprises a main application program and an indicator light control program which respectively and independently run, and the indicator light control method comprises the following steps of executing indicator light control through the indicator light control program:
acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the mode state conversion is detected by the main application program;
controlling the on-off action of the indicator light according to the indicator light configuration information of the indicator light configuration file;
the indicator light control method further comprises: executing, by the host application, the steps of:
creating a communication thread;
if a communication connection signal is detected, awakening the communication thread corresponding to the communication connection signal;
if the mode state change is detected in the communication thread corresponding to the communication connection signal, writing corresponding indicator lamp configuration information into the indicator lamp configuration file according to the target mode after the mode state change;
wherein the target mode includes a tool test mode, the indicator light configuration information at least includes a mode identification number corresponding to the target mode one to one, and if the mode state change is detected in the communication thread corresponding to the communication connection signal, writing the corresponding indicator light configuration information into the indicator light configuration file according to the target mode after the mode state change, including:
and if the mode state change is detected to be specifically the mode state change of the obtained tool test instruction frame, determining that the current target mode is the tool test mode, and writing fourth indicator lamp configuration information corresponding to the tool test mode into the indicator lamp configuration file, wherein the fourth indicator lamp configuration information comprises a fourth mode identification number.
2. The indicator light control method according to claim 1, wherein the target modes further include a normal mode, a communication abnormal alarm mode, and a firmware upgrade mode, and the writing of the corresponding indicator light configuration information into the indicator light configuration file according to the target mode after the mode state transition if the mode state transition is detected in the communication thread corresponding to the communication connection signal further includes:
if the mode state change that is specifically the communication connection is established or the communication connection is disconnected is detected, determining that the current target mode is the normal mode, and writing first indicator lamp configuration information corresponding to the normal mode into the indicator lamp configuration file, wherein the first indicator lamp configuration information comprises a first mode identification number, communication mode identification information and on-off identification information;
if the mode state change of the communication abnormity is detected, determining that the current target mode is the abnormal communication alarm mode, and writing second indicator lamp configuration information corresponding to the abnormal communication alarm mode into the indicator lamp configuration file, wherein the second indicator lamp configuration information comprises a second mode identification number and the communication mode identification information;
and if the mode state change is detected to be specifically the mode state change of the acquired firmware upgrading instruction frame, determining that the current target mode is the firmware upgrading mode, and writing third indicator lamp configuration information corresponding to the firmware upgrading mode into the indicator lamp configuration file, wherein the third indicator lamp configuration information comprises a third mode identification number.
3. The indicator light control method according to claim 2, wherein the indicator light comprises one or more of a WiFi signal indicator light, a bluetooth signal indicator light and a USB signal indicator light, and correspondingly, the controlling of the on/off operation of the indicator light according to the indicator light configuration information of the indicator light configuration file comprises:
and executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file so as to control one or more of the WiFi signal indicator light, the Bluetooth signal indicator light and the USB signal indicator light to execute on-off actions.
4. The indicator light control method according to claim 3, wherein if the target mode is the normal mode, the executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file to control one or more of the WiFi signal indicator light, the bluetooth signal indicator light, and the USB signal indicator light to perform a lighting-off action comprises:
and executing a first indicator light control sub-process corresponding to the first mode identification number according to the first indicator light configuration information contained in the indicator light configuration file, wherein the first indicator light control sub-process comprises controlling the WiFi signal indicator light, the Bluetooth signal indicator light or the USB signal indicator light to execute a light-on action or a light-off action according to the communication mode identification information and the light-on and light-off identification information.
5. The indicator light control method according to claim 3, wherein if the target mode is the abnormal communication alarm mode, executing an indicator light control sub-process corresponding to the mode identification number according to the mode identification number in the indicator light configuration file to control one or more of the WiFi signal indicator light, the bluetooth signal indicator light and the USB signal indicator light to perform a lighting-off action, comprising:
and executing a second indicator light control sub-process corresponding to the second mode identification number according to the second indicator light configuration information contained in the indicator light configuration file, wherein the second indicator light control sub-process comprises controlling the WiFi signal indicator light, the Bluetooth signal indicator light or the USB signal indicator light to execute a preset on-off action according to the communication mode identification information.
6. The indicator light control method according to any one of claims 1 to 5, further comprising, before said indicator light control step is executed by said indicator light control program:
and loading the main application program and the indicator lamp control program.
7. An indicator lamp control device, characterized in that, the indicator lamp control device includes a main application program running unit and an indicator lamp control program running unit which are independent respectively, the main application program running unit is used for running a main application program, the indicator lamp control program running unit is used for running an indicator lamp control program, the indicator lamp control program running unit includes:
the acquisition module is used for acquiring an indicator light configuration file, wherein the indicator light configuration file comprises indicator light configuration information, and the indicator light configuration information is information which is written into the indicator light configuration file correspondingly according to a target mode after mode state conversion after the main application program operation unit detects mode state conversion;
the control module is used for controlling the on-off action of the indicator lights according to the indicator light configuration information of the indicator light configuration file;
the main application program running unit includes:
the thread creating module is used for creating communication threads, and the communication threads comprise WiFi communication threads, Bluetooth communication threads and/or USB communication threads;
the detection module is used for awakening the communication thread corresponding to the communication connection signal if the communication connection signal is detected;
a writing module, configured to write corresponding indicator configuration information into the indicator configuration file according to the target mode after the mode state is changed if the mode state change is detected in the communication thread corresponding to the communication connection signal;
the target mode includes a tool test mode, the indicator light configuration information at least includes a mode identification number corresponding to the target mode one to one, and the write-in module is specifically configured to:
and if the mode state change is detected to be specifically the mode state change of the obtained tool test instruction frame, determining that the current target mode is the tool test mode, and writing fourth indicator lamp configuration information corresponding to the tool test mode into the indicator lamp configuration file, wherein the fourth indicator lamp configuration information comprises a fourth mode identification number.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the computer program, when executed by the processor, causes the terminal device to carry out the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, causes a terminal device to carry out the steps of the method according to any one of claims 1 to 6.
CN202010466082.4A 2020-05-28 2020-05-28 Indicator lamp control method and device, terminal equipment and storage medium Active CN111679957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010466082.4A CN111679957B (en) 2020-05-28 2020-05-28 Indicator lamp control method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010466082.4A CN111679957B (en) 2020-05-28 2020-05-28 Indicator lamp control method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111679957A CN111679957A (en) 2020-09-18
CN111679957B true CN111679957B (en) 2022-08-05

Family

ID=72453092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010466082.4A Active CN111679957B (en) 2020-05-28 2020-05-28 Indicator lamp control method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111679957B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377628B (en) * 2021-06-21 2023-03-14 东莞华贝电子科技有限公司 Server UID indicator lamp control device and control method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521103A (en) * 2011-12-10 2012-06-27 山东明佳包装检测科技有限公司 Program and method for monitoring PC (Personal Computer) state
CN103257915A (en) * 2013-05-21 2013-08-21 北京小米科技有限责任公司 Method and device for providing operation state of software of display equipment
CN106274644A (en) * 2016-08-05 2017-01-04 深圳市元征科技股份有限公司 A kind of automobiles indicator lamp control method and device
CN107239385A (en) * 2017-06-06 2017-10-10 郑州云海信息技术有限公司 A kind of server and instruction lamp control method
CN109885457A (en) * 2017-12-06 2019-06-14 深圳中电长城信息安全***有限公司 Indicate lamp control method, electronic equipment and computer readable storage medium
CN110413487A (en) * 2018-04-28 2019-11-05 中国长城科技集团股份有限公司 A kind of indicator light management method, system and the baseboard management controller of server
CN111124803A (en) * 2019-11-22 2020-05-08 苏州浪潮智能科技有限公司 Method and device for controlling state of indicator light and computer readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9305439B2 (en) * 2012-10-25 2016-04-05 Google Inc. Configurable indicator on computing device
US9921933B2 (en) * 2015-11-03 2018-03-20 Quanta Computer Inc. System and method for indicator light control of storage devices

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521103A (en) * 2011-12-10 2012-06-27 山东明佳包装检测科技有限公司 Program and method for monitoring PC (Personal Computer) state
CN103257915A (en) * 2013-05-21 2013-08-21 北京小米科技有限责任公司 Method and device for providing operation state of software of display equipment
CN106274644A (en) * 2016-08-05 2017-01-04 深圳市元征科技股份有限公司 A kind of automobiles indicator lamp control method and device
CN107239385A (en) * 2017-06-06 2017-10-10 郑州云海信息技术有限公司 A kind of server and instruction lamp control method
CN109885457A (en) * 2017-12-06 2019-06-14 深圳中电长城信息安全***有限公司 Indicate lamp control method, electronic equipment and computer readable storage medium
CN110413487A (en) * 2018-04-28 2019-11-05 中国长城科技集团股份有限公司 A kind of indicator light management method, system and the baseboard management controller of server
CN111124803A (en) * 2019-11-22 2020-05-08 苏州浪潮智能科技有限公司 Method and device for controlling state of indicator light and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
停止排灯与跑道放行指示灯设计研究;梁岩松等;《民航学报》;20180725(第4期);第8-12页 *

Also Published As

Publication number Publication date
CN111679957A (en) 2020-09-18

Similar Documents

Publication Publication Date Title
KR100932057B1 (en) PL
US20120185634A1 (en) Computer system and method for inheriting hba identifier of pci card
CN110618918A (en) Control method, control device and control equipment for hard disk status lamp in PCH
CN113064748B (en) Process succession method, device, electronic equipment and storage medium
CN111679957B (en) Indicator lamp control method and device, terminal equipment and storage medium
CN111949457A (en) Server fault chip detection method and device
CN107220009B (en) Method and device for uniformly acquiring state information of RAID cards of different manufacturers
CN111190621A (en) Firmware burning method, device, system, terminal equipment and storage medium
CN208654779U (en) A kind of firmware based on multiple types bus more new system offline
CN112306040A (en) Vehicle detection method, device, equipment and server
CN111708577A (en) Method and equipment for self-adapting processor model and VR parameter
CN114407585B (en) Tire pressure sensor address writing method and device, electronic equipment and storage medium
CN111679649B (en) Vehicle-mounted terminal starting method and device, terminal equipment and storage medium
CN109308041A (en) A kind of control system, haulage equipment and the production line of display base plate haulage equipment
JP5485846B2 (en) Information recording device
CN113535246A (en) Hard disk hot plug method, device, terminal equipment and medium
US10802901B2 (en) Obtaining state information of threads of a device
CN113741985A (en) Method, device and equipment for cold start of system after BIOS (basic input output System) upgrade and readable medium
CN109245920B (en) Automatic switch configuration method and device, switch and storage medium
CN114489509A (en) Video storage method and device of automobile data recorder, electronic equipment and storage medium
CN111027104A (en) Method, device and mainboard for preventing loss of network card identification data
CN112445431A (en) Data storage method, device, equipment and medium
CN111722879A (en) USB flash disk identification method, Linux system, Linux equipment and readable storage medium
CN112243513B (en) RFID tag and RFID tag system
CN112104766B (en) Diagnostic protocol reconstruction method, device, terminal equipment and storage medium

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