[go: up one dir, main page]

CN114780288A - A data playback method, device and storage medium - Google Patents

A data playback method, device and storage medium Download PDF

Info

Publication number
CN114780288A
CN114780288A CN202210329403.5A CN202210329403A CN114780288A CN 114780288 A CN114780288 A CN 114780288A CN 202210329403 A CN202210329403 A CN 202210329403A CN 114780288 A CN114780288 A CN 114780288A
Authority
CN
China
Prior art keywords
playback
data
channel
host computer
can0
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
CN202210329403.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.)
Shanghai Hinge Electronic Technologies Co Ltd
Original Assignee
Shanghai Hinge Electronic Technologies 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 Shanghai Hinge Electronic Technologies Co Ltd filed Critical Shanghai Hinge Electronic Technologies Co Ltd
Priority to CN202210329403.5A priority Critical patent/CN114780288A/en
Publication of CN114780288A publication Critical patent/CN114780288A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • 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/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • 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/26Special purpose or proprietary protocols or architectures
    • 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
    • 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)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data playback method, a device and a storage medium, at least comprising: establishing playback communication path connection, and selecting an output channel interface required by data playback in playback output equipment adopted in the playback communication path connection; configuring playback parameters required by a playback path and selecting a required playback data file; and outputting the playback data through the input channel interface. The connection of the playback communication path is based on the interaction of the upper computer and the playback output equipment. According to the technical scheme provided by the invention, the vehicle-mounted Ethernet real-time data and the CAN real-time data with high bandwidth and high throughput CAN be played back, and bugs appearing in the vehicle-mounted network sensor communication CAN be timely and accurately acquired by customizing the message format of the interactive data packet.

Description

一种数据回放方法、装置及存储介质A data playback method, device and storage medium

技术领域technical field

本发明涉及汽车传感器技术领域,特别是涉及一种数据回放方法、装置及 存储介质。The present invention relates to the technical field of automotive sensors, in particular to a data playback method, device and storage medium.

背景技术Background technique

近年来随着技术的发展进步,推动者汽车工业进步,汽车工业朝向辅助驾 驶、自动驾驶、无人驾驶的方向不断向前推进,使得传统的低俗、高可靠性的 传输CAN总线无法满足图像或视频、激光雷达的传感器需要高带宽、低延时 的发展需求,而车载以太网总线技术具有较高的带宽、实时性以及低成本成为 必然选择,但CAN总线由于具有高可靠性仍然具有较好的实用性。在对于不 同车载以太网接口设备与CAN设备之间的测试现阶段现有的测试设备不具备 数据回放功能,只是从ECU中获取传输的数据包,由于无法进行数据回放,如果传输过程中出现问题,无法还原出当时通信状况,使得工程人员较难发现 问题。In recent years, with the development and progress of technology, it has promoted the progress of the automobile industry, and the automobile industry has continued to move forward in the direction of assisted driving, automatic driving, and unmanned driving, making the traditional vulgar and high-reliability transmission CAN bus unable to meet the requirements of image or The sensors of video and lidar need high bandwidth and low delay. The vehicle Ethernet bus technology has high bandwidth, real-time performance and low cost, which is an inevitable choice. However, the CAN bus still has better performance due to its high reliability. practicability. In the test between different vehicle Ethernet interface devices and CAN devices, the existing test equipment does not have the function of data playback, but only obtains the transmitted data packets from the ECU. Since data playback cannot be performed, if there is a problem during the transmission process , it is impossible to restore the communication status at that time, making it difficult for engineers to find problems.

发明内容SUMMARY OF THE INVENTION

基于现有技术中存在的缺陷,本发明提供基于一种数据回放方法,至少 包括:Based on the defects existing in the prior art, the present invention provides a data playback method based on at least:

建立回放通信路径连接,在回放通信路径连接中采用的回放输出设备中 选择数据回放所需的输出通道接口;Establish a playback communication path connection, and select the output channel interface required for data playback in the playback output device used in the playback communication path connection;

配置回放路径所需的回放参数并选择所需回放数据文件;Configure the playback parameters required by the playback path and select the desired playback data file;

通过所述输入通道接口输出回放数据。The playback data is output through the input channel interface.

一种数据回放方法,进一步可选的,根据回放参数设置时把所需的输出 通道接口,和所需的输出通道接口对应的关联的参数一起发送给回放输出设 备。A data playback method, further optionally, according to the playback parameter setting, the required output channel interface and the associated parameters corresponding to the required output channel interface are sent to the playback output device together.

一种数据回放方法,进一步可选的,回放通信路径的连接是基于上位机 与回放输出设备进行交互。A data playback method, further optionally, the connection of the playback communication path is based on the interaction between the upper computer and the playback output device.

一种数据回放方法,进一步可选的,回放输出设备收到回放通信路径发 送控制命令后,执行关联的参数设置和模式切换,将执行结果响应发送给上位 机。A data playback method, further optionally, after the playback output device receives the control command sent by the playback communication path, it performs associated parameter setting and mode switching, and sends the execution result response to the host computer.

一种数据回放方法,进一步可选的,输出通道接口至少包括:TE0、TE1、 RJ45、CAN0、CAN1中的一种。A data playback method, further optionally, the output channel interface includes at least one of: TE0, TE1, RJ45, CAN0, and CAN1.

一种数据回放方法,进一步可选的,所述回放参数至少包括:设置回放 列表,选择单次回放或循环回放;A data playback method, further optionally, the playback parameters include at least: setting a playback list, selecting single playback or loop playback;

如果是循环回放,设置循环的次数和/或无限循环,同时设置回放文件之间 的间隔时间和/或设置每个数据包之间的间隔时间。For loop playback, set the number of loops and/or infinite loop, and set the interval between playback files and/or set the interval between each data packet.

一种数据回放方法,进一步可选的,传输回放参数的数据包报文至少包 括:A data playback method, further optionally, the data packet message for transmitting playback parameters includes at least:

dstAddr:目的物理地址;dstAddr: destination physical address;

srcAddr:源物理地址;srcAddr: source physical address;

enable:通道总开关;enable: channel master switch;

channel:8bit字段,每个Bit代表一个通道的开关,1表示开,0表示关, 依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: 8bit field, each bit represents the switch of a channel, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3 bits are reserved;

can0Type:若channel字段的CAN0为1时本字段有效,含义:0表示 CAN帧,1表示CANFD帧;can0Type: This field is valid if CAN0 of the channel field is 1, meaning: 0 means CAN frame, 1 means CANFD frame;

can0FrameType:若channel字段的CAN0为1时本字段有效,含义:0 表示标准帧,1表示扩展帧。can0FrameType: This field is valid if CAN0 of the channel field is 1, meaning: 0 means standard frame, 1 means extended frame.

一种数据回放方法,进一步可选的,执行结果响应发送的数据包报文至 少包括:A data playback method, further optionally, the data packet message sent in response to the execution result at least includes:

dstAddr:目的物理地址;dstAddr: destination physical address;

srcAddr:源物理地址;srcAddr: source physical address;

enable:通道总开关;enable: channel master switch;

channel:分为8Bit,每个Bit代表一个通道的开关,1表示开,0表示关, 依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: divided into 8Bit, each Bit represents a channel switch, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, the remaining 3Bit are reserved;

或frameType:帧类型;或packIdx:数据包序号,从1开始递增;或 ctrlType:模式类型。Or frameType: frame type; or packIdx: packet sequence number, increasing from 1; or ctrlType: mode type.

一种数据回放方法,进一步可选的,上位机收到执行结果响应的数据包 后,根据enable和channel字段判断通道是否操作成功并显示提示信息。A data playback method, further optional, after the host computer receives the data packet of the execution result response, it judges whether the channel operation is successful according to the enable and channel fields and displays prompt information.

一种数据回放方法,进一步可选的,显示提示信息至少包括:当前文件 列表循环的序号、循环的次数,当前循环的文件序号、文件总数、当前正在回 放的文件名称或当前回放的进度条中一种或多种。A data playback method, further optionally, the displayed prompt information includes at least: the sequence number of the current file list cycle, the number of cycles, the file sequence number of the current cycle, the total number of files, the name of the file currently being played back, or the progress bar of the current playback. one or more.

一种数据回放装置,包括上位机和回放输出设备,上位机与回放设备进 行通信,上位机存储有数据回放程序,当数据回放程序被执行时,致使所处 上位机实现上述方法中所实现的步骤。A data playback device, comprising a host computer and a playback output device, the host computer communicates with the playback device, the host computer stores a data playback program, and when the data playback program is executed, the host computer is caused to realize the above-mentioned method. step.

一种存储有计算机程序的计算机可读存储介质,用于上述实现上述方法 的计算机程序,包括:当所述计算机程序被处理器执行时,致使所述处理器 调用所述程序,执行上述方法。A computer-readable storage medium storing a computer program, used for the above-mentioned computer program for implementing the above-mentioned method, includes: when the computer program is executed by a processor, causing the processor to call the program to execute the above-mentioned method.

有益效果:Beneficial effects:

本发明提供的技术方案中,可以对高带宽、高吞吐的车载以太网实时数据 和CAN实时数据进行回放,同时保证了回放时环境和接收数据时网络环境一 致。另外,通过自定义交互数据包的报文格式,能够及时准确获取车内网络传 感器通信中出现的bug所在,降低工程技术人员的冗余工作In the technical scheme provided by the present invention, the high-bandwidth, high-throughput on-board Ethernet real-time data and CAN real-time data can be played back, while ensuring that the playback environment is consistent with the network environment when receiving the data. In addition, by customizing the message format of the interactive data package, the bugs in the communication of the in-vehicle network sensors can be accurately and timely obtained, reducing the redundant work of engineers and technicians.

附图说明Description of drawings

以下附图仅对本发明做示意性说明和解释,并不限定本发明的范围。The following drawings merely illustrate and explain the present invention schematically, and do not limit the scope of the present invention.

图1为本发明一实施例回放通信路径建立所包括上位机和回放输出设备 的示意图。Fig. 1 is a schematic diagram of a host computer and a playback output device included in the establishment of a playback communication path according to an embodiment of the present invention.

图2为本发明一实施例中数据回放模块所依赖的特征关系示意图。FIG. 2 is a schematic diagram of feature relationships on which a data playback module depends in an embodiment of the present invention.

图3为本发明一实施例中传输回放参数的数据包报文格式标准定义。FIG. 3 is a standard definition of a packet message format for transmitting playback parameters in an embodiment of the present invention.

图4为本发明一实施例中执行结果响应发送的数据包报文格式标准定义。FIG. 4 is a standard definition of the format of a data packet message sent in response to an execution result in an embodiment of the present invention.

具体实施方式Detailed ways

为了对本文的技术特征、目的和效果有更加清楚的理解,现对照附图说 明本发明的具体实施方式,在各图中相同的标号表示相同的部分。为使图面 简洁,各图中的示意性地表示出了与本发明相关部分,而并不代表其作为产 品的实际结构。另外,为使图面简洁便于理解,在有些图中具有相同结构或 功能的部件,仅示意性地绘示了其中的一个,或仅标出了其中的一个。In order to have a clearer understanding of the technical features, objects and effects herein, the specific embodiments of the present invention will now be described with reference to the accompanying drawings, in which the same reference numerals denote the same parts. For the sake of brevity of the drawings, the parts relevant to the present invention are schematically shown in the drawings, and do not represent the actual structure as a product. In addition, in order to make the drawings concise and easy to understand, only one of the components having the same structure or function in some drawings is schematically shown, or only one of them is marked.

关于控制系统,功能模块、应用程序(APP)本领域技术人员熟知的是, 其可以采用任何适当的形式,既可以是硬件也可以是软件,既可以是离散设 置的多个功能模块,也可以是集成到一个硬件上的多个功能单元。作为最简 单的形式,所述控制系统可以是控制器,例如组合逻辑控制器、微程序控制 器等,只要能够实现本申请描述的操作即可。当然,控制系统也可以作为不 同的模块集成到一个物理设备上,这些都不偏离本发明的基本原理和保护范 围。Regarding the control system, functional modules and application programs (APP) are well known to those skilled in the art, and can take any appropriate form, either hardware or software, or a plurality of discretely set functional modules, or are multiple functional units integrated into one hardware. In its simplest form, the control system may be a controller, such as a combinational logic controller, a microprogrammed controller, or the like, so long as it can implement the operations described in this application. Of course, the control system can also be integrated into a physical device as different modules, all without departing from the basic principles and protection scope of the present invention.

本发明中“连接”,即可包括直接连接、也可以包括间接连接、通信连接、 电连接,特别说明除外。In the present invention, "connection" may include direct connection, indirect connection, communication connection, and electrical connection, unless otherwise specified.

本文中所使用的术语仅为了描述特定实施方案的目的并且不旨在限制本 公开。如本文中所使用地,单数形式“一个”、“一种”、以及“该”旨在也包括 复数形式,除非上下文明确地另作规定。还将理解的是,当在说明书中使用 时,术语“包括”和/或“包含”是指存在有所陈述的特征、数值、步骤、操作、 元件和/或组分,但是并不排除存在有或额外增加一个或多个其它的特征、 数值、步骤、操作、元件、组分和/或其组成的群组。作为在本文中所使用 的,术语“和/或”包括列举的相关项的一个或多个的任何和全部的组合The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the present disclosure. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that, when used in the specification, the terms "comprising" and/or "comprising" refer to the presence of stated features, values, steps, operations, elements and/or components, but do not exclude the presence of One or more other features, values, steps, operations, elements, components, and/or groups of components thereof are present or additionally added. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items

应当理解,此处所使用的术语“车辆”或“车辆的”或其它类似术语一般包 括机动车辆,例如包括运动型多用途车辆(SUV)、公共汽车、卡车、各种商 用车辆的乘用汽车,包括各种舟艇、船舶的船只,航空器等等,并且包括混 合动力车辆、电动车辆、可插式混合动力电动车辆、氢动力车辆以及其它替 代性燃料车辆(例如源于非石油的能源的燃料)。正如此处所提到的,混合动 力车辆是具有两种或更多动力源的车辆,例如汽油动力和电力动力两者的车 辆。It should be understood that the terms "vehicle" or "vehicle's" or other similar terms as used herein generally include motor vehicles, such as passenger cars including sport utility vehicles (SUVs), buses, trucks, various commercial vehicles, Includes various boats, ships' vessels, aircraft, etc., and includes hybrid vehicles, electric vehicles, plug-in hybrid electric vehicles, hydrogen-powered vehicles, and other alternative fuel vehicles (such as fuels derived from energy sources other than petroleum) . As mentioned herein, a hybrid vehicle is a vehicle having two or more power sources, such as both gasoline-powered and electric-powered vehicles.

此外,本公开的控制器可被具体化为计算机可读介质上的非瞬态计算机 可读介质,该计算机可读介质包含由处理器、控制器或类似物执行的可执行 程序指令。计算机可读介质的示例包括,但不限于,ROM、RAM、光盘 (CD)-ROM、磁带、软盘、闪存驱动器、智能卡和光学数据存储设备。计算 机可读记录介质也可分布在通过网络耦合的计算机系统中,使得计算机可读 介质例如通过远程信息处理服务器或控制器区域网络(CAN)以分布式方式存储和执行。Furthermore, the controller of the present disclosure may be embodied as a non-transitory computer readable medium on a computer readable medium containing executable program instructions to be executed by a processor, controller or the like. Examples of computer-readable media include, but are not limited to, ROM, RAM, compact disc (CD)-ROMs, magnetic tapes, floppy disks, flash drives, smart cards, and optical data storage devices. The computer-readable recording medium can also be distributed over network coupled computer systems so that the computer-readable medium is stored and executed in a distributed fashion, such as by a telematics server or a controller area network (CAN).

本发明一种数据回放装置,参见图1至图4,具体至少包括:上位机和 回放输出设备,回放输出设备设置有多种类型的输出通道接口,上位机与回 放输出设备相连接,通过自定义协议进行交互通信;A data playback device of the present invention, referring to FIG. 1 to FIG. 4, specifically includes at least a host computer and a playback output device, the playback output device is provided with various types of output channel interfaces, and the host computer is connected with the playback output device. Define protocols for interactive communication;

回放输出设备包括车载测试数据开发板,数据开发板集成车载以太网协 议栈、CAN协议栈或TSN协议栈中的一种或多种;The playback output device includes a vehicle test data development board, and the data development board integrates one or more of the vehicle Ethernet protocol stack, CAN protocol stack or TSN protocol stack;

上位机和回放输出设备建立回放通信路径连接,输出通道接口至少包括 一下类型接口中的一种或多种,具体为:The host computer and the playback output device establish a playback communication path connection, and the output channel interface includes at least one or more of the following types of interfaces, specifically:

分别提供TE0、TE1、RJ45、CAN0、CAN1五组通道选择中的一种或多 种,用户选择通道以后,默认可以自动获取对应得通道参数:Provides one or more of five groups of channel selection: TE0, TE1, RJ45, CAN0 and CAN1. After the user selects a channel, the corresponding channel parameters can be automatically obtained by default:

具体包括Specifically include

其中,TE0、TE1、RJ45都分别对应参数如下:Among them, the corresponding parameters of TE0, TE1, and RJ45 are as follows:

Mode:模式,选项:Master、SlaveMode: Mode, options: Master, Slave

Rate:速率,选项:1000Mbps、100MbpsRate: Rate, options: 1000Mbps, 100Mbps

其中,in,

CAN0、CAN1分别对应参数如下:The corresponding parameters of CAN0 and CAN1 are as follows:

Type Can:类型,选项:can、canfd;Type Can: Type, options: can, canfd;

Frame Type:帧类型,选项:standard、extend;Frame Type: frame type, options: standard, extend;

BaudRate(bps):波特率;BaudRate(bps): baud rate;

DataBaudRate(bps):数据波特率,当Type为canfd时有效;DataBaudRate(bps): data baud rate, valid when Type is canfd;

Frame ID:帧ID,当Type为can时值域为0-0x7ff,当Type为canfd 时值域为0-0xfff;Frame ID: frame ID, the value range is 0-0x7ff when Type is can, and the value range is 0-0xfff when Type is canfd;

Frame Filter Mask:帧过滤掩码,当Type为can时值域为0-0x7ff, 当Type为canfd时值域为0-0xfff。Frame Filter Mask: Frame filter mask, the value range is 0-0x7ff when Type is can, and the value range is 0-0xfff when Type is canfd.

通过设置以上接口对应的参数,能够针对自研车载以太网协议、CAN通 信中查看数据包的传输功能,实现了现有技术中不能实现的功能测试,使得 主机厂的工程技术人员能够通过数据回放观察车辆中不同传感器的通信概况。By setting the parameters corresponding to the above interfaces, it is possible to view the transmission function of data packets in the self-developed in-vehicle Ethernet protocol and CAN communication, and realize the function test that cannot be realized in the existing technology, so that the engineering and technical personnel of the OEM can pass the data playback. Observe the communication profile of different sensors in the vehicle.

具体地,上位机可以为计算机、SoC主机、智能终端,运行于window、 linux,android、QNX系统中的任意一种;Specifically, the host computer can be a computer, a SoC host, or an intelligent terminal, running on any one of the windows, linux, android, and QNX systems;

具体地,回放输出设备为用于测试和验证的开发板卡,包括SoC芯片、 存储芯片、MAC芯片和PHY芯片组成;或可以基于FPGA芯片组成,或可 以采用ASIC芯片实现。Specifically, the playback output device is a development board used for testing and verification, including a SoC chip, a memory chip, a MAC chip, and a PHY chip; or it can be based on an FPGA chip, or can be implemented using an ASIC chip.

具体地,参见图2,上位机设置有数据回放模块,数据回放模块的应用 HMI界面采用QT或其它第三方插件进行设计,回放数据pcap文件读取以及 和下位机交互采用基于npcap库实现;Specifically, referring to Fig. 2, the host computer is provided with a data playback module, and the application HMI interface of the data playback module adopts QT or other third-party plug-ins to design, and the playback data pcap file reads and interacts with the lower computer and adopts the realization based on the npcap library;

为了实现基于现有的CAN协议、车载以太网协议以及车载以太网协议 之间的相互通信的报文识别,本实施例对对上位机与回放输出设备的通信协 议进行定义:In order to realize the message identification based on the mutual communication between existing CAN protocol, vehicle Ethernet protocol and vehicle Ethernet protocol, the present embodiment defines the communication protocol to host computer and playback output device:

传输回放参数的数据包报文格式结构定义:The definition of the packet message format structure for transmitting playback parameters:

dstAddr:6Byte目的物理地址;dstAddr: 6Byte destination physical address;

srcAddr:6Byte源物理地址;srcAddr: 6Byte source physical address;

frameType:2Byte帧类型:0x1915代表命令,0x1815代表数据;frameType: 2Byte Frame type: 0x1915 for command, 0x1815 for data;

packIdx:1Byte数据包序号(从1开始递增);packIdx: 1Byte data packet sequence number (incremented from 1);

ctrlType:1Byte模式类型:数据回放(0x72);ctrlType: 1Byte mode type: data playback (0x72);

enable:1Byte通道总开关:0x1使能、0x0停止;enable: 1Byte channel master switch: 0x1 enable, 0x0 stop;

channel:1Byte分为8Bit,每个Bit代表一个通道的开关,1表示开, 0表示关,依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: 1Byte is divided into 8Bits, each Bit represents a channel switch, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3Bit are reserved;

can0Type:1Byte若channel字段的CAN0为1时本字段有效,含义: 0-CAN帧1-CANFD帧;can0Type: 1Byte If the CAN0 of the channel field is 1, this field is valid, meaning: 0-CAN frame 1-CANFD frame;

can0FrameType:1Byte若channel字段的CAN0为1时本字段有效, 含义:0-标准帧1-扩展帧;can0FrameType: 1Byte If the CAN0 of the channel field is 1, this field is valid, meaning: 0-standard frame 1-extended frame;

can0BaudRate:4Byte若channel字段的CAN0为1时本字段有效, 波特率(bps);can0BaudRate: 4Byte, if the CAN0 of the channel field is 1, this field is valid, the baud rate (bps);

can0DataBaudRate:4Byte若channel字段的CAN0为1时本字段有效, 数据波特率(bps),CANFD才有;can0DataBaudRate: 4Byte If CAN0 of the channel field is 1, this field is valid, and the data baud rate (bps) is only available in CANFD;

can0FrameId:4Byte若channel字段的CAN0为1时本字段有效,帧 IDcan0FrameId: 4Byte If CAN0 of channel field is 1, this field is valid, frame ID

can1Type:1Byte若channel字段的CAN1为1时本字段有效,含义: 0-CAN帧1-CANFD帧;can1Type: 1Byte If the CAN1 of the channel field is 1, this field is valid, meaning: 0-CAN frame 1-CANFD frame;

can1FrameType:1Byte若channel字段的CAN1为1时本字段有效, 含义:0-标准帧1-扩展帧;can1FrameType: 1Byte If the CAN1 of the channel field is 1, this field is valid, meaning: 0-standard frame 1-extended frame;

can1BaudRate:4Byte若channel字段的CAN1为1时本字段有效, 波特率(bps);can1BaudRate: 4Byte If the CAN1 of the channel field is 1, this field is valid, the baud rate (bps);

can1DataBaudRate:4Byte若channel字段的CAN1为1时本字段有效, 数据波特率(bps),CANFD才有;can1DataBaudRate: 4Byte If CAN1 of the channel field is 1, this field is valid, and the data baud rate (bps) is only available in CANFD;

can1FrameId:4Byte若channel字段的CAN1为1时本字段有效,帧 ID。can1FrameId: 4Byte If CAN1 of channel field is 1, this field is valid, frame ID.

如图3所示,图3显示传输回放参数的数据包报文As shown in Figure 3, Figure 3 shows the packet message that transmits the playback parameters

执行结果响应发送的数据包报文格式定义:The format definition of the data packet sent in response to the execution result:

dstAddr:6Byte目的物理地址;dstAddr: 6Byte destination physical address;

srcAddr:6Byte源物理地址;srcAddr: 6Byte source physical address;

frameType:2Byte帧类型:0x1915代表命令,0x1815代表数据;frameType: 2Byte Frame type: 0x1915 for command, 0x1815 for data;

packIdx:1Byte数据包序号(从1开始递增);packIdx: 1Byte data packet sequence number (incremented from 1);

ctrlType:1Byte模式类型:数据回放(0x72);ctrlType: 1Byte Mode type: data playback (0x72);

enable:1Byte通道总开关:0x1使能、0x0停止;enable: 1Byte channel master switch: 0x1 enable, 0x0 stop;

channel:1Byte分为8Bit,每个Bit代表一个通道的开关,1表示开,0 表示关,依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留。channel: 1Byte is divided into 8Bit, each Bit represents a channel switch, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3Bit are reserved.

如图4所示,图4显示执行结果响应发送的数据包报文。As shown in Figure 4, Figure 4 shows the data packet message sent in response to the execution result.

具体地,数据回放模块包括以下三个子接口组成,子接口组成相应的 API接口逻辑调用关系,实现数据回放功能。具体地包括:Specifically, the data playback module consists of the following three sub-interfaces, and the sub-interfaces form the logical calling relationship of the corresponding API interface to realize the data playback function. Specifically:

第一界面接口,用于数据回放,并且能够调用第二配置接口和第三功能 接口;The first interface interface is used for data playback, and can call the second configuration interface and the third function interface;

第二配置接口,用于实例化一个配置对象并且被第一界面接口所调用, 同时能够调用第三功能接口;The second configuration interface is used to instantiate a configuration object and is called by the first interface interface, and can also call the third functional interface;

第三功能接口,用于给第一界面接口和/或第第二配置接口提供实现功能 的回调函数,具体包括:The third functional interface is used to provide the first interface interface and/or the second configuration interface with a callback function that realizes the function, and specifically includes:

将回放输出设备的正常模式切换为数据回放模式,并设置对应回放的通 道和通道参数;Switch the normal mode of the playback output device to the data playback mode, and set the corresponding playback channel and channel parameters;

将回放输出设备的当前模式取消回放模式的设定;Cancel the playback mode setting from the current mode of the playback output device;

开始回放数据文件;Start playback of data files;

停止数据文件得回放。Stop the playback of the data file.

具体地,基于上述提供数据回放装置,本实施例提供了一种数据回放方 法,具体包括:Specifically, based on the above-mentioned provision of a data playback device, the present embodiment provides a data playback method, which specifically includes:

建立回放通信路径连接,在回放通信路径连接中采用的回放输出设备中 选择数据回放所需的输出通道接口;Establish a playback communication path connection, and select the output channel interface required for data playback in the playback output device used in the playback communication path connection;

配置回放路径所需的回放参数并选择所需回放数据文件;Configure the playback parameters required by the playback path and select the desired playback data file;

通过所述输入通道接口输出回放数据。The playback data is output through the input channel interface.

回放通信路径的连接是基于上位机与回放输出设备进行交互。The connection of the playback communication path is based on the interaction between the host computer and the playback output device.

根据回放参数设置时把所需的输出通道接口,和所需的输出通道接口对 应的关联的参数一起发送给回放输出设备。According to the playback parameter setting, the required output channel interface and the corresponding parameters corresponding to the required output channel interface are sent to the playback output device.

回放输出设备收到回放通信路径发送控制命令后,执行关联的参数设置 和模式切换,将执行结果响应发送给上位机。After the playback output device receives the control command sent by the playback communication path, it executes the associated parameter setting and mode switching, and sends the execution result response to the upper computer.

输出通道接口至少包括:TE0、TE1、RJ45、CAN0、CAN1中的一种,每 种接口定义相应的参数。The output channel interface includes at least one of TE0, TE1, RJ45, CAN0, and CAN1, and each interface defines corresponding parameters.

设置回放列表,选择单次回放或循环回放;Set the playback list, choose single playback or loop playback;

如果是循环回放,设置循环的次数和/或无限循环,同时设置回放文件之间 的间隔时间和/或设置每个数据包之间的间隔时间。For loop playback, set the number of loops and/or infinite loop, and set the interval between playback files and/or set the interval between each data packet.

传输回放参数的数据包报文至少包括:The data packets that transmit playback parameters include at least:

dstAddr:目的物理地址;dstAddr: destination physical address;

srcAddr:源物理地址;srcAddr: source physical address;

enable:通道总开关;enable: channel master switch;

channel:8bit字段,每个Bit代表一个通道的开关,1表示开,0表示关, 依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: 8bit field, each bit represents the switch of a channel, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3 bits are reserved;

can0Type:若channel字段的CAN0为1时本字段有效,含义:0表示 CAN帧,1表示CANFD帧;can0Type: This field is valid if CAN0 of the channel field is 1, meaning: 0 means CAN frame, 1 means CANFD frame;

can0FrameType:若channel字段的CAN0为1时本字段有效,含义:0 表示标准帧,1表示扩展帧。can0FrameType: This field is valid if CAN0 of the channel field is 1, meaning: 0 means standard frame, 1 means extended frame.

传输回放参数的数据包报文至少包括:The data packets that transmit playback parameters include at least:

dstAddr:目的物理地址;dstAddr: destination physical address;

srcAddr:源物理地址;srcAddr: source physical address;

enable:通道总开关;enable: channel master switch;

channel:8bit字段,每个Bit代表一个通道的开关,1表示开,0表示关, 依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: 8bit field, each bit represents the switch of a channel, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3 bits are reserved;

can0Type:若channel字段的CAN0为1时本字段有效,含义:0表示 CAN帧,1表示CANFD帧;can0Type: This field is valid if CAN0 of the channel field is 1, meaning: 0 means CAN frame, 1 means CANFD frame;

can0FrameType:若channel字段的CAN0为1时本字段有效,含义:0 表示标准帧,1表示扩展帧。can0FrameType: This field is valid if CAN0 of the channel field is 1, meaning: 0 means standard frame, 1 means extended frame.

上位机收到执行结果响应的数据包后,根据enable和channel字段判断通 道是否操作成功并显示提示信息。After the host computer receives the data packet of the execution result response, it judges whether the operation of the channel is successful according to the enable and channel fields and displays the prompt information.

当前文件列表循环的序号、循环的次数,当前循环的文件序号、文件总数、 当前正在回放的文件名称或当前回放的进度条中一种或多种。The sequence number of the current file list loop, the number of loops, the file sequence number of the current loop, the total number of files, the name of the file currently being played back, or one or more of the current playback progress bar.

以上所述的仅是本发明的优选实施方式,本发明不限于以上实施例。本领 域的技术人员可以清楚,该实施例中的形式不局限于此,同时可调整方式也不 局限于此。可以理解,本领域技术人员在不脱离本发明的基本构思的前提下直 接导出或联想到的其他改进和变化,均应认为包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention, and the present invention is not limited to the above embodiments. Those skilled in the art can understand that the form in this embodiment is not limited to this, and the adjustable manner is also not limited to this. It can be understood that other improvements and changes directly derived or thought of by those skilled in the art without departing from the basic concept of the present invention should all be considered to be included within the protection scope of the present invention.

Claims (12)

1.一种数据回放方法,其特征在于,至少包括:1. a data playback method, is characterized in that, comprises at least: 建立回放通信路径连接,在回放通信路径连接中采用的回放输出设备中选择数据回放所需的输出通道接口;Establish a playback communication path connection, and select the output channel interface required for data playback in the playback output device used in the playback communication path connection; 配置回放路径所需的回放参数并选择所需回放数据文件;Configure the playback parameters required by the playback path and select the desired playback data file; 通过所述输出通道接口输出回放数据。The playback data is output through the output channel interface. 2.如权利要求1所述一种数据回放方法,其特征在于,根据回放参数设置时把所需的输出通道接口和所需的输出通道接口对应的关联的参数一起发送给回放输出设备。2 . A data playback method as claimed in claim 1 , wherein the required output channel interface and the associated parameters corresponding to the required output channel interface are sent to the playback output device together according to the playback parameter setting. 3 . 3.如权利要求1所述一种数据回放方法,其特征在于,回放通信路径的连接是基于上位机与回放输出设备进行交互。3 . The data playback method according to claim 1 , wherein the connection of the playback communication path is based on the interaction between the host computer and the playback output device. 4 . 4.如权利要求1所述一种数据回放方法,其特征在于,回放输出设备收到回放通信路径发送控制命令后,执行关联的参数设置和模式切换,将执行结果响应发送给上位机。4 . A data playback method according to claim 1 , wherein after receiving the control command sent by the playback communication path, the playback output device executes associated parameter setting and mode switching, and sends the execution result response to the host computer. 5 . 5.如权利要求1至4任一项所述数据回放方法,其特征在于,输出通道接口至少包括:TE0、TE1、RJ45、CAN0、CAN1中的一种。5. The data playback method according to any one of claims 1 to 4, wherein the output channel interface comprises at least one of: TE0, TE1, RJ45, CAN0, and CAN1. 6.如权利要求1所述一种数据回放方法,其特征在于,所述回放参数至少包括:设置回放列表,选择单次回放或循环回放;6. A data playback method according to claim 1, wherein the playback parameters at least include: setting a playback list, and selecting single playback or loop playback; 如果是循环回放,设置循环的次数和/或无限循环,同时设置回放文件之间的间隔时间和/或设置每个数据包之间的间隔时间。In case of loop playback, set the number of loops and/or infinite loop, and set the interval time between playback files and/or set the interval time between each data packet. 7.如权利要求1所述一种数据回放方法,其特征在于,传输回放参数的数据包报文至少包括:7. a kind of data playback method as claimed in claim 1 is characterized in that, the data packet message of transmitting playback parameter comprises at least: dstAddr:目的物理地址;dstAddr: destination physical address; srcAddr:源物理地址;srcAddr: source physical address; enable:通道总开关;enable: channel master switch; channel:8bit字段,每个Bit代表一个通道的开关,1表示开,0表示关,依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: 8bit field, each Bit represents the switch of a channel, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3 bits are reserved; can0Type:若channel字段的CAN0为1时本字段有效,含义:0表示CAN帧,1表示CANFD帧;can0Type: This field is valid if CAN0 of the channel field is 1, meaning: 0 means CAN frame, 1 means CANFD frame; can0FrameType:若channel字段的CAN0为1时本字段有效,含义:0表示标准帧,1表示扩展帧。can0FrameType: This field is valid if CAN0 of the channel field is 1, meaning: 0 means standard frame, 1 means extended frame. 8.如权利要求4所述一种数据回放方法,其特征在于,执行结果响应发送的数据包报文至少包括:8. a kind of data playback method as claimed in claim 4 is characterized in that, the data packet message sent in response to execution result at least comprises: dstAddr:目的物理地址;dstAddr: destination physical address; srcAddr:源物理地址;srcAddr: source physical address; enable:通道总开关;enable: channel master switch; channel:分为8Bit,每个Bit代表一个通道的开关,1表示开,0表示关,依次为TE0、TE1、RJ45、CAN0、CAN1,剩余3Bit保留;channel: divided into 8Bit, each Bit represents a channel switch, 1 means on, 0 means off, followed by TE0, TE1, RJ45, CAN0, CAN1, and the remaining 3Bit are reserved; 或frameType:帧类型;或packIdx:数据包序号,从1开始递增;或ctrlType:模式类型。Or frameType: frame type; or packIdx: packet sequence number, increasing from 1; or ctrlType: mode type. 9.如权利要求4所述一种数据回放方法,其特征在于,上位机收到执行结果响应的数据包后,根据enable和channel字段判断通道是否操作成功并显示提示信息。9. A kind of data playback method as claimed in claim 4, is characterized in that, after the host computer receives the data packet of the execution result response, according to enable and channel field, judges whether the channel is operated successfully and displays prompt information. 10.如权利要求4所述一种数据回放方法,其特征在于,显示提示信息至少包括:当前文件列表循环的序号、循环的次数,当前循环的文件序号、文件总数、当前正在回放的文件名称或当前回放的进度条中一种或多种。10. a kind of data playback method as claimed in claim 4 is characterized in that, displaying prompt information at least comprises: the serial number of current file list loop, the number of times of loop, the file serial number of current loop, the total number of files, the file name currently being played back or one or more of the current playback progress bar. 11.一种数据回放装置,其特征在于,包括上位机和回放输出设备,上位机与回放设备进行通信,上位机存储有数据回放程序,当数据回放程序被执行时,致使所处上位机实现权利要求1-10任一项所述方法中的步骤。11. a data playback device, it is characterized in that, comprise host computer and playback output equipment, host computer communicates with playback equipment, host computer is stored with data playback program, when data playback program is executed, causes the host computer to realize. Steps in the method of any one of claims 1-10. 12.一种存储有计算机程序的计算机可读存储介质,其特征在于,当所述计算机程序被处理器执行时,致使所述处理器实现权利要求1-10任一项所述方法中的步骤。12. A computer-readable storage medium storing a computer program, characterized in that, when the computer program is executed by a processor, the processor is caused to implement the steps in the method of any one of claims 1-10 .
CN202210329403.5A 2022-03-30 2022-03-30 A data playback method, device and storage medium Pending CN114780288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210329403.5A CN114780288A (en) 2022-03-30 2022-03-30 A data playback method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210329403.5A CN114780288A (en) 2022-03-30 2022-03-30 A data playback method, device and storage medium

Publications (1)

Publication Number Publication Date
CN114780288A true CN114780288A (en) 2022-07-22

Family

ID=82426991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210329403.5A Pending CN114780288A (en) 2022-03-30 2022-03-30 A data playback method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114780288A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572641A (en) * 2009-05-26 2009-11-04 阴晓峰 CAN bus based controller network monitoring system and monitoring method
WO2018196655A1 (en) * 2017-04-26 2018-11-01 广州睿嵌电子技术有限公司 Public network communication method for on-board electronic processing unit system
CN110320891A (en) * 2019-07-09 2019-10-11 中车青岛四方车辆研究所有限公司 Rail vehicle braking system CAN bus message maintenance monitoring system and monitoring method
CN113296489A (en) * 2021-04-23 2021-08-24 东风汽车集团股份有限公司 Driving controller hardware open loop test method, device, equipment and storage medium
CN114120481A (en) * 2021-11-19 2022-03-01 北京经纬恒润科技股份有限公司 CAN data acquisition method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101572641A (en) * 2009-05-26 2009-11-04 阴晓峰 CAN bus based controller network monitoring system and monitoring method
WO2018196655A1 (en) * 2017-04-26 2018-11-01 广州睿嵌电子技术有限公司 Public network communication method for on-board electronic processing unit system
CN110320891A (en) * 2019-07-09 2019-10-11 中车青岛四方车辆研究所有限公司 Rail vehicle braking system CAN bus message maintenance monitoring system and monitoring method
CN113296489A (en) * 2021-04-23 2021-08-24 东风汽车集团股份有限公司 Driving controller hardware open loop test method, device, equipment and storage medium
CN114120481A (en) * 2021-11-19 2022-03-01 北京经纬恒润科技股份有限公司 CAN data acquisition method, device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李中立;黄菊花;郭伟春;: "基于LabVIEW的汽车网络监控系统研究", 测控技术, no. 02, 18 February 2013 (2013-02-18) *
谢东坡;张仪栋;周亮;颜永福;徐建勋;: "基于SAE J1939协议的客车ECU参数测试系统", 汽车技术, no. 12, 24 December 2010 (2010-12-24) *

Similar Documents

Publication Publication Date Title
Li et al. A design for automotive CAN bus monitoring system
CN108536121B (en) Method and device for establishing logical channel and vehicle communication interface VCI
CN109532720A (en) A kind of intelligent automobile of the ethernet gateway with rear configuration feature
CN110386064B (en) In-vehicle camera control system, method, in-vehicle device, and car
CN106325231A (en) Method and system for remote fault detection of vehicles on production line
CN108667679B (en) Conversion method and device
US10764210B2 (en) Operation method of communication node for mirroring in vehicle network
CN114545906A (en) Vehicle-mounted Ethernet gateway and vehicle
US8996248B2 (en) Virtual sensor network system and method for convergence of heterogeneous sensors
CN114785474B (en) In-vehicle SOME/IP transmission method and device based on TSN time-sensitive network
CN117951017A (en) Intelligent driving automatic simulation test method and system
CN106713092A (en) Conversion system for vehicle-mounted CAN bus data and FlexRay bus data and conversion method thereof
CN109347965A (en) A communication method, device and related equipment
CN116383073A (en) Digital key testing system
CN112181464A (en) Off-vehicle upgrading method, system, medium and device
CN114780288A (en) A data playback method, device and storage medium
CN102710656B (en) Communication protocol inverse analysis method based on automotive gateway system
CN102681526A (en) CAN (controller area network) bus system and fault diagnosis method thereof
CN114995353A (en) Vehicle diagnosis method, device and system
CN118803658A (en) Vehicle data processing method, system, computer device, readable storage medium and program product
CN109683470A (en) A kind of software and hardware self-adaptive matching method, device and driving device
CN110138840B (en) Parallel refreshing method based on vehicle-mounted Ethernet
CN102710479A (en) Automobile gateway system for inverse resolution of communication protocols
US12087101B2 (en) Smart control device for vehicle factory and vehicle control method using the same
CN115601852A (en) Method, device and vehicle for processing vehicle data

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
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Room 403, block a, 1018 dongsanliqiao Road, Pudong New Area, Shanghai 200125

Applicant after: Heqian Automotive Technology (Shenzhen) Co.,Ltd.

Address before: Room 403, block a, 1018 dongsanliqiao Road, Pudong New Area, Shanghai 200125

Applicant before: SHANGHAI HINGE ELECTRONIC TECHNOLOGIES Co.,Ltd.

Country or region before: China