Data transfer device and data transfer program
The data transfer device uses a buffer memory with varied frame sizes and dynamic frame selection to manage buffer sizes efficiently, addressing the challenge of simultaneous ECU message handling without system restrictions or processing load increases.
Patent Information
- Application Number
- JP2023215817
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-07-03
AI Technical Summary
Existing data transfer devices face challenges in managing buffer sizes appropriately without restricting system use cases or increasing processing load, particularly when receiving diagnostic messages from multiple ECUs simultaneously.
The data transfer device employs a buffer memory with multiple buffer frames of varying sizes and a system to dynamically select the appropriate buffer frame based on message length notifications, ensuring efficient storage without reducing the number of ECUs or dynamically allocating buffer areas.
This approach effectively manages buffer sizes, preventing restrictions on system use cases and processing load increases by efficiently utilizing buffer frames, allowing simultaneous message handling from multiple ECUs.
Smart Images

Figure 2025099279000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data transfer device and a data transfer program.
Background Art
[0002] A plurality of electronic control units (hereinafter referred to as ECUs (Electronic Control Units)) are mounted on a vehicle. With the increasing functionality of vehicles and the like, the number of ECUs mounted on vehicles tends to increase. For example, in data communication between a diagnostic tool and an ECU, DoIP (Diagnostics over Internet Protocol), a diagnostic protocol based on Ethernet (registered trademark), is adopted as a communication protocol for realizing high-speed and large-capacity data communication.
[0003] On the other hand, it is difficult for all ECUs mounted on a vehicle to support DoIP, and there are cases where an ECU that can only support DoCAN, a diagnostic protocol based on CAN (registered trademark), is connected. Therefore, in order to enable data communication between a diagnostic tool connected to Ethernet and an ECU that only supports DoCAN, a data transfer device intervening between the diagnostic tool and the ECU needs to have a function of protocol conversion between DoIP and DoCAN (see, for example, Patent Document 1).
Prior Art Documents
Patent Documents
[0004]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0005] In a diagnostic tool, a diagnostic request message may be sent to a plurality of ECUs to be diagnosed simultaneously. Therefore, in the data transfer device, there is a possibility of receiving diagnostic response messages from a plurality of ECUs simultaneously, and it is necessary to prepare buffer frames larger than the maximum length of the messages received from the ECUs that can be the diagnosis targets, for the number of ECUs that can be the diagnosis targets. However, with such a configuration, the buffer size will increase inappropriately. In this regard, it is conceivable to reduce the number of ECUs to be diagnosed or to dynamically allocate buffer areas according to the lengths of the messages received from the ECUs.
[0006] However, in the measure of reducing the number of ECUs to be diagnosed, there is a problem that the use cases of the entire system are restricted. In the measure of dynamically allocating buffer areas according to the lengths of the messages, there is a problem that the processing load increases because processing for eliminating fragmentation that occurs when dynamically securing buffer areas is required. Such problems occur not only when diagnostic response messages are received simultaneously from a plurality of ECUs to be diagnosed, but also, for example, when ECU information is received simultaneously from a plurality of ECUs at the time of collecting ECU information in software update.
[0007] The present invention has been made in view of the above circumstances, and an object thereof is to provide a data transfer device and a data transfer program capable of appropriately suppressing the buffer size without causing restrictions on the use cases of the entire system and an increase in processing load.
Means for Solving the Problem
[0008] According to the invention described in claim 1, the data transfer device (7) transfers messages between an external device and an electronic control device. The buffer memory (19b) stores messages received from either the external device or the electronic control device, and has a plurality of buffer frames with different buffer sizes. The message length specifying unit (28) specifies the message length indicating the length of the message to be received hereafter based on a message length notification message received from either the external device or the electronic control device. The corresponding buffer frame specifying unit (29) specifies, as the corresponding buffer frame, a buffer frame among the plurality of buffer frames that exceeds the message length specified by the message length specifying unit. The availability determination unit (30) determines the availability of the corresponding buffer frame. The storage control unit (31) stores the message received from either the external device or the electronic control device in the corresponding buffer frame when the availability of the corresponding buffer frame is determined by the availability determination unit.
[0009] The buffer memory for storing messages received from either the external device or the electronic control device is configured to have a plurality of buffer frames with different buffer sizes, and among the plurality of buffer frames, a buffer frame that exceeds the message length of the message to be received hereafter is specified as the corresponding buffer frame. When the availability of the corresponding buffer frame is specified, the message received from either the external device or the electronic control device is stored in the corresponding buffer frame. Thereby, it is not necessary to reduce the number of electronic control devices, nor is it necessary to dynamically allocate buffer areas according to the message length, so that the buffer size can be appropriately suppressed without causing restrictions on the use cases of the entire system or an increase in processing load.
Brief Description of the Drawings
[0010]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Mode for Carrying Out the Invention
[0011] Hereinafter, embodiments will be described with reference to the drawings. As shown in FIG. 1, a vehicle system 1 mounted on a vehicle includes a central ECU 2 that functions as a central gateway, and a plurality of ECUs 3 to 6 that are each a diagnostic target. The first ECU 3 and the second ECU 4 support DoCAN, which is a CAN-based diagnostic protocol. The fourth ECU 5 and the fourth ECU 6 support DoIP, which is an Ethernet-based diagnostic protocol. That is, the vehicle system 1 is a system in which DoCAN and DoIP coexist as diagnostic protocols. The ECUs 3 to 6 are, for example, ECUs having a function of controlling a drive system, ECUs having a function of controlling an ADAS (Advanced Driving Assistant System) system, ECUs having a function of controlling a multimedia system, and the like.
[0012] The central ECU 2 includes a diagnostic gateway (hereinafter referred to as diagnostic GW (Gate Way)) 7 (corresponding to a data transfer device), a CAN gateway (hereinafter referred to as CAN GW) 8, and a DoIP gateway (hereinafter referred to as DoIP GW) 9. The diagnostic GW 7 has a function of protocol conversion between DoIP and DoCAN.
[0013] The vehicle system 1 is provided with an external connector (not shown) to which a diagnostic tool 10 (corresponding to an external device) is connected, and the diagnostic tool 10 is detachably connected to the external connector. The physical shape, electrical signal, pin assignment, etc. of the external connector are defined. When the diagnostic tool 10 is connected to the external connector, the diagnostic tool 10, the diag GW7, and the DoIP GW9 are connected so as to be capable of data communication via the Ethernet 11.
[0014] The diag GW7 and the CAN GW8 are connected so as to be capable of data communication via the CAN 12, and the CAN GW8, the first ECU 3, and the second ECU 4 are connected so as to be capable of data communication via the CAN 13. The DoIP GW9, the third ECU 5, and the fourth ECU 6 are connected so as to be capable of data communication via the Ethernet 14. The number of CANs connected to the CAN GW8 may be plural, and the number of ECUs connected to the CAN 13 may be 1 or 3 or more. The number of Ethernets connected to the DoIP GW9 may be plural, and the number of ECUs connected to the Ethernet 14 may be 1 or 3 or more.
[0015] The diagnostic tool 10 transmits a diagnostic request message generated according to DoIP defined in ISO 13400. The diagnostic request message is a message for instructing the execution of diagnostic processing for the ECU to be diagnosed, and includes an identifier for specifying the ECU to be diagnosed.
[0016] When a diagnostic request message in which the first ECU 3 or the second ECU 4 is specified as the ECU to be diagnosed is transmitted from the diagnostic tool 10, the transmitted diagnostic request message is received by the diag GW 7, protocol-converted from the DoIP protocol to the DoCAN protocol in the diag GW 7, and received by the first ECU 3 or the second ECU 4 via the CAN GW 8. When the first ECU 3 or the second ECU 4 receives the diagnostic request message, it generates a diagnostic response message for the received diagnostic request message and transmits the generated diagnostic response message. The diagnostic response message transmitted from the first ECU 3 or the second ECU 4 is received by the diag GW 7 via the CAN GW 8, protocol-converted from the DoCAN protocol to the DoIP protocol in the diag GW 7, and received by the diagnostic tool 10.
[0017] For example, when a diagnostic request message in which the third ECU 5 or the fourth ECU 6 is specified as the ECU to be diagnosed is transmitted from the diagnostic tool 10, the transmitted diagnostic request message is received by the third ECU 5 or the fourth ECU 6 via the DoIP GW 9. When the third ECU 5 or the fourth ECU 6 receives the diagnostic request message, it generates a diagnostic response message for the received diagnostic request message and transmits the generated diagnostic response message. The diagnostic response message transmitted from the third ECU 5 or the fourth ECU 6 is received by the diagnostic tool 10 via the DoIP GW 9.
[0018] The configuration of the diagnostic tool 10, the diag GW7, the first ECU 3, and the second ECU 4 will be described. As shown in FIG. 2, the diagnostic tool 10 includes a control unit 15, a communication interface 16, a flash memory 17, and a liquid crystal display 18. The control unit 15 is mainly composed of a microcomputer (hereinafter referred to as a microcontroller) having a CPU 15a, a RAM 15b, a ROM 15c, etc., and executes software processing by executing a computer program stored in a non-transitory tangible storage medium by the CPU 15a, and executes control by hardware processing by a dedicated electronic circuit, and controls the operation of the diagnostic tool 10. The communication interface 16 controls data communication via the Ethernet 11. The flash memory 17 stores various information. The liquid crystal display 18 has a touch input function, receives various operation inputs from an operator, and displays various information such as a diagnostic result.
[0019] The diag GW7 includes a control unit 19, a communication interface 20, and a flash memory 21. The control unit 19 is mainly composed of a microcontroller having a CPU 19a, a RAM 19b (corresponding to a buffer memory), a ROM 19c, etc., and executes software processing by executing a computer program stored in a non-transitory tangible storage medium by the CPU 19a, and executes control by hardware processing by a dedicated electronic circuit, and controls the operation of the diag GW7. The communication interface 20 controls data communication via the Ethernet 11 and data communication via the CAN 12. The flash memory 21 stores various information.
[0020] The control unit 19 uses the RAM 19b as a buffer area for storing messages. That is, the control unit 19 stores the message received from the diagnostic tool 10 in the RAM 19b, and protocol-converts the message stored in the RAM 19b from the DoIP protocol to the DoCAN protocol. Further, the control unit 19 stores the message received from the first ECU 3 or the second ECU 4 in the RAM 19b, and protocol-converts the message stored in the RAM 19b from the DoCAN protocol to the DoIP protocol.
[0021] The first ECU 3 includes a control unit 22, a communication interface 23, and a flash memory 24. The control unit 22 is mainly composed of a microcomputer having a CPU 22a, a RAM 22b, a ROM 22c, etc., and executes software processing by executing a computer program stored in a non-transitory tangible storage medium by the CPU 22a, and controls the operation of the first ECU 3 by hardware processing using a dedicated electronic circuit. The communication interface 23 controls data communication via CAN 13. The flash memory 24 stores various kinds of information. The second ECU 4 includes a control unit 25, a communication interface 26, and a flash memory 27. The control unit 25 is mainly composed of a microcomputer having a CPU 25a, a RAM 25b, a ROM 25c, etc. The second ECU 4 has the same configuration as the first ECU 3.
[0022] The buffer size of the RAM 19b of the diag GW7 will be described. In the above-described configuration, the diagnostic tool 10 may simultaneously transmit diagnostic request messages to the ECUs 3 and 4 corresponding to a plurality of DoCANs to be diagnosed. In the diag GW7, there is a possibility of simultaneously receiving diagnostic response messages from the ECUs 3 and 4 corresponding to a plurality of DoCANs, and it is necessary to prepare buffer frames larger than the maximum length of the messages received from the ECUs that can be the diagnostic targets, for the number of ECUs that can be the diagnostic targets. Assume the case shown in FIG. 3 for the buffer frame. Note that the server shown in FIG. 3 corresponds to the ECUs 3 and 4 corresponding to the DoCAN, and the client shown in FIG. 3 corresponds to the diagnostic tool 10. Also, the message size shown in FIG. 3 is the same as the message length.
[0023] When simulating in the case shown in FIG. 3, the required buffer size for the RAM 19b can be calculated as follows. Buffer size required for message requests by functional addressing = Number of clients × Message size = 2 × 7 bytes = 14 bytes Buffer size required for message response to message request by functional addressing = Number of clients × Number of servers × Message size = 2 × 20 × 65,535 bytes = 2,621,400 bytes Buffer size required for message request by physical addressing = Number of clients × Number of servers that clients request in parallel = 2 × 4 × 4,095 bytes = 32,760 bytes Buffer size required for RAM19b = Buffer size required for message request by functional addressing + Buffer size required for message response to message request by functional addressing + Buffer size required for message request by physical addressing = 14 bytes + 2,621,400 bytes + 32,760 bytes = 2,654,176 bytes = 2.6 Mbytes
[0024] That is, the buffer size required for RAM19b calculated by simulation corresponds to an aggregate of the number (n = 20) of ECUs corresponding to DoCAN of buffer frames of a size corresponding to the maximum message length (64 Kbytes), as shown in FIG. 4. However, the buffer size required for RAM19b calculated in this way may be inappropriate.
[0025] Regarding this point, the present embodiment adopts the following configuration. As shown in FIG. 5, the RAM 19b includes a plurality of three types of buffer frames having different buffer sizes. That is, the RAM 19b includes na buffers (large) with a buffer size of "64 Kbyte", nb buffers (medium) with a buffer size of "8 Kbyte", and nc buffers (small) with a buffer size of "500 byte". The buffer (large), buffer (medium), and buffer (small) respectively correspond to buffer frames. na, nb, and nc are natural numbers, and satisfy the following formula under the conditions of the above-described simulation. na + nb + nc ≤ n = 20
[0026] The buffer size of the RAM 19b shown in FIG. 5 is smaller than the buffer size of the RAM 19b shown in FIG. 4, suppressing the buffer size. Note that the classification of the buffer frames may be two types or four or more types. Further, the buffer size of each buffer frame is not limited to "64 Kbyte", "8 Kbyte", and "500 byte". Furthermore, the number of each buffer frame is arbitrary, and any number may be used as long as it satisfies the condition of being smaller than the buffer size of the RAM 19b shown in FIG. 4. For example, it may be determined according to the scale of the system, the specifications of the microcomputer, the nature of the application executed by the ECU to be diagnosed, and the like.
[0027] The function of the control unit 19 of the diagnostic GW 7 will be described. As shown in FIG. 6, the control unit 19 includes a message length specifying unit 28, a corresponding buffer frame specifying unit 29, an empty determination unit 30, and a storage control unit 31. A data transfer program is executed by these units 28 to 31.
[0028] When the message length notification message is received from the first ECU 3 or the second ECU 4, the message length specifying unit 28 specifies the length of the diagnostic response message to be received next based on the received message length notification message.
[0029] When the length of the message is determined by the message length determination unit 28, the corresponding buffer frame determination unit 29 determines the smallest buffer frame in the buffer frames of the RAM 19b that exceeds the specified message length as the corresponding buffer frame. That is, when it is determined that the length of the diagnostic response message to be received hereafter is, for example, "60 Kbyte", the "buffer (large)" with a buffer size of "64 Kbyte" is determined as the corresponding buffer frame. When it is determined that the length of the diagnostic response message to be received hereafter is, for example, "3 Kbyte", the "buffer (medium)" with a buffer size of "8 Kbyte" is determined as the corresponding buffer frame. When it is determined that the length of the diagnostic response message to be received hereafter is, for example, "200 byte", the "buffer (small)" with a buffer size of "500 byte" is determined as the corresponding buffer frame.
[0030] The free space determination unit 30 determines the presence or absence of free space in the corresponding buffer frame. When the corresponding buffer frame is specified by the corresponding buffer frame determination unit 29 and the presence of free space in the corresponding buffer frame is specified by the free space determination unit 30, the storage control unit 31 stores the diagnostic response message to be received hereafter in the corresponding buffer frame. On the other hand, when the corresponding buffer frame is specified by the corresponding buffer frame determination unit 29 but the absence of free space in the corresponding buffer frame is specified by the free space determination unit 30, the storage control unit 31 causes a waiting notification message for waiting for the transmission of the diagnostic response message to be transmitted to the transmission request source of the diagnostic response message. Also, after the storage control unit 31 causes the waiting notification message to be transmitted to the transmission request source of the message, when the presence of free space in the corresponding buffer frame is specified by the free space determination unit 30, the storage control unit 31 causes a start notification message for starting the transmission of the message to be transmitted to the transmission request source of the message.
[0031] Next, the operation of the above-described configuration will be described with reference to FIGS. 7 to 8. In FIGS. 7 to 8, the illustration of the CANGW8 is omitted. In this case, a configuration in which there is one "buffer (large)" and one "buffer (medium)" will be described.
[0032] (1) Case where there is free space in the corresponding buffer frame (see Fig. 7) In the diagnostic ECU 7, it is assumed that the large buffer in the RAM 19b is free and the medium buffer is free. When the diagnostic request message transmitted from the diagnostic tool 10 is received by the first ECU 3 via the diagnostic GW 7 and the CAN GW 8, the first ECU 3 transmits an FF (First Frame) (A1). The FF transmitted from the first ECU 3 contains information on the length of the message to be transmitted from the first ECU 3 hereafter. That is, the FF corresponds to a message length notification message for notifying the message length indicating the length of the message to be transmitted hereafter. The FF transmitted from the first ECU 3 contains information indicating that the message length of the message to be transmitted from the first ECU 3 hereafter is "3 KB".
[0033] In the diagnostic ECU 7, when the control unit 19 receives the FF transmitted from the first ECU 3 via the CAN GW 8, a transmission request for a message with a message length of "3 KB" from the first ECU 3 is generated, and it is specified that the message length of the message to be transmitted from the first ECU 3 hereafter is "3 KB" (corresponding to the message length specification procedure). The control unit 19 specifies the medium buffer, which is the smallest buffer frame exceeding "3 KB", as the corresponding buffer (corresponding to the corresponding buffer frame specification procedure).
[0034] The control unit 19 determines whether there is free space in the medium buffer specified as the corresponding buffer (corresponding to the free space determination procedure). When the control unit 19 determines that there is free space in the medium buffer, it secures the empty medium buffer as a buffer frame for storing the message from the first ECU 3 and transmits an FC (Flow Control) (A2). The FC transmitted from the diagnostic ECU 7 corresponds to a start notification message for starting the transmission of the message.
[0035] When the FC transmitted from the diagnostic ECU 7 is received by the first ECU 3 via the CAN GW 8, the first ECU 3 transmits a CF (Consecutive Frame) (A3). The CF transmitted from the first ECU 3 corresponds to a diagnostic response message including a diagnostic result for a diagnostic request.
[0036] In the diagnostic ECU 7, when the CF transmitted from the first ECU 3 is received via the CAN GW 8, the control unit 19 stores the received CF in a buffer (medium) (corresponding to a storage control procedure) and performs protocol conversion from the DoCAN protocol to the DoIP protocol. The control unit 19 repeats the above-described processing every time the CF transmitted from the first ECU 3 is received via the CAN GW 8.
[0037] When the diagnostic request message transmitted from the diagnostic tool 10 is received by the second ECU 4 via the diagnostic GW 7 and the CAN GW 8, the second ECU 4 transmits an FF (A4). The FF transmitted from the second ECU 4 includes information on the length of the message to be transmitted from the second ECU 4 hereafter. The FF transmitted from the second ECU 4 includes information indicating that the message length of the message to be transmitted from the second ECU 4 hereafter is "60 KB".
[0038] In the diagnostic ECU 7, when the FF transmitted from the second ECU 4 is received via the CAN GW 8, a transmission request for a message with a message length of "60 KB" from the second ECU 4 occurs, and it is specified that the message length of the message to be transmitted from the second ECU 4 hereafter is "60 KB" (corresponding to a message length specifying procedure). The control unit 19 specifies a buffer (large), which is the smallest buffer frame exceeding "60 KB", as a corresponding buffer (corresponding to a corresponding buffer frame specifying procedure).
[0039] The control unit 19 determines the availability of the buffer (large) specified as the corresponding buffer (corresponding to the free space determination procedure). When the control unit 19 identifies that there is free space in the buffer (large), it secures the free buffer (large) as a buffer frame for message storage from the second ECU 4 and transmits the FC (A5). Also in this case, the FC transmitted from the diagnostic ECU 7 corresponds to a start notification message for starting the transmission of a message.
[0040] On the other hand, the first ECU 3 transmits the final CF including the final diagnostic result to be transmitted (A6). In the diagnostic ECU 7, when the control unit 19 receives the final CF transmitted from the first ECU 3 via the CAN GW 8, it stores the received CF in the buffer (medium) and performs protocol conversion from the DoCAN protocol to the DoIP protocol. The control unit 19 transmits the data including the diagnostic results from the first CF received from the first ECU 3 to the final CF to the diagnostic tool 10 as a diagnostic response of the first ECU 3 (A7). When the control unit 19 completes the transmission of the diagnostic response of the first ECU 3 to the diagnostic tool 10, it releases the buffer (medium) secured until then.
[0041] When the FC transmitted from the diagnostic ECU 7 is received by the second ECU 4 via the CAN GW 8, the second ECU 4 transmits the CF (A8). The CF transmitted from the second ECU 4 also corresponds to a diagnostic response message including a diagnostic result for a diagnostic request.
[0042] In the diagnostic ECU 7, when the control unit 19 receives the CF transmitted from the second ECU 4 via the CAN GW 8, it stores the received CF in the buffer (large) (corresponding to the storage control procedure) and performs protocol conversion from the DoCAN protocol to the DoIP protocol. The control unit 19 repeats the above-described process every time the CF transmitted from the second ECU 4 is received via the CAN GW 8.
[0043] The second ECU 4 transmits the final CF including the final diagnostic result to be transmitted (A9). In the diagnostic ECU 7, when the control unit 19 receives the final CF transmitted from the second ECU 4 via the CAN GW 8, it stores the received CF in the buffer (large), and performs protocol conversion from the DoCAN protocol to the DoIP protocol. The control unit 19 transmits the data including the diagnostic results from the first CF received from the second ECU 4 to the final CF to the diagnostic tool 10 as the diagnostic response of the second ECU 4 (A10). When the control unit 19 completes the transmission of the diagnostic response of the second ECU 4 to the diagnostic tool 10, it releases the buffer (large) that it has secured so far.
[0044] The above has illustrated the case where the second ECU 4 starts transmitting the CF after the first ECU 3 transmits the final CF. However, if the second ECU 4 starts transmitting the CF before the first ECU 3 transmits the final CF, in the diagnostic ECU 7, the CF received from the first ECU 3 and the CF received from the second ECU 4 are received in parallel. Also, the above has illustrated the configuration with one buffer (large) and one buffer (medium). However, when there are multiple buffer frames of the same buffer size, those multiple buffer frames of the same buffer size are used simultaneously. For example, in the configuration with two or more buffers (large), when a transmission request for a message with a message length of "30 KB" from the first ECU 3 occurs and a transmission request for a message with a message length of "60 KB" from the second ECU 4 occurs, one buffer (large) is secured as a buffer frame for storing the message from the first ECU 3, and at the same time, another buffer (large) is secured as a buffer frame for storing the message from the second ECU 4.
[0045] Also, it is not necessarily required to specify the smallest buffer frame exceeding the message length as the corresponding buffer. For example, when it is specified that the message length of the message transmitted from the first ECU 3 is "3 KB", and it is specified that there is no free space in the buffer (medium) (corresponding to the first buffer frame), and it is specified that there is free space in the buffer (large) (corresponding to the second buffer frame), the free buffer (large) may be secured as a buffer frame for storing the message from the first ECU 3. Further, although the above has been exemplified for the relationship between the buffer (large) and the buffer (medium), the same applies when the buffer (small) is involved. That is, the same applies to the relationship between the buffer (large) and the buffer (small), and the relationship between the buffer (medium) and the buffer (small).
[0046] (2) Case where there is no free space in the corresponding buffer frame (see FIG. 8) In the diagnostic ECU 7, it is assumed that the buffer (large) in the RAM 19b is free. When the first ECU 3 receives the diagnostic request message transmitted from the diagnostic tool 10 via the diagnostic GW 7 and the CAN GW 8, it transmits FF (A11). The FF transmitted from the first ECU 3 includes information indicating that the message length of the message to be transmitted from the first ECU 3 hereafter is "60 KB".
[0047] In the diagnostic ECU 7, when the control unit 19 receives the FF transmitted from the first ECU 3 via the CAN GW 8, a transmission request for a message with a message length of "60 KB" from the first ECU 3 occurs, and it is specified that the message length of the message to be transmitted from the first ECU 3 hereafter is "60 KB" (corresponding to the message length specifying procedure). The control unit 19 specifies the buffer (large), which is the smallest buffer frame exceeding "60 KB", as the corresponding buffer (corresponding to the corresponding buffer frame specifying procedure).
[0048] The control unit 19 determines the availability of space in the buffer (large) specified as the corresponding buffer (corresponding to the free space determination procedure). When the control unit 19 identifies that there is free space in the buffer (large), it secures the empty buffer (large) as a buffer frame for message storage from the first ECU 3 and transmits the FC (A12). The FC transmitted from the diagnostic ECU 7 corresponds to a start notification message for starting the transmission of a message.
[0049] When the first ECU 3 receives the FC transmitted from the diagnostic ECU 7 via the CAN GW 8, it transmits the CF (A13). The CF transmitted from the first ECU 3 corresponds to a diagnostic response message including a diagnostic result for a diagnostic request.
[0050] In the diagnostic ECU 7, when the control unit 19 receives the CF transmitted from the first ECU 3 via the CAN GW 8, it stores the received CF in the buffer (large) (corresponding to the storage control procedure) and performs protocol conversion from the DoCAN protocol to the DoIP protocol. The control unit 19 repeats the above-described processing every time the CF transmitted from the first ECU 3 is received via the CAN GW 8.
[0051] When the diagnostic request message transmitted from the diagnostic tool 10 is received by the second ECU 4 via the diagnostic GW 7 and the CAN GW 8, the second ECU 4 transmits the FF (A14). The FF transmitted from the second ECU 4 includes information indicating that the message length of the message to be transmitted from the second ECU 4 hereafter is "30 KB".
[0052] In the diagnostic ECU 7, when the control unit 19 receives the FF transmitted from the second ECU 4 via the CAN GW 8, a transmission request for a message with a message length of "30 KB" from the second ECU 4 occurs, and it is identified that the message length of the message to be transmitted from the second ECU 4 hereafter is "30 KB" (corresponding to the message length identification procedure). The control unit 19 identifies the buffer (large), which is the smallest buffer frame exceeding "30 KB", as the corresponding buffer (corresponding to the corresponding buffer frame identification procedure).
[0053] The control unit 19 determines the availability of free space in the buffer (large) identified as the corresponding buffer (corresponding to the free space determination procedure). When the control unit 19 determines that there is no free space in the buffer (large), it transmits FC WAIT (A15). FC WAIT corresponds to a wait notification message for waiting for the transmission of a message. When the second ECU 4 receives the FC WAIT transmitted from the diagnostic ECU 7 via the CAN GW 8, it waits for the transmission of the CF.
[0054] The first ECU 3 transmits the final CF including the final diagnostic result to be transmitted (A16). In the diagnostic ECU 7, when the control unit 19 receives the final CF transmitted from the first ECU 3 via the CAN GW 8, it stores the received CF in the buffer (large) and performs protocol conversion from the DoCAN protocol to the DoIP protocol. The control unit 19 transmits the data including the diagnostic results from the first CF received from the first ECU 3 to the final CF to the diagnostic tool 10 as the diagnostic response of the first ECU 3 (A17). When the control unit 19 completes the transmission of the diagnostic response of the first ECU 3 to the diagnostic tool 10, it releases the buffer (large) that has been secured until then.
[0055] When the control unit 19 identifies that there is free space in the buffer (large) by releasing the buffer (large), it secures the empty buffer (large) as a buffer frame for storing messages from the second ECU 4 and transmits FC (A18).
[0056] When the FC transmitted from the diagnostic ECU 7 is received by the second ECU 4 via the CAN GW 8, the second ECU 4 transmits a CF (A19). The second ECU 4 transmits a final CF that includes the final diagnostic result to be transmitted (A20). In the diagnostic ECU 7, when the control unit 19 receives the final CF transmitted from the second ECU 4 via the CAN GW 8, the received CF is stored in a buffer (large), and protocol conversion is performed from the DoCAN protocol to the DoIP protocol. The control unit 19 transmits data including the diagnostic results from the first CF received from the second ECU 4 to the final CF to the diagnostic tool 10 as the diagnostic response of the second ECU 4 (A21). When the control unit 19 completes the transmission of the diagnostic response of the second ECU 4 to the diagnostic tool 10, the buffer (large) that has been secured until then is released.
[0057] The above has been illustrated for the case where there is one buffer (large), but the same applies to the case where there are two or more buffers (large). That is, for example, when there are two buffers (large), if a transmission request for a message from another ECU occurs while all of the two buffers (large) are in use, the control unit 19 identifies the buffer (large) as a corresponding buffer and determines that there is no free buffer (large), then transmits an FC WAIT and waits for the transmission of a message from another ECU. The same applies to the buffer (medium) and the buffer (small).
[0058] As described above, according to this embodiment, the following operational effects can be obtained. In the diagnostic GW 7, the RAM 19b that stores the diagnostic response messages received from the ECUs 3 and 4 to be diagnosed has a configuration with a plurality of buffer frames having different buffer sizes, and among the plurality of buffer frames, a buffer frame that exceeds the length of the diagnostic response message to be received hereafter is specified as a corresponding buffer frame. When it is determined that there is free space in the corresponding buffer frame, the diagnostic response message is stored in the corresponding buffer frame. As a result, it is not necessary to reduce the number of ECUs to be diagnosed, nor is it necessary to dynamically allocate buffer areas according to the length of the diagnostic response message. Therefore, the buffer size can be appropriately suppressed without causing restrictions on the use cases of the entire system or an increase in the processing load.
[0059] In Diag GW7, the smallest buffer frame exceeding the length of the diagnostic response message to be received hereafter is specified as the corresponding buffer frame. By specifying the smallest buffer frame as the corresponding buffer frame, a finite buffer frame can be used efficiently.
[0060] In Diag GW7, when it is specified that there is no free space in the corresponding buffer frame, a waiting notification message for waiting for the transmission of the diagnostic response message is sent to the source of the transmission request of the diagnostic response message. The transmission of the diagnostic response message from the transmission request source can be waited for.
[0061] In Diag GW7, after sending the waiting notification message to the source of the transmission request of the diagnostic response message, when it is specified that there is free space in the corresponding buffer frame, a start notification message for starting the transmission of the diagnostic response message is sent to the source of the transmission request of the diagnostic response message. When the state changes from waiting for the transmission of the diagnostic response message from the transmission request source to having free space in the corresponding buffer frame, the transmission of the diagnostic response message from the transmission request source can be started.
[0062] The above has exemplified the case where diagnostic response messages are received simultaneously from the ECUs 3 and 4 to be diagnosed, but it can also be applied to cases where ECU information is received simultaneously from a plurality of ECUs, for example, when collecting ECU information in software update.
[0063] This disclosure has been described in accordance with the embodiments, but it is understood that this disclosure is not limited to such embodiments or structures. This disclosure includes various modifications and modifications within the equivalent scope. In addition, various combinations and forms, and further, other combinations and forms including only one element, more than one element, or less than one element thereof, fall within the scope and spirit of this disclosure.
[0064] The control unit and its method described in the present disclosure may be implemented by a dedicated computer configured by a processor and a memory programmed to execute one or more functions embodied by a computer program. Alternatively, the control unit and its method described in the present disclosure may be implemented by a dedicated computer provided by configuring a processor with one or more dedicated hardware logic circuits. Or, the control unit and its method described in the present disclosure may be implemented by one or more dedicated computers configured by a combination of a processor and a memory programmed to execute one or more functions and a processor configured by one or more hardware logic circuits. Further, the computer program may be stored in a computer-readable non-transitory tangible recording medium as instructions to be executed by a computer.
Explanation of Signs
[0065] In the drawings, 1 is a vehicle system, 2 is a central ECU, 3 to 6 are ECUs (electronic control units), 7 is a diagnostic GW (data transfer device), 10 is a diagnostic tool (external device), 19 is a control unit, 19b is a RAM (buffer memory), 28 is a message length specifying unit, 29 is a corresponding buffer frame specifying unit, 30 is an availability determination unit, and 31 is a storage control unit.
Claims
1. A data transfer device (7) for transferring messages between an external device and an electronic control device, a buffer memory (19b) that stores messages received from either the external device or the electronic control device and has a plurality of buffer frames with different buffer sizes; a message length specifying unit (28) that specifies a message length indicating the length of a message to be received based on a message length notification message received from either the external device or the electronic control device; a corresponding buffer frame specifying unit (29) that specifies, as a corresponding buffer frame, a buffer frame among the plurality of buffer frames that exceeds the message length specified by the message length specifying unit; an availability determination unit (30) that determines the availability of the corresponding buffer frame; and a storage control unit (31) that stores a message received from either the external device or the electronic control device in the corresponding buffer frame when the availability of the corresponding buffer frame is determined by the availability determination unit. A data transfer device comprising.
2. The data transfer device according to claim 1, wherein the corresponding buffer frame specifying unit specifies, as the corresponding buffer frame, the smallest buffer frame among the plurality of buffer frames that exceeds the message length specified by the message length specifying unit.
3. The data transfer device according to claim 1, wherein the storage control unit transmits a waiting notification message for waiting for message transmission to the message transmission source when the unavailability of the corresponding buffer frame is determined by the availability determination unit.
4. The data transfer device according to claim 3, wherein after the storage control unit transmits the waiting notification message to the message transmission source, when the availability of the corresponding buffer frame is determined by the availability determination unit, the storage control unit transmits a start notification message for starting message transmission to the message transmission source.
5. The buffer memory has, as the plurality of buffer frames, a first buffer frame and a second buffer frame having a buffer size larger than that of the first buffer frame. The corresponding buffer frame specifying unit specifies the second buffer frame as the corresponding buffer frame when the lack of free space in the first buffer frame specified as the corresponding buffer frame is specified by the free space determination unit, and the message length indicating the length of the message to be received hereafter is specified by the message length specifying unit as the length corresponding to the first buffer frame. The data transfer device according to claim 1.
6. A data transfer device that transfers messages between an external device and an electronic control device, and a control unit (19) of a data transfer device (7) including a buffer memory (19b) that stores messages received from either the external device or the electronic control device and has a plurality of buffer frames with different buffer sizes, A message length specifying procedure for specifying a message length indicating the length of a message to be received hereafter based on a message length notification message received from either the external device or the electronic control device; A corresponding buffer frame specifying procedure for specifying, as a corresponding buffer frame, a buffer frame among the plurality of buffer frames that exceeds the message length specified by the message length specifying procedure; A free space determination procedure for determining the presence or absence of free space in the corresponding buffer frame; A data transfer program that executes a storage control procedure for storing a message received from either the external device or the electronic control device in the corresponding buffer frame when the presence of free space in the corresponding buffer frame is specified by the free space determination procedure.
Citation Information
Patent Citations
Transfer apparatus
WO2023119720A1