Node testing method, device and system
By outputting test commands in the CAN node controller and recording the time when the stop output message and bus level reaches a specific value, we judge whether the T_WAIT_BUS_SLEEP time parameter of the node controller is normal, which solves the problem of the node controller being unable to sleep, resulting in the power loss of the entire vehicle. The problem of this achieves the optimization of battery usage efficiency and energy saving.
Patent Information
- Application Number
- CN202411335346.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-24
AI Technical Summary
In the AUTOSAR network management of the automotive open system architecture, there is a problem with the T_WAIT_BUS_SLEEP time development of the CAN node controller, which causes the CAN node controller to be unable to sleep, causing the risk of power loss in the entire vehicle.
The node controller to be tested is triggered to output the network management message by outputting the test command, and record the time when its output stops and the time when the bus level reaches a specific value. Based on these times, determine whether the specific time parameters of the node controller pass the test to ensure that T_WAIT_BUS_SLEEP The time parameters are normal.
It avoids the problem of node controller not sleeping due to abnormal parameters in specific time, and ensures the efficiency of the vehicle battery usage and energy-saving effect.
Smart Images

Figure CN119225333A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing, and in particular to a node testing method, device and system. Background Art
[0002] The role of the T_WAIT_BUS_SLEEP time parameter in the automotive open system architecture AUTOSAR network management is: in CAN (Controller Area Network) communication, it ensures that all CAN node controllers have enough time to stop their network activities before entering sleep mode, thereby achieving energy saving and optimizing battery efficiency.
[0003] If there is a problem with the T_WAIT_BUS_SLEEP time development of the CAN node controller, the CAN node controller itself or the peer controller will not be able to sleep, which may cause the risk of the entire vehicle running out of power. Summary of the invention
[0004] In view of this, the present application provides a node testing method, device and system to solve the problem in the prior art that if there is a problem with the T_WAIT_BUS_SLEEP time development of the CAN node controller, the CAN node controller itself or the peer controller will not be able to sleep, thereby causing the risk of the whole vehicle running out of power. The specific solution is as follows:
[0005] A node testing method, comprising:
[0006] If it is determined that the node controller to be tested is in a specific state, output a test instruction, wherein the test instruction is used to trigger the node controller to be tested to output a first message, wherein the first message is a network management message;
[0007] Determine a time point at which the node controller to be tested stops outputting the first message, and determine the time point at which the outputting of the first message stops as a first time point;
[0008] Determine a time when a bus level of the node controller to be tested reaches a specific value, and determine the time when the bus level reaches the specific value as a second time, the second time being later than the first time;
[0009] Based on the first moment and the second moment, it is determined whether a specific time parameter of the node controller to be tested passes the node test, and the specific time parameter is used to characterize the time required for the node controller to be tested to reach the specific state.
[0010] Further, it is determined that the node controller to be tested is in a specific state, including:
[0011] Determining the value of the bus level of the node controller to be tested;
[0012] If it is determined that the bus level of the node controller to be tested is a specific value, it is determined that the node controller to be tested is in a specific state.
[0013] Further, it is determined that the node controller to be tested is in a specific state, including:
[0014] Get a test request;
[0015] Based on the test request, a power supply is controlled to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state.
[0016] Further, the determining whether the node controller to be tested passes the node test based on the first moment and the second moment includes:
[0017] determining a time difference between a second moment and said first moment;
[0018] If the time difference is within a specific range, determining that the specific time parameter of the node controller to be tested passes the node test;
[0019] If the time difference is not within the specific range, it is determined that the specific time parameter of the node controller to be tested fails the node test.
[0020] Further, the determining whether the node controller to be tested passes the node test based on the first moment and the second moment includes:
[0021] Determine whether the node controller to be tested outputs a second message between the first moment and the second moment, the second message being different from the first message;
[0022] If it is determined that the node controller to be tested does not output the second message between the first moment and the second moment, it is determined whether the node controller to be tested passes the node test based on the first moment and the second moment.
[0023] Furthermore, it also includes:
[0024] Detecting a waveform output by an oscilloscope, wherein the oscilloscope is connected to the node controller to be tested and outputs a waveform based on a bus level of the node controller to be tested;
[0025] The determining the time when the node controller to be tested stops outputting the first message includes:
[0026] Determining, based on the waveform output by the oscilloscope, that the node controller to be tested stops outputting the first message at the first moment;
[0027] The step of determining the time when the bus level of the node controller to be tested reaches a specific value includes:
[0028] Based on the waveform output by the oscilloscope, it is determined that the bus level of the node controller to be tested reaches a specific value at the second moment.
[0029] A node testing system, comprising:
[0030] The node controller to be tested;
[0031] A processor is used to output a test instruction when it is determined that the node controller to be tested is in a specific state, and the test instruction is used to trigger the node controller to be tested to output a first message, wherein the first message is a network management message; determine the moment when the node controller to be tested stops outputting the first message, and determine the moment when the output of the first message stops as a first moment; determine the moment when the bus level of the node controller to be tested reaches a specific value, and determine the moment when the bus level reaches the specific value as a second moment, and the second moment is later than the first moment; determine whether the node controller to be tested passes the node test based on the first moment and the second moment.
[0032] Furthermore, it also includes:
[0033] an oscilloscope, connected to the node controller to be tested, capable of outputting a waveform based on the bus level of the node controller to be tested;
[0034] The processor determines that the node controller to be tested stops outputting the first message at the first moment based on the waveform output by the oscilloscope; and determines that the bus level of the node controller to be tested reaches a specific value at the second moment based on the waveform output by the oscilloscope.
[0035] Furthermore, it also includes:
[0036] A power supply capable of supplying power to the node controller to be tested;
[0037] The processor is used to obtain a test request, and based on the test request, control a power supply to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state.
[0038] A node testing device, comprising:
[0039] An output unit, configured to output a test instruction when it is determined that the node controller to be tested is in a specific state, wherein the test instruction is used to trigger the node controller to be tested to output a first message, wherein the first message is a network management message;
[0040] A first determining unit, configured to determine a time when the node controller to be tested stops outputting the first message, and determine the time when the outputting of the first message stops as a first time;
[0041] A second determining unit, configured to determine a time when a bus level of the node controller to be tested reaches a specific value, and determine the time when the bus level reaches the specific value as a second time, wherein the second time is later than the first time;
[0042] The third determining unit is used to determine whether the node controller to be tested passes the node test based on the first moment and the second moment.
[0043] It can be seen from the above technical scheme that the node testing method, device and system disclosed in the present application, if it is determined that the node controller to be tested is in a specific state, outputs a test instruction, the test instruction is used to trigger the node controller to be tested to output a first message, the first message is a network management message; determines the moment when the node controller to be tested stops outputting the first message, and determines the moment when the output of the first message stops as the first moment; determines the moment when the bus level of the node controller to be tested reaches a specific value, and determines the moment when the bus level reaches the specific value as the second moment, the second moment is later than the first moment; based on the first moment and the second moment, determines whether the specific time parameter of the node controller to be tested passes the node test, the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state. When the node controller to be tested is in a specific state, this solution outputs a test instruction to test the node controller to be tested. The moment when the node controller to be tested stops outputting the first message and the moment when the bus level of the node controller to be tested reaches a specific value are used to judge whether the specific time parameters of the node controller to be tested pass the node test. This implements the test of the specific time parameters of the node controller and avoids the risk of the node controller itself or the opposite controller being unable to sleep due to abnormalities in the specific time parameters, thereby causing the whole vehicle to run out of power. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0045] Figure 1 A flowchart of a node testing method disclosed in an embodiment of the present application;
[0046] Figure 2 A flowchart of a node testing method disclosed in an embodiment of the present application;
[0047] Figure 3 A flowchart of a node testing method disclosed in an embodiment of the present application;
[0048] Figure 4 A flowchart of a node testing method disclosed in an embodiment of the present application;
[0049] Figure 5 A schematic diagram of the structure of a node testing system disclosed in an embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of a node testing device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0051] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0052] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0053] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0054] This application discloses a node testing method, and its flow chart is as follows: Figure 1 As shown, including:
[0055] Step S11: if it is determined that the node controller to be tested is in a specific state, output a test instruction, the test instruction is used to trigger the node controller to be tested to output a first message, the first message is a network management message;
[0056] Step S12, determining the time when the node controller to be tested stops outputting the first message, and determining the time when the outputting of the first message stops as the first time;
[0057] Step S13, determining the time when the bus level of the node controller to be tested reaches a specific value, and determining the time when the bus level reaches the specific value as a second time, the second time being later than the first time;
[0058] Step S14: determine whether a specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment, where the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state.
[0059] The role of the T_WAIT_BUS_SLEEP time parameter in the automotive open system architecture AUTOSAR network management is: in CAN (Controller Area Network) communication, it ensures that all CAN node controllers have enough time to stop their network activities before entering sleep mode, thereby achieving energy saving and optimizing battery efficiency.
[0060] If there is a problem with the T_WAIT_BUS_SLEEP time development of the CAN node controller, the CAN node controller itself or the peer controller will not be able to sleep, which may cause the risk of the entire vehicle running out of power.
[0061] Based on this, in this scheme, when it is determined that the node controller to be tested is in a specific state, a test instruction is output to trigger the node controller to be tested to output a first message, and the first moment when the node controller to be tested stops outputting the first message, and the second moment when the bus level of the node controller to be tested reaches specific data are recorded, and based on the first moment and the second moment, it is determined whether the specific time parameters of the node controller to be tested pass the node test, thereby realizing the judgment of whether the characteristic time parameters of the node controller to be tested are abnormal, so as to avoid the node controller itself or the opposite controller being unable to sleep due to abnormal specific time parameters, thereby causing the risk of power shortage of the entire vehicle.
[0062] The node controller to be tested is a CAN (Controller Area Network) node, which can be a CAN type or CANFD (Controller Area Network Flexible Data-Rate) type controller ECU. Among them, the CAN controller is a hardware device used for serial communication protocols in automotive or industrial environments, mainly used to allow multiple control units or nodes to communicate on the same bus; the CANFD controller is an enhanced version of the CAN controller, supporting higher data rates and larger data loads.
[0063] When the node controller to be tested is in a specific state, the node controller to be tested does not perform data interaction and can be tested. At this time, a test instruction is output to the node controller to be tested so that the node controller to be tested can output a first message, which is a network management message. When the node controller to be tested outputs the first message, the node controller to be tested exits the specific state.
[0064] Network management messages are the core component of AUTOSAR network management and are used for mode management and switching between communication nodes, such as switching between sleep-wake-up-working modes.
[0065] When the node controller to be tested outputs the first message, the time when the node controller to be tested outputs the first message is recorded to determine the time when the node controller to be tested stops outputting the first message, and the time is determined as the first time.
[0066] The node controller to be tested stops outputting the first message, that is, the node controller to be tested has completed outputting all the first messages and no longer outputs messages. The moment when the node controller to be tested stops outputting the first message is recorded and recorded as the first moment.
[0067] After the node controller to be tested stops outputting the first message, the node controller to be tested is continuously monitored. At this time, the bus level of the node controller to be tested is monitored, so that when it is determined that the bus level of the node controller to be tested reaches a specific value, the moment of occurrence of this event is recorded, that is, the moment when the bus level of the node controller to be tested reaches the specific value is recorded and recorded as the second moment. The second moment is later than the first moment, that is, the event that the bus level of the node controller to be tested reaches the specific value is later than the event that the node controller to be tested stops outputting the first message, which ensures that the process that the bus level reaches the specific value after the node controller to be tested stops outputting the first message is executed sequentially, and it can be accurately determined based on this whether the characteristic time parameter of the node controller to be tested passes the node test.
[0068] When the node controller to be tested reaches the second moment, it re-enters the specific state. The process of the node controller to be tested from the first moment to the second moment is the process of its entering the specific state. Therefore, based on the first moment and the second moment, it can be determined whether the specific time parameter of the node controller to be tested passes the node test.
[0069] Among them, the specific time parameter (T_WAIT_BUS_SLEEP) is used to characterize the time required for the node controller to be tested to reach a specific state. That is, the above process is actually to test the time required for the node controller to be tested to reach a specific state, so as to determine whether there is an abnormality in the time required for it to reach the specific state, and when there is no abnormality, it is determined that the test of the specific time parameter of the node controller to be tested has passed.
[0070] In addition, the node testing method disclosed in the present embodiment tests the specific time parameters of the node controller to be tested. It can actually test the specific time parameters of multiple node controllers to be tested at the same time. It is only necessary to set unique identifiers for the multiple node controllers to be tested respectively to distinguish the multiple node controllers to be tested. When it is determined that there is an abnormal node controller among the multiple node controllers to be tested, it can be determined based on the set unique identifier which node controller has the abnormality, thereby avoiding misjudgment.
[0071] The node testing method disclosed in this embodiment, if it is determined that the node controller to be tested is in a specific state, output a test instruction, the test instruction is used to trigger the node controller to be tested to output a first message, the first message is a network management message; determine the moment when the node controller to be tested stops outputting the first message, and determine the moment when the first message is stopped outputting as the first moment; determine the moment when the bus level of the node controller to be tested reaches a specific value, and determine the moment when the bus level reaches the specific value as the second moment, the second moment is later than the first moment; based on the first moment and the second moment, determine whether the specific time parameter of the node controller to be tested passes the node test, the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state. This scheme outputs a test instruction when the node controller to be tested is in a specific state, tests the node controller to be tested, and uses the moment when the node controller to be tested stops outputting the first message and the moment when the bus level of the node controller to be tested reaches a specific value to judge whether the specific time parameter of the node controller to be tested passes the node test, thereby realizing the test of the specific time parameter of the node controller, avoiding the risk of the node controller itself or the opposite end controller being unable to sleep due to abnormal specific time parameters, thereby causing the whole vehicle to lose power.
[0072] This embodiment discloses a node testing method, and its flow chart is as follows: Figure 2 As shown, including:
[0073] Step S21, determining the value of the bus level of the node controller to be tested;
[0074] Step S22: if it is determined that the bus level of the node controller to be tested is a specific value, it is determined that the node controller to be tested is in a specific state, a test instruction is output, and the test instruction is used to trigger the node controller to be tested to output a first message, where the first message is a management network message;
[0075] Step S23, determining the time when the node controller to be tested stops outputting the first message, and determining the time when the outputting of the first message stops as the first time;
[0076] Step S24, determining the time when the bus level of the node controller to be tested reaches a specific value, and determining the time when the bus level reaches the specific value as a second time, the second time being later than the first time;
[0077] Step S25: determine whether a specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment, where the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state.
[0078] Determine whether the node controller to be tested is in a specific state. Only when it is in the specific state will the test instruction be output to test the specific time parameters of the node controller to be tested.
[0079] Since the test of specific time parameters of the node controller to be tested requires recording the moment when it stops outputting the first message, and when the node controller is in a specific state, it will not output any message. Therefore, only when the node controller is in a specific state and the node controller is controlled to start testing, there will be no impact on the test process by other messages.
[0080] To determine whether the node controller to be tested is in a specific state, the bus level of the node controller to be tested can be used to determine the value of the bus level of the node controller to be tested. Specifically, if the value of the bus level is a specific value, it can be determined that the node controller to be tested is in a specific state.
[0081] The node controller to be tested is in a specific state, which may be a dormant state, an idle state, or other states without data transmission. When the node controller to be tested is in a specific state, the value of its bus level is a specific value. If the node controller to be tested is in a non-specific state, the value of its bus level can be determined to be a non-specific value.
[0082] If the node controller to be tested is in a dormant state, at this time, its bus level is 0, that is, the specific value is 0; if the node controller to be tested is in an idle state, at this time, it has not yet reached the dormant state, then the bus level at this time may not be 0, but another specific value. Then, as long as it is determined that the bus level of the node controller to be tested is a specific value, such as: 0 or another specific value, it can be determined that the node controller to be tested is in a specific state. At this time, a test instruction can be output to make the node controller to be tested exit the current specific state, so that it transmits the first message, and after it completes the transmission of the first message, and detects that the bus level of the node controller to be tested becomes a specific value again, then the node controller to be tested re-enters the specific state.
[0083] Therefore, based on the first time and the second time, the time required for the node controller to be tested to reach a specific state can be determined, that is, the time required for its corresponding bus level to return to a specific value.
[0084] That is, determining whether the specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment may be specifically as follows:
[0085] Determine the time difference between the second moment and the first moment; if the time difference is within a specific range, determine that the specific time parameter of the node controller to be tested passes the node test; if the time difference is not within the specific range, determine that the specific time parameter of the node controller to be tested fails the node test.
[0086] The first moment is the moment when the node controller to be tested stops outputting the first message. At this time, as long as the node controller to be tested does not transmit other data or messages subsequently, the node controller to be tested can enter a specific state when a certain period of time is reached; the second moment is the moment when the bus level of the node controller to be tested reaches a specific value. At the second moment, the node controller to be tested re-enters the specific state.
[0087] Therefore, it is necessary to determine the difference between the second moment and the first moment, determine the time required from the node controller to be tested having no message output to the time it enters a specific state, and determine whether the time is within a specific range. If it is within the specific range, it can be determined that the specific time parameter of the node controller to be tested passes the node test, that is, there is no abnormality in the time required for the node controller to be tested to enter a specific state;
[0088] If it is determined that the time required from the time when the node controller to be tested has no message output to the time when it enters a specific state is not within a specific range, it can be determined that the specific time parameter of the node controller to be tested has not passed the node test, that is, there is an abnormality in the time required for the node controller to be tested to enter a specific state.
[0089] The specific range may be: 4500-5500ms. Of course, it may also be other ranges, which are not specifically limited here.
[0090] The node testing method disclosed in this embodiment determines the value of the bus level of the node controller to be tested; if the bus level of the node controller to be tested is determined to be a specific value, it is determined that the node controller to be tested is in a specific state, and a test instruction is output, the test instruction is used to trigger the node controller to be tested to output a first message, the first message is a management network message; determine the moment when the node controller to be tested stops outputting the first message, and the moment when the first message is stopped is determined as the first moment; determine the moment when the bus level of the node controller to be tested reaches a specific value, and the moment when the bus level reaches the specific value is determined as the second moment, the second moment is later than the first moment; based on the first moment and the second moment, determine whether the specific time parameter of the node controller to be tested passes the node test, the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state. This scheme determines whether it is in a specific state based on the value of the bus level of the node controller to be tested. When it is a specific value, it can be determined that the node controller to be tested is currently in a specific state, so that when the node controller to be tested is in a specific state, it is exited from the specific state and tested, so as to avoid the problem of inaccurate test results caused by testing when the node controller is not in a specific state.
[0091] This embodiment discloses a node testing method, and its flow chart is as follows: Figure 3 As shown, including:
[0092] Step S31, obtaining a test request;
[0093] Step S32: Based on the test request, control the power supply to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state, and output a test instruction, where the test instruction is used to trigger the node controller to be tested to output a first message;
[0094] Step S33, determining the time when the node controller to be tested stops outputting the first message, and determining the time when the outputting of the first message stops as the first time;
[0095] Step S34, determining the time when the bus level of the node controller to be tested reaches a specific value, and determining the time when the bus level reaches the specific value as a second time, the second time being later than the first time;
[0096] Step S35: determine whether a specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment, where the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state.
[0097] When it is determined that the node controller to be tested is in a specific state, the node controller to be tested is tested to determine whether a specific time parameter of the node controller to be tested can pass the test.
[0098] Determining that the node controller to be tested is in a specific state may include: obtaining a test request, and controlling a power supply to supply power to the node controller to be tested based on the test request, so that the node controller to be tested is in the specific state.
[0099] When there is no power supply to the node controller, the node controller is in a state where it cannot transmit data or messages due to the lack of power supply. When there is power supply to the node controller, it switches from the state where it cannot transmit data or messages to the state where it can transmit data or messages but currently there is no data or messages to be transmitted. That is, when the node controller switches from having no power supply to having power supply, the node controller switches to a specific state, at which time, specific time parameters can be tested on it.
[0100] The test request can be input by the user, or a time interval can be set and pre-set by a timer. When the timer reaches the time interval, a test request is automatically generated.
[0101] After obtaining the test request, in response to the test request, the power supply is directly controlled to supply power to the node controller to be tested. At this time, it can be determined that the node controller to be tested is in a specific state and can be tested, so a test instruction needs to be output. Before the node controller to be tested controls the power supply to supply power to it in response to the test request, no power supply supplies power to it.
[0102] Furthermore, it can also be:
[0103] After obtaining the test request, in response to the test request, the control power supply is used to supply power to the node controller to be tested. Afterwards, it is detected whether the bus level of the node controller to be tested is a specific value. If it is determined that the bus level is a specific value, it is determined that the node controller to be tested is in a specific state and can be tested. Therefore, a test instruction needs to be output.
[0104] After the test instruction is output, the node controller to be tested is triggered to output the first message. At this time, the IG module can simulate the message to trigger the node controller to be tested to exit the specific mode and output the first message. The IG simulation module (Interactive Generator module) is a functional module in the CANoe software, which is used to send user-defined or database messages to the bus. The CANoe software is a tool for the automotive bus development environment, mainly used for modeling, simulation, testing and development of CAN communication networks.
[0105] The node test method disclosed in this embodiment obtains a test request; based on the test request, controls the power supply to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state, outputs a test instruction, and the test instruction is used to trigger the node controller to be tested to output a first message; determines the moment when the node controller to be tested stops outputting the first message, and determines the moment when the first message stops outputting as the first moment; determines the moment when the bus level of the node controller to be tested reaches a specific value, and determines the moment when the bus level reaches the specific value as the second moment, and the second moment is later than the first moment; determines whether the specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment, and the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state. After obtaining the test request, this scheme controls the power supply to supply power to the node controller to be tested, so that the node controller to be tested can be in a specific state, so as to ensure that after the node controller to be tested changes from no power supply to power supply, the node controller to be tested can directly enter the specific state, so as to ensure that there is no interference from other data or messages when testing the node controller to be tested, and avoid the problem of inaccurate test results.
[0106] This embodiment discloses a node testing method, and its flow chart is as follows: Figure 4 As shown, including:
[0107] Step S41: if it is determined that the node controller to be tested is in a specific state, output a test instruction, the test instruction is used to trigger the node controller to be tested to output a first message, the first message is a network management message;
[0108] Step S42, determining the time when the node controller to be tested stops outputting the first message, and determining the time when the outputting of the first message stops as the first time;
[0109] Step S43, determining the time when the bus level of the node controller to be tested reaches a specific value, and determining the time when the bus level reaches the specific value as a second time, the second time being later than the first time;
[0110] Step S44, determining whether the node controller to be tested outputs a second message between the first moment and the second moment, and the second message is different from the first message;
[0111] Step S45: If it is determined that the node controller to be tested does not output the second message between the first moment and the second moment, determine whether the node controller to be tested passes the node test based on the first moment and the second moment.
[0112] When the node controller to be tested is in a specific state, the node controller to be tested is tested, controlled to exit the specific state, and output a first message, and the first moment when the node controller to be tested stops outputting the first message and the second moment when the bus level of the node controller to be tested reaches a specific value are recorded, so as to determine whether the specific time parameters of the node controller to be tested pass the test based on the first moment and the second moment.
[0113] Among them, when determining whether the specific time parameters of the node controller to be tested pass the test based on the first moment and the second moment, it is possible to first check whether there is a message transmission between the first moment and the second moment to avoid the problem of inaccurate testing due to inaccurate determination of the first moment and the second moment.
[0114] If the node controller to be tested is in a specific state before the test, then there is no need for message transmission. Therefore, in theory, when testing the node controller to be tested, only the first message should need to be transmitted. Therefore, it is sufficient to directly determine whether the specific time parameters of the node controller to be tested pass the test based on the first moment and the second moment.
[0115] However, in actual application, if during the test, the node controller to be tested receives other message transmission tasks, that is, during the test, the node controller to be tested needs to transmit other messages in addition to the first message, and if the first message is transmitted first, and after the first message is transmitted, other messages are still being transmitted, then, based on the moment of stopping transmission of the first message as the initial moment of the time required for the node controller to be tested to reach a specific state, the test results will be inaccurate.
[0116] The initial moment in the time required for the node controller to reach a specific state should be when the node controller transmits the last frame of the message, and then it will no longer take any action until it enters a specific state. Therefore, this embodiment adds a judgment on whether there is a message transmission between the first moment and the second moment.
[0117] If there is no message transmission between the first moment and the second moment, then it can be directly determined based on the first moment and the second moment whether the specific time parameter of the node controller to be tested passes the test, that is, the time required for the node controller to be tested to enter a specific state is within a specific range;
[0118] If there are other message transmissions between the first moment and the second moment, it is necessary to further determine the moment of the last frame message transmitted by the node controller to be tested (regardless of which message among the other messages), determine the moment as the third moment, and determine based on the third moment and the second moment whether the specific time parameters of the node controller to be tested pass the node test, that is, the time required for the node controller to be tested to enter a specific state is within a specific range, so as to avoid the problem of inaccurate testing due to the large time difference between the second moment and the first moment resulting in the duration not being within a specific range when the first moment and the second moment are used for determination.
[0119] The node testing method disclosed in the present embodiment outputs a test instruction if it is determined that the node controller to be tested is in a specific state, and the test instruction is used to trigger the node controller to be tested to output a first message, and the first message is a network management message; determines the moment when the node controller to be tested stops outputting the first message, and determines the moment when the output of the first message stops as the first moment; determines the moment when the bus level of the node controller to be tested reaches a specific value, and determines the moment when the bus level reaches the specific value as the second moment, and the second moment is later than the first moment; determines whether the node controller to be tested outputs a second message between the first moment and the second moment, and the second message is different from the first message; if it is determined that the node controller to be tested does not output the second message between the first moment and the second moment, determines whether the node controller to be tested passes the node test based on the first moment and the second moment. This scheme adds a judgment on whether there is a second message output between the first moment and the second moment. Only by ensuring that there is no message output between the first moment and the second moment can it be ensured that the conclusion on whether the specific time parameters of the node controller to be tested determined based on the first moment and the second moment pass the test is accurate, avoiding the problem of inaccurate testing due to other message transmissions between the first moment and the second moment, thereby affecting normal use.
[0120] Furthermore, the node testing method disclosed in this embodiment may also include:
[0121] Detect the waveform output by the oscilloscope, wherein the oscilloscope is connected to the node controller to be tested, and outputs a waveform based on the bus level of the node controller to be tested. The waveform output by the oscilloscope includes time, that is, the oscilloscope outputs the bus level of the node controller to be tested at each moment.
[0122] Then, determine the moment when the node controller to be tested stops outputting the first message. You can also determine the moment when the waveform output by the node controller to be tested meets the waveform of stopping outputting the first message through the waveform output by the oscilloscope, and determine that moment as the first moment. The waveform corresponding to the bus level when the node controller outputs a message is different from the waveform corresponding to the bus level when the node controller does not output a message. Therefore, whether the node controller outputs a message can be determined through the waveform corresponding to the bus level.
[0123] The moment when the bus level of the node controller to be tested reaches a specific value can be determined by the waveform output by the oscilloscope, and the moment when the bus level of the node controller to be tested reaches the specific value can be determined as the second moment.
[0124] In addition, when determining whether the node controller to be tested is in a specific state, if it is determined based on whether the value of the bus level of the node controller to be tested is a specific value, then when determining whether the node controller to be tested is in a specific state, it can also be determined by the waveform output by the oscilloscope.
[0125] It should be noted that in the node testing method disclosed in this embodiment, the value of the bus level of the node controller to be tested can also be determined by other means, and is not limited to being determined by an oscilloscope, such as: detecting the bus level at the CAN bus of the node controller to be tested by a sensor.
[0126] In the node testing method disclosed in this embodiment, the waveform output by the oscilloscope is used to determine the value of the bus level of the node controller to be tested. The specific value of the bus level can be directly displayed through the waveform, thereby ensuring the accuracy of the determination of the bus level value.
[0127] This embodiment discloses a node testing system, and its structural diagram is as follows: Figure 5 As shown, including:
[0128] The node controller 51 and processor 52 to be tested.
[0129] There may be one or more node controllers 51 to be tested, and the processor may test one node controller or multiple node controllers at the same time.
[0130] The processor 51 is used to output a test instruction when it is determined that the node controller to be tested is in a specific state, and the test instruction is used to trigger the node controller to be tested to output a first message, and the first message is a network management message; determine the moment when the node controller to be tested stops outputting the first message, and determine the moment when the output of the first message stops as the first moment; determine the moment when the bus level of the node controller to be tested reaches a specific value, and determine the moment when the bus level reaches the specific value as the second moment, and the second moment is later than the first moment; determine whether the node controller to be tested passes the node test based on the first moment and the second moment.
[0131] Furthermore, the node testing system disclosed in this embodiment may also include:
[0132] an oscilloscope, connected to the node controller to be tested, capable of outputting a waveform based on a bus level of the node controller to be tested;
[0133] The processor determines that the node controller to be tested stops outputting the first message at a first moment based on the waveform output by the oscilloscope; and determines that the bus level of the node controller to be tested reaches a specific value at a second moment based on the waveform output by the oscilloscope.
[0134] Furthermore, the node testing system disclosed in this embodiment may also include:
[0135] A power supply capable of supplying power to the node controller under test;
[0136] The processor is used to obtain a test request, and based on the test request, control a power supply to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state.
[0137] Furthermore, the node testing system disclosed in this embodiment may also include:
[0138] A CAN collector, connected to the node controller to be tested, and used to collect the message output by the node controller to be tested, no matter the message is the first message or other messages;
[0139] In addition, the node testing system may also include:
[0140] The PC is connected to the CAN collector and is used to display the messages collected by the CAN collector.
[0141] Among them, the PC computer may only include a display screen, which is only used for display, and cannot execute other complex data processing processes; or, the PC computer not only includes a display screen, but also includes a controller that can execute complex data processing processes. The controller here can be the same as the processor in the node test system disclosed in this embodiment, or can be a different structure for processing data.
[0142] Furthermore, the processor is configured to:
[0143] The value of the bus level of the node controller to be tested is determined; if the bus level of the node controller to be tested is determined to be a specific value, it is determined that the node controller to be tested is in a specific state.
[0144] Furthermore, the processor is configured to:
[0145] A test request is obtained; based on the test request, a power supply is controlled to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state.
[0146] Furthermore, the processor is configured to:
[0147] Determine the time difference between the second moment and the first moment; if the time difference is within a specific range, determine that the specific time parameter of the node controller to be tested passes the node test; if the time difference is not within the specific range, determine that the specific time parameter of the node controller to be tested fails the node test.
[0148] Furthermore, the processor is configured to:
[0149] Determine whether the node controller to be tested outputs a second message between a first moment and a second moment, and the second message is different from the first message; if it is determined that the node controller to be tested does not output the second message between the first moment and the second moment, determine whether the node controller to be tested passes the node test based on the first moment and the second moment.
[0150] The node testing system disclosed in this embodiment is implemented based on the node testing method disclosed in the above embodiment, which will not be described in detail here.
[0151] The node test system disclosed in this embodiment outputs a test instruction if it is determined that the node controller to be tested is in a specific state, and the test instruction is used to trigger the node controller to be tested to output a first message, and the first message is a network management message; determine the moment when the node controller to be tested stops outputting the first message, and determine the moment when the first message stops outputting as the first moment; determine the moment when the bus level of the node controller to be tested reaches a specific value, and determine the moment when the bus level reaches the specific value as the second moment, and the second moment is later than the first moment; determine whether the specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment, and the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state. This scheme outputs a test instruction when the node controller to be tested is in a specific state, and tests the node controller to be tested. The moment when the node controller to be tested stops outputting the first message and the moment when the bus level of the node controller to be tested reaches a specific value are used to judge whether the specific time parameter of the node controller to be tested passes the node test, thereby realizing the test of the specific time parameter of the node controller, avoiding the risk of the node controller itself or the opposite end controller being unable to sleep due to abnormal specific time parameters, thereby causing the whole vehicle to lose power.
[0152] This embodiment discloses a node testing device, and its structural diagram is shown in FIG. Figure 6 As shown, including:
[0153] An output unit 61 , a first determining unit 62 , a second determining unit 63 and a third determining unit 64 .
[0154] The output unit 61 is used to output a test instruction when it is determined that the node controller to be tested is in a specific state, and the test instruction is used to trigger the node controller to be tested to output a first message, and the first message is a network management message;
[0155] The first determining unit 62 is used to determine the time when the node controller to be tested stops outputting the first message, and determine the time when the output of the first message stops as the first time;
[0156] The second determining unit 63 is used to determine the time when the bus level of the node controller to be tested reaches a specific value, and determine the time when the bus level reaches the specific value as the second time, and the second time is later than the first time;
[0157] The third determination unit 64 is used to determine whether the node controller to be tested passes the node test based on the first time and the second time.
[0158] The node testing device disclosed in this embodiment is implemented based on the node testing method disclosed in the above embodiment, which will not be described in detail here.
[0159] The node test device disclosed in this embodiment outputs a test instruction if it is determined that the node controller to be tested is in a specific state, and the test instruction is used to trigger the node controller to be tested to output a first message, and the first message is a network management message; determine the moment when the node controller to be tested stops outputting the first message, and determine the moment when the first message stops outputting as the first moment; determine the moment when the bus level of the node controller to be tested reaches a specific value, and determine the moment when the bus level reaches the specific value as the second moment, and the second moment is later than the first moment; determine whether the specific time parameter of the node controller to be tested passes the node test based on the first moment and the second moment, and the specific time parameter is used to characterize the time required for the node controller to be tested to reach a specific state. This scheme outputs a test instruction when the node controller to be tested is in a specific state, and tests the node controller to be tested. The moment when the node controller to be tested stops outputting the first message and the moment when the bus level of the node controller to be tested reaches a specific value are used to judge whether the specific time parameter of the node controller to be tested passes the node test, thereby realizing the test of the specific time parameter of the node controller, avoiding the risk of the node controller itself or the opposite end controller being unable to sleep due to abnormal specific time parameters, thereby causing the whole vehicle to lose power.
[0160] This embodiment discloses a vehicle, which at least includes a control device, and the control device is used to execute the above-mentioned node testing method.
[0161] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0162] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0163] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0164] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A node testing method, characterized in that: include: If it is determined that the node controller to be tested is in a specific state, output a test instruction, wherein the test instruction is used to trigger the node controller to be tested to output a first message, wherein the first message is a network management message; Determine a time point at which the node controller to be tested stops outputting the first message, and determine the time point at which the outputting of the first message stops as a first time point; Determine a time when a bus level of the node controller to be tested reaches a specific value, and determine the time when the bus level reaches the specific value as a second time, the second time being later than the first time; Based on the first moment and the second moment, it is determined whether a specific time parameter of the node controller to be tested passes the node test, and the specific time parameter is used to characterize the time required for the node controller to be tested to reach the specific state.
2. The method according to claim 1, characterized in that Determine that the node controller under test is in a specific state, including: Determining the value of the bus level of the node controller to be tested; If it is determined that the bus level of the node controller to be tested is a specific value, it is determined that the node controller to be tested is in a specific state.
3. The method according to claim 1, characterized in that Determine that the node controller under test is in a specific state, including: Get a test request; Based on the test request, a power supply is controlled to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state.
4. The method according to claim 1, characterized in that: The determining whether the node controller to be tested passes the node test based on the first time and the second time includes: determining a time difference between a second moment and said first moment; If the time difference is within a specific range, determining that the specific time parameter of the node controller to be tested passes the node test; If the time difference is not within the specific range, it is determined that the specific time parameter of the node controller to be tested fails the node test.
5. The method according to claim 1, characterized in that The determining whether the node controller to be tested passes the node test based on the first time and the second time includes: Determine whether the node controller to be tested outputs a second message between the first moment and the second moment, the second message being different from the first message; If it is determined that the node controller to be tested does not output the second message between the first moment and the second moment, it is determined whether the node controller to be tested passes the node test based on the first moment and the second moment.
6. The method according to claim 1, characterized in that Also includes: Detecting a waveform output by an oscilloscope, wherein the oscilloscope is connected to the node controller to be tested and outputs a waveform based on a bus level of the node controller to be tested; The determining the time when the node controller to be tested stops outputting the first message includes: Determining, based on the waveform output by the oscilloscope, that the node controller to be tested stops outputting the first message at the first moment; The step of determining the time when the bus level of the node controller to be tested reaches a specific value includes: Based on the waveform output by the oscilloscope, it is determined that the bus level of the node controller to be tested reaches a specific value at the second moment.
7. A node testing system, characterized in that: include: The node controller to be tested; A processor, configured to output a test instruction when determining that the node controller to be tested is in a specific state, wherein the test instruction is used to trigger the node controller to be tested to output a first message, wherein the first message is a network management message; Determine a time point at which the node controller to be tested stops outputting the first message, and determine the time point at which the outputting of the first message stops as a first time point; Determine a time when a bus level of the node controller to be tested reaches a specific value, and determine the time when the bus level reaches the specific value as a second time, the second time being later than the first time; Based on the first time and the second time, it is determined whether the node controller to be tested passes the node test.
8. The system according to claim 7, characterized in that Also includes: an oscilloscope, connected to the node controller to be tested, capable of outputting a waveform based on the bus level of the node controller to be tested; The processor determines, based on the waveform output by the oscilloscope, that the node controller to be tested stops outputting the first message at the first moment; Based on the waveform output by the oscilloscope, it is determined that the bus level of the node controller to be tested reaches a specific value at the second moment.
9. The system according to claim 7, characterized in that Also includes: A power supply capable of supplying power to the node controller to be tested; The processor is used to obtain a test request, and based on the test request, control a power supply to supply power to the node controller to be tested, so that the node controller to be tested is in a specific state.
10. A node testing device, characterized in that: include: An output unit, configured to output a test instruction when it is determined that the node controller to be tested is in a specific state, wherein the test instruction is used to trigger the node controller to be tested to output a first message, wherein the first message is a network management message; A first determining unit, configured to determine a time when the node controller to be tested stops outputting the first message, and determine the time when the outputting of the first message stops as a first time; A second determining unit, configured to determine a time when a bus level of the node controller to be tested reaches a specific value, and determine the time when the bus level reaches the specific value as a second time, wherein the second time is later than the first time; The third determining unit is used to determine whether the node controller to be tested passes the node test based on the first moment and the second moment.
Citation Information
Patent Citations
Vehicle control method and system
CN106184070A
Method and device for testing waiting dormancy time of CAN bus
CN107959609A
Device and method for testing time from pre-dormancy to dormancy of AUTOSAR network management
CN113965483A
Time parameter testing method, device, equipment and medium
CN117596173A
Vehicle-mounted controller testing method and device and electronic equipment
CN117631636A
