CN109921915A - Test the method, apparatus and electronic equipment of real-time clock module arousal function - Google Patents

Test the method, apparatus and electronic equipment of real-time clock module arousal function Download PDF

Info

Publication number
CN109921915A
CN109921915A CN201910014718.9A CN201910014718A CN109921915A CN 109921915 A CN109921915 A CN 109921915A CN 201910014718 A CN201910014718 A CN 201910014718A CN 109921915 A CN109921915 A CN 109921915A
Authority
CN
China
Prior art keywords
message
mentioned
devices under
wake
time
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.)
Granted
Application number
CN201910014718.9A
Other languages
Chinese (zh)
Other versions
CN109921915B (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.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen 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 PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN201910014718.9A priority Critical patent/CN109921915B/en
Publication of CN109921915A publication Critical patent/CN109921915A/en
Application granted granted Critical
Publication of CN109921915B publication Critical patent/CN109921915B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

This application discloses a kind of method, apparatus, electronic equipment and computer readable storage mediums for testing real-time clock module arousal function, wherein this method comprises: the target wake-up mode that setting is devices under;Suspend mode message is sent to test equipment, and triggers and is devices under into dormant state, wherein suspend mode message carries type of message identifier and quasi- sleep time;When be devices under be waken up from dormant state when, to test equipment send wake up message so that test equipment be based on suspend mode message and wake up message obtain epicycle test result, wherein wake up message carry type of message identifier and quasi- sleep time;After waiting preset duration, the step of repeating the target wake-up mode being devices under described in setting and subsequent step, until reach preset number of rounds of tests or testing time.By application scheme, it can be achieved that automatic test to real-time clock module arousal function, so that test result is more accurate.

Description

Test the method, apparatus and electronic equipment of real-time clock module arousal function
Technical field
The application belongs to equipment the field of test technology more particularly to a kind of side for testing real-time clock module arousal function Method, device, electronic equipment and computer readable storage medium.
Background technique
In various Intelligent mobile equipments and embedded device, it usually needs use real-time clock (Real Time Clock, RTC) module dormancy awakening function.In order to determine dormancy awakening function provided by RTC block in distinct electronic apparatuses The reliability of energy, usually used way are to allow equipment to enter immediately being devices under the upper setting RTC wake-up moment and stop It sleeps, then waiting is devices under is waken up by RTC alarm clock;At the same time, one third-party clock and watch of manual control or calculagraph Device, crawl obtain being devices under at the time of wake-up at the time of suspend mode and by RTC;Finally, being obtained according to crawl tested At the time of examination equipment enters suspend mode and at the time of wake-up by RTC, calculate and RTC block that analysis is devices under provided by stop The reliability and order of accuarcy of dormancy arousal function.
However, the accuracy of above-mentioned artificial grasping manipulation is difficult to be guaranteed, and in circulating pressure reliability test, on The workload for stating artificial grasping manipulation is more heavy, and cost of labor is caused to increase.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of method, apparatus of test real-time clock module arousal function, electricity Sub- equipment and computer readable storage medium can be realized in the case where saving cost of labor and wake up function to real-time clock module The automatic test of energy, so that test result is more accurate.
The first aspect of the application provides a kind of method for testing real-time clock module arousal function, is applied to tested Equipment, comprising:
The above-mentioned target wake-up mode being devices under is set, to the determination above-mentioned wake-up moment being devices under and is intended Sleep time;
Suspend mode message is sent to test equipment, and triggers above-mentioned be devices under into dormant state, wherein above-mentioned suspend mode Message carries type of message identifier and quasi- sleep time;
When it is above-mentioned be devices under be waken up from above-mentioned dormant state when, Xiang Shangshu test equipment send wake up message, So that above-mentioned test equipment is based on above-mentioned suspend mode message and above-mentioned wake-up message obtains epicycle test result, wherein above-mentioned to call out Awake message carries type of message identifier and quasi- sleep time;
After waiting preset duration, the above-mentioned target wake-up mode being devices under of above-mentioned setting is repeated, to determination The step of above-mentioned wake-up moment being devices under and quasi- sleep time and subsequent step, until reach preset number of rounds of tests or Testing time.
The second aspect of the application provides a kind of method for testing real-time clock module arousal function, sets applied to test It is standby, comprising:
When receiving the first message for being devices under transmission, above-mentioned first message is parsed, based on above-mentioned the The type of message identifier carried in one message determines the type of above-mentioned first message;
If above-mentioned first message is suspend mode message, the time that record receives above-mentioned first message is used as at the first time, And obtain the quasi- sleep time carried in above-mentioned first message;
After receiving above-mentioned first message, if above-mentioned the second message for being devices under transmission is received, to above-mentioned Second message is parsed, and the class of above-mentioned second message is determined based on the type of message identifier carried in above-mentioned second message Type;
If above-mentioned second message is to wake up message, record receives the time of above-mentioned second message as the second time;
Based on above-mentioned first time, above-mentioned second time and above-mentioned quasi- sleep time, epicycle test result is calculated;
It repeats above-mentioned when receiving the first message for being devices under transmission, above-mentioned first message is solved The step of analysing, the type of above-mentioned first message is determined based on the type of message identifier carried in above-mentioned first message and subsequent step Suddenly, until reaching preset number of rounds of tests or testing time.
The third aspect of the application provides a kind of device for testing real-time clock module arousal function, is applied to tested Equipment, comprising:
Setup unit is devices under for setting the above-mentioned target wake-up mode being devices under to determination is above-mentioned The wake-up moment and quasi- sleep time;
First transmission unit for sending suspend mode message to test equipment, and triggers above-mentioned be devices under into suspend mode State, wherein above-mentioned suspend mode message carries the quasi- sleep time that type of message identifier and above-mentioned computing unit calculate;
Second transmission unit, for when it is above-mentioned be devices under be waken up from above-mentioned dormant state when, to above-mentioned test Equipment, which is sent, wakes up message, so that above-mentioned test equipment is based on above-mentioned suspend mode message and above-mentioned wake-up message obtains epicycle test As a result, wherein above-mentioned wake-up message carries type of message identifier and quasi- sleep time;
Wherein, above-mentioned setup unit is triggered again after waiting preset duration, until reach preset number of rounds of tests or Testing time.
The fourth aspect of the application provides a kind of device for testing real-time clock module arousal function, sets applied to test It is standby, comprising:
First resolution unit, for when receiving the first message for being devices under transmission, to above-mentioned first message into Row parsing, the type of above-mentioned first message is determined based on the type of message identifier carried in above-mentioned first message;
First recording unit records if determining that above-mentioned first message is suspend mode message for above-mentioned first resolution unit The time of above-mentioned first message is received as first time, and obtains the quasi- sleep time carried in above-mentioned first message;
Second resolution unit above-mentioned is devices under transmission if receiving for after receiving above-mentioned first message Second message then parses above-mentioned second message, is determined based on the type of message identifier carried in above-mentioned second message The type of above-mentioned second message;
Second recording unit, if determining that above-mentioned second message to wake up message, records for above-mentioned second resolution unit The time of above-mentioned second message is received as the second time;
As a result computing unit, first time for being recorded based on above-mentioned first unit, above-mentioned second unit record the Two times and above-mentioned quasi- sleep time, are calculated epicycle test result;
Wherein, above-mentioned first resolution unit is again triggered after the completion of the above results computing unit executes, until reaching Preset number of rounds of tests or testing time.
The 5th aspect of the application provides one kind and is devices under, above-mentioned to be devices under including memory, processor And it is stored in the computer program that can be run in above-mentioned memory and on above-mentioned processor, above-mentioned processor executes above-mentioned meter The step of realizing the method for first aspect as above when calculation machine program.
The 6th aspect of the application provides a kind of computer readable storage medium, and above-mentioned computer readable storage medium is deposited Computer program is contained, above-mentioned computer program realizes the method for first aspect as above when being executed by processor the step of.
The 7th aspect of the application provides a kind of computer program product, and above-mentioned computer program product includes computer Program, when above-mentioned computer program is executed by one or more processors the step of the realization such as method of above-mentioned first aspect.
The eighth aspect of the application provides a kind of test equipment, above-mentioned test equipment include memory, processor and It is stored in the computer program that can be run in above-mentioned memory and on above-mentioned processor, above-mentioned processor executes above-mentioned computer The step of method of second aspect as above is realized when program.
The 9th aspect of the application provides a kind of computer readable storage medium, and above-mentioned computer readable storage medium is deposited Computer program is contained, above-mentioned computer program realizes the method for second aspect as above when being executed by processor the step of.
The tenth aspect of the application provides a kind of computer program product, and above-mentioned computer program product includes computer Program, when above-mentioned computer program is executed by one or more processors the step of the realization such as method of above-mentioned second aspect.
Therefore by application scheme, in being devices under, the above-mentioned target being devices under is set first and is called out The mode of waking up then sends suspend mode report to test equipment to the determination above-mentioned wake-up moment being devices under and quasi- sleep time Text, and trigger above-mentioned be devices under into dormant state, wherein above-mentioned suspend mode message carries type of message identifier and intends Sleep time, when it is above-mentioned be devices under be waken up from above-mentioned dormant state when, Xiang Shangshu test equipment send wake up message, So that above-mentioned test equipment is based on above-mentioned suspend mode message and above-mentioned wake-up message obtains epicycle test result, wherein above-mentioned to call out Awake message carries type of message identifier and quasi- sleep time, and after waiting preset duration, repeats in above-mentioned setting The target wake-up mode being devices under is stated, the step of to the determination above-mentioned wake-up moment being devices under and quasi- sleep time And subsequent step, until reaching preset number of rounds of tests or testing time.By application scheme, by being devices under in suspend mode And suspend mode message and test packet are sent to test equipment respectively when waking up, so that test equipment is based on above two message Receiving time calculates the order of accuarcy of real-time clock module arousal function, is realized in the case where saving cost of labor with this to reality The automatic test of Shi Shizhong data bits function, so that test result is more accurate.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only some of the application Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is that a kind of implementation process of method for testing real-time clock module arousal function provided by the embodiments of the present application is shown It is intended to;
Fig. 2 is the implementation process of the method for another test real-time clock module arousal function provided by the embodiments of the present application Schematic diagram;
Fig. 3 be it is provided by the embodiments of the present application test real-time clock module arousal function method in, be devices under and The time shaft schematic diagram of test equipment during the test;
Fig. 4 is a kind of structural block diagram of device for testing real-time clock module arousal function provided by the embodiments of the present application;
Fig. 5 is the structural frames of the device of another test real-time clock module arousal function provided by the embodiments of the present application Figure;
Fig. 6 is the schematic diagram provided by the embodiments of the present application being devices under;
Fig. 7 is the schematic diagram of test equipment provided by the embodiments of the present application.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, so as to provide a thorough understanding of the present application embodiment.However, it will be clear to one skilled in the art that there is no these specific The application also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, so as not to obscure the description of the present application with unnecessary details.
In order to illustrate the above-mentioned technical solution of the application, the following is a description of specific embodiments.
Embodiment one
Below to it is provided by the embodiments of the present application it is a kind of test real-time clock module arousal function method be described, ask Refering to fig. 1, the method for the test real-time clock module arousal function in the embodiment of the present application is applied to be devices under, this method Include:
In a step 101, it sets the above-mentioned target wake-up mode being devices under, is devices under to determination is above-mentioned Wake up moment and quasi- sleep time;
In the embodiment of the present application, due to being surveyed to the arousal function for the real-time clock RTC block being devices under Examination, it is then desired to target wake-up mode when being tested by user or the pre-set each round of the system being devices under.Tool Body, user can wake up from constant time lag, integral point wakes up, random delay wakes up and mix in wake-up, carry out required for selecting The wake-up mode of test is as target wake-up mode.After having selected target wake-up mode, the mesh will be based on by being devices under Mark wake-up mode determines that it wakes up moment and quasi- sleep time.
In a step 102, suspend mode message is sent to test equipment, and triggers above-mentioned be devices under into dormant state;
In the embodiment of the present application, it is devices under after determining above-mentioned quasi- sleep time, it is raw based on the quasi- sleep time At suspend mode message, specifically, in above-mentioned suspend mode message other than carrying quasi- sleep time, type of message mark is also carried Symbol.The structure of above-mentioned suspend mode message is as follows using the example of C language:
Wherein, above-mentioned type is type of message identifier, when type is " S " (meaning " sleep "), for identifying this newspaper Text is suspend mode message.Above-mentioned sleep_time is quasi- sleep time.
Specifically, above-mentioned test equipment is also equipped with RTC block, and its time precision meets RTC and wakes up accuracy test Requirement.
After having sent suspend mode message to above-mentioned test equipment, above-mentioned be devices under into dormant state is triggered.It is above-mentioned It is devices under in the dormant state, any instruction will not be run.
In step 103, when it is above-mentioned be devices under be waken up from above-mentioned dormant state when, Xiang Shangshu test equipment hair Wake-up message is sent, so that above-mentioned test equipment is based on above-mentioned suspend mode message and above-mentioned wake-up message obtains epicycle test result;
In the embodiment of the present application, when it is above-mentioned be devices under be waken up from above-mentioned dormant state by RTC wake source when, Transmission wake-up message is devices under to above-mentioned, wherein when above-mentioned wake-up message carries type of message identifier and quasi- suspend mode It is long, and the equal length of the wake-up message and above-mentioned suspend mode message.In fact, one wheel test in, above-mentioned suspend mode message with call out The difference of awake message is only that the type of message identifier entrained by it is different.When type (i.e. type of message identifier) is " W " When (meaning " Wake "), message is waken up for identifying this message.Since message transmissions need certain time to test equipment, That is, a fixed response time can be generated to test equipment reception message from transmission message is devices under.When the transmission process of suspend mode message When equal with time delay caused by the transmission process for waking up message, the mistake of time brought by above-mentioned transmission loss theoretically can avoid Difference, thus require to wake up the equal length of message and suspend mode message.
At step 104, it after waiting preset duration, detects whether to reach preset number of rounds of tests or testing time, if so, 105 are thened follow the steps, if it is not, then returning to step 101 and subsequent step.
In the embodiment of the present application, it can be after waiting a preset duration, detect whether to reach preset number of rounds of tests Or the testing time terminates this test when having reached preset number of rounds of tests or testing time, in not up to preset test When taking turns number or testing time, 101 and subsequent step are returned to step, namely starts new round test;It is also possible to first detect Whether reach preset number of rounds of tests or testing time, if having reached preset number of rounds of tests or testing time, directly terminates This test, if not up to preset number of rounds of tests or testing time, wait preset duration, return again to execute step 101 and Subsequent step, namely start new round test.That is, above-mentioned waiting preset duration detects whether to reach preset test with above-mentioned Wheel number or the execution of testing time sequence are not fixed.Specifically, above-mentioned preset number of rounds of tests or testing time are as set by user It is fixed.It can be before this test starts, output test termination condition choice box, user can voluntarily select to be according to testing wheel The condition that number terminates as test, or according to the condition that the testing time terminates as test, be not construed as limiting herein.Specifically, Above-mentioned waiting preset duration be in order to allow the system being devices under to be thus capable of sufficiently recovering working condition, value can by user according to Actual conditions and preset, for example, above-mentioned preset duration can be set as to 3 seconds.In fact, terminating a wheel being devices under Test, after being waken up in dormant state, if suspend mode function is called to enter next round test immediately, above-mentioned suspend mode function is very Possible malloc failure malloc, that is, the system being devices under, which generally requires to call twice in succession, to be needed at least to wait between suspend mode function One minimum interval duration, difference, representative value are 3 seconds to the minimum interval duration in different systems.Thus, in a wheel After test, after needing to wait preset duration, next round test operation just can be performed, that is, after being devices under and being waken up, need Wait at least for preset duration TwSuspend mode function suspend mode can just be called again afterwards.
In step 105, test terminates.
Optionally, above-mentioned steps 101 specifically include:
A1, the wake-up mode selection instruction for receiving input;
A2, it is based on above-mentioned wake-up mode selection instruction, in preset more than two wake-up modes, determines target wake-up side Formula;
In the embodiment of the present application, user can refer to input wake-up mode selection is devices under before the test begins It enables, so that being devices under based on above-mentioned wake-up mode selection instruction, in preset more than two wake-up modes, determines mesh Mark wake-up mode.Specifically, above-mentioned two above wake-up mode includes but is not limited to: constant time lag wakes up, integral point wakes up, random Delay wakes up and mixing wakes up.Specifically, being described as follows to above-mentioned several different wake-up modes:
Above-mentioned constant time lag wakes up, and refers to waiting a constant time lag duration (example since the current time for initiating suspend mode Such as 1 minute or 1 hour) after wake-up device at once.When selecting the wake-up mode, the specific value of constant time lag duration by with Family is configured, and is not defined herein to its specific value.
Above-mentioned integral point wakes up, and refers to since the current time for initiating suspend mode, in next integral point moment wake-up device.Example Such as, if the current time for initiating suspend mode is 09:05:50, in 10:00:00 moment wake-up device.
Above-mentioned random delay wakes up, and refers to waiting a random delay duration (example since the current time for initiating suspend mode Such as any random number within the scope of 1 to 3600 second) after wake-up device at once.The range of above-mentioned random number can answering according to equipment Self-setting is required with characteristic and testing progress.When selecting which, (i.e. random number can take the value interval of random number Minimum value and maximum value) be configured by user, subsequent equipment utilization random number generation function generates in the value interval One random delay duration value.By the way that the value interval of above-mentioned random number is manually arranged, the flexibility of test can be increased.Specifically Ground can export prompting frame, such as " ask before testing if selected wake-up mode is that random delay wakes up (or mixing wakes up) Input the value interval (unit: second) of random number ", then receive two integers of user's input, such as 1,100 or 10,600 Deng, respectively identify random number value interval be 1~100 second and 10~600 seconds.Quasi- suspend mode is generated calling random delay to wake up When duration, random number will be generated in above-mentioned value interval as quasi- sleep time.
Mixing wakes up, and refers to waking up from constant time lag wake-up, integral point, randomly chooses a kind of mode in random delay wake-up It is waken up.When selecting which, the specific value for the constant time lag duration that constant time lag wakes up and the value of random delay Section is configured in advance by user, before each round test starts, is required to first determine that epicycle tests used wake-up mode, That is, before the test of every wheel starts, being waken up from constant time lag, integral point if user is selected this test and waken up using mixing It wakes up, randomly choose a kind of mode during random delay wakes up and waken up.
It is alternatively possible to by user the test of every wheel when equal selection target wake-up modes again;Alternatively, being also possible to Only the selection target wake-up mode in first run test, subsequent every wheel test are based on the first run and test selected target wake-up user Mode is set;In the case where user only sets first run test, in once testing the more wheels test carried out, If the test of user's first run has selected, constant time lag wake-up, integral point are waken up or random delay wakes up, and every wheel wake-up mode is constant; If user has selected mixing to wake up, every wheel wake-up mode is the random selection being devices under, i.e., every wheel wake-up mode It may change automatically.
Optionally, in order to improve testing efficiency and reduce manual working, the parameter after artificial setting is primary is by continuous action In the every wheel test once tested, until this test is completed.After the completion, it can be once again set up different parameters, and carried out More wheels test next time.Specifically, in the basic library function of developing instrument, there is random number generation function, for example, can adopt Use the random number under random number generation function rand () Lai Shengcheng random delay wake-up mode in C language as when quasi- suspend mode It is long.As a particular example, to generate the random number between 10 to 600, then its C language code is as follows:
int i;
srand((unsigned)time(NULL));
I=rand ();
I=10+i% (600-10+1);
In above-mentioned code, srand ((unsigned) time (NULL)) is random to generate for random number seed to be arranged Effect;Above-mentioned i=rand () is for generating a random number i;Above-mentioned i=10+i% (600-10+1) be used for make generate with Machine number i meets specified value range.
A3, the above-mentioned wake-up moment being devices under and quasi- sleep time are set according to above-mentioned target wake-up mode.
Optionally, it suspend mode message and wakes up quasi- sleep time entrained in message and can be denoted as Ts.According to above-mentioned wake-up side The difference of formula, above-mentioned quasi- sleep time TsCalculation it is also different, specifically:
Constant time lag is waken up, TsEqual to the constant time lag duration set;Random delay is waken up, TsEqual to most Newly-generated random delay duration;Integral point is waken up, TsEqual to the difference that next integral point clock value subtracts current clock value;And It wakes up, is eventually waken up from above-mentioned constant time lag since the mixing wakes up, in random delay wake-up and integral point wake-up for mixing The wake-up mode for selecting one of them to test as epicycle, thus TsIt will wake up in above-mentioned mixing and be waken up used by determining epicycle After mode, T is calculated based on identified wake-up modesValue.
Optionally, before the above-mentioned transmission suspend mode message to test equipment, the above method further include:
B1, the above-mentioned communication modes being devices under between above-mentioned test equipment are obtained;
B2, in above-mentioned be devices under, relevant to above-mentioned communication modes PORT COM is opened, so that above-mentioned be tested It tries equipment and message is sent to above-mentioned test equipment by above-mentioned PORT COM.
In the embodiment of the present application, above-mentioned communication modes include but is not limited to serial communication, USB communication, ethernet communication. Based on the communication modes being devices under between above-mentioned test equipment, different PORT COMs is selected to transmit institute in test process The suspend mode message and wake-up message of generation.Specifically, it if serial communication, is then opened and above-mentioned string in above-mentioned be devices under Mouth communicates relevant PORT COM, so that being devices under with test equipment using identical baud rate and communication format (data Digit stops digit, character check mode) it is communicated;If USB communicate, then in above-mentioned be devices under open with it is upper The relevant PORT COM of serial communication is stated, so that being devices under with one of equipment in test equipment using equipment mould Formula, another equipment are used host mode, are communicated using identical Bus Speed and identical transport protocol;If Ethernet Communication, then be devices under with test equipment using transmission control protocol (Transmission Control Protocol, TCP it) is communicated with Client/Server pattern, specifically, is devices under as client computer, communication port opens function In purpose IP address should be TCP port numbers that the IP address of test equipment, destination slogan should be test equipment, correspondingly, For test equipment as server, the peer IP address that communication port opens in function should fill in the value of " indicating any IP address ", Server-side port numbers should fill in the TCP port number of test equipment.
Therefore in the embodiment of the present application, it is devices under and only needs to send when every wheel is tested to test equipment Suspend mode message and wake-up message are calculated the test knot of every wheel test by test equipment automatically by suspend mode message and wake-up message Fruit, this no longer needs user manually to carry out timing, comparison and calculating in the process, under the premise of promoting test result accuracy, Cost of labor is greatly saved.
Embodiment two
Below to it is provided by the embodiments of the present application it is a kind of test real-time clock module arousal function method be described, ask Referring to Fig.2, the method for the test real-time clock module arousal function in the embodiment of the present application is applied to be devices under, this method Include:
In step 201, when receiving the first message for being devices under transmission, above-mentioned first message is solved Analysis, the type of above-mentioned first message is determined based on the type of message identifier carried in above-mentioned first message;
In the embodiment of the present application, due to not knowing the type of above-mentioned first message, it is then desired to first to first report Text is parsed, and the type of above-mentioned first message is determined based on the type of message identifier carried in above-mentioned first message.Specifically Ground, however, it is determined that the type of message identifier carried in above-mentioned first message is equal with preset suspend mode message identifier, for example, " S " represents above-mentioned first message then as suspend mode message;It is on the contrary, however, it is determined that the type of message mark carried in above-mentioned first message Symbol is equal with preset wake-up message identifier, for example, " W ", then represents above-mentioned first message to wake up message.
In step 202, if above-mentioned first message is suspend mode message, the time that record receives above-mentioned first message is made At the first time, and to obtain the quasi- sleep time carried in above-mentioned first message;
In the embodiment of the present application, when determining above-mentioned first message is suspend mode message, test equipment will record reception Time to above-mentioned first message is used as at the first time.Specifically, above-mentioned first time can be recorded in database or its In his storage region, it is not construed as limiting herein.Further, the quasi- sleep time carried in above-mentioned first message can also be obtained, Above-mentioned quasi- sleep time is the above-mentioned expectation sleep time for being devices under epicycle test process.
In step 203, after receiving above-mentioned first message, if receiving above-mentioned the second report for being devices under transmission Text then parses above-mentioned second message, determines above-mentioned based on the type of message identifier carried in above-mentioned second message The type of two messages;
It in the embodiment of the present application,, will again if test equipment has received message again after receiving the first message The secondary message received is denoted as the second message.Similarly with step 201, however, it is determined that the type of message carried in above-mentioned second message Identifier is equal with preset suspend mode message identifier, for example, " S ", then represents above-mentioned second message as suspend mode message;Conversely, If it is determined that the type of message identifier carried in above-mentioned first message is equal with preset wake-up message identifier, for example, " W ", Represent above-mentioned second message then to wake up message.
In step 204, if above-mentioned second message is to wake up message, the time that record receives above-mentioned second message is made For the second time;
In the embodiment of the present application, when determining above-mentioned second message to wake up message, test equipment will record reception To above-mentioned second message time as the second time.It specifically, can be by the in above-mentioned second time and above-mentioned steps 202 One time together, as the timing time of same wheel test, was recorded in database or other storage regions, and did not limited herein It is fixed.
In step 205, it is based on above-mentioned first time, above-mentioned second time and above-mentioned quasi- sleep time, this is calculated Take turns test result;
In the embodiment of the present application, when above-mentioned first message is suspend mode message, which is to be devices under It is sent before suspend mode;And when above-mentioned second message is to wake up message, which is to be devices under to send upon awakening 's;Therefore, it is possible to using above-mentioned first time as the above-mentioned practical suspend mode moment being devices under, using above-mentioned second time as The above-mentioned practical wake-up moment being devices under, using the difference of above-mentioned first time and the second time as being devices under reality Duration under in a dormant state, i.e., practical sleep time.Then above-mentioned time dormancy time and above-mentioned quasi- sleep time are calculated Error, obtain the accuracy of RTC block arousal function, namely obtain epicycle test result.Specifically, RTC block wakes up function The accuracy of energy can be obtained by following formula: accuracy=[1- | (T2-T1)-Ts|/Ts] * 100%.Wherein, T2It is second Time, T1For first time, TsTo intend sleep time, | (T2-T1)-Ts|/TsIndicate one wheel test process (be devices under from Into dormant state to being waken up this process) in, duration and it is expected sleep time (intending sleep time) when practical suspend mode Relative error, 1 subtracts the accuracy that epicycle RTC block arousal function can be obtained after the relative error.
In step 206, it detects whether to reach preset number of rounds of tests or testing time, if so, 207 are thened follow the steps, If it is not, then returning to step 201 and subsequent step.
In the embodiment of the present application, it can be exported and be tested by test equipment before test equipment enters message reception state Termination condition choice box, user can voluntarily select to be the condition terminated according to number of rounds of tests as test, or according to test The condition that time terminates as test, is not construed as limiting herein.After user chooses, test equipment receives the test of user's input Termination condition selection instruction sets above-mentioned test discussion or testing time, meanwhile, terminate to the above-mentioned test of transmission is devices under Condition selection instruction is devices under the condition for terminating this test to inform;It is received alternatively, being also possible to test equipment After above-mentioned test termination condition selection instruction, first do not inform test equipment, until this test reach preset test discussion or When the testing time, then to transmission test END instruction is devices under, triggering above-mentioned is devices under terminates test, does not make herein It limits.Optionally, if user selects to define number of rounds of tests variable, and will be at the beginning of it using number of rounds of tests as test termination condition Initial value is assigned to 0, and the number of rounds of tests variable adds 1 after every wheel test, and detects whether to reach default after the test of every wheel Number of rounds of tests;If user selects to define testing time variable as test termination condition using the testing time, and it is initial The current clock value that value is assigned to when this test starts reads again current clock value, will read again after the test of every wheel The current clock value got subtracts above-mentioned testing time variable, obtains the length of testing speech of this test, and detect the length of testing speech Whether preset testing time is reached.By the above process, it may be implemented to be automatically stopped test, avoid using artificial counting Mode decide whether test complete.
In step 207, test terminates.
Optionally, the above method further include:
C1, obtain above-mentioned test equipment and it is above-mentioned be devices under between communication modes;
C2, in above-mentioned test equipment, open relevant to above-mentioned communication modes PORT COM;
C3, message transmitted by above-mentioned be devices under is received by above-mentioned PORT COM.
In the embodiment of the present application, above-mentioned communication modes include but is not limited to serial communication, USB communication, ethernet communication. Based on the communication modes being devices under between above-mentioned test equipment, different PORT COMs is selected to transmit institute in test process The suspend mode message and wake-up message of generation.Specifically, it if serial communication, is then opened and above-mentioned serial ports in above-mentioned test equipment Relevant PORT COM is communicated, so that test equipment and being devices under using identical baud rate and communication format (data bit Number stops digit, character check mode) it is communicated;It communicates, is then opened and above-mentioned string in above-mentioned test equipment if USB Mouthful communicate relevant PORT COM so that test equipment be devices under in one of equipment using equipment mode, separately One equipment uses host mode, is communicated using identical Bus Speed and identical transport protocol;If ethernet communication, Then test equipment is communicated using Transmission Control Protocol and Client/Server pattern with being devices under, specifically, test equipment As server, the peer IP address that communication port opens in function should fill in the value of " indicating any IP address ", server-side end Slogan should fill in the TCP port number of test equipment, correspondingly, be devices under as client computer, communication port is opened in function Purpose IP address should be TCP port numbers that the IP address of test equipment, destination slogan should be test equipment.On opening Behind the associated communication port for stating test equipment, message transmitted by above-mentioned be devices under can be received by above-mentioned PORT COM. Specifically, above-mentioned PORT COM can also be monitored, to obtain message transmitted by above-mentioned be devices under in time.
Optionally, the above method further include:
D1, during the message to be received for being devices under transmission such as above-mentioned test equipment, obtain above-mentioned survey in real time Try the reception waiting time of equipment, wherein above-mentioned message includes the first message and the second message;
If D2, above-mentioned reception waiting time have been more than preset reception waiting time threshold value, reception time exceeded message is exported.
In the embodiment of the present application, above-mentioned reception waiting time threshold value and test equipment currently wait received message Type of message is related.Specifically, under a kind of application scenarios, if it is above-mentioned be devices under it is waited it is received for wake up message (i.e. the second message), then it is the reception time-out duration for waking up message, above-mentioned reception waiting time that above-mentioned reception waiting time is practical Threshold value can be set, typically greater than above-mentioned quasi- sleep time based on quasi- sleep time, for example, above-mentioned reception can be waited Duration threshold value is set as twice of quasi- sleep time.In fact, under normal circumstances, if the suspend mode of epicycle test equipment 100 seconds, After having sent 100 seconds of suspend mode message, test equipment is ready to receive to wake-up message.But in view of above-mentioned wake-up in practical application Process is the process for being easiest to occur mistake, it is likely that appearance can not wake up always, the practical wake-up moment is slower than specified wake-up The mistakes such as moment, thus the reception waiting time threshold value that can set above-mentioned wake-up message herein added additional one as 2*100 seconds Duration again, so that there is insignificant wake-up mistake even if being devices under, test equipment, which remains on, can receive wake-up Message.It should be noted that considering testing efficiency, above-mentioned reception waiting time threshold value is not set to infinite metric, i.e., It is not set to infinitely wait herein and wakes up message.Specifically, when timing time has been more than above-mentioned reception waiting duration threshold value, If not receiving above-mentioned the second message for being devices under transmission yet, then it is assumed that mistake occurs in the wakeup process being devices under Accidentally, at this point it is possible to export reception time exceeded message, for example, output " do not receive and wake up message ", and terminate epicycle test.
Under another application scenarios, if it is above-mentioned be devices under it is waited it is received for suspend mode message (i.e. first report Text), then above-mentioned reception waiting time is the reception time-out duration of suspend mode message, and above-mentioned reception waiting time threshold value can be based on Above-mentioned be devices under is completed the waiting time after a wheel is tested and is set.It is assumed that being devices under after one wheel test of completion (i.e. After being waken up in dormant state), it needs to wait TwSecond is just again introduced into next round test (i.e. waiting TwSecond is just again introduced into suspend mode State), then above-mentioned reception waiting time threshold value can be set as Tw+ 3 seconds, certainly, user can also be with the above-mentioned quilt of sets itself The T of test equipmentwValue, be not construed as limiting herein.Suspend mode function is called to need twice in succession because being devices under general requirement A minimum interval duration is waited, thus test equipment receives after waking up message, T can be waited by being devices underwIt is again introduced into after second The reception waiting time threshold value of the suspend mode message of test equipment is set as T for the sake of more insuring by suspend modewIt is+3 seconds, additional to increase Add 3 seconds time-out, in case wrong report receives time-out error.It is of course also possible to which above-mentioned reception waiting time threshold value is set as Tw+ 5 seconds or TwIt+10 seconds, is not construed as limiting herein.Specifically, if receiving waiting time has been more than above-mentioned reception waiting time threshold value When, above-mentioned the first message for being devices under transmission is not received yet, then it is assumed that mistake occurs in the sleep procedure being devices under Accidentally, at this point it is possible to export reception time exceeded message, for example, output " not receiving suspend mode message ", and terminate epicycle test.
Therefore in the embodiment of the present application, it is devices under and only needs to send when every wheel is tested to test equipment Suspend mode message and wake-up message are calculated the test knot of every wheel test by test equipment automatically by suspend mode message and wake-up message Fruit, this no longer needs user manually to carry out timing, comparison and calculating in the process, under the premise of promoting test result accuracy, Cost of labor is greatly saved.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present application constitutes any limit It is fixed.
It should be noted that the method being applied in test equipment in above-described embodiment two should first be activated operation, so that Test equipment enters message and receives wait state;Then restart in operation above-described embodiment one and is applied to be devices under Method;After test equipment receives and is devices under first transmitted message, it is devices under and test equipment Into synchronous regime, that is, operation while can guarantee above-mentioned two sets of methods.It so, can since test equipment preferentially starts So that loss situation will not be occurred by being devices under transmitted message, it can be avoided test result and be affected.
In order to better illustrate technical solution provided by the embodiment of the present application, set below by being devices under with test Standby time shaft during the test makes an explanation to the method for test real-time clock module arousal function, please refers to Fig. 3:
F1, it is being devices under upper setting wake-up mode;Also, endless form is set in test equipment, that is, selection knot Beam condition;
It F2, test equipment and is devices under according to communication modes, opens corresponding PORT COM respectively;
F3, first round test start, and test equipment waiting receives suspend mode message;It is laggard to be devices under transmission suspend mode message Enter dormant state;Test equipment receives suspend mode message, and records current time T1, start waiting therewith and receive wake-up message;
F4, reach wakeup time, be devices under and be waken up, and sent to test equipment and wake up message;It is devices under It receives and wakes up message, and record current time T2, and transmitted suspend mode is devices under until receiving next round test Message;
F5, after being devices under and being waken up, preset time T is waitedw, the second wheel, which is tested, to be started, process and F3, F4 phase Seemingly, after the test of several wheels, reach this test and reach selected termination condition, this test terminates.
In order to better illustrate technical solution provided by the embodiment of the present application, it is real that specific test result is given below Example:
Table 1
Wherein, above-mentioned table 1 shows the wake-up mode (random number range is 10 to 600) waken up in random delay, terminates Condition is the partial test Flow Record under 1000 wheel tests;
Certainly, based on the lower more wheel tests of primary test as a result, the bat of this test, average can also be counted The optional index such as error rate, mean square error.Such as:
Actual test wheel number 2000
Minimum accuracy 95
Maximum likelihood 100
Bat 98.8
Whether there is suspend mode message and does not receive situation It is no
Whether appearance, which wakes up message, does not receive situation It is no
Test result Pass through
Table 2
Wherein, above-mentioned table 2 shows the wake-up mode (random number range is 10 to 600) waken up in random delay, terminates Condition is the statistics of the optional index in part of the test result under 2000 wheel tests;It is set due to having ensured that using test trusty Standby and test environment is indicated generally to be devices under and has occurred to wake up or crashing if message occur does not receive situation Critical system fault.
Embodiment three
The embodiment of the invention provides a kind of devices for testing real-time clock module arousal function, set applied to tested It is standby, as shown in figure 4, the device 400 of the test real-time clock module arousal function in the embodiment of the present invention includes:
Setup unit 401 is set for setting the above-mentioned target wake-up mode being devices under to above-mentioned be tested of determination Standby wake-up moment and quasi- sleep time;
First transmission unit 402 for sending suspend mode message to test equipment, and triggers above-mentioned be devices under into stopping Dormancy state, wherein above-mentioned suspend mode message carries the quasi- sleep time that type of message identifier and above-mentioned computing unit calculate;
Second transmission unit 403, for when it is above-mentioned be devices under be waken up from above-mentioned dormant state when, to above-mentioned survey It tries equipment and sends wake-up message, so that above-mentioned test equipment is based on above-mentioned suspend mode message and above-mentioned wake-up message obtains epicycle survey Test result, wherein above-mentioned wake-up message carries type of message identifier and quasi- sleep time;
Wherein, above-mentioned setup unit 401 is triggered again after waiting preset duration, until reaching preset number of rounds of tests Or the testing time.
Optionally, above-mentioned setup unit 401 includes:
Selection instruction receiving subelement, wake-up mode selection instruction for receiving input;
Target wake-up mode determines subelement, for being based on above-mentioned wake-up mode selection instruction, in preset two or more In wake-up mode, target wake-up mode is determined;
Wake up parameter sets subelement, when for setting the above-mentioned wake-up being devices under according to above-mentioned target wake-up mode Quarter and quasi- dormancy time.
Optionally, above-mentioned apparatus 400 further include:
Communication modes acquiring unit, for obtaining the above-mentioned communication modes being devices under between above-mentioned test equipment;
PORT COM opening unit, for opening communication relevant to above-mentioned communication modes in above-mentioned be devices under Port, so that above-mentioned be devices under sends message to above-mentioned test equipment by above-mentioned PORT COM.
Therefore in the embodiment of the present application, it is devices under and only needs to send when every wheel is tested to test equipment Suspend mode message and wake-up message are calculated the test knot of every wheel test by test equipment automatically by suspend mode message and wake-up message Fruit, this no longer needs user manually to carry out timing, comparison and calculating in the process, under the premise of promoting test result accuracy, Cost of labor is greatly saved.
Example IV
The embodiment of the invention provides a kind of devices for testing real-time clock module arousal function, are applied to test equipment, As shown in figure 5, the device 500 of the test real-time clock module arousal function in the embodiment of the present invention includes:
First resolution unit 501, for when receiving the first message for being devices under transmission, to above-mentioned first message It is parsed, the type of above-mentioned first message is determined based on the type of message identifier carried in above-mentioned first message;
First recording unit 502 is remembered if determining that above-mentioned first message is suspend mode message for above-mentioned first resolution unit Record receives the time of above-mentioned first message as first time, and obtains the quasi- sleep time carried in above-mentioned first message;
Second resolution unit 503 above-mentioned is devices under transmission if receiving for after receiving above-mentioned first message The second message, then above-mentioned second message is parsed, it is true based on the type of message identifier carried in above-mentioned second message The type of fixed above-mentioned second message;
Second recording unit 504, if determining that above-mentioned second message to wake up message, is remembered for above-mentioned second resolution unit Record receives the time of above-mentioned second message as the second time;
As a result computing unit 505, what first time, above-mentioned second unit for being recorded based on above-mentioned first unit were recorded Second time and above-mentioned quasi- sleep time, are calculated epicycle test result;
Wherein, above-mentioned first resolution unit, 501 the above results computing unit 505 is again triggered after the completion of executing, until Reach preset number of rounds of tests or testing time.
Optionally, above-mentioned apparatus 500 further include:
Communication modes acquiring unit, for obtain above-mentioned test equipment and it is above-mentioned be devices under between communication modes;
PORT COM opening unit, for opening communication terminal relevant to above-mentioned communication modes in above-mentioned test equipment Mouthful;
Message receiving unit, for receiving message transmitted by above-mentioned be devices under by above-mentioned PORT COM.
Optionally, above-mentioned apparatus 500 further include:
Waiting time acquiring unit is received, in the message to be received for being devices under transmission such as above-mentioned test equipment In the process, the reception waiting time of above-mentioned test equipment is obtained in real time, wherein above-mentioned message includes the first message and the second report Text;
Time exceeded message output unit, if being more than preset reception waiting time threshold value for above-mentioned reception waiting time, Then export reception time exceeded message.
Therefore in the embodiment of the present application, it is devices under and only needs to send when every wheel is tested to test equipment Suspend mode message and wake-up message are calculated the test knot of every wheel test by test equipment automatically by suspend mode message and wake-up message Fruit, this no longer needs user manually to carry out timing, comparison and calculating in the process, under the premise of promoting test result accuracy, Cost of labor is greatly saved.
Embodiment five
The embodiment of the present invention provides one kind and is devices under, referring to Fig. 6, being devices under packet in the embodiment of the present invention Include: memory 601 and is stored on memory 601 and can locate one or more processors 602 (only showing one in Fig. 6) The computer program run on reason device.Wherein: for memory 601 for storing software program and module, processor 602 passes through fortune Row is stored in the software program and unit of memory 601, thereby executing various function application and data processing, on obtaining State the corresponding resource of predeterminable event.Specifically, processor 602 is stored in the above-mentioned computer program of memory 601 by operation When perform the steps of
The above-mentioned target wake-up mode being devices under is set, to the determination above-mentioned wake-up moment being devices under and is intended Sleep time;
Suspend mode message is sent to test equipment, and triggers above-mentioned be devices under into dormant state, wherein above-mentioned suspend mode Message carries type of message identifier and quasi- sleep time;
When it is above-mentioned be devices under be waken up from above-mentioned dormant state when, Xiang Shangshu test equipment send wake up message, So that above-mentioned test equipment is based on above-mentioned suspend mode message and above-mentioned wake-up message obtains epicycle test result, wherein above-mentioned to call out Awake message carries type of message identifier and quasi- sleep time;
After waiting preset duration, the above-mentioned target wake-up mode being devices under of above-mentioned setting is repeated, to determination The step of above-mentioned wake-up moment being devices under and quasi- sleep time and subsequent step, until reach preset number of rounds of tests or Testing time.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, the above-mentioned target wake-up mode being devices under of above-mentioned setting, to the above-mentioned quilt of determination The wake-up moment of test equipment and quasi- sleep time, comprising:
Receive the wake-up mode selection instruction of input;
Target wake-up mode is determined in preset more than two wake-up modes based on above-mentioned wake-up mode selection instruction;
The above-mentioned wake-up moment being devices under and quasi- sleep time are set according to above-mentioned target wake-up mode.
In the third the possible embodiment provided based on the first above-mentioned possible embodiment, processing Device 602 is stored by operation and is performed the steps of in the above-mentioned computer program of memory 601
Obtain the above-mentioned communication modes being devices under between above-mentioned test equipment;
In above-mentioned be devices under, PORT COM relevant to above-mentioned communication modes is opened, so that above-mentioned tested Equipment sends message to above-mentioned test equipment by above-mentioned PORT COM.
Further, as shown in fig. 6, above-mentioned be devices under may also include that one or more input equipments 603 (in Fig. 6 only Show one) and one or more output equipments 604 (one is only shown in Fig. 6).Memory 601, processor 602, input are set It is connected for 603 and output equipment 604 by bus 605.
It should be appreciated that in embodiments of the present invention, alleged processor 602 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Input equipment 603 may include keyboard, Trackpad, fingerprint adopt sensor (for acquire user finger print information and The directional information of fingerprint), microphone etc., output equipment 604 may include display, loudspeaker etc..
Memory 601 may include read-only memory and random access memory, and provide instruction sum number to processor 602 According to.Part or all of memory 601 can also include nonvolatile RAM.For example, memory 601 may be used also With the information of storage device type.
Therefore by the embodiment of the present application, it is devices under and only needs to send when every wheel is tested to test equipment Suspend mode message and wake-up message are calculated the test knot of every wheel test by test equipment automatically by suspend mode message and wake-up message Fruit, this no longer needs user manually to carry out timing, comparison and calculating in the process, under the premise of promoting test result accuracy, Cost of labor is greatly saved.
Embodiment six
The embodiment of the present invention provides a kind of test equipment, referring to Fig. 7, the test equipment in the embodiment of the present invention includes: Memory 701, one or more processors 702 (one is only shown in Fig. 4) and is stored on memory 701 and can be in processor The computer program of upper operation.Wherein: memory 701 is deposited for storing software program and module, processor 702 by operation The software program and unit in memory 701 are stored up, it is above-mentioned pre- to obtain thereby executing various function application and data processing If the corresponding resource of event.Specifically, processor 702 is stored real in the above-mentioned computer program of memory 701 by operation Existing following steps:
When receiving the first message for being devices under transmission, above-mentioned first message is parsed, based on above-mentioned the The type of message identifier carried in one message determines the type of above-mentioned first message;
If above-mentioned first message is suspend mode message, the time that record receives above-mentioned first message is used as at the first time, And obtain the quasi- sleep time carried in above-mentioned first message;
After receiving above-mentioned first message, if above-mentioned the second message for being devices under transmission is received, to above-mentioned Second message is parsed, and the class of above-mentioned second message is determined based on the type of message identifier carried in above-mentioned second message Type;
If above-mentioned second message is to wake up message, record receives the time of above-mentioned second message as the second time;
Based on above-mentioned first time, above-mentioned second time and above-mentioned quasi- sleep time, epicycle test result is calculated;
It repeats above-mentioned when receiving the first message for being devices under transmission, above-mentioned first message is solved The step of analysing, the type of above-mentioned first message is determined based on the type of message identifier carried in above-mentioned first message and subsequent step Suddenly, until reaching preset number of rounds of tests or testing time.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, processor 702 is stored in the above-mentioned computer program of memory 701 also by operation It performs the steps of
Obtain above-mentioned test equipment and it is above-mentioned be devices under between communication modes;
In above-mentioned test equipment, PORT COM relevant to above-mentioned communication modes is opened;
Message transmitted by above-mentioned be devices under is received by above-mentioned PORT COM.
In the third the possible embodiment provided based on the first above-mentioned possible embodiment, processing Device 702 is stored by operation and is also performed the steps of in the above-mentioned computer program of memory 701
During the message to be received for being devices under transmission such as above-mentioned test equipment, above-mentioned test is obtained in real time and is set Standby reception waiting time, wherein above-mentioned message includes the first message and the second message;
If above-mentioned reception waiting time has been more than preset reception waiting time threshold value, reception time exceeded message is exported.
Further, as shown in fig. 7, above-mentioned test equipment may also include that one or more input equipments 703 (only show in Fig. 7 One out) and one or more output equipments 704 (one is only shown in Fig. 7).Memory 701, processor 702, input equipment 703 and output equipment 704 connected by bus 705.
It should be appreciated that in embodiments of the present invention, alleged processor 702 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Input equipment 703 may include keyboard, Trackpad, fingerprint adopt sensor (for acquire user finger print information and The directional information of fingerprint), microphone etc., output equipment 704 may include display, loudspeaker etc..
Memory 701 may include read-only memory and random access memory, and provide instruction sum number to processor 702 According to.Part or all of memory 701 can also include nonvolatile RAM.For example, memory 701 may be used also With the information of storage device type.
Therefore by the embodiment of the present application, it is devices under and only needs to send when every wheel is tested to test equipment Suspend mode message and wake-up message are calculated the test knot of every wheel test by test equipment automatically by suspend mode message and wake-up message Fruit, this no longer needs user manually to carry out timing, comparison and calculating in the process, under the premise of promoting test result accuracy, Cost of labor is greatly saved.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of above-mentioned apparatus is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others Mode is realized.For example, system embodiment described above is only schematical, for example, the division of above-mentioned module or unit, Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical property, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-described embodiment side All or part of the process in method can also instruct relevant hardware to complete, above-mentioned computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, above-mentioned computer program includes computer program code, and above-mentioned computer program code can Think source code form, object identification code form, executable file or certain intermediate forms etc..Above-mentioned computer-readable medium can be with It include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, light that can carry above-mentioned computer program code Disk, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that above-mentioned computer The content that readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as In certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and telecommunications letter Number.
Above above-described embodiment is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method for testing real-time clock module arousal function, which is characterized in that applied to being devices under, comprising:
The target wake-up mode being devices under described in setting, to the wake-up moment being devices under described in determination and quasi- suspend mode Duration;
Suspend mode message is sent to test equipment, and is devices under described in triggering into dormant state, wherein the suspend mode message Carry type of message identifier and quasi- sleep time;
When it is described be devices under be waken up from the dormant state when, Xiang Suoshu test equipment send wake up message so that It obtains the test equipment and epicycle test result is obtained based on the suspend mode message and the wake-up message, wherein the wake-up report Text carries type of message identifier and quasi- sleep time;
After waiting preset duration, the target wake-up mode being devices under described in the setting is repeated, to described in determination The step of wake-up moment being devices under and quasi- sleep time and subsequent step, until reaching preset number of rounds of tests or test Time.
2. the method as described in claim 1, which is characterized in that the target wake-up mode being devices under described in the setting, To the wake-up moment being devices under described in determination and quasi- sleep time, comprising:
Receive the wake-up mode selection instruction of input;
Target wake-up mode is determined in preset more than two wake-up modes based on the wake-up mode selection instruction;
The wake-up moment being devices under according to target wake-up mode setting and quasi- sleep time.
3. the method as described in claim 1, which is characterized in that the method also includes:
The communication modes being devices under described in acquisition between the test equipment;
In described be devices under, PORT COM relevant to the communication modes is opened, so that described be devices under Message is sent to the test equipment by the PORT COM.
4. a kind of method for testing real-time clock module arousal function, which is characterized in that be applied to test equipment, comprising:
When receiving the first message for being devices under transmission, first message is parsed, based on first report The type of message identifier carried in text determines the type of first message;
If first message is suspend mode message, record receives the time of first message as first time, and obtains Take the quasi- sleep time carried in first message;
After receiving first message, if second message for being devices under transmission is received, to described second Message is parsed, and the type of second message is determined based on the type of message identifier carried in second message;
If second message is to wake up message, record receives the time of second message as the second time;
Based on the first time, second time and the quasi- sleep time, epicycle test result is calculated;
Described in repeating when receiving the first message for being devices under transmission, first message is parsed, base The type of message identifier carried in first message determines the step of type of first message and subsequent step, directly To reaching preset number of rounds of tests or testing time.
5. method as claimed in claim 4, which is characterized in that the method also includes:
Obtain the test equipment and it is described be devices under between communication modes;
In the test equipment, PORT COM relevant to the communication modes is opened;
By being devices under transmitted message described in PORT COM reception.
6. method as claimed in claim 4, which is characterized in that the method also includes:
During the message to be received for being devices under transmission such as the test equipment, the test equipment is obtained in real time Receive waiting time, wherein the message includes the first message and the second message;
If the reception waiting time has been more than preset reception waiting time threshold value, reception time exceeded message is exported.
7. one kind is devices under, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to The step of any one of 3 the method.
8. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claims 1 to 3 of realization the method.
9. a kind of test equipment, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 4 to 6 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 4 to 6 of realization the method.
CN201910014718.9A 2019-01-08 2019-01-08 Method and device for testing wake-up function of real-time clock module and electronic equipment Active CN109921915B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910014718.9A CN109921915B (en) 2019-01-08 2019-01-08 Method and device for testing wake-up function of real-time clock module and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910014718.9A CN109921915B (en) 2019-01-08 2019-01-08 Method and device for testing wake-up function of real-time clock module and electronic equipment

Publications (2)

Publication Number Publication Date
CN109921915A true CN109921915A (en) 2019-06-21
CN109921915B CN109921915B (en) 2021-04-23

Family

ID=66960181

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910014718.9A Active CN109921915B (en) 2019-01-08 2019-01-08 Method and device for testing wake-up function of real-time clock module and electronic equipment

Country Status (1)

Country Link
CN (1) CN109921915B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333766A (en) * 2020-11-13 2021-02-05 北京美斯顿科技开发有限公司 Wireless communication method, system, terminal communication equipment and electronic equipment
CN113207148A (en) * 2021-03-19 2021-08-03 深圳市有方科技股份有限公司 Data transmission method, device, communication equipment and storage medium
CN113391936A (en) * 2021-06-15 2021-09-14 西安联乘智能科技有限公司 Reliability test method and system for vehicle-mounted intelligent antenna equipment
CN113965484A (en) * 2021-10-21 2022-01-21 奇瑞商用车(安徽)有限公司 Test method and system for automobile bus dormancy awakening rack
CN113965483A (en) * 2021-10-21 2022-01-21 奇瑞商用车(安徽)有限公司 Device and method for testing time from auto TOSAR network management pre-dormancy to dormancy
CN113992555A (en) * 2021-10-27 2022-01-28 奇瑞商用车(安徽)有限公司 Automatic testing method and system for main node network
CN114124767A (en) * 2021-11-29 2022-03-01 奇瑞商用车(安徽)有限公司 Automatic testing method and device for gateway network management strategy

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662777A (en) * 2009-09-11 2010-03-03 北京交通大学 Wireless sensor network distributed hibernation method based on probability statistics
CN102023912A (en) * 2009-09-11 2011-04-20 鸿富锦精密工业(深圳)有限公司 Dormancy wake-up testing system and method
US20120120958A1 (en) * 2010-02-01 2012-05-17 Priya Mahadevan Deep sleep mode management for a network switch
CN105302726A (en) * 2015-11-13 2016-02-03 浪潮电子信息产业股份有限公司 Test method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662777A (en) * 2009-09-11 2010-03-03 北京交通大学 Wireless sensor network distributed hibernation method based on probability statistics
CN102023912A (en) * 2009-09-11 2011-04-20 鸿富锦精密工业(深圳)有限公司 Dormancy wake-up testing system and method
US20120120958A1 (en) * 2010-02-01 2012-05-17 Priya Mahadevan Deep sleep mode management for a network switch
CN105302726A (en) * 2015-11-13 2016-02-03 浪潮电子信息产业股份有限公司 Test method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333766A (en) * 2020-11-13 2021-02-05 北京美斯顿科技开发有限公司 Wireless communication method, system, terminal communication equipment and electronic equipment
CN113207148A (en) * 2021-03-19 2021-08-03 深圳市有方科技股份有限公司 Data transmission method, device, communication equipment and storage medium
CN113207148B (en) * 2021-03-19 2023-09-01 深圳市有方科技股份有限公司 Data transmission method, device, communication equipment and storage medium
CN113391936A (en) * 2021-06-15 2021-09-14 西安联乘智能科技有限公司 Reliability test method and system for vehicle-mounted intelligent antenna equipment
CN113965484A (en) * 2021-10-21 2022-01-21 奇瑞商用车(安徽)有限公司 Test method and system for automobile bus dormancy awakening rack
CN113965483A (en) * 2021-10-21 2022-01-21 奇瑞商用车(安徽)有限公司 Device and method for testing time from auto TOSAR network management pre-dormancy to dormancy
CN113965483B (en) * 2021-10-21 2023-10-31 奇瑞商用车(安徽)有限公司 AUTOSAR network management pre-dormancy to dormancy time testing device and method
CN113992555A (en) * 2021-10-27 2022-01-28 奇瑞商用车(安徽)有限公司 Automatic testing method and system for main node network
CN114124767A (en) * 2021-11-29 2022-03-01 奇瑞商用车(安徽)有限公司 Automatic testing method and device for gateway network management strategy

Also Published As

Publication number Publication date
CN109921915B (en) 2021-04-23

Similar Documents

Publication Publication Date Title
CN109921915A (en) Test the method, apparatus and electronic equipment of real-time clock module arousal function
CN108062367B (en) Data list uploading method and terminal thereof
CN104904309B (en) A kind of method and mobile terminal sending heartbeat message
CN1992635B (en) Method of simulating SNMP network element and performing network management system test with the network element
EP2851798A1 (en) Method, device, and terminal for adjusting heartbeat cycle for application
CN109936511A (en) A kind of token acquisition methods, device, server, terminal device and medium
CN107547300B (en) Network quality detection method and device
CN106897219B (en) Method and device for testing stability of mobile terminal system
CN109788027A (en) Method of data synchronization, device, server and computer storage medium
CN110457229A (en) Game performance monitoring method, device, electronic equipment and storage medium
CN107333287B (en) Network detecting method, network detection device and intelligent terminal
CN112601199B (en) Intelligent contact sensing method, device and system based on low-power-consumption Bluetooth
Inçki et al. Runtime verification of IoT systems using complex event processing
CN107704317B (en) Intelligent device and application management method thereof and device with storage function
CN102937893A (en) Software timing method of dynamic overload timing length
CN114390578A (en) Network performance testing method and device, electronic equipment and medium
CN105528546B (en) Vulnerability mining method and device and electronic equipment
CN110365598A (en) Method, apparatus, server, terminal and the storage medium that heartbeat message is sent
CN108964822A (en) A kind of multi-scheme obtains the method and system of network time parallel
CN103326892B (en) The operating method and device of web interface
CN113965904A (en) Device registration method, device and storage medium
CN106982156B (en) Priority setting method, device, communication system, equipment and readable storage medium storing program for executing
CN109213589A (en) A kind of method and device of Message Processing
CN109040937A (en) Microphone blocks based reminding method and relevant apparatus
CN107608723A (en) One kind application alignment awakening method, terminal and computer-readable recording 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