Search

CN-122019278-A - Real-time testing method and device for data interface between CAN and Ethernet

CN122019278ACN 122019278 ACN122019278 ACN 122019278ACN-122019278-A

Abstract

The invention provides a real-time test method and device for a data interface between CAN and Ethernet, which solve the technical problem of lack of efficiency in the existing heterogeneous data comparison. The method comprises the steps of establishing independent acquisition threads for data acquisition of related paths to acquire the related information in real time, establishing mapping rules of the related information among data encapsulation definitions of the related paths, establishing a man-machine interaction interface to form a data display frame for independent data acquisition of the related paths, and synchronously displaying the related information in different organization forms in the data display frame according to the data time sequence rules. The real-time performance is good, and each data has a corresponding header to indicate the content of the data, so that the tester is helped to quickly identify and judge the correctness of the data, and the testing efficiency is improved.

Inventors

  • WANG AIXIA
  • WANG YUANQING
  • LIU BEN
  • GAO LIYUAN
  • LI XIN

Assignees

  • 北京特种机械研究所

Dates

Publication Date
20260512
Application Date
20251204

Claims (10)

  1. 1. The real-time test method for the data interface between the CAN and the Ethernet is characterized by comprising the following steps of: establishing an independent acquisition thread for related path data acquisition to acquire in real time; establishing a mapping rule of the association information among data encapsulation definitions of the related paths; establishing a human-computer interaction interface to form a data display frame with independent data acquisition paths; And synchronously displaying the associated information in different organization forms in the data display frame according to the data timing rule.
  2. 2. The real-time testing method of claim 1, wherein the mapping rule of the association information comprises: identification of the same information in different packages (defined headers, symbols or); A brief description of the same information; The causal related associated information exists in different packages; an identification (defined header, symbol or) of the associated information that there is a causal association; a brief description of the associated information.
  3. 3. The method of real-time testing according to claim 1, wherein the data presentation framework forms a two-dimensional presentation form of the acquired data, and header headers and rows are formed in the presentation form. The header includes a single transverse header, a single longitudinal header, transverse and longitudinal headers.
  4. 4. The method of real-time testing according to claim 1, wherein the header includes an identification, a time stamp, and a succinct description.
  5. 5. The real-time testing method of claim 1, wherein the timing rules include an update period, a synchronous update according to timing, an asynchronous update according to timing.
  6. 6. The real-time testing method of claim 1, further comprising: and setting a time sequence control interface of the associated information in the man-machine interaction interface.
  7. 7. The method of real-time testing according to claim 6, wherein the timing control interface forms a control of a data presentation timeline, comprising: Suspending/continuing to display the associated information collected in real time; And carrying out time line rollback according to the stored data acquired by the data to form rollback display of the associated information.
  8. 8. A real-time testing device for a data interface between a CAN and an ethernet, comprising: a memory for storing program code for a process of a real-time test method of a CAN and ethernet data interface according to any one of claims 1 to 7; and a processor for executing the program code.
  9. 9. A real-time testing device for a data interface between a CAN and an ethernet, comprising: The synchronous acquisition control module is used for establishing an independent acquisition thread for related path data acquisition to acquire in real time; The package information mapping module is used for establishing a mapping rule of the association information among data package definitions of the related paths; The display frame construction module is used for establishing a human-computer interaction interface to form a data display frame with independent data acquisition paths; And the display data synchronization module is used for synchronously displaying the associated information in different organization forms in the data display frame according to the data time sequence rule.
  10. 10. The real-time testing apparatus of a CAN-ethernet data interface of claim 9, further comprising: and the man-machine coordination adjusting module is used for setting a time sequence control interface of the related information in the man-machine interaction interface.

Description

Real-time testing method and device for data interface between CAN and Ethernet Technical Field The invention relates to the technical field of data testing, in particular to a real-time testing method and device for a data interface between CAN and Ethernet. Background In testing software based on CAN-to-Ethernet interface devices, the correspondence between input CAN data and output Ethernet data is often analyzed. In the prior art, a tester grabs CAN data of a CAN bus in a system by means of CAN debugging software (for example CANTest), and grabs ethernet data of an ethernet bus in the system by means of ethernet debugging software (for example wireshark) for comparison test. Because a single ethernet data package generally contains tens or even hundreds of bytes of information, CAN data and ethernet data are generally in continuous change in a testing process, and a tester generally needs to compare whether the CAN data and the ethernet data meet protocol requirements at the same time according to a timestamp of stored data, which results in low testing efficiency. Disclosure of Invention In view of the above problems, embodiments of the present invention provide a method and an apparatus for testing a data interface between a CAN and an ethernet in real time, which solve the technical problem that the existing heterogeneous data comparison lacks efficiency. The real-time testing method of the data interface between the CAN and the Ethernet comprises the following steps: establishing an independent acquisition thread for related path data acquisition to acquire in real time; establishing a mapping rule of the association information among data encapsulation definitions of the related paths; establishing a human-computer interaction interface to form a data display frame with independent data acquisition paths; And synchronously displaying the associated information in different organization forms in the data display frame according to the data timing rule. In an embodiment of the present invention, the mapping rule of the association information includes: identification of the same information in different packages (defined headers, symbols or); A brief description of the same information; The causal related associated information exists in different packages; an identification (defined header, symbol or) of the associated information that there is a causal association; a brief description of the associated information. In an embodiment of the present invention, the data display frame forms a two-dimensional display table for collecting data, and header headers and table rows are formed in the display table. The header includes a single transverse header, a single longitudinal header, transverse and longitudinal headers. In an embodiment of the present invention, the header includes an identifier, a timestamp, and a succinct description. In one embodiment of the present invention, the timing rules include update periods, synchronous update according to timing, asynchronous update according to timing. In an embodiment of the present invention, the method further includes: and setting a time sequence control interface of the associated information in the man-machine interaction interface. In an embodiment of the present invention, the timing control interface forms a control of a data presentation timeline, including: Suspending/continuing to display the associated information collected in real time; And carrying out time line rollback according to the stored data acquired by the data to form rollback display of the associated information. The real-time testing device of the data interface between the CAN and the Ethernet in the embodiment of the invention comprises: the memory is used for storing program codes of the processing process of the real-time test method of the data interface between the CAN and the Ethernet; and a processor for executing the program code. The real-time testing device of the data interface between the CAN and the Ethernet in the embodiment of the invention comprises: The synchronous acquisition control module is used for establishing an independent acquisition thread for related path data acquisition to acquire in real time; The package information mapping module is used for establishing a mapping rule of the association information among data package definitions of the related paths; The display frame construction module is used for establishing a human-computer interaction interface to form a data display frame with independent data acquisition paths; And the display data synchronization module is used for synchronously displaying the associated information in different organization forms in the data display frame according to the data time sequence rule. In an embodiment of the present invention, the method further includes: and the man-machine coordination adjusting module is used for setting a time sequence control interface of the related information in the man-machine in