CN117997673A - Bus testing device and bus testing method - Google Patents

Bus testing device and bus testing method Download PDF

Info

Publication number
CN117997673A
CN117997673A CN202410381880.5A CN202410381880A CN117997673A CN 117997673 A CN117997673 A CN 117997673A CN 202410381880 A CN202410381880 A CN 202410381880A CN 117997673 A CN117997673 A CN 117997673A
Authority
CN
China
Prior art keywords
message
message data
sending
sent
mode parameter
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.)
Pending
Application number
CN202410381880.5A
Other languages
Chinese (zh)
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.)
Kunyi Electronic Technology Shanghai Co Ltd
Original Assignee
Kunyi Electronic Technology Shanghai 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 Kunyi Electronic Technology Shanghai Co Ltd filed Critical Kunyi Electronic Technology Shanghai Co Ltd
Priority to CN202410381880.5A priority Critical patent/CN117997673A/en
Publication of CN117997673A publication Critical patent/CN117997673A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04L12/40006Architecture of a communication node
    • H04L12/40013Details regarding a bus controller
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0602Systems characterised by the synchronising information used
    • 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
    • H04L12/40006Architecture of a communication node
    • H04L12/40019Details regarding a bus master
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/14Multichannel or multilink protocols
    • 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/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application relates to a bus testing device and a bus testing method, and relates to the field of automobile testing, wherein the device comprises a message sending device for connecting a vehicle bus, and the message sending device is configured to execute at least the following steps in a first working state: acquiring first message data and configuration parameters, wherein the configuration parameters are at least used for determining the sending moment of the first message data; and sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment. At least, the accuracy of the signal sending time can be effectively improved.

Description

Bus testing device and bus testing method
Technical Field
The application relates to the field of automobile testing, in particular to a bus testing device and a bus testing method.
Background
In the fields of automatic driving and auxiliary driving of automobiles, the functions of multi-bus simulation, test, diagnosis and the like aiming at the vehicles can be realized on the terminal so as to serve network development and test of the vehicles. In general, a simulation signal is determined on an upper computer, and the determined simulation signal is sent to a vehicle through a vehicle bus, so that the running condition of a tested module in the vehicle can be tested or diagnosed according to the running condition of the module to be tested in the vehicle in response to the simulation signal.
However, the upper computer generally adopts a Windows system, the clock precision is not high, the sending time of the simulation signals is difficult to accurately control, and particularly for the simulation signals needing to be sent circularly, the time stability of the simulation signals sent to the bus is poor, and the test is influenced.
Disclosure of Invention
Accordingly, in order to solve the above-mentioned problems in the related art, it is necessary to provide a bus testing device and a bus testing method that can at least effectively improve the accuracy of signal transmission time, so as to improve the accuracy of automobile testing.
According to various embodiments of the present application, an aspect of the present application provides a bus testing apparatus comprising a message sending device for connecting to a bus of a vehicle, the message sending device being configured to perform at least the following steps in a first operating state:
Acquiring first message data and configuration parameters, wherein the configuration parameters are at least used for determining the sending time of the first message data;
And sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment.
In the bus test device in the above embodiment, since the clock precision of the message sending device is higher than that of the upper computer, the local clock of the message sending device is used as the reference clock to send the message data, and compared with the case that the clock of the upper computer is used as the reference clock to send the message data, the time precision of sending the message data to the vehicle bus is effectively improved, thereby ensuring the time stability of the vehicle bus for obtaining the message data and avoiding the occurrence of the event affecting the vehicle test result due to the unstable time of sending the signal to the vehicle bus.
In some embodiments, the bus testing apparatus further includes a host computer, where the host computer is connected to at least one message sending device, and is configured to obtain message data to be sent by the at least one message sending device and configuration parameters thereof. The upper computer is connected with one or more message sending devices and can respectively control the message sending of each message sending device; the upper computer can acquire the message data to be transmitted and the configuration parameters thereof, and the message data to be transmitted is configured to be transmitted through at least one channel of the at least one message transmitting device. Therefore, based on the upper computer connected with the message sending devices, the message sending devices can be controlled in batches to send test data to the vehicle bus, so that multichannel test is realized.
In some embodiments, the upper computer is further configured to obtain a mode parameter of the message data to be sent, where the mode parameter is at least used to determine a sending mode of the message data to be sent; the upper computer is configured to:
if the mode parameter is the first mode parameter, acquiring first message data based on the message data to be sent, and controlling the message sending equipment to execute the steps in the first working state;
If the mode parameter is the second mode parameter, acquiring second message data based on the message data to be transmitted, transmitting the second message data to the message transmitting equipment according to the configuration parameter and the system clock of the upper computer, and controlling the message transmitting equipment to execute the steps in the second working state; the step of the message sending device executing the second working state comprises the following steps: and receiving and forwarding second message data sent by the upper computer to the vehicle bus.
In the bus test apparatus in the above embodiment, the following two message data transmission modes are provided: mode one, executing the step in the first working state through the message sending equipment; and in the second mode, the second message data sent by the upper computer is received and forwarded to the vehicle bus through the message sending equipment. The mode one or the mode two is selected according to the mode parameters, the use is more convenient and flexible, and the actual functional requirements of various different application scenes are met.
In some embodiments, the host computer is further configured to perform the step of obtaining the mode parameters as follows:
if the message data to be sent is a first type message, judging that the mode parameter of the message data to be sent is a first mode parameter;
If the message data to be sent is the second type message, judging that the mode parameter of the message data to be sent is the second mode parameter; wherein the probability of the first type of message being modified is less than the probability of the second type of message being modified.
In the bus test device in the above embodiment, for the message data to be sent with higher modification probability, since the message data may be frequently modified, the modification needs to be responded immediately; and for the message data to be transmitted with lower modification probability, the modification times and the modification frequency are lower. Therefore, the method automatically switches to a matched working mode by setting the modification probability according to the message data to be sent, and the intelligence and the accuracy of the message data sending are improved.
In some embodiments, the host computer is further configured to perform the step of obtaining the mode parameters as follows:
if the message data to be sent is the third type message, judging that the mode parameter of the message data to be sent is the first mode parameter;
If the message data to be sent is the fourth type message, judging that the mode parameter of the message data to be sent is the second mode parameter; the number of times that the mode parameter is the first mode parameter in the history sending record of the third type message is larger than the number of times that the mode parameter is the second mode parameter, and the number of times that the mode parameter is the first mode parameter in the history sending record of the fourth type message is smaller than the number of times that the mode parameter is the second mode parameter.
In the bus test device in the above embodiment, the number of times of switching to the mode parameter with higher frequency occupation ratio is automatically switched according to the number of times that the mode parameter is the first mode parameter or the second mode parameter in the history sending records of the messages of different types, so that the appropriate working mode is intelligently matched according to the history sending records of the messages of different types, and the intelligence and the accuracy of the data sending of the messages are improved.
In some embodiments, the configuration parameters include a cycle parameter that is used at least to determine a transmission time difference between two transmissions of the message data to be transmitted; the upper computer is further configured to perform the steps of obtaining the mode parameters as follows:
If the message data to be sent is a fifth type message, judging that the mode parameter of the message data to be sent is a first mode parameter;
if the message data to be sent is a sixth type message, judging that the mode parameter of the message data to be sent is a second mode parameter; the sending time difference of the two sending of the fifth type message is smaller than the sending time difference of the two sending of the sixth type message.
In the bus test device in the above embodiment, for the to-be-transmitted message data with smaller transmission time difference, the requirement on the transmission time precision is higher, for the to-be-transmitted message data with larger transmission time difference, the requirement on the transmission time precision is slightly lower, and by intelligently matching the proper working mode according to the transmission time difference of two transmissions of the to-be-transmitted message data, the intelligence and the precision of the transmission of the message data are improved.
In some embodiments, the host computer is further configured to: obtaining target model data and the current model type of the message sending equipment; the target model data comprises a target model type used for indicating the message sending equipment to support the first working state;
If the current model type is the same as a target model type in the target model data, the message sending equipment is judged to have the function of executing the steps in the first working state.
In the bus testing apparatus in the above embodiment, after determining that the current message sending device supports the first working state according to the current model type of the current message sending device, the current message sending device is controlled to execute the step in the first working state, so as to avoid failure in control of the working mode and influence on time accuracy of sending the message data.
In some embodiments, the configuration parameters include a start transmission time and a cycle parameter, the cycle parameter being at least used to determine a transmission time difference between two transmissions of the first message data, and the steps in the message transmission device performing the first working state include:
acquiring first message data and configuration parameters;
And transmitting the first message data to the vehicle bus according to the starting transmission time and the circulation parameter and the local clock of the message transmitting equipment.
In the bus test device in the above embodiment, the sending time of the message data is flexibly adjusted by setting the sending start time in the configuration parameter, so as to improve the flexibility of sending the message data.
In some embodiments, the configuration parameters include a cycle parameter, where the cycle parameter is at least used to determine a transmission time difference between two transmissions of the first message data, and the step of the message transmission device performing the first working state includes:
acquiring first message data and configuration parameters;
and responding to the sending instruction, wherein the sending instruction is at least used for determining the starting sending time, and sending the first message data to the vehicle bus according to the starting sending time and the circulation parameter and the local clock of the message sending equipment.
In the bus test apparatus in the above embodiment, the transmission instruction may be set to include a transmission mode such as immediate transmission or timing transmission, so that the transmission time of the message data may be flexibly adjusted according to the transmission mode of the transmission instruction.
In some embodiments, another aspect of the present application provides a bus testing method, comprising:
based on the message sending equipment, acquiring first message data and configuration parameters, wherein the configuration parameters are at least used for determining the sending moment of the first message data;
and based on the message sending equipment, sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment.
In the bus test method in the above embodiment, since the clock precision of the message sending device is higher than that of the upper computer, the local clock of the message sending device is used as the reference clock to send the message data, and compared with the case that the clock of the upper computer is used as the reference clock to send the message data, the sending time precision of sending the message data to the vehicle bus is effectively improved, thereby ensuring the time stability of obtaining the message data by the vehicle bus and avoiding the occurrence of the event that the vehicle test result is influenced due to the unstable time of sending the signal to the vehicle bus.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other embodiments of the drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a bus testing apparatus according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps in a first mode of execution of a bus test apparatus according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a bus testing apparatus according to another embodiment of the present application;
FIG. 4 is a schematic flow chart of a bus testing device for intelligently selecting a first mode and a second mode according to an embodiment of the present application;
FIG. 5 is a flow chart of a method for obtaining a mode parameter by an upper computer in a bus test device according to an embodiment of the application;
FIG. 6 is a flowchart of a method for obtaining a mode parameter by an upper computer in a bus test apparatus according to another embodiment of the present application;
FIG. 7 is a flowchart of a method for obtaining a mode parameter by an upper computer in a bus test apparatus according to another embodiment of the present application;
fig. 8 is a flowchart of a bus testing method according to an embodiment of the application.
Detailed Description
In order that the application may be readily understood, a more complete description of the application will be rendered by reference to the appended drawings. Preferred embodiments of the present application are shown in the drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
Where the terms "comprising," "having," and "including" are used herein, another component may also be added unless a specifically defined term is used, such as "consisting of only," "… …," etc. Unless mentioned to the contrary, singular terms may include plural and are not to be construed as being one in number.
It will be understood that, although the terms "first," "second," etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element could be termed a second element, and, similarly, a second element could be termed a first element, without departing from the scope of the present application.
In the description of the present application, it should be noted that, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; the connection may be direct or indirect via an intermediate medium, or may be internal communication between two components. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art.
In bus simulation, test and diagnosis for a vehicle, a module to be tested is a vehicle electronic controller (Electronic Control Unit, ECU) or a sensor, upper computer software runs on various terminals, and a target simulation signal determined by an upper computer can be used for simulating an output signal of the electronic controller or the sensor in the vehicle so as to test the module to be tested. However, for the simulation signal sent in a circulating way, for example, the simulation signal is sent once in 1ms, because the time accuracy of the Windows system of the upper computer is not high, the time interval of the simulation signal output by the upper computer is not 1ms, for example, part of the time interval is 0.9ms or 1.1ms, and the like, so that the time interval of the simulation signal sent to the bus of the vehicle is unstable, and the accuracy and reliability of the test result are affected.
Based on the above, the application aims to provide a bus testing device and a bus testing method, which can at least effectively improve the accuracy of signal sending time so as to improve the accuracy of automobile testing.
Referring to fig. 1-2, in some embodiments of the present application, a bus testing apparatus 300 is provided, including a message sending device 302 for connecting to a vehicle bus 400, where the message sending device 302 is configured to perform at least the following steps in a first operating state:
Step S102: acquiring first message data and configuration parameters, wherein the configuration parameters are at least used for determining the sending time of the first message data;
Step S104: and sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment.
As an example, the message sending device 302 is a bus board card, where the bus board card is used to connect an upper computer and a bus system of a vehicle, and is responsible for transferring information between the two, and the upper computer may send a target simulation signal to the bus board card, where the bus board card as a node accesses the vehicle bus and communicates with other nodes on the vehicle bus, so as to send the target simulation signal to a module to be tested on the vehicle bus. After the bus board card obtains the configuration parameters, the sending time of the first message data can be determined according to the configuration parameters, and the obtained first message data is sent to the vehicle bus based on the local clock of the bus board card, where the sending time is used for indicating one or more sending times of the first sending message.
As an example, the bus board card may use its own clock, or may be connected to an external time service device, and obtain a local clock through time service of the external time service device.
For example, the external time service device may be at least one selected from a GPS device, an RTK device, a vehicle controller, or the like, and is configured to provide a clock source with time precision higher than that of the Windows system clock to the bus board card.
With continued reference to fig. 1-2, since the clock precision of the message sending device 302 is higher than the Windows system clock precision of the host computer, the local clock of the message sending device 302 is used as the reference clock to send the message data, so that the sending time precision of sending the message data to the vehicle bus 400 is effectively improved, the time stability of the vehicle bus 400 for obtaining the message data is ensured, and the event that the vehicle test result is affected due to the unstable time of sending the signal to the vehicle bus 400 is avoided.
In some embodiments, the message sending device includes a storage module, a control module, and a transceiver module, where the control module receives the first message data and the configuration parameters, and stores the first message data and the configuration parameters in the storage module, and the storage module may store the first message data and the configuration parameters, and the control module may send the first message data to the vehicle bus through the transceiver module by using the configuration parameters. For example, the configuration parameters include a cycle interval or a transmission frequency, and a transmission time period or a cycle number or a transmission end time, after starting transmission, the control module transmits the first message data to the vehicle bus according to the configuration parameters, for example, the cycle interval is 10ms, the cycle number is 20, and after starting transmission, the control module transmits the first message data to the vehicle bus once every 10ms in real intervals locally until 20 times are accumulated.
Referring to fig. 3, in some embodiments, the bus testing apparatus 300 further includes a host computer 304, where the host computer 304 is connected to at least one message sending device 302, and is configured to obtain message data to be sent by the at least one message sending device 302 and configuration parameters of the message data to be sent.
For example, with continued reference to fig. 3, the upper computer 304 is connected to one or more message sending devices 302, and the upper computer 304 can respectively control the message sending of each message sending device 302; one message sending device 302 includes at least one channel for connecting to the vehicle bus 400, and the host computer 304 may obtain the message data to be sent and the configuration parameters thereof, and configure the message data to be sent through at least one channel of the at least one message sending device 302. Thus, based on the upper computer 304 connected to each of the plurality of message sending devices 302, the plurality of message sending devices 302 are controlled in batch to send test data to the vehicle bus 400, so as to realize multi-channel testing, and improve the testing efficiency.
In some embodiments, the message sending device 302 includes at least one CAN/CANFD bus channel, at least one LIN bus channel, and at least one flexray bus channel, and the host obtains the message data to be sent and the configuration parameters thereof, specifies one or more bus channel bus messaging of one or more message sending devices 302 for a plurality of message data to be sent, and controls sending of each channel of each message sending device 302 according to the configuration parameters of the message data to be sent.
Referring to fig. 4, in some embodiments, the upper computer is further configured to obtain a mode parameter of the message data to be sent, where the mode parameter is at least used to determine a sending mode of the message data to be sent; the upper computer is configured to execute the following steps:
Step S202: if the mode parameter is the first mode parameter, acquiring first message data based on the message data to be sent, and controlling the message sending equipment to execute the steps in the first working state;
Step S204: if the mode parameter is the second mode parameter, acquiring second message data based on the message data to be transmitted, transmitting the second message data to the message transmitting equipment according to the configuration parameter and the system clock of the upper computer, and controlling the message transmitting equipment to execute the steps in the second working state; the step of the message sending device executing the second working state comprises the following steps: and receiving and forwarding second message data sent by the upper computer to the vehicle bus.
As an example, please continue to refer to fig. 4, two modes of message data transmission are provided: mode one, executing the steps in the first working state through the message sending equipment; and in the second mode, the second message data sent by the upper computer is received and forwarded to the vehicle bus through the message sending equipment. The mode I or the mode II is intelligently selected according to the mode parameters, the use is more convenient and flexible, and the actual functional requirements of various different application scenes are met.
In the mode, the message sending device sends the first message data to the bus body according to the configuration parameters and the local clock of the message sending device, in the mode, the time accuracy is higher than that of the mode two because the message sending device sends the message by using the local clock of the message sending device, but when the message data or the configuration parameters are modified, the message sending device needs to be synchronized to the message sending device after the modification is carried out on an upper computer, the message sending device sends the message according to new contents, if the message data or the configuration parameters need to be frequently modified, for example, the content of the message data or the configuration parameters can be regulated according to the feedback information of the bus body, the problem of slow response exists, and the message sending device needs to frequently modify the message data and the sent configuration parameters, so that the configuration errors are easy to be caused, and the normal operation of the device is influenced;
In the second mode, the upper computer sends the second message data to the message sending equipment according to the configuration parameters and the system clock of the upper computer, and the message sending equipment only carries out forwarding operation.
When the bus test device is used, for each message data to be transmitted, the mode parameters of the message data can be respectively configured to determine the transmission mode of each message. For example, after the user determines the mode parameter of each message data to be sent, the configuration parameters and the mode parameters of the message data to be sent are sent to the upper computer; for example, after the upper computer obtains the message data to be sent and the configuration parameters thereof, the user manually determines the mode parameters of each message data to be sent on the upper computer software interface. For example, the first mode parameter or the second mode parameter is set as a default mode parameter, the mode parameter of each message data to be sent is configured as a default mode parameter, and the user can manually modify the mode parameter of the message data to be sent from the default mode parameter to another mode parameter.
Referring to fig. 5, in some embodiments, the upper computer is further configured to perform the following steps of obtaining the mode parameters:
step S2012: if the message data to be sent is a first type message, judging that the mode parameter of the message data to be sent is a first mode parameter;
step S2015: if the message data to be sent is the second type message, judging that the mode parameter of the message data to be sent is the second mode parameter; wherein the probability of the first type of message being modified is less than the probability of the second type of message being modified.
For example, a stability parameter may be set in the message parameter, where the stability parameter is used to indicate a probability that the message is modified, for example, the stability parameter may be a numerical value, and the numerical value indicates a magnitude of the probability that the message is modified; the stability parameter may be a state, including stable constant or constantly modified; the probability of the message being modified is small, the mode one can be selected, the probability of the message being modified is large, and the mode two can be selected.
Specifically, for the message data to be sent with higher modification probability, the message data and the configuration parameters may be modified, and the modification needs to be responded immediately, if the first mode is used for sending, the message sending device may be caused to frequently acquire new message data and configuration parameters, and continuously send the new message data according to the new configuration parameters, firstly, the modification made by the message data and the configuration parameters cannot be fed back to the message sending device immediately, and secondly, the message sending device may be caused to frequently modify and easily generate errors; for the message data to be transmitted with low modification probability, the message data and the configuration parameters generally remain unchanged for a long time, the modification times and the modification frequency are low, and the message transmitting equipment can remain unchanged for a long time after acquiring the message data and the configuration parameters, so that the stability is good. Therefore, the method automatically switches to a matched working mode by setting the modification probability according to the message data to be sent, and the intelligence and the accuracy of the message data sending are improved.
In some embodiments, the stability parameters are obtained in a manner set by the user.
Referring to fig. 6, in some embodiments, the upper computer is further configured to perform the following steps of obtaining the mode parameters:
Step S2013: if the message data to be sent is the third type message, judging that the mode parameter of the message data to be sent is the first mode parameter;
Step S2016: if the message data to be sent is the fourth type message, judging that the mode parameter of the message data to be sent is the second mode parameter; the number of times that the mode parameter is the first mode parameter in the history sending record of the third type message is larger than the number of times that the mode parameter is the second mode parameter, and the number of times that the mode parameter is the first mode parameter in the history sending record of the fourth type message is smaller than the number of times that the mode parameter is the second mode parameter.
For example, the message data may be used for simulating signals, such as for simulating ECU control signals or for simulating sensor signals, different message data being used for simulating different signals, which due to their different properties often have different selected mode parameters. For example, for the message data simulating the vehicle speed signal, the value of the message data needs to be frequently modified, and is generally set as the second mode parameter, and for the message data simulating the power-on state, the value of the message data is basically unchanged, and is generally set as the first mode parameter. Therefore, for one message data, a history message sending record can be obtained according to the simulated signal, and the mode parameter is automatically switched to the mode parameter with higher frequency occupation ratio according to the frequency or occupation ratio of the first mode parameter or the second mode parameter in the history message sending record, so that the history sending record of the message data simulating different types of signals is realized, the proper working mode is intelligently matched, and the intelligence and the accuracy of the message data sending are improved.
Referring to fig. 7, in some embodiments, the configuration parameters include a cycle parameter, where the cycle parameter is at least used to determine a transmission time difference between two transmissions of the message data to be transmitted; the upper computer is further configured to perform the steps of obtaining the mode parameters as follows:
Step S2014: if the message data to be sent is a fifth type message, judging that the mode parameter of the message data to be sent is a first mode parameter;
Step S2017: if the message data to be sent is a sixth type message, judging that the mode parameter of the message data to be sent is a second mode parameter; the sending time difference of the two sending of the fifth type message is smaller than the sending time difference of the two sending of the sixth type message.
For example, the cycle parameter may include a cycle interval or a cycle frequency, and a cycle number or a transmission start time and an end time of the message data, where the cycle interval is a transmission time difference between two adjacent transmissions of the message data; the mode parameter can be determined according to the sending time difference of the two adjacent messages, and the mode one or the mode two is automatically selected according to the sending time difference of the two adjacent messages, so that the message with smaller sending time difference of the two adjacent messages, such as 1ms, has relatively higher requirement on time precision, and the mode one is selected; for the message with larger time difference between the sending of two adjacent messages, such as 1000ms, the requirement on time precision is relatively low, and the mode two is selected. According to the size of the sending time difference of the two sending times of the message data to be sent, the proper working mode is intelligently matched, and the intelligence and the accuracy of the sending of the message data are improved.
It can be understood that when the number of message data is large, the buffer capacity and the transmission capacity of the message transmitting device are limited, so when determining the mode parameter, the message data with small modification probability, small transmission time difference and relatively large first mode parameter in the history transmission record is preferentially set as the first mode parameter. Specifically, in some embodiments, the configuration parameters include a cycle parameter, where the cycle parameter is at least used to determine a transmission time difference between two transmissions of the message data to be transmitted; the upper computer is further configured to perform the steps of obtaining the mode parameters as follows:
if the message data to be sent is a first type message, judging that the mode parameter of the message data to be sent is a first mode parameter;
If the message data to be sent are the second type message and the fifth type message, and the number of the message data to be sent, of which the mode parameters are the first mode parameters, in the bus test device is lower than a preset first threshold value, judging that the mode parameters of the message data to be sent are the first mode parameters;
If the message data to be sent are a second type message, a sixth type message and a third type message, and the number of the message data to be sent, of which the mode parameters are first mode parameters, in the bus test device is lower than a preset second threshold value, judging that the mode parameters of the message data to be sent are first mode parameters;
otherwise, judging the mode parameter of the message data to be sent as a second mode parameter.
The values of the first threshold and the second threshold may be preset according to the number of the message sending devices, the number of channels of the message sending devices, the buffering and the performance of the message sending devices, and the like. The mode parameters are determined according to the transmission capacity of the message transmission equipment by integrating the stability parameters, the message transmission time difference and the historical message transmission record, so that the transmission performance of the message transmission equipment is ensured, and the stability of message data transmission is further ensured.
In some embodiments, the host computer is further configured to perform the steps of:
Step S2002: obtaining target model data and the current model type of the message sending equipment; the target model data comprises a target model type used for indicating the message sending equipment to support the first working state;
Step S2004: if the current model type is the same as a target model type in the target model data, the message sending equipment is judged to have the function of executing the steps in the first working state.
For example, after the current message sending device is determined to support the first working state according to the current model type of the current message sending device, the current message sending device is controlled to execute the step in the first working state, so that failure of control of the working mode is avoided, and time accuracy of message data sending is affected.
It can be understood that after the upper computer determines that the message sending device has the function of executing the step in the first working state, the mode parameter of the message data to be sent can be determined to be the first mode parameter or the second mode parameter, and after the upper computer determines that the message sending device does not have the function of executing the step in the first working state, all the mode parameters of the message data to be sent are the second mode parameter.
In some embodiments, the configuration parameters include a start transmission time and a cycle parameter, the cycle parameter being at least used to determine a transmission time difference between two transmissions of the first message data, and the steps in the message transmission device performing the first working state include:
Step S1022: acquiring first message data and configuration parameters; the configuration parameters comprise a starting transmission time and a circulation parameter, wherein the circulation parameter is at least used for determining a transmission time difference of two transmissions of the first message data;
Step S1042: and transmitting the first message data to the vehicle bus according to the starting transmission time and the circulation parameter and the local clock of the message transmitting equipment.
By setting the starting transmission time in the configuration parameters, the transmission time of the message data is flexibly adjusted, so that the timing transmission or the instant transmission is realized, and the flexibility of the message data transmission is improved.
In some embodiments, the configuration parameters include a start transmission time and a cycle parameter, the cycle parameter being used at least to determine a transmission time difference between two transmissions of the second message data, the host computer being configured to: if the mode parameter is the second mode parameter, acquiring second message data based on the message data to be transmitted, transmitting the second message data to the message transmitting equipment according to the starting transmission time and the circulation parameter and the system clock of the upper computer, and controlling the message transmitting equipment to execute the steps in the second working state; the step of the message sending device executing the second working state comprises the following steps: and receiving and forwarding second message data sent by the upper computer to the vehicle bus.
In some embodiments, the configuration parameters of one message data include a Custom Name (Custom Name), a signal Name (Name) to be emulated, a message parameter, a trigger parameter, a cycle parameter, and the like, where the cycle parameter is at least used to determine a transmission time difference between two transmissions of the message data to be transmitted; the message parameters may include: coding (ID), channel (Channel), data Length Code (DLC), type (type), etc., wherein the coding is used for distinguishing different message data, the Channel is used for indicating message sending equipment and Channel used for sending the message data, the data length code is used for indicating bit number of the message data, and the type is used for indicating bus protocol type of the message data; the trigger parameters may include: a transmission time (Sent) for indicating a start transmission time including instant transmission and timing transmission, a trigger Key value (Key) for indicating how to give a transmission instruction, and the like, and a cycle parameter including a cycle interval and a cycle number. The upper computer can add new frames or blank frames for obtaining the message data to be sent, and the new frames can be added by selecting one frame of message data from data files such as DBC, LDF, arxml and the like and importing the message data into the upper computer; adding a blank frame can create a new blank frame in the upper computer software interface and edit the message content.
In some embodiments, a message data to be sent is obtained in an upper computer software interface, the custom name is Frame-1, the signal name to be simulated is EPBi _3fa, the ID in the message parameter is 0x1 (hexadecimal), the channel is CAN1, DLC (data length code) is 8, the type is CAN, the value of the sending time in the trigger parameter is Now, the instant sending is indicated, the trigger key value is set to K, the click key K is the start sending instruction, the cycle interval is set to 500ms (the time interval of sending the signal is 500 ms), the cycle number is infinite (the signal is always sent until the stop sending signal instruction is not received), and the mode parameter is configured as the second mode parameter. Because the mode parameter is the second mode parameter, when the user presses the key K on the computer keyboard, a command for starting to send is given, and according to the starting sending time, the Frame-1 is continuously sent to the vehicle bus by the upper computer until the sending is stopped. The custom name of the second message data to be sent is Frame-2, the signal name to be simulated is VCU_2FC, the ID in the related configuration parameters is 0x1, the mode parameters are configured as the first mode parameters, and other configuration parameters are the same as the first message data. Because the mode parameter is the first mode parameter, the Frame-2, the transmission starting time and the circulation parameter are transmitted to the message transmitting equipment, when the user presses the key K on the computer keyboard, a transmission starting instruction is given, and the message transmitting equipment continuously transmits the Frame-2 to the vehicle bus until transmission is stopped.
In some embodiments, if there are multiple first message data or multiple second message data to be sent at the same time, for example, the starting sending time of two message data is the same, or the two message data are all sent in a loop, and the loop intervals are different, but the two message data are sent at the same time at intervals, and multiple message frames may be sequentially sent to the vehicle bus according to the order of priority levels (for example, ID values) of the multiple message frames.
In some embodiments, the step of the messaging device performing the first operating state includes:
Step S1024: acquiring first message data and configuration parameters; the configuration parameters comprise circulation parameters which are at least used for determining the sending time difference of the two sending of the first message data;
Step S1044: and responding to the sending instruction, wherein the sending instruction is at least used for determining the starting sending time, and sending the first message data to the vehicle bus according to the starting sending time and the circulation parameter and the local clock of the message sending equipment.
For example, the transmission instruction may be configured to include a transmission mode such as immediate transmission or timing transmission, so that the transmission time of the message data is flexibly adjusted according to the transmission mode of the transmission instruction.
In some embodiments, the configuration parameters include a cycle parameter, the cycle parameter being used at least to determine a transmission time difference between two transmissions of the second message data, the upper computer being configured to: if the mode parameter is the second mode parameter, acquiring second message data based on the message data to be transmitted, responding to a transmitting instruction, wherein the transmitting instruction is at least used for determining the starting transmission time, transmitting the second message data to the message transmitting equipment according to the starting transmission time, the circulating parameter and the system clock of the upper computer, and controlling the message transmitting equipment to execute the steps in the second working state; the step of the message sending device executing the second working state comprises the following steps: and receiving and forwarding second message data sent by the upper computer to the vehicle bus.
In some embodiments, the configuration parameters include cycle interval, number of cycles; the upper computer is configured to execute the following steps:
Step S2062: if the mode parameter is the second mode parameter, before receiving the end sending instruction, detecting whether a message frame modification instruction is received or not;
Step S2064: if yes, the modified configuration parameters and/or second message data are obtained in response to the message modification instruction, and the second message data are sent to the message sending equipment according to the system clock of the upper computer and the modified configuration parameters and/or the second message data.
In some embodiments, the configuration parameters include cycle interval, number of cycles; the upper computer is configured to execute the following steps:
If the mode parameter is the first mode parameter, before receiving the end sending instruction, detecting whether a message frame modification instruction is received or not;
if so, responding to the message modification instruction, acquiring the modified configuration parameters and/or first message data, and sending the modified configuration parameters and/or first message data to the message sending equipment, wherein the message sending equipment sends the first message data to the vehicle bus according to the local clock and the modified configuration parameters and/or first message data.
Referring to fig. 8, in some embodiments, another aspect of the present application provides a bus testing method, including the steps of:
Step S302: based on the message sending equipment, acquiring first message data and configuration parameters, wherein the configuration parameters are at least used for determining the sending moment of the first message data;
step S304: and based on the message sending equipment, sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment.
By way of example, since the clock precision of the message sending device is higher than that of the upper computer, the local clock of the message sending device is used as the reference clock to send the message data, and the sending time precision of sending the message data to the vehicle bus is effectively improved relative to that of sending the message data by using the clock of the upper computer as the reference clock, so that the time stability of the vehicle bus for obtaining the message data is ensured, and the event that the vehicle test result is influenced due to the unstable time of sending the signal to the vehicle bus is avoided.
It should be understood that, although the steps in the flowcharts of fig. 2, 4-8 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, while at least some of the steps of fig. 2, 4-8 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of execution of the sub-steps or stages is not necessarily sequential, and may be performed in rotation or alternatively with at least a portion of the sub-steps or stages of other steps or steps.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the claims. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A bus testing apparatus, comprising:
The message sending device is used for being connected with the vehicle bus and is configured to at least execute the following steps in the first working state:
acquiring first message data and configuration parameters, wherein the configuration parameters are at least used for determining the sending time of the first message data;
And sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment.
2. The bus testing apparatus according to claim 1, further comprising a host computer, wherein the host computer is connected to at least one message sending device, and is configured to obtain message data to be sent by the at least one message sending device and configuration parameters thereof.
3. The bus testing device according to claim 2, wherein the host computer is further configured to obtain a mode parameter of the message data to be sent, where the mode parameter is at least used to determine a sending mode of the message data to be sent; the upper computer is configured to:
if the mode parameter is a first mode parameter, acquiring first message data based on the message data to be sent, and controlling the message sending equipment to execute the steps in the first working state;
If the mode parameter is a second mode parameter, acquiring second message data based on the message data to be sent, sending the second message data to the message sending equipment according to the configuration parameter and the system clock of the upper computer, and controlling the message sending equipment to execute the steps in a second working state;
The step of executing the second working state by the message sending device comprises the following steps:
And receiving and forwarding the second message data sent by the upper computer to a vehicle bus.
4. The bus test apparatus of claim 3 wherein the host computer is further configured to perform the step of obtaining mode parameters as follows:
if the message data to be sent is a first type message, judging that the mode parameter of the message data to be sent is a first mode parameter;
If the message data to be sent is the second type message, judging that the mode parameter of the message data to be sent is the second mode parameter; wherein the probability of the first type of message being modified is less than the probability of the second type of message being modified.
5. The bus test apparatus of claim 3 wherein the host computer is further configured to perform the step of obtaining mode parameters as follows:
if the message data to be sent is a third type message, judging that the mode parameter of the message data to be sent is the first mode parameter;
If the message data to be sent is a fourth type message, judging that the mode parameter of the message data to be sent is the second mode parameter; the number of times that the mode parameter is the first mode parameter is larger than the number of times that the mode parameter is the second mode parameter in the history sending record of the third type message, and the number of times that the mode parameter is the first mode parameter is smaller than the number of times that the mode parameter is the second mode parameter in the history sending record of the fourth type message.
6. A bus test apparatus according to claim 3, wherein the configuration parameters include a cycle parameter for determining at least a transmission time difference between two transmissions of the message data to be transmitted; the upper computer is further configured to perform the following steps of obtaining mode parameters:
if the message data to be sent is a fifth type message, judging that the mode parameter of the message data to be sent is the first mode parameter;
If the message data to be sent is a sixth type message, judging that the mode parameter of the message data to be sent is a second mode parameter; and the sending time difference of the two sending of the fifth type message is smaller than that of the sixth type message.
7. The bus test apparatus of claim 3, wherein the host computer is further configured to:
Obtaining target model data and the current model type of the message sending equipment; the target model data comprises a target model type used for indicating the message sending equipment to support the first working state;
And if the current model type is the same as a target model type in the target model data, judging that the message sending equipment has the function of executing the step in the first working state.
8. The bus test apparatus according to claim 1, wherein the configuration parameters include a start transmission time and a cycle parameter, the cycle parameter being used at least to determine a transmission time difference between two transmissions of the first message data, and the step of the message transmission device performing the first operation state includes:
acquiring first message data and configuration parameters;
and transmitting the first message data to the vehicle bus according to the starting transmission time and the circulation parameter and the local clock of the message transmitting equipment.
9. The bus test apparatus according to claim 1, wherein the configuration parameters include a cycle parameter, the cycle parameter being used at least to determine a transmission time difference between two transmissions of the first message data, the step of the message transmission device performing the first operation state includes:
acquiring first message data and configuration parameters;
And responding to a transmitting instruction, wherein the transmitting instruction is at least used for determining the starting transmitting time, and transmitting the first message data to the vehicle bus according to the starting transmitting time, the circulating parameter and the local clock of the message transmitting equipment.
10. A bus testing method, comprising:
acquiring first message data and configuration parameters based on message transmitting equipment, wherein the configuration parameters are at least used for determining the transmitting time of the first message data;
And based on the message sending equipment, sending the first message data to the vehicle bus according to the configuration parameters and the local clock of the message sending equipment.
CN202410381880.5A 2024-03-29 2024-03-29 Bus testing device and bus testing method Pending CN117997673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410381880.5A CN117997673A (en) 2024-03-29 2024-03-29 Bus testing device and bus testing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410381880.5A CN117997673A (en) 2024-03-29 2024-03-29 Bus testing device and bus testing method

Publications (1)

Publication Number Publication Date
CN117997673A true CN117997673A (en) 2024-05-07

Family

ID=90891333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410381880.5A Pending CN117997673A (en) 2024-03-29 2024-03-29 Bus testing device and bus testing method

Country Status (1)

Country Link
CN (1) CN117997673A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973570A (en) * 2013-01-31 2014-08-06 华为技术有限公司 Message transmission method, AP (access point) and message transmission system
CN110557826A (en) * 2019-09-20 2019-12-10 北京邮电大学 Clock synchronization method and device
CN111650916A (en) * 2020-04-27 2020-09-11 宝能(广州)汽车研究院有限公司 ECU (electronic control unit) refreshing method based on CAN (controller area network) bus
CN114640703A (en) * 2022-03-14 2022-06-17 中国第一汽车股份有限公司 Data communication method and device, electronic equipment and storage medium
CN115225699A (en) * 2021-11-17 2022-10-21 广州汽车集团股份有限公司 Vehicle data acquisition method, vehicle-mounted telematics processor, and storage medium
CN116582387A (en) * 2023-05-18 2023-08-11 北京百度网讯科技有限公司 Message sending method, device and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973570A (en) * 2013-01-31 2014-08-06 华为技术有限公司 Message transmission method, AP (access point) and message transmission system
CN110557826A (en) * 2019-09-20 2019-12-10 北京邮电大学 Clock synchronization method and device
CN111650916A (en) * 2020-04-27 2020-09-11 宝能(广州)汽车研究院有限公司 ECU (electronic control unit) refreshing method based on CAN (controller area network) bus
CN115225699A (en) * 2021-11-17 2022-10-21 广州汽车集团股份有限公司 Vehicle data acquisition method, vehicle-mounted telematics processor, and storage medium
CN114640703A (en) * 2022-03-14 2022-06-17 中国第一汽车股份有限公司 Data communication method and device, electronic equipment and storage medium
CN116582387A (en) * 2023-05-18 2023-08-11 北京百度网讯科技有限公司 Message sending method, device and equipment

Similar Documents

Publication Publication Date Title
US5357557A (en) Inter-mobile-terminal testing method in cellular automobile telephone system
WO2023240571A1 (en) Csi reporting method and apparatus, information sending method and apparatus, device, and medium
CN108445860B (en) Diagnostic apparatus, diagnostic request processing method, and computer-readable storage medium
CN112596447B (en) Method and device for determining length of ECU (electronic control Unit) flash data, electronic equipment and medium
CN117997673A (en) Bus testing device and bus testing method
CN110769460B (en) BSR transmission method, device, related equipment and storage medium
CN115134403B (en) Internet of things communication assembly control method supporting multi-protocol access
CN116521602A (en) Bus data transmission method and device and storage medium
WO1989002141A1 (en) Method and system for transmitting information and controlling components
CN112448889B (en) Gateway controller route configuration method, device, equipment and automobile
CN111740972B (en) Method, device, equipment and storage medium for updating communication protocol stack information
CN112559470A (en) File format conversion method and device, storage medium and electronic equipment
CN100546253C (en) A kind of management method of telecommunication equipment unit
CN108803582B (en) Automatic bus switching system and method suitable for remote fault diagnosis
CN111819039B (en) Robot control method, apparatus and readable storage medium
CN118780224A (en) Multiplexing system, multiplexing method, electronic device, and medium
CN117376300B (en) Message all-channel sending method and device, electronic equipment and storage medium
US7529268B1 (en) Multi-point electronic control system protocol
CN114584527B (en) HART communication method, device, equipment and readable storage medium
CN111262766B (en) Method, device and system for transmitting multi-packet application message data
CN115119272A (en) Network communication method between device and server, computer device and storage medium
CN116373758A (en) Control method, storage medium and controller for engineering vehicle electric control unit
CN116758972A (en) Memory chip testing method, device and storage medium
CN118012022A (en) Diagnostic method and system for vehicle, vehicle and equipment
CN115857476A (en) Calibration test method and system for vehicle controller

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