Electronic control device, data communication method, and data communication program
The electronic control device and method address protocol restrictions by converting data frames between ECUs, ensuring flexible application development and seamless communication across different protocols.
Patent Information
- Application Number
- JP2022073342
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-10-02
- Estimated Expiration
- 2042-04-27
AI Technical Summary
Existing communication protocols between in-vehicle electronic control units (ECUs) restrict application development due to differences in connection forms, limiting the freedom in application development.
An electronic control device and method that converts data frames between different communication protocols, allowing applications to handle data regardless of direct connections, by using a protocol conversion unit to convert data frames from a first communication protocol to a second protocol and extract protocol data units for application use.
Ensures flexibility in application development by enabling applications to handle data from any control unit, regardless of direct bus connections, and facilitates seamless communication across different protocols.
Smart Images

Figure 0007748331000001 
Figure 0007748331000002 
Figure 0007748331000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an electronic control device, a data communication method, and a data communication program. [Background technology]
[0002] For example, communication protocols used for data communication between in-vehicle electronic control units (hereinafter referred to as ECUs (Electronic Control Units)) include CAN (Controller Area Network) (registered trademark) and Ethernet (registered trademark) (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2015-139093 Summary of the Invention [Problem to be solved by the invention]
[0004] In this case, if an ECU is equipped with a first control unit and a second control unit, and the first control unit is directly connected to a first communication bus that complies with the first communication protocol, an application executed by the first control unit can handle data in the first communication protocol. However, if the second control unit is not directly connected to the first communication bus, the application executed by the second control unit cannot handle data in the first communication protocol. As such, the connection of the control units that execute the application imposes restrictions on application development, resulting in a problem in which the degree of freedom in application development cannot be ensured.
[0005] The present invention has been made in consideration of the above-mentioned circumstances, and its purpose is to provide an electronic control device, a data communication method, and a data communication program that can appropriately ensure freedom in app development. [Means for solving the problem]
[0006] According to the invention recited in claim 1, a data frame receiving unit (5a) receives data frames of a first communication protocol from a first communication bus conforming to the first communication protocol. A protocol conversion unit (5b) at reception converts the data frames of the first communication protocol received by the data frame receiving unit into data frames of a second communication protocol. A protocol data unit extracting unit (15a) extracts protocol data units of the first communication protocol from the data frames of the second communication protocol that have been protocol converted by the protocol conversion unit at reception. A protocol data unit providing unit (16a) provides the protocol data units of the first communication protocol extracted by the protocol data unit extracting unit to an application.
[0007] When a data frame of the first communication protocol is received from the first communication bus, the received data frame of the first communication protocol is protocol converted into a data frame of the second communication protocol. A protocol data unit of the first communication protocol is extracted from the protocol-converted data frame of the second communication protocol, and the extracted protocol data unit of the first communication protocol is provided to the application.
[0008] Even if the control unit that executes the application is not directly connected to the first communication bus, the protocol data unit stored in the data frame of the first communication protocol received from the first communication bus can be provided to the application, and the application can handle data of the first communication protocol. This means that application development is not restricted by the connection form of the control unit that executes the application, application developers can develop applications without considering differences in communication protocols, and a sufficient degree of freedom in application development can be ensured.
[0009] In addition to the inventions set forth in the claims, the present disclosure includes the following inventions. [1] An electronic control device (1) having a control unit (6) that executes an application, a data frame receiving unit (5a) that receives a data frame of the first communication protocol from a first communication bus that complies with the first communication protocol; a receiving protocol conversion unit (5b) that converts a data frame of a first communication protocol received by the data frame receiving unit into a data frame of a second communication protocol; a protocol data unit extraction unit (15a) that extracts a protocol data unit of the first communication protocol from the data frame of the second communication protocol that has been protocol-converted by the receiving protocol conversion unit; a protocol data unit providing unit (16a) that provides the protocol data units of the first communication protocol extracted by the protocol data unit extracting unit to an application.
[0010] [2] a protocol data unit acquisition unit (16b) that acquires a protocol data unit of the first communication protocol from the application; a protocol data unit storage unit (15c) that stores the protocol data unit of the first communication protocol acquired by the protocol data unit acquisition unit in a data frame of the second communication protocol; a transmission protocol conversion unit (5c) that converts a data frame of a second communication protocol in which a protocol data unit of a first communication protocol is stored in the protocol data unit storage unit into a data frame of the first communication protocol; The electronic control device according to [1], further comprising: a data frame transmitting unit (5d) that transmits a data frame of the first communication protocol that has been protocol-converted by the transmission protocol conversion unit to the first communication bus.
[0011] [3] a reception time protocol data unit storage unit (15b) for storing the protocol data units of the first communication protocol extracted by the protocol data unit extraction unit, The electronic control device according to [1] or [2], wherein the protocol data unit providing unit provides the protocol data unit of the first communication protocol stored by the received protocol data unit storage unit to the application.
[0012] [4] a transmission protocol data unit storage unit (15d) for storing the protocol data units of the first communication protocol acquired by the protocol data unit acquisition unit, The electronic control device according to [2] or [3], wherein the protocol data unit storage unit stores the protocol data units of the first communication protocol stored by the transmission protocol data unit storage unit in a data frame of the second communication protocol.
[0013] [5] The electronic control device according to any one of claims [1] to [4], wherein the protocol data unit providing unit provides the protocol data units of the first communication protocol extracted by the protocol data unit extracting unit to the application in accordance with the order in which the data frames of the first communication protocol were received by the data frame receiving unit from the first communication bus.
[0014] [6] An electronic control device according to any one of claims [2] to [5], wherein the data frame transmitting unit transmits a data frame of the first communication protocol that has been protocol-converted by the transmission protocol conversion unit to the first communication bus in accordance with the order in which the protocol data units of the first communication protocol were acquired from the application by the protocol data unit acquisition unit.
[0015] [7] the receiving protocol conversion unit is provided in a first control unit, the protocol data unit extractor and the protocol data unit provider are provided in a second controller; The electronic control device according to any one of [1] to [6], wherein the first control unit and the second control unit perform data communication in accordance with a second communication protocol.
[0016] [8] the protocol data unit acquisition unit and the protocol data unit storage unit are provided in a second control unit, the transmission protocol conversion unit is provided in a first control unit, The electronic control device according to any one of [2] to [7], wherein the first control unit and the second control unit perform data communication in accordance with a second communication protocol. [Brief explanation of the drawings]
[0017] [Figure 1] Functional block diagram illustrating one embodiment. [Figure 2] Functional block diagram of the first control unit and CAN service [Figure 3] Diagram showing the flow when receiving CAN data [Figure 4] Diagram showing the flow of CAN data transmission [Figure 5] Diagram explaining protocol conversion [Figure 6] Flowchart showing the process when receiving CAN data [Figure 7] Sequence diagram when receiving CAN data [Figure 8] FIG. 10 is a diagram showing how CAN PDUs are stored when CAN data is received. [Figure 9] FIG. 10 is a diagram showing how CAN PDUs are stored when CAN data is received. [Figure 10] Flowchart showing the process of sending CAN data [Figure 11] Sequence diagram when sending CAN data [Figure 12] FIG. 10 is a diagram showing how CAN PDUs are stored when CAN data is transmitted. [Figure 13] FIG. 10 is a diagram showing how CAN PDUs are stored when CAN data is transmitted. DETAILED DESCRIPTION OF THE INVENTION
[0018] An embodiment will be described below with reference to the drawings. As shown in FIG. 1 , a master ECU 1 mounted on a vehicle controls the vehicle by acquiring information from, for example, a powertrain ECU, a body ECU, a cockpit ECU, a chassis ECU, and a safety ECU, or by issuing instructions to each ECU. To achieve this, the master ECU 1 includes multiple applications and multiple middleware programs. The master ECU 1 functions as an update master that manages reprogramming for purposes such as function improvement and defect recovery. The master ECU 1 is connected to multiple ECUs 3 and 4 via a CAN bus 2 (Controller Area Network) (registered trademark) (corresponding to a first communication bus) to enable data communication. The master ECU 1 issues operational instructions to the multiple ECUs 3 and 4 and acquires operational statuses from the multiple ECUs 3 and 4, thereby performing integrated management of the multiple ECUs 3 and 4. The number of ECUs connected to the master ECU 1 via the CAN bus 2 is not limited to two and can be any number. The multiple ECUs 3 and 4 include, for example, a powertrain ECU, a body ECU, a cockpit ECU, a chassis ECU, and a safety ECU.
[0019] The master ECU1 is connected to a DCM (Data Communication Module) that functions as a data communication device. The DCM is capable of transmitting and receiving data by wirelessly connecting to the outside via a communication network. The master ECU1 identifies a reprogramming target ECU that functions as a reprogramming target from, for example, multiple ECUs, and performs reprogramming by instructing the reprogramming target ECU3 to write an update program. The master ECU1 is connected to a DCM (Data Communication Module) that functions as a data communication device. The DCM is wirelessly connected to an OTA center via a communication network, and is capable of receiving a distribution package transmitted from the OTA center. When the DCM4 receives the distribution package transmitted from the OTA center, it transfers the received distribution package to the master ECU1. When the distribution package is transferred from the DCM, the master ECU1 extracts the update program from the transferred distribution package and performs reprogramming by instructing the reprogramming target ECU3 to write the extracted update program.
[0020] The master ECU 1 includes a first control unit 5, a second control unit 6 (corresponding to a control unit), and a storage 7. The first control unit 5 and the second control unit 6 are each configured by a microcomputer having a CPU (Central Processing Unit). The master ECU 1 includes a ROM (Read Only Memory), a RAM (Random Access Memory), and an I / O (Input / Output). The first control unit 5 and the second control unit 6 each execute a control program stored in a non-transitory physical storage medium to perform processing corresponding to the control program, and cooperate to control the overall operation of the master ECU 1. The control programs executed by the first control unit 5 and the second control unit 6 each include a part of a data communication program.
[0021] The first control unit 5 is connected to the ECUs 3 and 4 via the CAN bus 2, and performs data communication with the ECUs 3 and 4 in accordance with the CAN protocol (corresponding to the first communication protocol). The first control unit 5 and the second control unit 6 are connected via Ethernet 8 (corresponding to the second communication bus), and perform data communication between them in accordance with the Ethernet protocol (corresponding to the second communication protocol). That is, the first control unit 5 is directly connected to the CAN bus 2. The second control unit 6 is not directly connected to the CAN bus 2, but is connected to the CAN bus 2 via the Ethernet 8. Data communication using the Ethernet protocol is faster and larger in capacity than data communication using the CAN protocol. The master ECU 1 is equipped with multiple CPUs. The first control unit 5 and the second control unit 6 correspond to multiple CPUs. In the hardware architecture of the master ECU 1, the first CPU is connected to the CAN bus 2 and is configured to directly access the CAN bus 2, while the second CPU is not connected to the CAN bus 2 and is configured not to directly access the CAN bus 2. Within the same board, the second CPU is connected to the first CPU via Ethernet so that they can communicate with each other. Instead of multiple CPUs, a virtual machine that realizes the same functions by software may be used.
[0022] The storage 7 is a non-volatile memory mainly made of, for example, a NOR flash memory or a NAND flash memory, and is shared by multiple applications executed by the first control unit 5 and the second control unit 6. That is, the multiple applications each access the storage 7 to write and read data. In this embodiment, a configuration in which the storage 7 is built into the master ECU 1 is exemplified, but the present invention can also be applied to a configuration in which the storage 7 is disposed outside the master ECU 1. Furthermore, while a configuration in which the storage 7 is shared by multiple applications executed by the first control unit 5 and the second control unit 6 is exemplified, the storage 7 may also be shared by applications executed by a control unit of another ECU connected to the master ECU 1 so as to be able to communicate data.
[0023] When each application 9a belonging to the application layer 9 requests information about a vehicle, it requests transmission of the information from one of the scene coder 11, car data coder 12, and CAN service 13 belonging to the middleware layer 10, depending on the granularity of the requested information. The scene coder 11, car data coder 12, and CAN service 13 each have an application programming interface (API) set so that they can provide information.
[0024] As described above, the first control unit 5 is directly connected to the CAN bus 2, and therefore has the function of controlling the transmission and reception of CAN frames including CAN data, which is data conforming to the CAN protocol. As shown in Fig. 2, the first control unit 5 includes a data frame receiving unit 5a and a reception protocol conversion unit 5b as functional blocks involved in receiving data from the CAN bus 2. The first control unit 5 includes a transmission protocol conversion unit 5c and a data frame transmitting unit 5d as functional blocks involved in transmitting CAN data to the CAN bus 2.
[0025] The CAN service 13 includes a data communication adapter 14, a data buffer 15, and a service adapter 16. The data communication adapter 14 controls the sending and receiving of Ethernet frames, which are data frames conforming to the Ethernet protocol.
[0026] The data buffer 15 includes a protocol data unit (hereinafter referred to as PDU) extractor 15a and a receive PDU accumulator 15b as functional blocks involved in receiving CAN data from the first controller 5. The data buffer 15 includes a PDU storage unit 15c and a transmit PDU accumulator 15d as functional blocks involved in transmitting CAN data to the first controller 5. A PDU is a unit of information to be transmitted and received, and includes a control information portion defined by a communication protocol and a payload, which is the data content.
[0027] Service adapter 16 provides application 9a with CAN PDUs including CAN data, which is data conforming to the CAN protocol, and also acquires CAN PDUs from application 9a. Service adapter 16 includes PDU provider 16a as a functional block involved in receiving CAN data from first control unit 5. Service adapter 16 also includes PDU acquirer 16b as a functional block involved in transmitting CAN data to first control unit 5.
[0028] When CAN data handled by application 9a is received, first control unit 5 and CAN service 13 operate in cooperation. As shown in FIG. 3, data frame receiving unit 5a, reception protocol conversion unit 5b, PDU extracting unit 15a, reception PDU storing unit 15b, and PDU providing unit 16a perform the following operations when CAN data is received. Data frame receiving unit 5a receives CAN frames from CAN bus 2. Reception protocol conversion unit 5b converts the CAN frames received by data frame receiving unit 5a into Ethernet frames. PDU extracting unit 15a extracts CAN PDUs from the Ethernet frames that have been protocol-converted by reception protocol conversion unit 5b.
[0029] The reception PDU storage unit 15b functions as a FIFO buffer for the CAN PDUs extracted by the PDU extraction unit 15a and stores the CAN PDUs extracted by the PDU extraction unit 15a. The PDU providing unit 16a provides the CAN PDUs stored by the reception PDU storage unit 15b to the application 9a. In this case, since the reception PDU storage unit 15b functions as a FIFO buffer, the PDU providing unit 16a provides the CAN PDUs stored by the reception PDU storage unit 15b to the application 9a in the order in which the CAN frames were received from the CAN bus 2. In other words, the CAN PDUs extracted from the received CAN frames are provided to the application 9a in the order in which the CAN frames were received from the CAN bus 2.
[0030] When transmitting CAN data handled by the application 9a, the first control unit 5 and the CAN service 13 operate in cooperation with each other. As shown in FIG. 4, the PDU acquisition unit 16b, the PDU accumulation unit at transmission 15d, the PDU storage unit 15c, the protocol conversion unit at transmission 5c, and the data frame transmission unit 5d perform the following operations when transmitting CAN data. The PDU acquisition unit 16b acquires CAN PDUs from the application 9a. The PDU accumulation unit at transmission 15d functions as a FIFO buffer for the CAN PDUs acquired by the PDU acquisition unit 16b, and accumulates the CAN PDUs acquired by the PDU acquisition unit 16b. The PDU storage unit 15c stores the CAN PDUs accumulated by the PDU accumulation unit at transmission 15d in an Ethernet frame.
[0031] The transmission protocol converter 5c converts the Ethernet frames, in which the CAN PDUs are stored by the PDU storage unit 15c, into CAN frames. The data frame transmitter 5d transmits the CAN frames, whose protocol has been converted by the transmission protocol converter 5c, to the CAN bus 2. In this case, since the transmission PDU storage unit 15d functions as a FIFO buffer, the data frame transmitter 5d transmits the CAN frames, whose protocol has been converted by the transmission protocol converter 5c, to the CAN bus 2 in the order in which the CAN PDUs were acquired from the application 9a. In other words, the CAN frames, in which the acquired PDUs are stored, are transmitted to the CAN bus 2 in the order in which the CAN PDUs were acquired from the application 9a.
[0032] As shown in Figure 5, when application 9a receives CAN data, it converts the protocol of the CAN frame received from CAN bus 2 into an Ethernet frame, and provides the CAN PDU extracted from the protocol-converted Ethernet frame to application 9a. When application 9a transmits CAN data, it converts the protocol of the Ethernet frame containing the CAN PDU into a CAN frame, and sends the protocol-converted CAN frame to CAN bus 2. The ID, control field, and data field of the CAN frame correspond to the CAN ID, DLC, and CAN data of the Ethernet frame, respectively.
[0033] Next, the operation of the above-described configuration will be described with reference to Figures 6 to 13. The process performed by the master ECU 1 when receiving CAN data and the process performed when transmitting CAN data will be described.
[0034] (1) CAN data reception processing (see Figures 6 to 9) When the master ECU 1 starts the reception process of CAN data, it determines whether or not a CAN frame has been received from the CAN bus 2 by the first control unit 5. When the master ECU 1 determines that a CAN frame has been received from the CAN bus 2 by the first control unit 5 (S1, corresponding to the data frame reception procedure), it performs protocol conversion of the received CAN frame into an Ethernet frame (S2, corresponding to the reception protocol conversion procedure). The master ECU 1 extracts a CAN PDU from the protocol-converted Ethernet frame using the CAN service 13 (S3, corresponding to the PDU extraction procedure) and stores the extracted CAN PDU (S4, corresponding to the reception PDU extraction procedure). The master ECU 1 provides the stored CAN PDU to the application 9a (S5, corresponding to the PDU extraction procedure), and ends the reception process of CAN data.
[0035] In this case, the CAN service 13 performs the process shown in Fig. 7. When the CAN service 13 receives an open instruction from application 9a (t1), it notifies application 9a of a response to the received open instruction (t2), and creates a temporary data storage area for application 9a that sent the open instruction in the receiving PDU accumulation unit 15b. When the CAN service 13 receives an Ethernet frame from the first control unit 5 (t3 to t5), if a set ID filter instruction has not been received from application 9a, it discards the received Ethernet frame.
[0036] When the CAN service 13 receives a set ID filter instruction from the application 9a (t6), it notifies the application 9a of a response to the notified set ID filter instruction (t7). When the CAN service 13 receives an Ethernet frame from the first control unit 5 (t8 to t10), if the application 9a has notified it of a set ID filter instruction, it compares the ID specified in the notified set ID filter instruction with the CAN ID stored in the received Ethernet frame. When the CAN service 13 identifies an Ethernet frame containing a CAN ID that matches the ID specified in the notified set ID filter instruction, it extracts a CAN PDU from the identified Ethernet frame and stores the extracted CAN PDU in a data storage area. When the CAN service 13 identifies an Ethernet frame containing a CAN ID that does not match the ID specified in the notified set ID filter instruction, it discards the identified Ethernet frame without extracting the CAN PDU. When the CAN service 13 receives a read instruction from the application 9a (t11), it provides the CAN PDU stored in the data storage area to the application 9a (t12).
[0037] In the example of Figure 7, the CAN service 13 stores the CAN PDUs with CAN IDs "1" and "2" in the data storage area because IDs "1" and "2" are specified in the set ID filter instruction notified from the application 9a, and when a read instruction is notified from the application 9a, the CAN service 13 provides the CAN PDUs with CAN IDs "1" and "2" to the application 9a. In this case, as shown in Figure 8, when the CAN service 13 provides the CAN PDUs with CAN IDs "1" and "2" to the application 9a, it empties the data storage area in the reception PDU storage unit 15b. The CAN service 13 repeats the above process.
[0038] Furthermore, after the CAN service 13 receives a set ID filter instruction from the application 9a and before it receives a read instruction from the application 9a, if the CAN service 13 receives Ethernet frames multiple times from the first control unit 5, the CAN service 13 sequentially extracts CANPDUs from the Ethernet frames that store a CAN ID that matches the ID specified by the notified set ID filter instruction, and sequentially stores the extracted CANPDUs in the data storage area.
[0039] In the example of Figure 9, the CAN service 13 specifies ID="1", "2", "4", and "5" in the set ID filter instruction notified by the application 9a, so when the CAN service 13 receives an Ethernet frame storing CANID="1", "2" from the first control unit 5, it stores the CAN PDUs with CANID="1", "2" in the data storage area, and when it subsequently receives an Ethernet frame storing CANID="4", "5" from the first control unit 5, it stores the CAN PDUs with CANID="4", "5" in the data storage area.
[0040] When the CAN service 13 receives a close instruction from the application 9a (t13), it notifies the application 9a of a response to the close instruction (t14) and erases the temporary data storage area created in the receiving PDU storage unit 15b. Through the above process, the CAN PDU stored in the CAN frame received from the CAN bus 2 can be provided to the application 9a, allowing the application 9a to handle the CAN data.
[0041] (2) CAN data transmission processing (see Figures 10 to 13) When the master ECU 1 starts the transmission process of CAN data, it determines whether or not it has acquired a CAN PDU from the application 9a via the CAN service 13 (S11). If the master ECU 1 determines that it has acquired a CAN PDU from the application 9a via the CAN service 13 (S11: YES, corresponding to the PDU acquisition procedure), it stores the acquired CAN PDU (S12: corresponding to the transmission PDU storage procedure). The master ECU 1 stores the stored CAN PDU in an Ethernet frame (S13, corresponding to the PDU storage procedure), and then performs protocol conversion of the Ethernet frame storing the CAN PDU into a CAN frame (S14, corresponding to the transmission protocol conversion procedure). The master ECU 1 transmits the converted CAN frame to the CAN bus 2 (S15, corresponding to the data frame transmission order), and ends the transmission process of CAN data.
[0042] In this case, the CAN service 13 performs the process shown in Fig. 11. When the CAN service 13 receives an open instruction from the application 9a (t21), it notifies the application 9a of a response to the received open instruction (t22), and creates a temporary data storage area for the application 9a that sent the open instruction in the transmission PDU accumulation unit 15d. When the CAN service 13 receives a write instruction from the application 9a (t23), it notifies the application 9a of a response to the received write instruction (t24), acquires a CANPDU from the application 9a, and saves the acquired CANPDU in the data storage area.
[0043] The CAN service 13 monitors a preset transmission cycle (for example, 5 millisecond cycle) of Ethernet frames. If the CAN service 13 has saved a CAN PDU when the transmission timing of an Ethernet frame arrives, the CAN service 13 stores the saved CAN PDU in an Ethernet frame, transmits the Ethernet frame storing the CAN PDU to the first control unit 5 (t25, t26), and waits for the transmission timing of the next Ethernet frame. If the CAN service 13 has not saved a CAN PDU when the transmission timing of an Ethernet frame arrives, the CAN service 13 waits for the transmission timing of the next Ethernet frame.
[0044] 12, the CAN service 13 receives a write instruction from the application 9a and acquires CAN PDUs with CAN IDs "11" and "12." The CAN service 13 then stores the acquired CAN PDUs with CAN IDs "11" and "12" in a data storage area, and when the time to transmit an Ethernet frame arrives, transmits the Ethernet frame containing the CAN PDUs to the first control unit 5. In this case, as shown in FIG. 13, after transmitting the Ethernet frames containing the CAN PDUs with CAN IDs "11" and "12" to the first control unit 5, the CAN service 13 empties the data storage area in the transmission PDU storage unit 15d. The CAN service 13 repeats the above-described process (t27 to t31).
[0045] Furthermore, when the CAN service 13 receives multiple write instructions from the application 9a after the timing for transmitting an Ethernet frame has arrived but before the timing for transmitting the next Ethernet frame has arrived, the CAN service 13 sequentially acquires CANPDUs from the application 9a and sequentially stores the acquired CANPDUs in the data storage area.
[0046] In the example of Figure 13, the CAN service 13 stores the CAN PDUs with CANIDs = "11" and "12" in the data storage area, then stores the CAN PDUs with CANIDs = "51" and "52" in the data storage area, and when the timing for transmitting the Ethernet frame arrives, it transmits the Ethernet frames containing the CAN PDUs with CANIDs = "11", "12", "51", and "52" to the first control unit 5.
[0047] When the CAN service 13 receives a close instruction from the application 9a (t32), it notifies the application 9a of a response to the notified close instruction (t33) and erases the temporary data storage area created in the transmission PDU accumulation unit 15d. Through the above process, it is possible to transmit a CAN frame storing a CAN PDU including CAN data to the CAN bus 2, and the application 9a can handle the CAN data.
[0048] As described above, according to this embodiment, the following advantageous effects can be obtained. When the master ECU 1 receives a CAN frame from the CAN bus 2, it converts the received CAN frame into an Ethernet frame, extracts the CAN PDU from the protocol-converted Ethernet frame, and provides the extracted CAN PDU to the application.
[0049] Even if the second control unit 6 that executes the app 9a is not directly connected to the CAN bus 2, the CAN PDU stored in the CAN frame received from the CAN bus 2 can be provided to the app 9a, allowing the app 9a to handle CAN data. This means that the connection topology of the control unit that executes the app does not impose any restrictions on app development, and app developers can develop apps without considering differences in communication protocols, ensuring sufficient flexibility in app development. In other words, the app developer of the app 9a does not need to consider whether the app 9a will be executed by the first control unit 5 or the second control unit 6.
[0050] When the master ECU 1 acquires a CAN PDU from the application 9a, the acquired CAN PDU is stored in an Ethernet frame, the Ethernet frame storing the CAN PDU is protocol-converted to a CAN frame, and the protocol-converted CAN frame is transmitted to the CAN bus 2.
[0051] Even if the second control unit 6 that executes the app 9a is not directly connected to the CAN bus 2, a CAN frame that stores the CAN data handled by the app 9a can be transmitted to the CAN bus 2. This allows the app developer to develop an app without considering differences in communication protocols not only for the CAN data received from the CAN bus 2 but also for the CAN data transmitted to the CAN bus 2, ensuring sufficient freedom in app development.
[0052] The master ECU 1 is configured to function as a FIFO buffer for CAN PDUs when receiving CAN data, so that the CAN PDUs stored in the received CAN frames can be appropriately provided to the application 9a in accordance with the order in which the CAN frames are received from the CAN bus 2.
[0053] The master ECU 1 is configured to function as a FIFO buffer for CAN PDUs when transmitting CAN data, so that CAN frames, which are protocol-converted Ethernet frames, can be transmitted to the CAN bus 2 in the order in which the CAN PDUs are obtained from the application 9a.
[0054] The above example illustrates a configuration in which a CAN bus 2 and an Ethernet 8 are used as communication buses, and protocol conversion is performed between CAN frames and Ethernet frames. However, other communication protocols may also be used, such as LIN, CXPI (Clock Extension Peripheral Interface) (registered trademark), FLEXRAY (registered trademark), and MOST (Media Oriented Systems Transport) (registered trademark).
[0055] Although the present disclosure has been described with reference to the embodiments, it is understood that the present disclosure is not limited to the embodiments or structures. The present disclosure also encompasses various modifications and modifications within the scope of equivalents. In addition, various combinations and forms, as well as other combinations and forms including only one element, more than one element, or less than one element, are also within the scope and spirit of the present disclosure.
[0056] The control unit and the method described herein may be implemented by a special-purpose computer configured by configuring a processor and memory programmed to perform one or more functions embodied in a computer program. Alternatively, the control unit and the method described herein may be implemented by a special-purpose computer configured by configuring a processor with one or more dedicated hardware logic circuits. Alternatively, the control unit and the method described herein may be implemented by one or more special-purpose computers configured by combining a processor and memory programmed to perform one or more functions with a processor configured with one or more hardware logic circuits. Furthermore, the computer program may be stored as instructions executed by a computer on a computer-readable non-transitory tangible storage medium. [Explanation of symbols]
[0057] In the drawing, 1 is a master ECU (electronic control unit), 5 is a first control unit, 5a is a data frame receiving unit, 5b is a protocol conversion unit at reception, 5c is a protocol conversion unit at transmission, 5d is a data frame transmitting unit, 6 is a second control unit (control unit), 13 is a CAN service, 15 is a data buffer, 15a is a PDU extraction unit, 15b is a PDU accumulation unit at reception, 15c is a PDU storage unit, 15d is a PDU accumulation unit at transmission, 16 is a service adapter, 16a is a PDU providing unit, and 16b is a PDU acquisition unit.
Claims
1. An electronic control device (1) having a control unit (6) that executes an app, a data frame receiving unit (5a) that receives a data frame of the first communication protocol from a first communication bus that conforms to the first communication protocol; a receiving protocol conversion unit (5b) that converts a data frame of a first communication protocol received by the data frame receiving unit into a data frame of a second communication protocol; a protocol data unit extraction unit (15a) that extracts a protocol data unit of the first communication protocol from a data frame of the second communication protocol that has been protocol-converted by the receiving protocol conversion unit; a protocol data unit providing unit (16a) that provides the protocol data units of the first communication protocol extracted by the protocol data unit extracting unit to an application.
2. a protocol data unit acquisition unit (16b) that acquires a protocol data unit of a first communication protocol from an application; a protocol data unit storage unit (15c) that stores the protocol data unit of the first communication protocol acquired by the protocol data unit acquisition unit in a data frame of the second communication protocol; a transmission protocol conversion unit (5c) that converts a data frame of a second communication protocol, in which a protocol data unit of a first communication protocol is stored by the protocol data unit storage unit, into a data frame of the first communication protocol; 2. The electronic control device according to claim 1, further comprising: a data frame transmitting section (5d) that transmits, to the first communication bus, a data frame of the first communication protocol that has been protocol-converted by the transmission protocol conversion section.
3. a reception time protocol data unit storage unit (15b) for storing the protocol data units of the first communication protocol extracted by the protocol data unit extraction unit, The electronic control device according to claim 1 , wherein the protocol data unit providing unit provides the protocol data unit of the first communication protocol stored by the received protocol data unit storage unit to the application.
4. a transmission protocol data unit storage unit (15d) for storing the protocol data units of the first communication protocol acquired by the protocol data unit acquisition unit, 3. The electronic control device according to claim 2, wherein the protocol data unit storage section stores the protocol data units of the first communication protocol stored by the transmission protocol data unit storage section in a data frame of the second communication protocol.
5. 2. The electronic control device according to claim 1, wherein the protocol data unit providing unit provides the protocol data units of the first communication protocol extracted by the protocol data unit extracting unit to the application in accordance with the order in which the data frames of the first communication protocol are received by the data frame receiving unit from the first communication bus.
6. 3. The electronic control device according to claim 2, wherein the data frame transmitting unit transmits a data frame of the first communication protocol that has been protocol-converted by the transmission protocol conversion unit to the first communication bus in accordance with the order in which the protocol data units of the first communication protocol were acquired from the application by the protocol data unit acquisition unit.
7. the receiving protocol conversion unit is provided in a first control unit, the protocol data unit extractor and the protocol data unit provider are provided in a second controller, The electronic control unit according to claim 1 , wherein the first control unit and the second control unit perform data communication in accordance with a second communication protocol.
8. the protocol data unit acquisition unit and the protocol data unit storage unit are provided in a second control unit, the transmission protocol conversion unit is provided in a first control unit, The electronic control unit according to claim 2 , wherein the first control unit and the second control unit perform data communication in accordance with a second communication protocol.
9. In an electronic control device (1) having a control unit (6) that executes an app, a data frame receiving step of receiving a data frame of the first communication protocol from a first communication bus conforming to the first communication protocol; a protocol conversion procedure at reception for converting a data frame of a first communication protocol received by the data frame reception procedure into a data frame of a second communication protocol; a protocol data unit extraction step of extracting a protocol data unit of the first communication protocol from the data frame of the second communication protocol that has been protocol-converted by the protocol conversion step at the time of reception; a protocol data unit providing step of providing the protocol data unit of the first communication protocol extracted by the protocol data unit extraction step to the application.
10. a protocol data unit acquisition step of acquiring a protocol data unit of the first communication protocol from the application; a protocol data unit storage step of storing the protocol data unit of the first communication protocol acquired by the protocol data unit acquisition step in a data frame of a second communication protocol; a transmission protocol conversion procedure for converting a data frame of a second communication protocol, in which protocol data of the first communication protocol has been stored by the protocol data unit storage procedure, into a data frame of the first communication protocol; 10. The data communication method according to claim 9, further comprising a data frame transmission step of transmitting, to said first communication bus, a data frame of the first communication protocol that has been protocol converted by said transmission protocol conversion step.
11. An electronic control device (1) having a control unit (6) that executes an app, a data frame receiving step of receiving a data frame of the first communication protocol from a first communication bus conforming to the first communication protocol; a protocol conversion procedure at reception for converting a data frame of a first communication protocol received by the data frame reception procedure into a data frame of a second communication protocol; a protocol data unit extraction step of extracting a protocol data unit of the first communication protocol from the data frame of the second communication protocol that has been protocol-converted by the protocol conversion step at the time of reception; a protocol data unit providing step of providing the protocol data unit of the first communication protocol extracted by the protocol data unit extraction step to an application.
12. a protocol data unit acquisition step of acquiring a protocol data unit of the first communication protocol from the application; a protocol data unit storage step of storing the protocol data unit of the first communication protocol acquired by the protocol data unit acquisition step in a data frame of a second communication protocol; a transmission protocol conversion procedure for converting a data frame of a second communication protocol, in which protocol data of the first communication protocol has been stored by the protocol data unit storage procedure, into a data frame of the first communication protocol; 12. The data communication program according to claim 11, further comprising a data frame transmission step of transmitting, to the first communication bus, a data frame of the first communication protocol that has been protocol converted by the transmission protocol conversion step.
Citation Information
Patent Citations
Welding equipment for chip members for engine valve
JP1989083383A
Information processing device
JP2013062734A
Relay device
JP2015139093A
Gateway module for a communications system, communications system, and method for transmitting data between users of a communications system
US20140133350A1
Communication apparatus
WO2003075537A1