Processing method for bus, bus communication device, system and program product
By introducing the packet transmission condition judgment and sending functions of simulation nodes in the bus communication device, the problem of single functions and limited real-time functionality of the existing bus communication device is solved, and efficient testing, calibration and diagnosis of real bus devices is realized.
Patent Information
- Application Number
- CN202411281839.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The existing bus communication device has a single function, and the real-time processing is limited by the accuracy and stability of the local time of the host computer and the communication means between the host computer and the bus communication device. It is impossible to effectively realize the testing, calibration and diagnosis of real bus equipment.
Provide a bus communication device, which judges and sends the message transmission conditions through simulation nodes, realizes message transmission to the target bus, enriches the functions of the bus communication device, and reduces the local time and communication means of the host computer to real-time. The impact of
The functions of the bus communication device are improved, the dependence on the local time and communication methods of the host computer are reduced, and the real-time and efficiency of testing, calibration and diagnosis of real bus devices are enhanced.
Smart Images

Figure CN119316250A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of bus technology, and in particular to a bus processing method, a bus communication device, a system and a program product. Background Art
[0002] Bus, such as CAN bus, LIN bus, Flexray bus, vehicle Ethernet bus, etc. Devices can be connected to the bus and communicate based on the bus. Such devices can be understood as real bus devices, such as controllers and sensors in vehicles. In the development process of real bus devices, it is often necessary to connect the real bus devices and devices that process the bus (such as test equipment, calibration equipment, diagnostic equipment, analysis equipment, etc.) to the bus. These devices can test, calibrate, diagnose, analyze, etc. the real bus devices through the bus.
[0003] In the prior art, such devices for processing the bus often include a host computer and a bus communication device. The bus communication device is connected between the host computer and the bus. Various processes are performed in the host computer. At this time, the bus communication device only serves as a bridge for transmitting data between the host computer and the bus. The processing process is all implemented by the host computer. It can be seen that the function of the bus communication device is relatively simple, and the real-time processing will also be limited by factors such as the accuracy and stability of the local time of the host computer, and the communication means between the host computer and the bus communication device. Summary of the invention
[0004] Based on this, it is necessary to provide a bus processing method, bus communication device, system and program product to address the above technical issues.
[0005] In a first aspect, the present application provides a processing method for a bus, wherein a bus communication device used is connected to a target bus, and the target bus is connected to a real bus device, and the method comprises:
[0006] The bus communication device sends a message to the target bus when a message sending condition of a message corresponding to at least one simulation node is satisfied. The simulation nodes are predefined, and each simulation node corresponds to one or a group of messages to be sent.
[0007] In a second aspect, the present application provides a system, characterized in that it includes: a bus communication device and a host computer, and the bus communication device is used to execute the method provided in the first aspect.
[0008] In a third aspect, the present application provides a bus communication device, including a memory and a processor, wherein the memory stores a program, and the processor implements the steps of the method provided in the first aspect when executing the program.
[0009] In a fourth aspect, the present application provides a readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps of the method provided in the first aspect.
[0010] In a fifth aspect, the present application provides a program product, including a program, which implements the steps of the method provided in the first aspect when executed by a processor.
[0011] In the above-mentioned processing method, bus communication device, system and program product for the bus, the bus communication device is not only a bridge between the host computer and the bus, but also can execute message transmission between the simulation node and the bus, and realize the message sending condition judgment and sending function of the simulation node message. Because it is executed by the bus communication device instead of the host computer, the function of the bus communication device is enriched. At the same time, the accuracy and stability of the local time of the host computer, and the communication means between the host computer and the bus communication device and other factors on the real-time performance of the target processing process are greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 An application environment in one embodiment Figure 1 ;
[0014] Figure 2 An application environment in one embodiment Figure 2 ;
[0015] Figure 3 An application environment in one embodiment Figure 3 ;
[0016] Figure 4 An application environment in one embodiment Figure 4 ;
[0017] Figure 5 A schematic diagram of the structure of a bus communication device and system in an embodiment Figure 1 ;
[0018] Figure 6 A schematic diagram of the structure of a bus communication device and system in an embodiment Figure 2 ;
[0019] Figure 7 A schematic diagram of a method in an embodiment Figure 1 ;
[0020] Figure 8 A schematic diagram of a method in an embodiment Figure 2 ;
[0021] Fig. 9 FIG. 4 is a flow chart of step S300 in an embodiment. DETAILED DESCRIPTION
[0022] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0024] It can be understood that the terms "first", "second", etc. used in the present application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
[0025] It should be noted that when an element is considered to be "connected" to another element, it can be directly connected to the other element, or connected to the other element through an intermediate element. In addition, the "connection" in the following embodiments should be understood as "electrical connection", "communication connection", etc. if there is transmission of electrical signals or data between the connected objects.
[0026] When used herein, the singular forms "a", "an", and "said / the" may also include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "include / comprise" or "have" etc. specify the presence of stated features, wholes, steps, operations, components, parts or combinations thereof, but do not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts or combinations thereof.
[0027] In the application scenario of the embodiment of the present application, Figure 1As shown, a bus communication device is used, and the bus communication device can be connected to a bus, and a real bus device can be connected to the bus. In the present application, the bus connected to the real bus device and the bus communication device can be represented as a target bus; in some examples, the bus communication device can perform at least one of testing, calibration, analysis, and recording on the real bus device through the bus, but is not limited to this; the bus communication device can realize the sending and receiving of messages on the bus.
[0028] A real bus device can be understood as any electronic device that can be connected to a bus and send and / or receive messages on the bus. A real bus device can be in the development process or already developed. In some examples, a real bus device can include a device that can be installed in a vehicle after development and connected to a bus in the vehicle. Specifically, a real bus device can be a controller (such as an ECU), a sensor, etc. In some examples, a real bus device can also include: a test bench.
[0029] The bus can be any bus. For example, it can be any of the following buses: CAN bus, LIN bus, Flexray bus, vehicle Ethernet bus, DSI3 bus, PSI5 bus, etc. In one example, if it is mainly used in the vehicle field, the bus usually refers to the vehicle bus. Of course, the vehicle bus only indicates that this type can be used in vehicles or is often used in vehicles, and does not mean that the bus involved in the embodiments of the present application is a bus that is already installed in the vehicle, so the bus can be already installed in the vehicle or not installed in the vehicle.
[0030] The real bus device and the bus communication device may be connected via one bus or multiple buses. For example, the real bus device is an ECU, and the ECU is connected to the bus communication device via a vehicle Ethernet bus, a CAN bus, a LIN bus, or a Flexray bus.
[0031] The bus can be connected to one real bus device or multiple real bus devices. For example, the real bus device is an ECU as a device under test. Sensors and / or test benches can also be connected to the bus as real bus devices. Furthermore, in one example, the operating signal of the test bench can be fed back to the ECU via the bus, and the control signal of the ECU can be fed back to the test bench via the bus. If the bus communication device needs to monitor the bus, the messages of these signals can also be monitored. For another example, multiple real bus devices can also be ECUs that need to be tested jointly.
[0032] There may be one or more bus communication devices. For example, if the interface of a single bus communication device is not sufficient to complete the test of the ECU (i.e., a real bus device), multiple bus communication devices may be used. The bus communication devices may or may not have a mechanism for mutual communication. The mechanism for mutual communication may be, for example: the bus communication devices may be cascaded through network cables, optical fibers, etc., or may be connected to the same Ethernet switch.
[0033] The bus communication device can be a device capable of running an embedded operating system, for example, it can be configured with a processor and memory sufficient to run an embedded operating system (such as Linux, EOS, Windows CE, etc.), and the processor reads the program in the memory to implement the functions of the bus communication device. Furthermore, the bus communication device can be more efficiently suitable for implementing message sending and / or message receiving between the simulation node and the bus, and in some examples, feedback display of the bus message can also be implemented.
[0034] In one exemplary specific application scenario, during the development of the real bus device (for example, when the real bus device is not installed in a vehicle for use), the real bus device and the bus communication device can be connected to the bus. In another exemplary specific application scenario, the bus communication device is installed in the vehicle and connected to the bus already used in the vehicle, and the real bus device is a real bus device that has been put into use in the vehicle.
[0035] In addition, the application scenarios of the embodiments of the present application are not limited thereto, for example, they may be in the fields of aerospace, electricity, etc.
[0036] For one example, please refer to Figure 2 , Figure 3 and Figure 4 The bus communication device can be connected to the host computer. Specifically, the bus communication device can be connected to the host computer via a USB cable or a network cable. In addition, the possibility of connecting to the host computer via other communication means such as optical fiber is not excluded.
[0037] In some examples, the host computer may be configured with target software, and the user who logs in to the target software can influence and / or observe the message transmission on the bus in the host computer. This influence and / or observation may be generated before the target processing of the bus is started, or after the target processing is started, or after the target processing is completed; for example, the relevant matters of the target processing required by the bus communication device are pre-configured, that is, pre-defined. Regardless of the target software configured in the host computer, as long as the solution of the bus communication device of the present application is used to achieve the target processing, it does not deviate from the scope of the embodiments of the present application.
[0038] In some examples, a terminal device other than the host computer can also be used, which can be configured with target software. The target software of the host computer and the terminal device can be the same or different; the user who logs in to the target software can influence and / or observe the target processing in the terminal device, and this influence and / or observation can be generated before the target processing is started, or after the target processing is started, or after the target processing is completed; in terms of communication methods, Figure 3 In the illustrated solution, the terminal devices can be connected to the bus communication device via a local area network and / or the Internet; Figure 4 In the solution shown, the terminal device can be connected to the host computer through a local area network and / or the Internet, and then interact with the bus communication device through the host computer.
[0039] In one application scenario, the host computer can be a device connected to the bus communication device via USB, and the terminal device can be a device that needs to interact with the bus communication device via the Internet. As a result, the limitation that real-time influence and / or real-time observation of target processing (such as testing processing of real bus devices via the bus) can only be achieved on site is broken through. For example, some personnel can influence and / or observe target processing (such as testing processing of real bus devices via the bus) through the host computer on site in the laboratory or R&D site, and other personnel can influence and / or observe target processing through terminal devices at home, in the office or anywhere else.
[0040] Figure 5 and Figure 6 Two architectures of the bus communication device are given as examples, but the specific structure of the bus communication device is not limited thereto.
[0041] Please refer to Figure 5 and Figure 6The bus communication device may include a processor (sufficient to run an embedded operating system, such as a Linux system), an FPGA, a USB module, a CAN module, a LIN module, a Flexray module, and an in-vehicle Ethernet module, wherein the FPGA is connected to a host computer via a USB module and a USB cable, the FPGA is connected to a CAN bus via a CAN module, the FPGA is connected to a LIN bus via a LIN module, the FPGA is connected to a Flexray bus via a Flexray module, and the FPGA is connected to an in-vehicle Ethernet bus via an in-vehicle Ethernet module. The FPGA may realize communication between the processor and each communication module (i.e., a USB module, a CAN module, a LIN module, a Flexray module, an in-vehicle Ethernet module, etc.). In one example, each communication module may, for example, include a transceiver chip of a corresponding communication protocol, such as a USB transceiver chip, a CAN transceiver chip, a LIN transceiver chip, a Flexray transceiver chip, an in-vehicle Ethernet transceiver chip, etc. In another example, each communication module may, for example, include an interface for transmitting corresponding signals.
[0042] Further, in Figure 6 In the scheme shown, a network communication module is provided in the bus communication device, and the network communication module is also connected to the FPGA. At this time, the terminal device can interact with the bus communication device through the network communication module without going through the host computer, for example, through a local area network and / or the Internet. The network communication module can be a network communication module of a mobile network such as 4G, 5G, 6G, or a network communication module such as Wifi, Bluetooth, etc.
[0043] The embodiment of the present application provides a processing method for a bus, wherein the bus communication device used is connected to a target bus, and the target bus is connected to a real bus device, wherein the target bus can refer to Figures 1 to 6 And the bus mentioned in the relevant content of the specification is understood; that is, the target bus mentioned in the specification of this application is: the bus connecting the bus communication device and the real bus device.
[0044] Please refer to Figure 7 , the processing method for the bus includes:
[0045] S100: the bus communication device starts target processing on the target bus in response to a start instruction from the outside;
[0046] S200: The bus communication device sends the message to the target bus when a message sending condition of the message corresponding to at least one simulation node is satisfied;
[0047] Wherein, the at least one simulation node is predefined.
[0048] The start instruction can be understood as an instruction for starting target processing.
[0049] In one example, the start instruction may be sent from the host computer to the bus communication device. In another example, it may be sent from a terminal device to the bus communication device. In another example, it may be configured as follows: both the host computer and the terminal device give start instructions, and the bus communication device responds to these start instructions and starts the target processing only after both the host computer and the terminal device give start instructions. In another example, it may be configured as follows: both the host computer and the terminal device give start instructions, and the bus communication device responds to these operation instructions and starts the target processing as long as it receives any start instruction. In another example, the bus communication device may also be triggered by an interactive component (such as a button) provided on the bus communication device, and the start instruction is obtained based on the trigger. In addition, step S100 may be present before step S200, for example, the target processing process is performed only after the target processing is started by step S100, which includes: step S200. Step S100 may not be present before step S200, for example, the target processing process may be entered after the target software is opened, thereby executing step S200. For another example, the target processing process may be entered after the bus communication device is turned on or powered on, and step S200 is executed. For another example, step S200 is executed after the host computer is connected.
[0050] In one example, the host computer and the terminal device can log in different users. Furthermore, regarding the startup instruction, it can also be configured that only a specific user or a specific device is allowed to issue the startup instruction, or: only the startup instruction issued by a specific user or a specific device can trigger step S100, that is, the bus communication device only starts the target processing of the target bus in response to the startup instruction issued by the specific user through the host computer or the terminal device.
[0051] The target processing can be understood as: any step or processing implemented after the target processing is started (i.e. any step or processing that is directly or indirectly triggered to be executed due to the start of the target processing) can be understood as part of the target processing. For example, the processing process of step S200 and step S300 mentioned in the specification of this application can be understood as part of the target processing, especially the processing process automatically executed by the bus communication device can be understood as part of the target processing. The target processing can include some or all of the following: testing, calibration, diagnosis, analysis, etc.
[0052] The simulation node, which can also be expressed as a simulation unit or a simulation module, refers to a node, unit, or module that is specifically configured with one or a series of messages to be sent. Different simulation nodes can be distinguished by the identifier of the simulation node. The difference between different simulation nodes is at least reflected in: the corresponding messages to be sent are different, that is, for at least some simulation nodes, the messages corresponding to different simulation nodes are different. Further, the simulation node can be understood as a concept defined for distinguishing different messages (for example, distinguishing by the source of the message, and / or: distinguishing by the sending conditions of the message), and sending messages based on this can help to reasonably and effectively standardize the processing flow of various messages.
[0053] It can be seen that in the present application, whether the message meets the corresponding message sending conditions and needs to be sent is determined by the bus communication device, while in the prior art, the bus communication device is only a bridge for message sending. As long as the message is received, it is sent to the bus. Usually, the host computer decides whether the message has reached the time to be sent.
[0054] In addition, in the prior art, even in the host computer, usually only the messages to be sent are configured, and the concept of simulation nodes is not used, that is, different simulation nodes are not used to distinguish different message combinations to be sent. Therefore, the bus communication device does not need and does not know which simulation node each message corresponds to. In the present application, the bus communication device implements the sending of messages corresponding to the simulation nodes. Therefore, the bus communication device needs to know which messages each simulation node corresponds to and distinguish different simulation nodes for message sending.
[0055] On this basis, it can be easily realized that the message sending of one simulation node does not necessarily affect the message sending of another simulation node, unless the sending condition of a certain message of a simulation node is designed so that the message of another simulation node is sent to the target bus. Otherwise, the sending of messages of different simulation nodes is independent of each other.
[0056] For example, if node A needs to send two messages with a time interval of △t between the two messages, node B needs to send three messages, each message needs to be sent based on the message sending time information, and node C needs to send three messages, each message needs to be triggered by the event of receiving a specific message from the target bus. In this case, the message sending of the three nodes A, B, and C can be implemented independently without affecting each other.
[0057] In order to better achieve the mutual independence of the message sending of the simulation nodes, in an example, the sending condition judgment and sending execution of the message of each simulation node are independent of each other and can be executed in parallel. The bus communication device can construct a processing unit for each simulation node, and each processing unit can execute its own message sending in parallel (including judging whether the message sending condition is met, and sending the message after meeting it). If the bus communication device still needs to assemble the message, the message of each simulation node is assembled by the corresponding processing unit. Furthermore, the corresponding relationship between the simulation node and the constructed processing unit can be one-to-one or non-one-to-one, for example, multiple simulation nodes may correspond to one processing unit.
[0058] In some examples, the processing unit can also be understood as a specific implementation of the simulation node.
[0059] Regardless of the type of simulation node, and regardless of whether a simulation node is used for definition and execution, if it is necessary to implement the sending and receiving of messages, it is often necessary to use a mapping relationship between logical channels and physical channels. Logical channels are usually carriers used to represent signal transmission channels when users configure target processing. For example, corresponding logical channels can be configured for simulation nodes, messages, or even simulation networks. Physical channels refer to channels in bus communication devices that actually communicate with the target bus, and may include corresponding physical interfaces.
[0060] In the prior art, for the target processing executed by the bus communication device within the same time period, the mapping relationship between the logical channel and the physical channel is unique, that is, in the process of the bus communication device executing the target processing, one physical channel can only be mapped to one logical channel. In some examples of the present application, a unique mapping relationship can also be used.
[0061] However, when applied to a technical solution where multiple objects affect target processing, this unique mapping method may be difficult to meet the needs. For example, different users may set up logical channels on different devices according to their own needs and configure physical channels for them. At this time, it may be difficult for users to ensure the uniqueness of the channel mapping relationship and map the different logical channels configured by each user to the same physical channel. Therefore, in some embodiments of the present application, different mapping relationships are configured for target processing executed in the same time period to meet the needs, thereby achieving the mapping of different logical channels to the same physical channel.
[0062] Therefore, in one embodiment, during the target processing, at least part of the messages are exchanged on the target bus by the bus communication device according to at least two different mapping relationships; the at least two different mapping relationships can map at least two different logical channels to the same physical channel, so that: the messages corresponding to the at least two different logical channels can exchange on the target bus via the same physical channel; the at least two different mapping relationships are defined by different objects.
[0063] The simulation nodes that can be created may include, for example, N types of simulation nodes. In some scenarios, N is an integer greater than or equal to 1, and in other scenarios, N may also be an integer greater than or equal to 2. In the implementation of the processing method for the bus, the simulation nodes executed by the bus communication device (i.e., the at least one simulation node) may be of one type or multiple types.
[0064] In one embodiment, for a plurality of different types of simulation nodes, the message sources of different types of simulation nodes are different; the different message sources involved therein can be understood as the messages of the simulation nodes being defined in different ways. If a certain device (such as a host computer and / or a terminal device) is used to predefine the simulation nodes (such as obtaining predefined information of the simulation nodes), different types of simulation nodes are predefined by different operation processes of the target software of the device. For example, in the interactive interface of the target software, an option for selecting the type of simulation node may be provided, and after the selection, the configuration interface for predefining the type of simulation node may be entered, and at this time, the message of the simulation node, the message sending conditions, etc. may be predefined through operation, and the configurable content may also be not limited to this.
[0065] Wherein: the multiple different types of simulation nodes may include at least two of the following: a first type of simulation node, a second type of simulation node, and a specified type of simulation node;
[0066] The message of the first type of simulation node is a user-defined message;
[0067] The message of the second type of simulation node is a pre-recorded message; the pre-recorded message and the sending time information of the pre-recorded message are determined based on the message transmitted on the designated bus during the working process of the designated bus and the corresponding message transmission time;
[0068] The message of the designated class simulation node originates from a designated file, and the designated file includes: a test script, and / or: a database file of a simulation network containing the simulation node. Specifically, the designated file can be divided into designated files of different types, and correspondingly, the designated class simulation node can also be divided into a third type of simulation node corresponding to the test script and a fourth type of simulation node corresponding to the database file.
[0069] Specifically, regardless of whether the designated class of simulation nodes is further divided into third class of simulation nodes and fourth class of simulation nodes, the message sources of the first class of simulation nodes and the second class of simulation nodes are different, the message sources of the first class of simulation nodes and the designated class of simulation nodes are different, and the message sources of the second class of simulation nodes and the designated class of simulation nodes are different.
[0070] In addition, the message source involved therein can be further understood as the source determined by the corresponding operation process in the simulation node definition process (for example, in the process of configuring the simulation node in the host computer and / or the terminal device), and thus it is possible that the messages are completely the same but belong to different types of simulation nodes. For example, the pre-recorded message formed by the pre-recorded message data and its corresponding sending time information, and the custom message manually written by the user according to the pre-recorded message data and its corresponding time interval information, may achieve the same message sending process in the end, but the message source is actually different. At the same time, the pre-recorded message can also be recorded in a specific file, and then, when pre-defining the second type of simulation node, it can also be achieved by importing a specific file, except that the second type of simulation node imports the specific file describing the pre-recorded message and the sending time information, while the designated type of simulation node imports the test script, database file or other designated file.
[0071] Therefore, different types of simulation nodes can also be distinguished from the differences in factors considered in the message sending conditions, and the differentiated processing of different types of simulation nodes in the processing process of the bus communication device can be reflected.
[0072] In one implementation manner, for different types of simulation nodes, the factors considered in the message sending conditions are different;
[0073] in:
[0074] Factors considered in the message sending conditions of the first type of simulation nodes include: time interval information between messages and / or operation information for the first type of simulation nodes;
[0075] The factors considered in the message sending conditions of the second type of simulation nodes include: message sending time information;
[0076] The factors considered in the message sending condition of the designated type simulation node include: whether the designated message is monitored on the target bus.
[0077] Among them, the difference in factors considered in message sending conditions can be understood as: for two types of simulation nodes, there is at least one factor that only exists in the considerations of message sending conditions for one type of simulation node, but not in the considerations of message sending conditions for another type of simulation node.
[0078] Specifically, the factor of "operation information for the first type of simulation node" of the first type of simulation node may not be a consideration factor for the message sending conditions of the second type of simulation node, and thus this factor alone may constitute the difference between the factors considered in the message sending conditions of the first type of simulation node and the second type of simulation node; at the same time, the factor of "operation information for the first type of simulation node" and the consideration factor of the message sending conditions of the non-specified type of simulation node, and the time interval information may not be a consideration factor for the message sending conditions of the second type of simulation node.
[0079] The factor of "whether the specified message is monitored on the target bus" of the specified type simulation node generally does not appear in the consideration factors of the message sending conditions of the second type simulation node and the first type simulation node. Therefore, this factor alone can constitute the difference in the factors considered in the message sending conditions between the first type simulation node and the specified type simulation node, and between the second type simulation node and the specified type simulation node.
[0080] In the above implementation, the different message sources of different types of simulation nodes effectively distinguish and enrich the various possibilities of target processing (such as testing of physical simulation nodes via the target bus) configuration and implementation logic. Taking the target processing as an example, the factors considered in the message source and message sending conditions often determine the test construction logic. Different construction logics have their own test requirements. For example, custom messages are user-defined, so they often reflect the user's understanding of the personalized and differentiated test needs. Pre-recorded messages are pre-recorded, so they reflect the message transmission that has objectively occurred on the bus. For example, it may be more in line with the actual situation, or it may be a reproduction of the message transmission process that has occurred, which is convenient for comparative observation and analysis; for another example, the test script may facilitate users to define more complex and comprehensive test processes, and it may also facilitate the import of test scripts written by other software to improve efficiency; for another example, the database file may facilitate users to define relatively standardized tests, such as reproducing the simulation network architecture that has been used, and it may also facilitate the import of database files written by other software to improve efficiency. Of course, the types of simulation nodes are not limited to first-class simulation nodes, second-class simulation nodes, and designated-class simulation nodes (which can be further divided into third-class simulation nodes and fourth-class simulation nodes). For example, if there are other forms of designated files, then the designated-class simulation nodes can further have fifth-class simulation nodes.
[0081] In addition, the simulation nodes of the same bus protocol can constitute a corresponding test network. For example, the simulation nodes of the CAN bus can constitute a CAN simulation network, the simulation nodes of the vehicle Ethernet bus can constitute a vehicle Ethernet simulation network, and the simulation nodes of the LIN bus can constitute a LIN simulation network, and so on for each bus protocol. In a specific example, taking a certain ECU under test as the real bus device, the messages corresponding to several simulation nodes of the CAN bus are transmitted to the ECU through the CAN bus; at the same time, the messages corresponding to several simulation nodes of the vehicle Ethernet bus are transmitted to the ECU through the vehicle Ethernet bus.
[0082] For the first type of simulation node, the first simulation node belonging to the first type of simulation node can be taken as an example to describe its construction, configuration, and processing process. That is, in this specification, the first simulation node is described as an embodiment of the first type of simulation node, and various first type simulation nodes implemented in the specific implementation process can be understood by referring to the first simulation node.
[0083] In the host computer or terminal device, the user can first establish an empty simulation network (such as a CAN simulation network, an in-vehicle Ethernet simulation network, etc.), create a first simulation node in the simulation network, and then configure the first simulation node with predefined information of the first simulation node, for example, the message content and / or sending method of a custom message can be configured through the corresponding operation process. After the configuration is completed, the predefined information of the first simulation node can be obtained. Step S200 may include: when the content and / or sending method of the first custom message has not been redefined, the bus communication device sends the first custom message to the target bus based on the predefined information of the first simulation node.
[0084] The predefined information of the first simulation node may include the content and / or sending mode of the first custom message; the sending mode defines at least one of the following: whether to send periodically; the period of the periodic sending; whether to send immediately in response to the manipulation of the manipulation object; whether to start the periodic sending in response to the manipulation of the manipulation object; whether to turn off the periodic sending in response to the manipulation of the manipulation object;
[0085] In one example, the predefined information of the first simulation node can be used to define: the content of a first custom message, and the first custom message is triggered and sent in response to a click of a button in a host computer or a key on a keyboard (both buttons and keys can be regarded as control objects). Correspondingly, the bus communication device will determine whether the corresponding device (such as the host computer and / or terminal device) receives a trigger signal generated by the click. The trigger signal can be understood as a kind of operation information. It can be seen that the predefined information of the first simulation node can pre-define the sending method of the first simulation node as: triggered by a click of a button or a key on a keyboard (both buttons and keys can be regarded as control objects), which is the message sending condition of the custom message. The bus communication device can send the corresponding first custom message when the click is detected.
[0086] In another example, the predefined information of the first simulation node can be used to define: the content of a first custom message; the first custom message is sent periodically, and the period of the periodic sending; correspondingly, after the target processing is started or the first custom message is started for periodic sending by the operation information, the bus communication device will send the first custom message according to the predefined information of the first simulation node and the local time, for example, judging whether the period has been reached according to the local time, and sending the first custom message after reaching it; at this time, the predefined information of the first simulation node can predefine the sending method of the first simulation node as: periodic sending with a corresponding period, and the judgment of whether the period has been reached is the message sending condition of the first custom message; of course, whether the periodic sending has been turned on can also be used as one of the message sending conditions;
[0087] Among them, the periodically sent may be the same first custom message, or may include multiple different first custom messages. In one example, each first custom message is predefined. In another example, the differences and / or correlations of the first custom messages may be predefined. For example, the first custom message of each period is obtained by performing a preset operation on the basis of the custom message of the previous period, such as adding one.
[0088] In addition, for the first custom message sent periodically, the first simulation node can be pre-defined whether it needs to turn on or off the periodic sending in response to the manipulation of the manipulation object. For example, the periodic sending can be turned on and off by clicking a button in the host computer or terminal device or a key on the keyboard (buttons and keys can be regarded as manipulation objects). The trigger signal generated by the click can also be regarded as a kind of operation information. In some examples, as long as the periodic sending is configured, it can also be configured so that the periodic sending is automatically turned on after the target processing is started.
[0089] In the above example that needs to be combined with operation information, the reception of operation information can also be regarded as a message sending condition. At the same time, after the target processing (such as testing) has started, the custom information of the first simulation node can also be adjusted, and for some or all devices (such as the host computer, and for example, some user's terminal devices), a new custom message can also be created.
[0090] Among them, for ease of understanding, the custom message created before the target processing starts, that is, the custom message defined in the predefined information of the first simulation node, can be described as the first custom message, regardless of whether the content of the predefined information changes due to the operation information, and the custom message created after the target processing starts is described as the second custom message.
[0091] In one implementation manner, since the first type of simulation node needs to combine operation information, this provides a basis for the joint operation of multiple users (or can be understood as multiple devices).
[0092] Among them, for ease of understanding, the operation information defined by the first object can be described as the first operation information, and the operation information defined by the second object can be described as the second operation information. The first object and the second object can be objects of different objects. The object here can refer to a user, a device, or a combination of a user and a device; for example, the first object and the second object can be different users, or the first object and the second object can be different devices; for another example: the definition of the object can also be designed as: a user defines operation information on a certain device (such as a host computer), then the combination of the user and the device can be regarded as one object, if the user defines operation information on another device, then the combination of the user and the device can be regarded as another object;
[0093] On this basis, the operation information defined by the object may include the operation information defined by the user, the operation information defined by the device, and the operation information defined jointly by the user and the device;
[0094] User-defined operation information can be understood as: the operation information defined by a user through a device (such as a host computer or a terminal device) after the user logs in to the device. Regardless of the device, it is regarded as user-defined operation information;
[0095] The operation information defined by the device can be understood as the operation information defined by a certain device (such as a host computer or a terminal device). At this time, no matter which user logs in, it is regarded as the operation information of the device;
[0096] The operation information jointly defined by the user and the device can be understood as the operation information defined by a user after logging into a device (such as a host computer or a terminal device), and is regarded as the operation information defined by the user + the device.
[0097] The operation information can be understood as information directly or indirectly generated by operation on a device (such as a host computer or a terminal device) that can cause any change in the message sent by the first simulation node. This change can be a change in the message content or a change in the sending method. The change can be a modification of an already created custom message or a newly created custom message.
[0098] In the case of clarifying the above definition, step S200 may include:
[0099] If the bus communication device obtains first operation information for the first simulation node from the outside, then based on the first operation information, a corresponding custom message is sent to the target bus;
[0100] If the bus communication device obtains second operation information for the first simulation node from the outside, it sends a corresponding custom message to the target bus based on the second operation information.
[0101] in:
[0102] The first operation information is defined by a first object, and the second operation information is defined by a second object.
[0103] Furthermore, through the above scheme, during the process of target processing, the influence of multiple objects on the message sending of the first simulation node can be realized, so that each person who needs to influence and observe the target processing (such as testing) can exert influence on the target processing in the way they want, meeting the needs of multiple parties. At the same time, it can also help to limit the influence of some people on the target processing. For example, for some objects, only some or all items of the message sending method of the first simulation node can be defined, and for other objects, the message content and sending method can be defined.
[0104] Among them, if the object represents a combination of a user and a device, then: it can also help meet the needs and restrictions of multiple parties in different scenarios. For example, if a user X uses a host computer on site (i.e., logs in to the host computer), he can be regarded as the first user, and if he uses a terminal device, he can be regarded as the second user. At the same time, another user Y can be regarded as the second user regardless of whether he uses a host computer or a terminal device. In order to distinguish different objects, the bus communication device can obtain corresponding object information (for example, including user information and / or device information, user information is used to indicate the user, such as which user, or at least one of the user's identity, authority, etc., and device information is used to indicate the device, such as whether it is a host computer or a terminal device, which terminal device it is).
[0105] In one example, different objects can also be distinguished to form different matters permissions, especially if the first simulation node is determined by the first object, for example, it is created and predefined by the first object, so as to obtain the predefined information of the first simulation node, then other objects other than the first object are regarded as the second object. At this time, compared with the second object, the first object often has more matters of operation permissions, or it can be understood that: the first object can affect the operational matters of the first simulation node message sending, which are often for the second object. In addition, the operational matters can also be determined by the first object when the first object creates and predefines the first simulation node.
[0106] The first object and the second object may be, for example: the first object refers to the first user and / or the host computer of the bus communication device; the second object refers to the second user and / or a terminal device other than the host computer.
[0107] In one example, the first operation information is used to define at least one of the following: the content of a first custom message that has been created; the sending method of the first custom message, whether the first custom message is sent; the content of a newly created second custom message; the sending method of the second custom message; whether the second custom message is sent; the definition of the newly created second custom message by the first operation information can also be understood as creating a second custom message and defining its content, sending method, etc.; if the content and / or sending method of the first custom message have been defined in the predefined information of the first simulation node, then the definition of the content and / or sending method of the first custom message by the first operation information can be understood as a redefinition or modification thereof.
[0108] In one example, the second operation information is used to define: the sending method of at least part of the custom message, and / or: whether at least part of the custom message is sent; at least part of the custom message that can be defined by the second operation information may refer to only the first custom message, or may include the first custom message and the second custom message. In one example, in order to fully limit the second object, the second operation information can be used only to define whether the custom message is sent but cannot define the sending method.
[0109] The operation information (such as the first operation information and the second operation information) can define whether to send or not, and may include whether to send immediately and / or whether to start periodic sending.
[0110] The sending method that can be defined by the operation information (such as the first operation information and the second operation information) can be understood by referring to the sending method in the predefined information of the first simulation node.
[0111] In one example, when the first simulation node is predefined by the first object, in order to fully limit the second object, the content of the sending method that can be defined by the second operation information may be less than that of the first operation information. For example, only the first operation information can define whether it is periodic sending or immediate sending, but the second operation information cannot. For another example, only the first operation information can define the period, but the second operation information cannot.
[0112] In one example, when the first simulation node is predefined by the first object, the authority to create and define the content of the first simulation node can also be attributed to the first object. In this case, the second object or the bus communication device is set to: prohibit the second object from performing the following operations on the first simulation node: newly create the custom message; modify the content of the custom message. In the specific implementation process, the realization of this result can be performed by the bus communication device. For example, after obtaining the operation information, the bus communication device can determine whether it is the above-mentioned prohibited operation based on the corresponding object information. If so, it will not be executed, and if not, it will be executed; the realization of this result can also be achieved by the second object. For example, in the interactive interface of the second object, the interface part of the prohibited operation is not presented, or the interface part is designed to be unable to be operated. For another example, before sending the second operation information, the device of the second object (such as a terminal device) will determine whether it is the above-mentioned prohibited operation. If so, the second operation information will not be sent.
[0113] If the custom message of the first simulation node needs to be sent periodically, the bus communication device can be periodically sent based on local time and period. Specifically, it can calculate whether the period has been reached based on the local time. Compared with the scheme of using the host computer to judge the period based on the host computer clock (usually network time), the clock will not be affected by poor network signal quality, which effectively improves the time accuracy of sending messages to the bus and avoids affecting the target processing results (such as test results) due to inaccurate and unstable time.
[0114] For the second type of simulation node, the second simulation node belonging to the second type of simulation node can be taken as an example to describe its construction, configuration, and processing process. That is, in this specification, the first simulation node is described as an embodiment of the first type of simulation node, and various second type simulation nodes implemented in the specific implementation process can be understood by referring to the second simulation node.
[0115] In the host computer or terminal device, the user can first establish an empty simulation network (such as a CAN simulation network, an in-vehicle Ethernet simulation network, etc.), create a second simulation node in the simulation network, and then configure the second simulation node with predefined information. For example, the pre-recorded message and the corresponding sending time information can be imported through the corresponding operation process, which can be recorded in the corresponding data storage file, thereby realizing it by importing the data storage file. After the configuration is completed, the predefined information of the second simulation node can be obtained.
[0116] Step S200 may include: the bus communication device sending a pre-recorded message to the target bus based on the predefined information of the second simulation node and the local time of the bus communication device;
[0117] The predefined information of the second simulation node includes the pre-recorded message and the sending time information of the pre-recorded message.
[0118] The pre-recorded message and the sending time information may be determined based on the message transmitted on the designated bus during the operation of the designated bus and the corresponding message transmission time.
[0119] The designated bus may be any bus, for example, a target bus, or a bus that has been put into operation in the vehicle.
[0120] The pre-recorded message can be understood as a message obtained based on the actual message occurring on the designated bus. No matter how or through what means it is pre-recorded and thus applied to the second simulation node, it can be understood as an implementation scheme of the pre-recorded message; the sending time information can be understood as any information used to indicate when the pre-recorded message should be sent to the target bus.
[0121] The pre-recorded message can be the message itself transmitted on the designated bus, or it can be formed by modifying, deleting, or supplementing the message. As long as part or all of the message content of the pre-recorded message is derived from the message transmitted on the designated bus, it can be used as an implementation scheme of the pre-recorded message. The relationship between the sending time information and the message transmission time can be, for example: in one example, the sending time information can be the message transmission time; in another example, the sending time information can be the time converted from the message transmission time. For example, the message transmission time of the two messages is 0 minutes and seconds on January 1, 2010 and 0 minutes and 1 seconds on January 1, 2010, and the sending time information can be 0 minutes and seconds on March 1, 2024 and 0 minutes and 1 seconds on March 1, 2024. It can be seen that the time difference of the message transmission time between the messages transmitted on the designated bus matches (for example, is the same as) the time difference of the sending time information of the corresponding pre-recorded message.
[0122] In addition, the sending time information can be a time represented by the representation of year, month, day, hour, minute, second, microsecond, and millisecond, or a time represented by a time value (such as a millisecond value). For example, the moment when the target processing is started is the origin moment (such as time 0), and the sending time information can be information about the time span from the origin moment. For example, the sending time information is 100 milliseconds, indicating that the corresponding pre-recorded message should be sent to the target bus at 100 milliseconds from the origin moment. Similarly, the message delivery time can also be a time value. In one example, the message delivery time is a time represented by year, month, day, minute, second, and millisecond, which can be converted into a time value of the time span from the origin moment, thereby obtaining the sending time information of the corresponding message.
[0123] Similarly, the local time of the bus communication device can be represented by year, month, day, minute, second, millisecond, etc., or can be represented by a time value. The bus communication device can send the pre-recorded message according to the predefined information of the second simulation node and the local time. For example, it determines whether the sending time information is reached according to the local time, and if so, sends the corresponding pre-recorded message.
[0124] In addition, the local time of the bus communication device can also be configurable. For example, for the second simulation node, the bus communication device can be configured so that the local time of the bus communication device startup moment matches the origin moment of the sending time information, and the two can represent time in the same way. At this time, for some or all other types of simulation nodes, since they do not need to use the absolute time of the local time in most cases, even if the local time is adjusted to adapt to the pre-recorded message, it does not affect the realization of its function. For example, for the first type of simulation node, what needs to be calculated based on the local time is the time interval, and the absolute time may not be concerned. Therefore, even if the first type of simulation node and the second type of simulation node work together and both use the local time of the bus communication device, they will not affect each other.
[0125] For the second type of simulation node, the message sending condition is: the local time reaches the sending time information of the pre-recorded message.
[0126] For the designated class simulation node, the designated simulation node belonging to the designated class simulation node can be taken as an example to describe its construction, configuration, and processing process. That is, in this specification, the designated simulation node is described as an embodiment of the designated class simulation node, and various designated class simulation nodes implemented in the specific implementation process can be understood by referring to the designated simulation node.
[0127] In the host computer or terminal device, the user can first establish an empty simulation network (such as a CAN simulation network, an in-vehicle Ethernet simulation network, etc.), create a specified simulation node in the simulation network, and then configure the specified simulation node with predefined information. For example, the corresponding test cases, database files, etc. can be imported through the corresponding operation process. After the import, the predefined information of the specified simulation node can be obtained.
[0128] The designated class of simulation nodes can be further divided into a third class of simulation nodes and a fourth class of simulation nodes. Furthermore, the at least one simulation node includes: a third simulation node as a third class of simulation node and / or a fourth simulation node as a fourth class of simulation node; the predefined information of the third simulation node is generated based on a predefined test script; the predefined information of the fourth simulation node is generated based on a database file of the imported simulation test network.
[0129] In the test script and / or database file, for the message to be sent, a specific event that triggers the message to be sent can be defined, such as the event of a specific message being monitored on the target bus. The specific message may be sent by a real bus device or other simulation nodes. Then, the corresponding message sending condition is: a specific message is monitored on the target bus. Of course, for a specified type of simulation node, the factors considered in its message sending condition may also include: the time interval information between messages; the message sending time information.
[0130] It can be seen that before step S200, before, after or at the same time as step S200, it also includes: the bus communication device receives predefined information of the simulation node from the outside; the predefined information is used to define the message and / or message sending condition corresponding to the simulation node; for at least some of the simulation nodes, the message of at least some of the simulation nodes is sent to the target bus by the bus communication device based on the predefined information of at least some of the simulation nodes. For some of the first type of simulation nodes whose message content or sending mode is modified by the operation information, it is also possible that the message is not sent based on the predefined information.
[0131] In one implementation, please refer to Figure 8 , the processing method for the bus also includes:
[0132] S300: The bus communication device feeds back message information of at least part of the bus message transmitted on the target bus to the designated device, so that the designated device displays corresponding content in a window based on the message information.
[0133] The designated device can be understood as a device that has a message information display requirement, wherein the designated device may include a host computer and / or a terminal device other than the host computer. Different objects (users and / or devices) may have different display requirements, or may have the same display requirements, and the corresponding devices (host computers or terminal devices) can all be used as designated devices to display the message information they need to display. In one example, the bus communication device can feed back the message information of all monitored messages to the designated device, and the designated device can choose which to display and how to display them according to its needs.
[0134] The bus message may be understood as any message monitored by the target bus during target processing, including messages fed back to the target bus from the bus communication device, and / or messages sent to the target bus from other devices on the target bus (such as physical bus devices).
[0135] The message information may refer to part or all of the message content of the bus message.
[0136] In addition, the message information may also be information converted from part or all of the message content, for example, the temperature information in the bus message may be converted into a specific temperature value and then fed back to the designated device; correspondingly, the bus communication device may be configured to perform the conversion; further, other information related to the bus message may be included, such as information statistically analyzed for the bus message, information obtained by feature tagging and timestamping the bus message, etc., and correspondingly, the bus communication device may be configured to perform at least one of the functions of statistical analysis, feature tag marking, timestamping, etc. Of course, the bus communication device may also only feed back part or all of the content of the bus message to the designated device, and the designated device may perform at least one of the functions of information conversion, statistical analysis, feature tag marking, timestamping, etc.
[0137] The window may refer to any display window that is displayed in a human-computer interactive manner. The content displayed in the window may be the received message information itself, or any content obtained based on the message information, such as information conversion, statistical analysis, feature tag marking, time stamp marking, etc. Regardless of the content based on the message information, regardless of the display mode (text mode, curve mode, chart mode, etc.) in the window, regardless of how many windows are used for display, it can be used as an implementation mode of the present application.
[0138] The bus communication device can feed back the message information of the bus message to the designated device for display during the target processing, so that during the target processing, the user can observe what happens on the target bus.
[0139] In one implementation, please refer to Fig. 9, step S300 may include:
[0140] S310: the bus communication device monitors the bus message transmitted on the target bus;
[0141] S320: The bus communication device marks a timestamp for the bus message based on the local time of the bus communication device, and obtains message information and a corresponding timestamp of the bus message;
[0142] S330: the bus communication device feeds back the message information and the corresponding timestamp of at least part of the bus message to the designated device;
[0143] Furthermore, it can be achieved that: the designated device can display the message information of the corresponding bus message based on the timestamp.
[0144] Among them, monitoring of bus messages can refer to any means that can obtain bus messages transmitted on the bus and provide bus messages and / or their message information for steps S320 and S330, for example, it can include: the bus communication device receives part or all of the bus messages from the target bus, for example, it can also include: obtaining messages sent by the bus communication device to the target bus, and these bus messages can be cached or stored in the bus communication device.
[0145] In one example, a bus communication device can receive bus messages from the bus, that is, all monitored bus messages are received from the target bus, and the timestamps affixed accordingly represent the time when the bus message is monitored, that is, the time when the bus message has been sent to the target bus, thereby ensuring the uniformity of the timestamps. On this basis, since the difference in timestamps can reflect the time interval between messages, the time interval between each message can be accurately reflected based on the uniformity of timestamps.
[0146] The timestamp can be any time used to describe the time when the bus message is delivered to the target bus. The timestamp can be similar in form to describing the year, month, day, minute, second, and millisecond, or similar to describing the time difference between the time when the bus message is delivered to the target bus and a certain moment (such as the origin time when the target process is started, or any other moment). In one example, after a bus message is monitored, the time information of the local time when the bus message is monitored can be used as the timestamp, or: the timestamp can be calculated based on this.
[0147] In one example, if the pre-recorded message of the second type of simulation node is the bus message that occurred previously, the pre-recorded message may have been monitored previously through step S310. At this time, the transmission time information and the timestamp may be the same, and the sending time information of the pre-recorded message can be obtained accordingly.
[0148] In the above scheme, the bus message can be displayed via the timestamp marked by the bus communication device. Since the bus communication device is directly connected to the target bus, the timestamp obtained therefrom can often accurately reflect the time when the bus message is transmitted on the bus.
[0149] In one embodiment,
[0150] In one implementation manner, the designated device may determine the message information to be displayed in the bus message according to its own display requirement information, and display the message information to be displayed based on the timestamp;
[0151] Among them, at least some of the display requirement information of the designated devices are different. In other implementations, the bus communication device may also be responsible for determining the message information to be displayed in the bus message according to the display requirement information of the designated device.
[0152] The display requirement information may be any information describing the display requirement. In one example, the display requirement information may reflect at least one of the following information: the message to be displayed; the information part of the message to be displayed; the statistical analysis content or target to be displayed.
[0153] The display requirement information may also include, for example, any information associated with the display processing method of the specified device, such as the sampling frequency, processing rate, display format, etc. of the information display.
[0154] Correspondingly, the difference in display requirement information may be manifested as at least one of the following: difference in the message to be displayed, difference in the information part of the message to be displayed, difference in the statistical analysis content or target to be displayed; it may also be manifested as difference in display processing method.
[0155] The message information to be displayed can be understood as the message information of the bus message to be displayed corresponding to the corresponding display requirement information. In one example, for all bus messages marked with timestamps, the bus messages required by the corresponding designated device can be selected based on the display requirement information, and these bus messages are used as the bus message information to be displayed; in another example, for all bus messages marked with timestamps, the bus messages required by the corresponding designated device can be selected based on the display requirement information, and then the bus messages are preset processed, and the message information of these bus messages can be obtained after the preset processing. The preset processing can be performed based on the display requirement information, or it can not be performed.
[0156] The preset processing involved may be, for example, extracting part of the information in the message, or converting the extracted information, such as converting the temperature information in the bus message into a specific temperature value, or labeling the message or part of the message, or determining whether the bus message needs to be discarded, and if so, discarding it. Different display processing methods may correspond to different preset processing.
[0157] In one implementation manner, a window message relationship may be provided in the device, and the window message relationship is used to at least represent the window and the message information to be displayed in each window; the display requirement information includes: designated window information, and the designated window information is used to represent the designated window used by the designated device;
[0158] Furthermore, the window and message information (i.e., the message itself and / or information obtained based on the message) can be bound through the window message relationship, and the message information corresponding to various windows can be pre-defined. On this basis, the user can decide what to display and how to display it by selecting the window. There is no need for the user to redefine the display requirement information every time, especially in the target processing (such as testing) process, the user can select the message to be displayed by selecting the window.
[0159] In one example, an object (such as a host computer) can define L types of windows, where L is an integer greater than or equal to 1, so as to obtain the window message relationship corresponding to each window. Then, other objects can obtain the window message relationship of each window of the L types of windows. Before target processing (such as testing), the designated device can select a designated window from the L types of windows, that is, obtain the designated window information. The designated device can obtain the display reference information of the designated window. The display reference information is used to indicate: after obtaining the corresponding message information, how the designated device should display the message information from the bus communication device, for example, in what form (text or icon) it should be displayed.
[0160] During target processing (such as testing), the designated window information can be adjusted by adding, deleting, modifying, etc. the selected window. The bus communication device can obtain the new designated window information and feedback the message information and timestamp based on the new designated window information (i.e., the new display requirement information).
[0161] During or before target processing (e.g., testing), if the window message relationship of a certain window is modified, thereby changing the content to be displayed, the content displayed will be changed for all designated devices that use the window as the designated window, without the need to process the display requirement information of each designated device separately. The permission to modify the window message relationship can be configured as: only the object that created the window can modify it, and it may not be limited to this.
[0162] The embodiment of the present invention further provides a system, including: a bus communication device and a host computer, wherein the bus communication device is used to execute the processing method for the bus in this specification.
[0163] In a further example, the system may also include a terminal device.
[0164] The system may be a test system, a calibration system, a data acquisition system, etc.
[0165] The embodiment of the present invention further provides a bus communication device, including a memory and a processor, wherein the memory stores a program, and the processor implements the steps of the bus processing method of this specification when executing the program. The structure of the bus communication device can refer to Figures 1 to 6 understand.
[0166] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0167] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0168] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A processing method for a bus, characterized in that: The bus communication device used is connected to a target bus, the target bus is connected to a real bus device, and the method comprises: The bus communication device sends a message to the target bus when a message sending condition of a message corresponding to at least one simulation node is satisfied. The simulation nodes are predefined, and each simulation node corresponds to one or a group of messages to be sent.
2. The method according to claim 1, characterized in that For different types of simulation nodes, the factors considered in the message sending conditions are different; Among them, the various different types of simulation nodes include: first-type simulation nodes, second-type simulation nodes; Factors considered in the message sending conditions of the first type of simulation nodes include: time interval information between messages and / or operation information for the first type of simulation nodes; The factors considered in the message sending conditions of the second type of simulation nodes include: message sending time information.
3. The method according to claim 1, characterized in that For the multiple different types of simulation nodes, the message sources of the different types of simulation nodes are different; wherein: the multiple different types of simulation nodes include at least two of the following: a first type of simulation node, a second type of simulation node, and a designated type of simulation node; The message of the first type of simulation node is a user-defined message; The message of the second type of simulation node is a pre-recorded message; the pre-recorded message and the sending time information of the pre-recorded message are determined based on the message transmitted on the designated bus during the working process of the designated bus and the corresponding message transmission time; The message of the simulation node of the designated type originates from a designated file, and the designated file includes: a test script file, and / or: a database file of the simulation network.
4. The method according to claim 1, characterized in that: The bus communication device further comprises: before sending a message to the target bus when a message sending condition of a message corresponding to at least one simulation node is satisfied: The bus communication device receives predefined information of the simulation node from the outside; the predefined information is used to define the message and / or message sending condition corresponding to the simulation node; for at least some of the simulation nodes, the message of at least some of the simulation nodes is sent to the target bus by the bus communication device based on the predefined information of at least some of the simulation nodes; The bus communication device starts a target process on the target bus in response to a start command from the outside.
5. The method according to claim 1, characterized in that: The at least one simulation node includes a first simulation node as a first type of simulation node; The bus communication device sends the message to the target bus when a message sending condition of the message corresponding to at least one simulation node is met, including: If the bus communication device obtains operation information for the first simulation node from the outside, then based on the operation information, a corresponding custom message is sent to the target bus; in: The operation information is used to define at least one of the following: the content of the first custom message that has been created; the sending method of the first custom message, and whether the first custom message is sent; the content of the newly created second custom message; the sending method of the second custom message; and whether the second custom message is sent.
6. The method according to any one of claims 1 to 5, characterized in that: The predefined information of the first simulation node as the first type of simulation node in the at least one simulation node includes the content and / or sending mode of the first custom message; the sending mode defines at least one of the following: whether to send periodically; the period of the periodic sending; whether to send immediately in response to the control of the control object; Whether to start periodic transmission in response to the control of the control object; Whether to turn off periodic transmission in response to manipulation of the manipulated object; The bus communication device sends the message to the target bus when a message sending condition of the message corresponding to at least one simulation node is met, including: In the case where the content and / or sending method of the first custom message are not redefined, the bus communication device sends the first custom message to the target bus based on the predefined information of the first simulation node.
7. The method according to any one of claims 1 to 5, characterized in that: Also includes: The bus communication device monitors the bus messages transmitted on the target bus; The bus communication device marks a timestamp for the bus message based on the local time of the bus communication device, and obtains the message information and the corresponding timestamp of the bus message; The bus communication device feeds back at least part of the message information of the bus message and the corresponding timestamp to the designated device, so that: the designated device can display the message information of the corresponding bus message based on the timestamp, and the designated device includes a host computer and / or a terminal device other than the host computer.
8. A system, characterized in that: include: A bus communication device and a host computer, wherein the bus communication device is used to execute the method described in any one of claims 1-7.
9. A bus communication device, comprising a memory and a processor, wherein the memory stores a program, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A program product, comprising a program, characterized in that When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Multi-channel bus data simulation system
CN104765709A
Intelligent substation message simulation test and association analysis system, and simulation method
CN104868599A
Method and system for lowering automobile bus load
CN109639543A
Communication message processing method and device, terminal equipment and storage medium
CN113242254A
Message sending method and device and computer equipment
CN113489653A