CN115378834B - Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment - Google Patents

Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment Download PDF

Info

Publication number
CN115378834B
CN115378834B CN202210955030.2A CN202210955030A CN115378834B CN 115378834 B CN115378834 B CN 115378834B CN 202210955030 A CN202210955030 A CN 202210955030A CN 115378834 B CN115378834 B CN 115378834B
Authority
CN
China
Prior art keywords
message
test
signal
preset
hil
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210955030.2A
Other languages
Chinese (zh)
Other versions
CN115378834A (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.)
Dongfeng Liuzhou Motor Co Ltd
Original Assignee
Dongfeng Liuzhou Motor 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 Dongfeng Liuzhou Motor Co Ltd filed Critical Dongfeng Liuzhou Motor Co Ltd
Priority to CN202210955030.2A priority Critical patent/CN115378834B/en
Publication of CN115378834A publication Critical patent/CN115378834A/en
Application granted granted Critical
Publication of CN115378834B publication Critical patent/CN115378834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a multi-network-segment gateway route test method and a device based on hardware-in-loop equipment.

Description

Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment
Technical Field
The invention relates to the field of vehicle multi-network-segment gateway route detection, in particular to a multi-network-segment gateway route test method and device based on hardware-in-loop equipment
Background
With the increasing complexity of the functions of the whole vehicle electrical equipment, the number of the whole vehicle CAN messages is very large and CAN reach more than thousands, and the number of signals defined under each CAN message is more than 30. The gateway routing function is divided into direct routing, periodic message routing, multi-packet message routing, request message routing, diagnostic message routing and other modes, and the requirements of each routing mode are inconsistent, so that the gateway routing function is very complex. The timely and accurate sending of the message is also important, and if an important message routing error or delay occurs, the function failure and even the out-of-control can be caused, so that serious accidents are caused. The existing multi-network segment gateway message routing function test method mainly comprises two types:
firstly, the manual testing method is original, and has the defects of long time consumption, high labor intensity, low testing coverage, high influence of human factors on testing results, poor repeatability and the like; in the face of such huge testing workload, the manual full coverage test needs more than 1 month at a time, and the test result can only be evaluated manually and subjectively, so that the transmission period of part of the messages is very short, for example, the level of 10ms, and whether the gateway routes in time can not be accurately judged by naked eyes; in addition, the gateway is changed very frequently in the development process, the manual test also has no repeatability, and the software can only conduct test aiming at a change point when the test is changed iteratively, so that the test is incomplete.
Secondly, the special network test cabinet is used for setting up an automatic test script to carry out the test, the special network cabinet is needed to be purchased, script writing and maintenance are difficult, more code writing professionals are needed to carry out the test, the cost is very high, moreover, the special network test cabinet needs to be connected with the whole vehicle for testing, the test step is complex, the test efficiency is low, and when the problem occurs, the specific gateway of the whole vehicle cannot be diagnosed, and the test time is long.
Disclosure of Invention
The invention provides a multi-network-segment gateway routing test method and device based on hardware-in-loop equipment, which improve the test efficiency of a vehicle multi-network-segment gateway and reduce the test cost.
In order to solve the technical problems, the invention provides a multi-network-segment gateway routing test method based on hardware-in-loop equipment, which is applicable to an HIL cabinet, wherein the HIL cabinet is connected with a gateway to be detected through a plurality of CAN lines, and the method comprises the following steps:
continuously sending a first test message to a source network segment of the gateway to be detected according to a preset period, so that the gateway to be detected routes the first test message to a target network segment;
monitoring whether the target network segment continuously uploads a second test message in the preset period;
if yes, comparing whether the first test message is consistent with the second test message;
if the test results are consistent, determining that the test result of the gateway to be detected is qualified;
if the test results are inconsistent, determining that the test result of the gateway to be detected is unqualified.
According to the method, the gateway to be detected and the HIL cabinet are connected through a plurality of CAN lines to detect, the routing function of each multi-network-segment gateway in the vehicle is directly tested, connection with the whole vehicle is not needed, testing time is saved, testing efficiency is improved, then a first testing message is continuously sent to the source network segment of the gateway to be detected according to a preset period, so that the gateway to be detected routes the first testing message to the target network segment, the routing function of the gateway to be detected is detected in the form of sending messages, whether a second testing message is continuously uploaded in the preset period or not is monitored by the target network segment, timeliness of the routing function of the gateway to be detected is detected, and accuracy of the gateway to be detected is obtained by comparing whether the first testing message is consistent with the second testing message.
As a preferred example, the sending, in the persistent manner, the first test packet to the source network segment of the gateway to be detected specifically includes:
continuously generating the first test message according to a preset period through a message model preset in the HIL cabinet;
and sending the first test message to the source network segment of the gateway to be detected through a board card preset in the HIL cabinet.
According to the invention, the test message is generated through the message model preset in the HIL cabinet and is sent to the source network segment connected with the gateway to be detected, so that a test script does not need to be built again in the test process, and the test efficiency is improved.
As a preferred example, the generating the first test message in the message model preset in the HIL cabinet according to a preset period includes:
generating a first initial message and a first signal according to the message model;
generating a first signal value according to the first signal by using automatic test software preset in the HIL cabinet;
and generating the first test message according to the first initial message and the first signal value.
According to the invention, the message is continuously generated according to the preset time period through the preset message model and is sent to the gateway to be detected, manual control sending is not needed, the test efficiency is improved, meanwhile, the first message comprises the first signal and the first signal value, the message content is rich, and the detection accuracy is improved.
As a preferred example, the monitoring whether the target network segment continuously uploads the second test message in the preset period specifically includes:
transmitting the second test message to a message model preset in the HIL cabinet through the target network segment by a board card preset in the HIL cabinet;
and obtaining the time of sending the second test message to the message model according to the automatic test software preset in the HIL cabinet.
According to the method, the time from the second test message to the message model is identified through the automatic test software preset in the HIL cabinet, and the timeliness of the routing function of the gateway to be detected is detected.
As a preferred example, the monitoring whether the target network segment continuously uploads the second test message in the preset period specifically includes:
continuously displaying the time of the second test message sent to the message model according to the automatic test software preset in the HIL cabinet, and judging whether the displayed time is smaller than or equal to the preset period;
if the displayed time is smaller than or equal to the preset period, determining that the target network segment continuously uploads a second test message in the preset period;
if the displayed time is greater than the preset period, determining that the target network segment does not continuously upload the second test message in the preset period.
The method and the device realize judging whether the gateway to be detected timely routes the received message or not through simple steps, detect the timeliness of the gateway to be detected in routing, do not need to additionally rewrite detection codes, and improve the detection efficiency.
As a preferred example, comparing whether the first test packet and the second test packet are consistent specifically includes:
the second test message is sent to a message model in the HIL cabinet through the target network segment and the board card in the HIL cabinet;
identifying a second signal of the second test message according to a signal model preset in the message model;
identifying a second signal value corresponding to the second signal through automatic test software preset in the HIL cabinet;
determining whether the first signal and the second signal are the same, and whether the first signal value and the second signal value are the same.
The invention obtains the detection result of the gateway to be detected by comparing whether the content of the message received by the gateway to be detected is consistent with that of the message forwarded by the gateway to be detected, and meanwhile, the more the content of the message is compared, the higher the accuracy of comparison is, and in the invention, the generation and the reception of the message are realized through a preset message model and automatic test software, no special test instrument is needed, the invention is suitable for any cabinet of the gateway to be detected, and the test cost is reduced.
As a preferred example, if the test results are consistent, determining that the test result of the gateway to be detected is qualified, and if the test results are inconsistent, determining that the test result of the gateway to be detected is unqualified specifically includes:
if the first signal and the second signal are the same, and the first signal value corresponding to the first signal and the second signal value corresponding to the second signal are the same in one-to-one correspondence, determining that the test result of the gateway to be detected is qualified;
if the first signal and the second signal are different, or the first signal value corresponding to the first signal and the second signal value corresponding to the second signal are different and correspond to each other, determining that the test result of the gateway to be detected is unqualified.
When comparing the first test message and the second test message, the invention not only compares the signals of the messages, but also compares the signal values of the messages, thereby improving the detection accuracy.
On the other hand, the embodiment of the invention provides a multi-network-segment gateway route testing device based on hardware-in-loop equipment, which comprises the following components: the device comprises a message sending module, a detection module and a test module;
the message sending module is used for continuously sending a first test message to a source network segment of the gateway to be detected according to a preset period so that the gateway to be detected routes the first test message to a target network segment;
the detection module is used for monitoring whether the target network segment continuously uploads a second test message in the preset period;
the test module is used for comparing whether the first test message and the second test message are the same.
The invention provides a multi-network-segment gateway routing test device based on hardware-in-loop equipment, which is used for continuously sending a first test message to a source network segment of a gateway to be detected according to a preset period through a message sending module, so that the gateway to be detected routes the first test message to a target network segment, the routing function of the gateway to be detected is detected according to the form of the sent message, whether the target network segment continuously uploads a second test message in the preset period is monitored through a detection module, the timeliness of the routing function of the gateway to be detected is detected, whether the first test message is identical with the second test message is compared through a test module, and the accuracy of the routing function of the gateway to be detected is detected.
As a preferable example, the message sending module includes a sending unit and a signal unit;
the sending unit is used for continuously generating the first test message according to a preset period through a message model preset in the HIL cabinet; the first test message is sent to a source network segment of the gateway to be detected through a board card preset in the HIL cabinet;
the signal unit is used for generating a first signal contained in the first test message through a signal model preset in the message model after generating the first test message according to the message model; and generating a first signal value according to the first signal through automatic testing software preset in the HIL cabinet, and automatically inputting the first signal value into the first testing message.
According to the invention, the first test signal is generated through the transmitting unit and is continuously transmitted to the gateway to be detected according to the preset period, so that the transmission process is not required to be controlled manually, the detection time is saved, and the detection efficiency is improved. Meanwhile, the signal model in the signal unit and the automatic test software contained in the HIL cabinet generate signals and signal values corresponding to the signals for the messages, so that the detection accuracy is improved.
As a preferred example, the detection module includes a receiving unit and a monitoring unit;
the receiving unit is configured to send the second test packet to a board card preset in the HIL cabinet through the target network segment, and the board card sends the second test packet to a packet model preset in the HIL cabinet, and identifies, through automatic test software preset in the HIL cabinet, a time when the second test packet is sent to the packet model;
the monitoring unit is used for judging whether the time is smaller than or equal to the preset period according to the time of the second test message displayed by the preset automatic test software in the HIL cabinet and sent to the message model; if the time is smaller than or equal to the preset period, the target network segment continuously uploads a second test message in the preset period; if the time is longer than the preset period, the target network segment does not continuously upload the second test message in the preset period.
According to the invention, the time for transmitting the second test message transmitted by the gateway to be detected to the message model is acquired through the receiving unit, whether the time is smaller than or equal to the preset period is compared through the monitoring unit, the timeliness of the gateway routing function to be detected is acquired, meanwhile, the receiving unit and the monitoring unit are both performed through the message model and the automatic test software, no additional test codes are required to be written, no special network cabinet is required, the detection cost is reduced, and the detection efficiency is improved.
Drawings
Fig. 1: the embodiment of the invention provides a flow diagram of a multi-network-segment gateway routing test method based on hardware-in-loop equipment;
fig. 2: the embodiment of the invention provides a multi-network-segment gateway route testing device based on hardware-in-loop equipment;
fig. 3: the multi-network-segment gateway route testing device based on the hardware-in-loop equipment provided by the embodiment of the invention;
fig. 4: a schematic diagram is generated for a message signal provided by the embodiment of the invention;
fig. 5: the embodiment of the invention provides a message signal value assignment and reading schematic diagram.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, a flow chart of a multi-segment gateway routing test method based on hardware-in-loop equipment according to an embodiment of the present invention mainly includes steps 101 to 105, specifically as follows:
step 101: and continuously sending a first test message to the source network segment of the gateway to be detected according to a preset period, so that the gateway to be detected routes the first test message to a target network segment.
In this embodiment, the steps specifically include: before testing, the gateway to be detected is connected with an HIL cabinet through a plurality of CAN lines, and the first test message is continuously generated according to a preset period through a message model preset in the HIL cabinet; and sending the first test message to the source network segment of the gateway to be detected through a board card preset in the HIL cabinet. And sending the first test message to the source network segment of the gateway to be detected through a board card preset in the HIL cabinet.
In this embodiment, a first initial message and a first signal are generated according to the message model, then a first signal value is generated according to the first signal through automatic test software preset in the HIL cabinet, and then the first test message is generated according to the first initial message and the first signal value.
Step 102: and monitoring whether the target network segment continuously uploads a second test message in the preset period.
In this embodiment, the steps specifically include: transmitting the second test message to a message model preset in the HIL cabinet through the target network segment by a board card preset in the HIL cabinet; and obtaining the time of sending the second test message to the message model according to the automatic test software preset in the HIL cabinet.
In this embodiment, first, according to automatic test software preset in the HIL cabinet, the time for sending the second test message to the message model is continuously displayed, whether the displayed time is less than or equal to the preset period is judged, if yes, the target network segment is determined to continuously upload the second test message in the preset period; if the displayed time is greater than the preset period, determining that the target network segment does not continuously upload the second test message in the preset period.
Step 103: if yes, comparing whether the first test message is consistent with the second test message.
In this embodiment, the steps specifically include: the second test message is sent to a message model in the HIL cabinet through the target network segment and the board card in the HIL cabinet; identifying a second signal of the second test message according to a signal model preset in the message model; identifying a second signal value corresponding to the second signal through automatic test software preset in the HIL cabinet; determining whether the first signal and the second signal are the same, and whether the first signal value and the second signal value are the same. If the same, step 104 is executed, and if the same, step 105 is executed.
Step 104: and if the test results are consistent, determining that the test result of the gateway to be detected is qualified.
In this embodiment, the steps specifically include: if the first signal and the second signal are the same, and the first signal value corresponding to the first signal and the second signal value corresponding to the second signal are the same in one-to-one correspondence, determining that the test result of the gateway to be detected is qualified.
Step 105: if the test results are inconsistent, determining that the test result of the gateway to be detected is unqualified.
In this embodiment, the steps specifically include: if the first signal and the second signal are different, or the first signal value corresponding to the first signal and the second signal value corresponding to the second signal are different and correspond to each other, determining that the test result of the gateway to be detected is unqualified.
Referring to fig. 2, a schematic structural diagram of a multi-segment gateway routing test device based on hardware-in-loop equipment according to the present invention mainly includes a message sending module 201, a detecting module 202 and a testing module 203.
In this embodiment, the message sending module 201 is configured to continuously send, according to a preset period, a first test message to a source network segment of the gateway to be detected, so that the gateway to be detected routes the first test message to a target network segment.
The detection module 202 is configured to monitor whether the target network segment continuously uploads the second test message in the preset period.
The test module 203 is configured to compare whether the first test message and the second test message are the same.
In this embodiment, the message sending module 201 includes a sending unit and a signal unit;
the sending unit is used for continuously generating the first test message according to a preset period through a message model preset in the HIL cabinet; the first test message is sent to a source network segment of the gateway to be detected through a board card preset in the HIL cabinet;
the signal unit is used for generating a first signal contained in the first test message through a signal model preset in the message model after generating the first test message according to the message model; and generating a first signal value according to the first signal through automatic testing software preset in the HIL cabinet, and automatically inputting the first signal value into the first testing message.
In this embodiment, the detection module includes a receiving unit and a monitoring unit;
the receiving unit is configured to send the second test packet to a board card preset in the HIL cabinet through the target network segment, and the board card sends the second test packet to a packet model preset in the HIL cabinet, and identifies, through automatic test software preset in the HIL cabinet, a time when the second test packet is sent to the packet model;
the monitoring unit is used for judging whether the time is smaller than or equal to the preset period according to the time of the second test message displayed by the preset automatic test software in the HIL cabinet and sent to the message model; if the time is smaller than or equal to the preset period, the target network segment continuously uploads a second test message in the preset period; if the time is longer than the preset period, the target network segment does not continuously upload the second test message in the preset period.
In this embodiment, the test module 203 includes a signal test unit, a signal value test unit, and a result unit;
the signal testing unit is used for testing whether the signals of the first test message and the second test message are the same;
the signal value testing unit is used for testing whether the signal values of the first test message and the second test message are the same;
the result unit is used for obtaining the test result of the gateway to be detected according to the test results of the signal test unit and the signal value test unit; if the test results of the signal test unit and the signal value test unit are the same, determining that the detection result of the gateway to be detected is qualified; if the results of the signal testing unit and the signal value testing unit are different, determining that the detection result of the gateway to be detected is unqualified.
In this embodiment, a first test message is continuously sent to a source network segment of a gateway to be detected through a message sending module 201 according to a preset period, so that the gateway to be detected routes the first test message to a target network segment, a routing function of the gateway to be detected is detected according to a form of the sent message, whether a second test message is continuously uploaded by the target network segment within the preset period is monitored through a detecting module 202, timeliness of the routing function of the gateway to be detected is detected, whether the first test message is identical to the second test message is compared through a testing module 203, and accuracy of the routing function of the gateway to be detected is detected.
Example two
Referring to fig. 3, a multi-network-segment gateway routing test device based on hardware-in-loop equipment provided by the embodiment of the invention mainly comprises an HIL (hardware-in-loop) cabinet, a CAN board card, a CAN model, an HIL host computer, a tested gateway and the like.
The CAN model is responsible for simulating a message needing to be routed by a sending gateway and receiving the message forwarded by the gateway; then through CAN board card; the CAN board card is responsible for carrying out physical CAN communication with the gateway, sending the message sent by the CAN model enable to the gateway, and simultaneously receiving the message sent by the gateway and transmitting the message to the CAN model. The CAN board card provided by the company dSPACE of the HIL cabinet supplier has the high-speed simulation function, and the provided automatic test software has the characteristics of simple and convenient operation, modularization of automatic sequence development and high-speed operation response, and CAN realize the ms-level quick operation response when the automatic test is carried out.
In one embodiment of the present invention, by performing gateway detection on the device shown in fig. 3, the message X is first sent by the controller B on the CAN1 segment, and the controller B on the CAN2 segment 2 needs to receive the message, and then the gateway is required to route the message X from the CAN1 to the CAN2. And signals such as signal-1, signal-2, signal-3 and … signal-n are defined in message X. In the test of message routing completion, signal values of signal-1, signal-2, signal-3- … signal-n need to be set (suggested to be respectively set to a maximum value, a minimum value and any intermediate value) in CAN1, then signal-1, signal-2, signal-3- … signal-n signals of message X are monitored in CAN2 and compared with values in CAN1, and the corresponding signals CAN be considered successful when the signal values are equal and sent out in a fixed period. In the test system described above, the signal modules of the response CAN be generated in the matlb/simulink by means of the established CANdbc file, which are generated for example by the above-mentioned signal-1, signal-2, signal-3 … signal-n, CAN1 and CAN2. During testing, the values of signal-1, signal-2 and signal-3 … in CAN1 are respectively defined as a, b and c … n, and are sent according to a period of 100 ms; and then monitoring the message X in the CAN2, and judging that the test is qualified when the message X on the CAN2 is also sent in a period of 100ms and the signal-1, signal-2 and signal-3- … signal-n values are also a, b and c … n.
The step of generating the simulink message signal module is shown in fig. 4, in which the dbc file is imported into CAN configuration software (provided by dstoce and operated in the simulink environment), and the signal module CAN be generated by the configuration of the CAN configuration software. Each message signal may generate a constant module in the simulink that may be set to a desired value by a write module of the automated test software. In the test system, for a message to be routed, a source network segment and a target network segment are required to generate consistent signal modules in a simulink, and the signal modules are mainly used for writing values and reading values. As in the above embodiment, message X produces the same signal-1, signal-2, signal-3, signal-n modules in both CAN1 and CAN2 simulation models of simulink. In the test process, after signal-1, signal-2, signal-3 and signal-n signal modules in the CAN1 simulation model are assigned, corresponding signal values of a CAN1 message X are written into a set value, and then the set value is transmitted to a gateway through a CAN1 bus which is physically connected with the gateway through a CAN board card; after receiving the message X of the CAN1, the gateway CAN route the message X to the CAN2 according to the gateway, the CAN2 bus physically connected with the CAN board card at the gateway is transmitted to the HIL board card, then the simulink model CAN analyze the routed message X according to the dbc file, and then the signal-1, the signal-2, the signal-3 and the signal-n signal modules in the CAN2 simulation model CAN read the true value in the routed message X, and then the real value is compared with the original set value, so that whether the test result is qualified CAN be confirmed.
In the above embodiment, as shown in fig. 5, a schematic diagram of assigning and reading a message signal value is provided for the present embodiment, a write module of DSPACE system automation test software writes signal-1, signal-2, signal-3- … signal-n signal modules of a CAN model X message of a CAN1 network segment into a test value (a, b, c, n), and then sends the test value to a gateway through a CAN line, and then the gateway routes the X message to CAN2; and then, waiting for 100ms (namely, the sending period of the message X) through the wait module in a delay way, reading out the values of the signal-1, signal-2 and signal-3 … signal-n signals of the message X of the CAN2 network segment through the read module of the automatic test software, comparing and judging with the written value (a, b, c, n), and considering that the message routing function passes when the value of the signal CAN2 is equal to the value of the signal CAN 1.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (6)

1. The multi-network-segment gateway routing test method based on hardware-in-loop equipment is characterized by being suitable for an HIL cabinet, wherein the HIL cabinet is connected with a gateway to be detected through a plurality of CAN lines, and the test method comprises the following steps:
continuously sending a first test message to a source network segment of the gateway to be detected according to a preset period, so that the gateway to be detected routes the first test message to a target network segment; the continuously sending a first test message to the source network segment of the gateway to be detected specifically includes: continuously generating the first test message according to a preset period through a message model preset in the HIL cabinet; sending the first test message to a source network segment of the gateway to be detected through a board card preset in the HIL cabinet; the generating the first test message continuously according to a preset period through a message model preset in the HIL cabinet specifically includes: generating a first initial message and a first signal according to the message model; generating a first signal value according to the first signal by using automatic test software preset in the HIL cabinet; generating the first test message according to the first initial message and the first signal value;
monitoring whether the target network segment continuously uploads a second test message in the preset period; the monitoring whether the target network segment continuously uploads a second test message in the preset period specifically includes: transmitting the second test message to a message model preset in the HIL cabinet through the target network segment by a board card preset in the HIL cabinet; obtaining the time of sending the second test message to the message model according to automatic test software preset in the HIL cabinet;
if yes, comparing whether the first test message is consistent with the second test message; the comparing whether the first test message is consistent with the second test message or not specifically comprises: the second test message is sent to a message model in the HIL cabinet through the target network segment and the board card in the HIL cabinet; identifying a second signal of the second test message according to a signal model preset in the message model; identifying a second signal value corresponding to the second signal through automatic test software preset in the HIL cabinet; judging whether the first signal and the second signal are the same or not and whether the first signal value and the second signal value are the same or not;
if the test results are consistent, determining that the test result of the gateway to be detected is qualified;
if the test results are inconsistent, determining that the test result of the gateway to be detected is unqualified.
2. The method for testing multi-segment gateway routing based on hardware-in-loop equipment according to claim 1, wherein the monitoring whether the target segment continuously uploads the second test message within the preset period specifically comprises:
continuously displaying the time of the second test message sent to the message model according to the automatic test software preset in the HIL cabinet, and judging whether the displayed time is smaller than or equal to the preset period;
if the displayed time is smaller than or equal to the preset period, determining that the target network segment continuously uploads a second test message in the preset period;
if the displayed time is greater than the preset period, determining that the target network segment does not continuously upload the second test message in the preset period.
3. The method for testing the multi-network-segment gateway route based on the hardware-in-the-loop equipment according to claim 1, wherein if the test results are consistent, the test results of the gateway to be tested are determined to be qualified, and if the test results are inconsistent, the test results of the gateway to be tested are determined to be unqualified, the method specifically comprises the following steps:
if the first signal and the second signal are the same, and the first signal value corresponding to the first signal and the second signal value corresponding to the second signal are the same in one-to-one correspondence, determining that the test result of the gateway to be detected is qualified;
if the first signal and the second signal are different, or the first signal value corresponding to the first signal and the second signal value corresponding to the second signal are different and correspond to each other, determining that the test result of the gateway to be detected is unqualified.
4. The utility model provides a many network segments gateway route testing arrangement based on hardware is at ring equipment which characterized in that is applicable to HIL rack, HIL rack passes through a plurality of CAN line with the gateway that waits to detect to be connected, testing arrangement includes: the device comprises a message sending module, a detection module and a test module;
the message sending module is used for continuously sending a first test message to a source network segment of the gateway to be detected according to a preset period so that the gateway to be detected routes the first test message to a target network segment; the message sending module is specifically configured to continuously generate the first test message according to a preset period through a message model preset in the HIL cabinet; sending the first test message to a source network segment of the gateway to be detected through a board card preset in the HIL cabinet; the generating the first test message continuously according to a preset period through a message model preset in the HIL cabinet specifically includes: generating a first initial message and a first signal according to the message model; generating a first signal value according to the first signal by using automatic test software preset in the HIL cabinet; generating the first test message according to the first initial message and the first signal value;
the detection module is used for monitoring whether the target network segment continuously uploads a second test message in the preset period; the detection module is specifically configured to send the second test message to a message model preset in the HIL cabinet through the target network segment by using a board card preset in the HIL cabinet; obtaining the time of sending the second test message to the message model according to automatic test software preset in the HIL cabinet;
the test module is used for comparing whether the first test message and the second test message are the same or not; the test module is specifically configured to send the second test message to a message model in the HIL cabinet through the target network segment and a board card in the HIL cabinet; identifying a second signal of the second test message according to a signal model preset in the message model; identifying a second signal value corresponding to the second signal through automatic test software preset in the HIL cabinet; determining whether the first signal and the second signal are the same, and whether the first signal value and the second signal value are the same.
5. The multi-segment gateway route test device based on hardware-in-loop equipment according to claim 4, wherein the message sending module comprises a sending unit and a signal unit;
the sending unit is used for continuously generating the first test message according to a preset period through a message model preset in the HIL cabinet; the first test message is sent to a source network segment of the gateway to be detected through a board card preset in the HIL cabinet;
the signal unit is used for generating a first signal contained in the first test message through a signal model preset in the message model after generating the first test message according to the message model; and generating a first signal value according to the first signal through automatic testing software preset in the HIL cabinet, and automatically inputting the first signal value into the first testing message.
6. The multi-segment gateway route test device based on hardware-in-loop equipment according to claim 4, wherein the detection module comprises a receiving unit and a monitoring unit;
the receiving unit is configured to send the second test packet to a board card preset in the HIL cabinet through the target network segment, and the board card sends the second test packet to a packet model preset in the HIL cabinet, and identifies, through automatic test software preset in the HIL cabinet, a time when the second test packet is sent to the packet model;
the monitoring unit is used for displaying the time of the second test message sent to the message model according to automatic test software preset in the HIL cabinet, and judging whether the time is smaller than or equal to the preset period; if the time is smaller than or equal to the preset period, the target network segment continuously uploads a second test message in the preset period; if the time is longer than the preset period, the target network segment does not continuously upload the second test message in the preset period.
CN202210955030.2A 2022-08-10 2022-08-10 Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment Active CN115378834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210955030.2A CN115378834B (en) 2022-08-10 2022-08-10 Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210955030.2A CN115378834B (en) 2022-08-10 2022-08-10 Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment

Publications (2)

Publication Number Publication Date
CN115378834A CN115378834A (en) 2022-11-22
CN115378834B true CN115378834B (en) 2024-01-09

Family

ID=84063037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210955030.2A Active CN115378834B (en) 2022-08-10 2022-08-10 Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment

Country Status (1)

Country Link
CN (1) CN115378834B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873310A (en) * 2012-12-10 2014-06-18 北汽福田汽车股份有限公司 Gateway testing method and system for CAN network
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
US9600386B1 (en) * 2013-05-31 2017-03-21 Sandia Corporation Network testbed creation and validation
CN109696900A (en) * 2017-10-23 2019-04-30 北京长城华冠汽车科技股份有限公司 A kind of system and method for testing board Controller Area Network message sending cycle
CN209728518U (en) * 2019-05-07 2019-12-03 东风汽车集团有限公司 New energy integrated controller hardware is in ring test system
CN111277476A (en) * 2018-12-04 2020-06-12 广州汽车集团股份有限公司 Gateway controller function verification method, gateway controller function verification device, computer equipment and storage medium
CN111343051A (en) * 2020-03-05 2020-06-26 中国第一汽车股份有限公司 Message routing test method, device and storage medium
CN212112225U (en) * 2020-04-27 2020-12-08 蜂巢智能转向科技河北有限公司 Vehicle electronic control unit test system
CN112147981A (en) * 2020-09-25 2020-12-29 西安法士特汽车传动有限公司 dSPACE HIL-based electric vehicle power-on and power-off logic test method and test system
CN112764410A (en) * 2021-01-19 2021-05-07 广州橙行智动汽车科技有限公司 Vehicle-mounted controller testing device, system and method
CN113904922A (en) * 2021-09-06 2022-01-07 东风柳州汽车有限公司 Gateway configuration method and device
CN114137937A (en) * 2021-11-25 2022-03-04 北京经纬恒润科技股份有限公司 Automatic diagnostic function test method and system
CN114460925A (en) * 2022-01-29 2022-05-10 重庆长安新能源汽车科技有限公司 Automatic HIL (high-level intelligence) testing method for CAN (controller area network) interface of electric automobile controller
CN114553759A (en) * 2022-02-25 2022-05-27 重庆长安新能源汽车科技有限公司 New energy automobile virtual gateway function testing method and system
CN114679396A (en) * 2021-07-02 2022-06-28 北京新能源汽车股份有限公司 Method, device and system for testing routing performance of gateway
CN114785634A (en) * 2022-04-30 2022-07-22 重庆长安新能源汽车科技有限公司 Method for implementing CRC (cyclic redundancy check) on data transmitted by CAN (controller area network) communication system in HIL (hardware-in-the-loop) test process

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10488468B2 (en) * 2016-01-11 2019-11-26 TwinTech Industry, Inc. Quality-control-testing system for portable charging devices and methods of use

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873310A (en) * 2012-12-10 2014-06-18 北汽福田汽车股份有限公司 Gateway testing method and system for CAN network
US9600386B1 (en) * 2013-05-31 2017-03-21 Sandia Corporation Network testbed creation and validation
CN106330618A (en) * 2016-09-19 2017-01-11 中国第汽车股份有限公司 Gateway routing automatic test system and test method based on CAN/LIN/MOST hybrid buses
CN109696900A (en) * 2017-10-23 2019-04-30 北京长城华冠汽车科技股份有限公司 A kind of system and method for testing board Controller Area Network message sending cycle
CN111277476A (en) * 2018-12-04 2020-06-12 广州汽车集团股份有限公司 Gateway controller function verification method, gateway controller function verification device, computer equipment and storage medium
CN209728518U (en) * 2019-05-07 2019-12-03 东风汽车集团有限公司 New energy integrated controller hardware is in ring test system
CN111343051A (en) * 2020-03-05 2020-06-26 中国第一汽车股份有限公司 Message routing test method, device and storage medium
CN212112225U (en) * 2020-04-27 2020-12-08 蜂巢智能转向科技河北有限公司 Vehicle electronic control unit test system
CN112147981A (en) * 2020-09-25 2020-12-29 西安法士特汽车传动有限公司 dSPACE HIL-based electric vehicle power-on and power-off logic test method and test system
CN112764410A (en) * 2021-01-19 2021-05-07 广州橙行智动汽车科技有限公司 Vehicle-mounted controller testing device, system and method
CN114679396A (en) * 2021-07-02 2022-06-28 北京新能源汽车股份有限公司 Method, device and system for testing routing performance of gateway
CN113904922A (en) * 2021-09-06 2022-01-07 东风柳州汽车有限公司 Gateway configuration method and device
CN114137937A (en) * 2021-11-25 2022-03-04 北京经纬恒润科技股份有限公司 Automatic diagnostic function test method and system
CN114460925A (en) * 2022-01-29 2022-05-10 重庆长安新能源汽车科技有限公司 Automatic HIL (high-level intelligence) testing method for CAN (controller area network) interface of electric automobile controller
CN114553759A (en) * 2022-02-25 2022-05-27 重庆长安新能源汽车科技有限公司 New energy automobile virtual gateway function testing method and system
CN114785634A (en) * 2022-04-30 2022-07-22 重庆长安新能源汽车科技有限公司 Method for implementing CRC (cyclic redundancy check) on data transmitted by CAN (controller area network) communication system in HIL (hardware-in-the-loop) test process

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于 HIL 的车载网关控制器的自动化测试研究;巫辉燕;《汽车实用技术》;第第46卷卷(第第5期期);第1-3页 *

Also Published As

Publication number Publication date
CN115378834A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
CN110492906B (en) Method for rapidly and automatically detecting performance of HPLC carrier module
CN107222362B (en) Automatic test platform for finished vehicle CAN network and optimization method thereof
CN112596972B (en) Test method, device and system of vehicle-mounted equipment and computer equipment
CN105515911A (en) Gateway automatic test system and method of CAN network
CN112835755A (en) Test data acquisition method, device and equipment and computer storage medium
CN113572658A (en) Vehicle control signal testing method and device, electronic equipment and storage medium
CN114679396B (en) Method, device and system for testing routing performance of gateway
CN115378834B (en) Multi-network-segment gateway route testing method and device based on hardware-in-loop equipment
CN210666480U (en) Vehicle test system
CN108072855B (en) Testing device and testing system
KR101552714B1 (en) method and system for analyzing automatically physical layer in car communication
CN111277303A (en) Production testing method and system based on universal asynchronous receiving and transmitting transmitter to Bluetooth
CN107643476B (en) Profibus bus insulation performance testing method based on virtual instrument technology
CN110825617A (en) Method and device for simulating communication interaction between devices
CN113468054B (en) Automatic test system and method for satellite interface and function test
CN109960238B (en) Automatic test system and method for vehicle diagnostic instrument
CN109949956B (en) High-load working condition simulation method and system for nuclear power station control system
CN105403847A (en) Voltage monitoring system based on FPGA technology and verification method
CN116609601B (en) Aging test method and equipment for new energy automobile battery management system
CN115695243A (en) Method and system for testing store-and-forward function of switch
CN112804114B (en) System and method for automatic communication and configuration of energy metering Internet of things equipment
CN113448309B (en) Automatic testing device and method for testing nuclear power instrument control system
CN110324078B (en) System and method for detecting optical interface differential signal fault
CN116125959A (en) In-loop test method and system for DID value of vehicle-mounted controller
CN113640026B (en) Industrial equipment testing method, device and system

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