WO2013061396A1 - Communication device, communication system and communication method - Google Patents

Communication device, communication system and communication method Download PDF

Info

Publication number
WO2013061396A1
WO2013061396A1 PCT/JP2011/074442 JP2011074442W WO2013061396A1 WO 2013061396 A1 WO2013061396 A1 WO 2013061396A1 JP 2011074442 W JP2011074442 W JP 2011074442W WO 2013061396 A1 WO2013061396 A1 WO 2013061396A1
Authority
WO
WIPO (PCT)
Prior art keywords
communication
message
target data
area
communication message
Prior art date
Application number
PCT/JP2011/074442
Other languages
French (fr)
Japanese (ja)
Inventor
義和 酒井
Original Assignee
トヨタ自動車 株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by トヨタ自動車 株式会社 filed Critical トヨタ自動車 株式会社
Priority to PCT/JP2011/074442 priority Critical patent/WO2013061396A1/en
Publication of WO2013061396A1 publication Critical patent/WO2013061396A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Definitions

  • the present invention relates to a communication device connected to a vehicle network, a communication system including the communication device, and a communication method using the communication system.
  • a plurality of electronic control units (ECUs) mounted on a vehicle are connected to each other via a network so that information (vehicle information) held by these electronic control units can be transmitted and received between each other.
  • vehicle information vehicle information
  • One of communication systems that constitute such a vehicle network system is a control area network (CAN).
  • CAN control area network
  • the maximum amount of data that can be transmitted in a frame as a unit in communication is set to 64 bits (8 bytes) at the maximum. For this reason, in a vehicle-mounted CAN, large data such as a program that cannot be stored in one frame is divided into a plurality of pieces, and each of the divided data is stored and transferred in different frames. However, the increase in the number of frames increases the information added to the frames in addition to the stored data, so-called overhead, so the increase in the amount of communication including the increase in overhead cannot be ignored.
  • Patent Document 1 An example of a technique for suppressing an increase in communication volume is described in Patent Document 1.
  • a plurality of control devices are connected to a communication line in a manner capable of mutual communication based on the CAN protocol.
  • a diagnostic terminal capable of outputting large data such as a new control program to a specific ECU can be connected to the communication line by an operation of an operator or the like.
  • this diagnostic terminal When transferring large data, this diagnostic terminal transfers to an extended ID area defined in an area different from the predetermined data area in addition to the predetermined data area specified in the CAN extended format. It is a specification that can store data to be stored. In addition to the predetermined data area, the specific ECU can acquire data transferred from an extended ID area or the like to reconstruct large data. Thus, according to this system, it is possible to transfer data having a maximum size of 1.39 times the size of the predetermined data area from the diagnosis terminal to the specific ECU.
  • the above-mentioned CAN ensures the reliability of data to be transferred based on the protocol regulations. That is, in the system described in Patent Document 1, the reliability of data to be transferred is ensured based on the CAN protocol when this data is received from the network. On the other hand, the CAN protocol guarantees the reliability even if there is a possibility that the transferred data after reception, that is, the data after communication processing via the network, may be altered due to noise or the like. I can't. As described above, the data after the communication process (reception process) is not guaranteed to the reliability at the time when it is processed by the ECU.
  • an ECU that processes received data has further acquired check data such as a checksum for checking errors in all transferred data after reception of all data is completed.
  • the ECU verifies the reliability of all the transferred data based on the check data, and then performs a predetermined process on the all data.
  • the data to be checked is included in advance in the data to be transferred, and the ECU that has received this data extracts the data for checking from the data, There is also a method for verifying the reliability of the received data. In any case, if modification or the like is found in the data received by the ECU at the time of processing by the ECU, the received data cannot be used and is wasted. It tends to grow.
  • the present invention has been made in view of such a situation, and an object of the present invention is to improve the reliability of data communicated by the CAN protocol at the time of processing the data and the communication apparatus. And a communication method using the communication system.
  • a communication device is a communication device that receives a communication message transferred between communication devices based on a communication protocol applied to a control area network.
  • the target data is stored in a target data storage area defined in one frame as a target data storage area, and the target data is modified in a different area from the target data storage area in the same frame.
  • the target data storage area By receiving a communication message storing a check value used for detecting the presence or absence of the target data, the target data storage area together with the target data stored in the target data storage area from the received communication message The check values stored in a different area are also acquired.
  • a communication method provided by the present invention is a communication method for receiving a communication message transferred between communication devices based on a communication protocol applied to a control area network.
  • the target data is stored in a target data storage area defined in one frame as a target data storage area, and the target data is modified in a different area from the target data storage area in the same frame.
  • Receiving a communication message in which a check value used for detection of presence / absence is stored obtaining a target data stored in the target data storage area from the received communication message, and receiving the same Before being stored in an area different from the target data storage area from the communication message And a step of obtaining a check value.
  • the receiving communication device detects the target data to be transferred between the communication devices and whether or not the target data has been altered.
  • the check value to be obtained can be acquired from one communication message (one frame).
  • the communication amount of the communication message in the network can be reduced as compared with the case where the check value is acquired as a separate communication message. Can be reduced.
  • the target data storage area corresponds to a data field defined in the CAN protocol.
  • the data field is an area where the user can freely define the contents (data), and the contents (data) defined by the user in the same area are the target data.
  • the receiving communication device can acquire the target data and the check value from one communication message, the correspondence between the two communication messages required when the target data and the check value are sent in different communication messages. Management can be omitted. For this reason, detection of modification of the target data is simplified and convenience is improved. For example, when the device that processes the transferred target data acquires the target data to be transferred and waits for the check value to be sent, or when the check value cannot be received, the check value is resent. It becomes possible to omit the process of requesting.
  • the communication message is configured as an extended format defined by a communication protocol applied to the control area network, and is an area different from the target data storage area in which the check value is stored.
  • An extension ID area for storing an extension ID defined in the extension format is used.
  • the receiving communication device can use the check value added without changing the extended format.
  • the presence or absence of modification of the target data is detected only by using the extended ID area.
  • a check value is easily added. It is also easy to change an existing device that supports the CAN protocol to such a communication device.
  • message filtering for determining whether or not the communication message is necessary is performed based only on the basic ID included in the extended format.
  • the receiving communication device is prevented from affecting the message filtering by the check value added to the extension ID.
  • the communication message to which the check value is added can be more suitably processed.
  • whether or not to include the check value in the communication message can be selected, and when it is selected not to include the check value, it is stored in the extended ID area of the communication message.
  • the extension ID is used for the message filtering together with the basic ID.
  • the receiving communication device can use the area for storing the extension ID as if the extension ID that is the original use is stored. Can be improved.
  • a processing device that detects whether or not the target data has been modified based on a check value acquired together with the received target data.
  • the processing device can detect whether or not the target data acquired from the receiving communication device has been altered by the check value included in the same communication message. As described above, since the target data and the check value can be acquired from the same communication message, it is expected that the processing relating to the detection of the presence / absence of alteration is accelerated.
  • a communication device is a communication device that transmits a communication message transferred between communication devices based on a communication protocol applied to a control area network, and includes the communication message.
  • the target data is stored in a target data storage area defined in one frame as a target data storage area, and the target data is modified in a different area from the target data storage area in the same frame.
  • a check value used for presence / absence detection is stored to generate the communication message to be transmitted.
  • a communication method provided by the present invention is a communication method for transmitting a communication message transferred between communication devices based on a communication protocol applied to a control area network, wherein the communication message is As a step prior to the step of transmitting, the step of storing the target data in a target data storage region defined in one frame as a region for storing the target data included in the communication message, and the target data in the same frame Storing a check value used for detecting whether or not the target data is altered in an area different from the storage area.
  • a transmitting communication device detects target data to be transferred between communication devices and whether or not the target data has been altered.
  • the check value to be stored can be stored in one communication message (one frame).
  • the communication amount of the communication message in the network can be reduced as compared with the case where the check value is transmitted as a separate communication message. Can be reduced. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like.
  • the transmitting communication device stores the target data and the check value to be transferred between the communication devices in one communication message, it is necessary when sending the target data and the check value in different communication messages. This makes it possible to omit the management of the correspondence between two communication messages, thereby improving convenience.
  • the device that transmits the target data may eliminate the waiting time until the check value is transmitted after transmitting the target data, or may omit processing corresponding to a retransmission request for one of the two. become able to.
  • the communication message is configured as an extended format defined by a communication protocol applied to the control area network, and is an area different from the target data storage area for storing the check value, An extension ID area for storing an extension ID defined in the extension format is used.
  • the transmitting communication device can add the check value without changing the extended format.
  • the presence or absence of modification of the target data is detected only by using the extended ID area.
  • a check value can be easily added. It is also easy to change an existing device that supports the CAN protocol to such a communication device.
  • whether or not to store the check value in the extended ID area can be selected, and when it is selected not to store the check value, the check value is not stored in the extended ID area.
  • the transmitting communication apparatus can store the extended ID that is originally intended for use in the area for storing the extended ID, thereby improving the versatility of the communication apparatus. become able to.
  • a communication system provided by the present invention is a communication system in which transmission and reception of a communication message transferred between communication devices based on a communication protocol applied to a control area network is performed.
  • the communication device described above is used as a communication device that transmits a communication message, and the communication device described above is used as a communication device that receives the communication message.
  • a communication method provided by the present invention is configured to transmit and receive a communication message transferred between communication devices based on a communication protocol applied to a control area network by mutual communication between the communication devices.
  • the communication method described above is used, and the communication message transmitted from the communication device that transmits the communication message is acquired by the communication device that receives the communication message.
  • the communication system detects the target data to be transferred between communication devices and the presence / absence of alteration of the target data.
  • the value can be stored in one communication message (one frame). Then, the target data and the check value stored in the communication message can be acquired from the one communication message.
  • the check value is transmitted and received as a separate communication message.
  • the communication volume of communication messages in the network can be reduced.
  • the overhead generated for each communication message in the communication system, arbitration during transmission, and the like can be reduced.
  • the communication system since the communication system stores the target data and the check value in one communication message and transmits and receives them, the two communication messages required when the target data and the check value are transmitted in different communication messages. It becomes possible to omit the management of the correspondence relationship and the convenience is improved.
  • the device that transmits the target data and the device that receives the target data may be configured to eliminate the waiting time until the next check value is transmitted and received after the target data is transmitted and received. It becomes possible to omit the processing corresponding to the retransmission request. Thereby, a quick communication can be performed as a communication system.
  • a communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network, wherein the communication device described above is used as a communication device for transmitting the communication messages.
  • the communication device described above is used as a communication device that receives the communication message, and notifies the communication device that transmits the communication message whether to store the check value in the extended ID area.
  • a function for transmitting a message is further provided, and the communication device that receives the communication message is provided in the extension ID area based on acquiring a message for notifying whether or not the check value is stored in the extension ID area.
  • a function of recognizing whether or not the check value is included is further provided.
  • the communication device that receives the communication message is transmitted and received as a communication system because whether or not a check value is stored in the communication message is set by the communication device that transmits the communication message. It becomes easy to switch the setting of whether to store the check value in the communication message. Thereby, the applicability of such a communication system is enhanced.
  • a communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network, wherein the communication device described above is used as a communication device for transmitting the communication messages.
  • a communication device described above is used as a communication device that receives the communication message, and a message requesting storage of the check value in the extension ID is transmitted to the communication device that receives the communication message.
  • a function for storing the check value in the extension ID area based on obtaining a message for requesting storage of the check value in the extension ID.
  • the communication device that transmits the communication message is set by the communication device that receives the communication message to determine whether or not to store the check value in the communication message. It becomes easy to switch the setting of whether to store the check value in the message. Thereby, the applicability of such a communication system is enhanced.
  • FIG. 2 is a schematic diagram schematically showing a data frame of a CAN protocol used in the communication system shown in FIG. 1, wherein (a) is a schematic diagram showing a standard format, (b) is a schematic diagram showing an extended format, and (c).
  • FIG. 4 is a schematic diagram showing how the extended format is used in this embodiment.
  • the flowchart which shows the analysis procedure of the format in the communication apparatus shown in FIG.
  • the flowchart which shows the procedure in which the arithmetic unit shown in FIG. 2 processes the analyzed data.
  • sequence diagram which shows the utilization aspect of the extended format of the CAN protocol about 2nd Embodiment which actualized the communication system provided with the communication apparatus which concerns on this invention with time.
  • sequence diagram which shows the utilization aspect of the extension format of the CAN protocol about other embodiment which actualized the communication system provided with the communication apparatus which concerns on this invention with time.
  • the vehicle 1 includes a communication system as a vehicle network system.
  • the communication system includes a first electronic control unit (ECU) 10, a second ECU 13, and a communication bus 16 that connects the first and second ECUs 10 and 13 so that they can communicate with each other.
  • ECU electronice control unit
  • the communication system is configured as a CAN network to which a CAN (Control Area Network) protocol is applied as a communication protocol.
  • Each of the first ECU 10 and the second ECU 13 is a control device that is used for various controls of the vehicle 1.
  • an ECU that controls a drive system is an ECU for an engine
  • an ECU for a travel system is an ECU for a steering or a brake ECU
  • an ECU for controlling a vehicle body system An ECU for a light and an ECU for a window can be mentioned, and an ECU for controlling an information device system includes an ECU for car navigation.
  • the first ECU 10 is provided with an information processing device 11 that performs processing required for various controls, and a CAN controller 12 as a communication device that can transmit and receive communication messages based on the CAN protocol. Yes.
  • the predetermined control function is provided by executing an application (application program) 111 that provides the predetermined control function.
  • the second ECU 13 includes an information processing device 14 that performs processing required for various controls, and a CAN controller 15 as a communication device that can transmit and receive communication messages based on the CAN protocol. Is provided.
  • the predetermined control function is provided by executing an application (application program) 141 that provides the predetermined control function.
  • the CAN controller 12 of the first ECU 10 and the CAN controller 15 of the second ECU 13 are connected to one communication bus 16, respectively.
  • the communication bus 16 includes a communication line that can transmit a communication message based on the CAN protocol.
  • the communication bus 16 may include wireless communication as part of a communication path, or may include a path that passes through another network via a gateway or the like.
  • Each of the CAN controllers 12 and 15 is configured to be able to transmit and receive a communication message based on a frame defined by the CAN protocol via the communication bus 16.
  • four types of frames such as a data frame (DF) and a remote frame (RF) are defined as a frame as a unit in communication.
  • the data frame is a format used for transferring “target data” arbitrarily set by the user between the information processing device 11 of the first ECU 10 and the information processing device 14 of the second ECU 13.
  • the “target data” arbitrarily set by the user is, for example, information on programs such as program parameters and application software for information processing devices, so-called repro data, information on vehicles such as vehicle parameters and vehicle speed, etc. This is data consisting of all or part of various information related to the execution of control.
  • As the format of the data frame “standard format F1” shown in FIG. 3A and “extended format F2” shown in FIG. 3B are defined.
  • the “standard format F1” includes an 11-bit “basic ID area” for storing the “basic ID”, a “data length area (DLC)” for storing the “data length”, and “target data”.
  • Data area having a maximum length of 64 bits is defined as a target data storage area for storing ".”
  • extended format F2 defines “basic ID area”, “data length area”, and “data area”, and stores “extended ID”.
  • a bit length “extended ID area” is defined.
  • the “target data” to be transferred is stored in the “data area” in the data frame, regardless of whether it is “standard format F1” or “extended format F2”. Yes.
  • This “data area” is configured such that the length of the area can be changed to an arbitrary number of bytes of 0 to 8 bytes (0 to 64 bit data). That is, the “data area” cannot store target data having a length exceeding 8 bytes (64 bits). However, some of the information that you want to transfer has data that exceeds 8 bytes, so long information with a length of 8 bytes or more is divided into 8 bytes each, Each message is forwarded to another communication message.
  • the divided data transmitted by each different communication message are combined on the receiving side so as to be reconstructed into the original length data. It should be noted that dividing and transferring information having a long data length in this way cannot be avoided according to the data frame of the CAN protocol.
  • the “extended format F2” is used as the format of the data frame
  • the “extended ID area” of the same format is replaced with “extended ID” as a check value.
  • the “special format F3” for storing the “checksum” is also available.
  • the first ECU 10 and the second ECU 13 can transmit and receive various types of information necessary for their control by communication messages composed of data frames transmitted and received via the communication bus 16. Yes.
  • the second ECU 13 has the same configuration as that of the first ECU 10, and therefore will not be described in detail. That is, the information processing device 14 of the second ECU 13 corresponds to the information processing device 11 of the first ECU 10, and the CAN controller 15 of the second ECU 13 corresponds to the CAN controller 12 of the first ECU 10.
  • the information processing device 11 of the first ECU 10 includes a microcomputer having an arithmetic device (CPU) and a storage device.
  • the information processing apparatus 11 includes an arithmetic device that executes arithmetic processing of a control program (application), a read-only memory (ROM) that stores the control program (application), data, and the like, and arithmetic operations of the arithmetic device. Volatile memory (RAM) is provided in which results are temporarily stored. Accordingly, the information processing apparatus 11 reads the control program (application 111) held in the storage device into the arithmetic device and executes it, thereby providing the function of the application 111 to the control target and performing the control. Control the target. In the information processing apparatus 11, one or more pieces of information that the second ECU 13 has are used for the operation of the application 111.
  • the information processing apparatus 11 detects information transmitted / received to / from the second ECU 13, that is, the arbitrary data 112 consisting of all or part of the transferred information, and whether or not the contents of the arbitrary data 112 are altered. Therefore, a checksum 113 calculated by applying a predetermined algorithm to the arbitrary data 112 is provided. That is, when a plurality of communication messages are received, the information processing apparatus 11 acquires the arbitrary data 112 based on the “target data (M3)” of each received communication message, and the acquired plurality of arbitrary data 112 can be combined to reconstruct one piece of information.
  • M3 target data
  • the information processing apparatus 11 divides one piece of information to be transferred into a plurality of pieces, generates each piece of arbitrary data 112 that is the divided piece of information, and sets each piece of arbitrary data 112
  • the communication message can be set as “target data (M3)”.
  • the value of “target data (M3)” read from the communication message is set in the arbitrary data 112 of the information processing apparatus 11.
  • the value of “checksum (M2)” read from the communication message is set.
  • the checksum is not included in the communication message, nothing is set in the checksum 113, for example, it is cleared to “0”.
  • an algorithm for verification corresponding to the algorithm used by the second ECU 13 for calculating the checksum 113 is set.
  • the information processing apparatus 11 can detect whether the arbitrary data 112 has been modified based on the checksum 113 corresponding to the arbitrary data 112. Then, the information processing apparatus 11 uses the arbitrary data 112, which has been detected as a result of the detection, not to be modified for the execution of the application 111. In this case, since the presence / absence of alteration of the arbitrary data 112 is detected immediately before being used for the execution of the application 111, the reliability of the arbitrary data 112 is improved, and the reliability of the operation of the application 111 using the arbitrary data 112 is improved. Can also be enhanced.
  • the application 111 calculates a checksum 113 corresponding to the arbitrary data 112 based on applying a predetermined algorithm to the arbitrary data 112 so that the presence / absence of falsification of the arbitrary data 112 can be detected. Since the calculated checksum 113 is stored in the “extended ID area”, the length is calculated to be 18 bits or less.
  • the second ECU 13 in which the algorithm for verification corresponding to the predetermined algorithm is set can detect whether or not the received arbitrary data 112 has been tampered with based on the received corresponding checksum 113.
  • the information processing device 11 of the first ECU 10 has a flag used to determine whether or not “checksum” is set in the communication message consisting of “extended format F2” when the information processing device 11 receives the communication message.
  • the switch SW flag 114 is set. When the received communication message does not include “checksum”, the switch SW flag 114 is set to “0” (“off”) indicating that no checksum is added. On the other hand, when “checksum” is included in the received communication message, the switch SW flag 114 is set to “1” (“ON”) indicating that the checksum is added. That is, the switch SW flag 114 is set to “0” when the format of the data frame is “extended format F2”, and is set to “1” when the format is “special format F3”. When the data frame format is “basic format F1”, the set value of the switch SW flag 114 is not used.
  • the switch SW flag 114 is used to determine whether or not to set “checksum” in the communication message composed of “extended format F2” when transmitting the communication message. That is, when “0” is set in the switch SW flag 114, the information processing apparatus 11 sets “extended format F2” in which “checksum” is not added to the communication message to be transmitted, while “ When “1” is set, the information processing apparatus 11 sets “special format F3” in which “checksum” is added to the communication message. As described above, whether or not the information processing apparatus 11 includes the check value in the communication message can be selected based on the value set in the switch SW flag 114.
  • a value of “0” or “1” is set in the switching SW flag 114 based on the operation of the application 111.
  • the switching SW flag is set.
  • 114 is set to “1”.
  • the CAN controller 12 is connected to the information processing apparatus 11 so as to be able to exchange data.
  • the CAN controller 12 is connected to the information processing apparatus 11 so that various kinds of information can be exchanged, and is connected to the communication bus 16 via the physical layer interface 17.
  • the physical layer interface 17 is a so-called CAN transceiver, and is electrically connected to the CAN controller 12 and the communication bus 16, and mutually converts electrical characteristics between the communication bus 16 and the CAN controller 12. As a result, communication messages can be transmitted in both directions between the communication bus 16 and the CAN controller 12.
  • the CAN controller 12 includes a transmission / reception circuit 121 that transmits and receives a communication message via the communication bus 16, and an ID filtering 122 that performs so-called message filtering that determines necessity / unnecessity of the received communication message. And are provided.
  • the CAN controller 12 is provided with a changeover switch 125 for switching the filtering of the ID filtering 122 to the special filtering when the communication message is “special format F3”.
  • the CAN controller 12 is provided with a CPU interface 123 for sending / receiving various data set in the communication message to / from the information processing apparatus 11. Further, the CPU interface 123 is provided with a message buffer 124 that is a readable / writable memory.
  • the message buffer 124 includes a reception buffer area that can be read from the information processing apparatus 11 and a writable transmission buffer area. Is provided. Note that the reception buffer area and the transmission buffer area may share a predetermined area of the message buffer 124, or may secure different areas of the message buffer 124.
  • the transmission / reception circuit 121 realizes the CAN protocol function.
  • the communication message received from the communication bus 16 is received by the reception port Rx via the physical layer interface 17, the received communication message is received by the CAN protocol. Analyze based on At this time, the transmission / reception circuit 121 detects the presence / absence of alteration of the communication message based on CRC (Cyclic Redundancy Check) stipulated to be provided in a CAN protocol remote frame or data frame.
  • CRC Cyclic Redundancy Check
  • the transmission / reception circuit 121 When the transmission / reception circuit 121 receives the target data (M3) to be transmitted to the communication bus 16 from the CPU interface 123, the transmission / reception circuit 121 creates a communication message including the target data (M3), CRC, and the like from the transmission port Tx. The data is transmitted to the communication bus 16 via the interface 17.
  • the changeover switch 125 is a switch for switching the filtering function executed by the ID filtering 122 depending on whether the communication message is “extended format F2” or “special format F3”. Switching is performed based on the switching SW flag 114 of the processing device 11. More specifically, the selector switch 125 is switched to “off” when the switch SW flag 114 of the information processing apparatus 11 is “0” (“off”), and filtering of the ID filtering 122 is performed with “basic ID” and “extended”. Based on “ID”. On the other hand, the selector switch 125 is switched to “ON” when the switch SW flag 114 is “1” (“ON”), and causes the filtering of the ID filtering 122 to be performed based only on “basic ID”. . That is, the changeover switch 125 is set to “off” when the communication message received by the first ECU 10 by the application 111 is “extended format F2”, and “on” when the communication message is “special format F3”. Is set to.
  • the ID filtering 122 sets whether the received communication message is a message required for the first ECU 10 or an unnecessary message in the “basic ID” or “extended ID” included in the data frame. It is determined based on applying the “ID filter value”.
  • the ID filtering 122 sends a communication message determined to be necessary to the CPU interface 123, but stops sending a communication message determined to be unnecessary to the CPU interface 123 instead. That is, the ID filtering 122 performs so-called filtering that restricts transmission of communication messages to the CPU interface 123 so that only necessary communication messages are sent to the CPU interface 123.
  • the communication message determined to be necessary can use the “target data (M3)” in the first ECU 10, while the communication message determined to be unnecessary is the “target data”. Is not used in the first ECU 10.
  • the set “basic ID” and “extended ID” indicating the contents necessary for the first ECU 10 are set in the first ECU 10
  • the set “basic ID” and “extended ID” are set. Based on this, the ID filter value of the ID filtering 122 is set.
  • the ID filtering 122 determines that the received data frame is “standard format F1” based on the CAN protocol, the “basic ID” set in the “basic ID area” of “standard format F1”. Filtering based on (basic filtering). In addition, when the ID filtering 122 determines that the received data frame is “extended format F2” based on the CAN protocol, the ID filtering 122 sets “basic ID” and “extended ID region” set in the “basic ID region”. Filtering (extended filtering) is performed based on the “extended ID”.
  • the ID filtering 122 performs filtering (special filtering) based on the “basic ID” set in the “basic ID area” when the communication message is determined to be “special format F3”. That is, the ID filtering 122 performs “basic filtering”, “extended filtering”, and “special filtering” as filtering.
  • the ID filtering 122 indicates that the bit following the “basic ID area” “RTR” (see FIG. 3A) is a dominant that is one of the two bus levels in the CAN protocol. If detected, the data frame is determined to be “standard format F1” and “basic filtering” is performed. Note that “RTR” is an abbreviation for remote transmission request.
  • the ID filtering 122 is a recessive in which “SRR” and “IDE” (see FIG. 3B), which are bits following the “basic ID area”, are the other levels of the two bus levels in the CAN protocol.
  • the data frame is provisionally determined to be “extended format F2”.
  • the changeover switch 125 is set to “off”
  • the ID filtering 122 determines that the format of the data frame is “extended format F2” and performs “extended filtering”.
  • the changeover switch 125 is set to “ON”
  • the ID filtering 122 determines that the format of the data frame is “special format F3” and performs “special filtering”.
  • SRR is an abbreviation for the Substitute Remote Request bit
  • IDE is an abbreviation for the identifier extension bit.
  • the ID filtering 122 selects “extended filtering” or “special filtering” based on whether the setting of the changeover switch 125 is “on” or “off”. I do.
  • the “special filtering” is filtering performed when the communication message is in the “special format F3”, and is filtering performed based on only the “basic ID”, similarly to the “basic filtering”.
  • the ID filtering 122 filters the communication message based only on the “basic ID”, and the data set in the “extended ID area” (checksum in the present embodiment) as in the “extended filtering”. Is sent to the CPU interface 123. That is, “special filtering” is different from “extended filtering” in that filtering is performed only by “basic ID”, while sending a communication message to the CPU interface 123 is performed in the same manner.
  • the ID filtering 122 determines that the format of the communication message is “special format F3” based on the “ON” setting by the changeover switch 125 and executes “special filtering”. As a result, the ID filtering 122 sends the data stored in the “extended ID area” of the communication message that has not been used for filtering, to the CPU interface 123. Accordingly, the information processing apparatus 11 can handle the data stored in the “extended ID area” as, for example, “checksum” based on the setting of the switching SW flag 114.
  • the ID filtering 122 transmits the communication message for transmission received from the CPU interface 123 to the transmission / reception circuit 121 as it is.
  • the ID filtering 122 may confirm “basic ID”, “extended ID”, “checksum”, and the like included in the communication message for transmission.
  • the CPU interface 123 enables transmission / reception of communication messages between the CAN controller 12 and the information processing apparatus 11 via the message buffer 124. That is, in the message buffer 124, the data buffer area can read and write data by the CPU interface 123, and can read and write data from the information processing apparatus 11.
  • the message buffer 124 is provided with a reception buffer in which data in each storage area of the communication message received by the first ECU 10 is stored in a predetermined area corresponding to the storage area.
  • the reception buffer is provided with “basic ID buffer area”, “extended ID buffer area”, “data length buffer area”, “target data buffer area”, and the like as predetermined areas.
  • the “basic ID” is set in the “basic ID buffer area”
  • the “extended ID” is set in the “extended ID buffer area”
  • the “data length” is set in the “data length buffer area”.
  • the “target data” is stored in the “target data buffer area”.
  • “basic ID (M1)” is stored in the “basic ID buffer area”
  • “extended ID (M2)” is displayed in the “extended ID buffer area”
  • “target data (M3)” is displayed in the “target data buffer area”.
  • Each is stored.
  • “extended ID” is stored in the “extended ID buffer area” of the reception buffer, while when the changeover switch 125 is “on”, the format of the communication message is “special format”. Since it is “F3”, “Checksum (M2)” is stored in the “Extended ID buffer area” of the reception buffer.
  • each of the predetermined areas described above can be read by the information processing apparatus 11. That is, when the information processing apparatus 11 detects that data is stored in the reception buffer, the information processing apparatus 11 can read data in each storage area of the received communication message that has passed through the ID filtering 122 via the reception buffer. .
  • the information processing apparatus 11 receives “basic ID” from the “basic ID buffer area” of the reception buffer, “extended ID” from the “extended ID buffer area”, “data length” from the “data length buffer area”, Obtain “target data” from the “target data buffer area”.
  • the “target data” is data including all or a part of the transferred information.
  • the information processing apparatus 11 determines the content of the corresponding “target data (M3)” based on “basic ID (M1)” and “extended ID (M2)”. Further, the information processing apparatus 11 acquires the “extended ID” from the “extended ID buffer area” when the switch SW flag 114 is “off”, while the communication message format when the switch SW flag 114 is “on”. Is “special format F3”, “checksum (M2)” is acquired from the “extended ID buffer area” of the reception buffer.
  • the message buffer 124 is provided with a transmission buffer in which data corresponding to each storage area of the communication message transmitted by the first ECU 10 is stored in a predetermined area corresponding to each storage area.
  • a “basic ID buffer area”, an “extended ID buffer area”, a “data length buffer area”, a “target data buffer area”, and the like are provided as predetermined areas.
  • each of the predetermined areas described above can be written from the information processing apparatus 11.
  • the “basic ID (M1)” is stored in the “basic ID buffer area” of the transmission buffer
  • the “extended ID (M2)” is stored in the “extended ID buffer area”
  • the “data” is stored in the message buffer 124.
  • “Data length” is stored in the “long buffer area”
  • “target data (M3)” is stored in the “target data buffer area”.
  • the information processing apparatus 11 stores the “extended ID” in the “extended ID buffer area” when the switch SW flag 114 is “off”, while the communication message format is changed when the switch 125 is “on”. Since the “special format F3” is selected, “checksum 113” is stored in the “extended ID buffer area” of the transmission buffer.
  • the transmission / reception circuit 121 When the transmission / reception circuit 121 detects that the data is stored in the transmission buffer, the transmission / reception circuit 121 acquires each data stored from the transmission buffer, and the acquired data includes a “basic ID (M1)” and an “extended ID (M2)”. ) ",” Data length ", and” target data (M3) "are generated.
  • the transmission / reception circuit 121 acquires the “extended ID” from the “extended ID buffer area” when the changeover switch 125 is “off”, while the communication message format is “special” when the changeover switch 125 is “on”. Since “format F3” is selected, “checksum (M3)” is acquired from the “extended ID buffer area” of the transmission buffer.
  • the ID filtering 122 When receiving the communication message from the transmission / reception circuit 121, the ID filtering 122 starts executing filtering. When filtering is executed, the received communication message is filtered based on the “basic ID” (step S10). If it is determined by filtering that the communication message is unnecessary, the execution of filtering is terminated. In order to distinguish the format type of the data frame of the communication message determined as the communication message necessary for the execution of filtering, it is determined whether or not “IDE” is dominant (step S11).
  • the ID filtering 122 is stored in each information area of the communication message. Are written to the corresponding areas of the reception buffer provided in the message buffer 124 (step S13). At this time, since the data frame is “standard format F1”, “standard ID (M1)”, “data length”, and “target data (M3)” are written in the reception buffer (“standard”). Writing). Then, the execution of filtering is terminated.
  • the ID filtering 122 determines whether or not the changeover switch 125 is set to “ON” (step S14). When it is determined that the changeover switch 125 is not “ON” (NO in step S14), the ID filtering 122 performs so-called “extended filtering” that performs filtering based on the “basic ID” and the “extended ID”. (Step S15). If the filtering determines that the message is an unnecessary communication message, the filtering is terminated.
  • the ID filtering 122 transfers the data stored in each information area of the communication message to the corresponding area of the reception buffer provided in the message buffer 124. Each is written (step S16). At this time, since the data frame is “extended format F2”, the “standard ID (M1)”, “extended ID (M2)”, “data length”, and “target data (M3) are stored in the reception buffer. ) "Is written (" extension "is written). Then, the execution of filtering is terminated.
  • the ID filtering 122 uses the data stored in each information area of the communication message in the corresponding area of the reception buffer provided in the message buffer 124. (Step S18). At this time, since the data frame is “special format F3”, the “standard ID (M1)”, “extended ID (M2)”, “data” are stored in the reception buffer as in “extended format F2”. “Length” and “Target data (M3)” are written ("Extension” is written). Then, the execution of filtering is terminated.
  • the data set in the “extended ID area” of the communication message is written in the “extended ID buffer area” of the reception buffer.
  • the format of the data frame is “special format F3”
  • the value stored in the “extended ID area” is not “extended ID” but “checksum”. “Checksum” is stored in “.”.
  • the information processing apparatus 11 When the information processing apparatus 11 detects that the data included in the communication message is set in the reception buffer, the information processing apparatus 11 starts predetermined data processing. When the predetermined data processing is started, the information processing apparatus 11 determines whether or not the switch SW flag 114 is “1” (“ON”) (step S20).
  • the information processing apparatus 11 Data set in each buffer area of the reception buffer is acquired (read) (step S21).
  • the information processing apparatus 11 determines the content of the “arbitrary data 112” including the “target data (M3)” based on the read “standard ID (M1)” and “extended ID (M2)”, and
  • the “arbitrary data 112” is subjected to predetermined data processing as it is (step S22). For example, the information processing apparatus 11 determines that the content of “arbitrary data 112” is “speed” of the vehicle 1 based on “standard ID”, and is set to “arbitrary data 112” in the processing of the application 111. The value is used as “speed”.
  • the information processing apparatus 11 acquires data set in each buffer area of the reception buffer ( Read) (step S23). That is, the information processing apparatus 11 obtains “standard ID (M1)” from the “standard ID buffer area” of the reception buffer, “checksum (M2)” from the “extended ID buffer area”, and “target data buffer area”. “Arbitrary data 112” is acquired. Then, the information processing apparatus 11 applies a predetermined algorithm for verification to the “arbitrary data 112” and the “checksum 113” to determine whether or not an error has occurred in the data of the “arbitrary data 112”. Detect (step S24).
  • the information processing apparatus 11 detects whether or not a so-called error has occurred in which the data of “arbitrary data 112” has been altered. Thereby, after the alteration is checked by “CRC” in the transmission / reception circuit 121, the alteration of the data generated in the “arbitrary data 112 (target data (M3))” is detected before reaching the information processing apparatus 11. Will be able to.
  • step S25 If no alteration (error) is detected by detecting the presence / absence of alteration (NO in step S25), the information processing apparatus 11 performs the same processing as in step S22 on the “arbitrary data 112” that has not been altered. Then, predetermined data processing is performed (step S22).
  • step S25 when a modification (error) is detected by detecting the presence or absence of modification (YES in step S25), the information processing apparatus 11 does not use the modified “arbitrary data 112” for predetermined data processing and In order to obtain an accurate value that has not been received, a retransmission request is made based on the “standard ID” corresponding to the “arbitrary data 112” (step S26). That is, the information processing apparatus 11 causes the CAN controller 12 to issue a remote frame, which is a communication message for requesting data, based on the “standard ID”. The remote frame based on the “standard ID” thus issued causes the second ECU 13 to reissue a data frame including “target data” corresponding to the “standard ID”.
  • the information processing apparatus 11 Even if the information processing apparatus 11 acquires the “arbitrary data 112” whose value has been modified, the information processing apparatus 11 thereafter receives a data frame corresponding to the “standard ID” reissued from the second ECU 13. In a short time, it is possible to obtain appropriate “arbitrary data 112” corresponding to the “standard ID” whose value is not altered.
  • the reliability of the value of “arbitrary data 112” used for execution of the application 111 is enhanced, and thus the reliability is improved.
  • the reliability of the execution result of the application 111 performed using the value of the “arbitrary data 112” is also improved.
  • the communication system including the communication device according to the present embodiment has the effects listed below.
  • the CAN controller 12 of the first ECU 10 changes the target data (M3) to be transferred between the two CAN controllers 12 and 15 and the target data (M3).
  • the checksum (M2) for detecting presence / absence can be acquired from one communication message (one frame).
  • the checksum M2 is acquired as a separate communication message. Compared to the above, it is possible to reduce the amount of communication messages in the network. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like.
  • the data area corresponds to a data field defined in the CAN protocol.
  • the data field is an area where the user can freely define the content (data), and the content (data) defined by the user in the same area is the target data (M3).
  • the CAN controller 12 can acquire the target data (M3) and the checksum (M2) from one communication message, respectively, when the target data (M3) and the checksum (M2) are sent in different communication messages. It is possible to omit management of the correspondence between two required communication messages. For this reason, detection of modification of the target data (M3) is simplified, and convenience is improved. For example, the device that processes the transferred target data eliminates the waiting time until the checksum is sent after acquiring the target data, or requests the retransmission of the check value when the check value cannot be received. This makes it possible to omit processing to be performed.
  • the CAN controller 12 of the first ECU 10 can use the checksum (M2) added without changing the “extended format F2”.
  • M2 checksum
  • the presence or absence of modification of the target data is detected only by using the extended ID area.
  • a checksum (M2) is easily added.
  • the CAN controller 12 of the first ECU 10 determines that the format is “special format F3”
  • the “checksum M2” added to the “extended ID” is added to perform filtering using only the “basic ID”. "Is prevented from affecting the message filtering performed by the ID filtering 122. As a result, the communication message to which the check value is added can be more suitably processed.
  • the CAN controller 12 uses the area storing the “extended ID” as if the “extended ID” which is the original use in the CAN protocol is stored. As a result, the versatility of the communication apparatus can be improved.
  • the information processing device 11 of the first ECU 10 detects whether or not the arbitrary data 112 is modified based on the acquired target data (M3) by using the checksum 113 included in the same communication message.
  • the arbitrary data 112 based on the target data (M3) and the checksum 113 can be acquired from the same communication message, the process for detecting the presence / absence of alteration is accelerated.
  • the CAN controller 15 of the second ECU 13 includes target data (M3) to be transferred between the two CAN controllers 12 and 15, and the target data (M3).
  • the checksum (M2) for detecting the presence or absence of alteration can be stored in one communication message (one frame). In this way, if the target data (M3) and the checksum (M2) transferred between the two CAN controllers 12 and 15 are stored in one communication message, the checksum (M2) is transmitted in a separate communication message. Compared with the case where it carries out, the communication amount of the communication message in a network can be reduced. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like.
  • the CAN controller 15 of the second ECU 13 stores the target data (M3) and the checksum (M2) in one communication message. This makes it possible to omit the management of the correspondence between the two communication messages required when sending the target data (M3) and the checksum (M2) in different communication messages, improving convenience.
  • the device that transmits the target data may eliminate the waiting time until the checksum is transmitted after transmitting the target data, or may omit processing corresponding to a retransmission request for one of the two. become able to.
  • the CAN controller 15 of the second ECU 13 can add the checksum (M2) without changing the “extended format F2”.
  • M2 checksum
  • the CAN controller 15 of the second ECU 13 can store the extended ID, which is the original application, in the area for storing the extended ID.
  • the versatility of the communication device can be improved.
  • the communication system includes target data (M3) to be transferred between the two CAN controllers 12 and 15, and a checksum (M2) that detects whether the target data (M3) has been altered. ) Can be stored in one communication message (one frame). Then, the target data (M3) and the checksum (M2) stored in the communication message can be acquired from the one communication message.
  • the target data (M3) and the checksum (M2) transferred between the two CAN controllers 12 and 15 are stored in one communication message and transmitted and received, the checksum ( Compared with the case where M2) is transmitted and received as a separate communication message, the communication volume of the communication message in the network can be reduced. As a result, the overhead generated for each communication message in the communication system, arbitration during transmission, and the like can be reduced.
  • the communication system can store and receive the target data (M3) and the checksum (M2) in one communication message. From this, it becomes possible to omit the management of the correspondence between two communication messages, which is necessary when the target data (M3) and the checksum (M2) are sent in different communication messages. Convenience is improved. For example, the device that transmits the target data (M3) and the device that receives the target data (M3) receive the target data (M3) and then wait until the next checksum (M2) is transmitted and received. Or the processing corresponding to the retransmission request for one of the two communication messages can be omitted. Thereby, a quick communication can be performed as a communication system.
  • a second embodiment that embodies a communication system including a communication apparatus according to the present invention will be described with reference to FIG.
  • a part of the processing in the first ECU 10A and the second ECU 13A is different from the first ECU 10 and the second ECU 13 in the first embodiment, but the other configurations are the same. Therefore, here, differences in processing will be described, and detailed description of similar configurations will be omitted. That is, it is assumed that the first ECU 10A and the second ECU 13A can support “basic format F1,” “extended format F2,” and “special format F3”.
  • the first ECU 10A changes the data frame format of the communication message between the second ECU 13A and the first ECU 10A to one of the “extended format F2” or the “special format F3” as necessary. It is possible to select and switch to the selected format as appropriate.
  • the value of the switch SW flag 114 is appropriately set to either “0” (“off”) or “1” (“on”) depending on the application executed there. It has become so.
  • the value of the switch SW flag is appropriately set to “0” or “1” depending on the application executed there.
  • Each of the first ECU 10A and the second ECU 13A indicates that the data frame is “extended format F2” when the value of the switch SW flag is “0”, that is, “extended ID” is set in the “extended ID area”. This corresponds to the stored method (extended method).
  • each of the first ECU 10A and the second ECU 13A when the value of the switch SW flag is “1”, indicates that the data frame is “special format F3”, that is, “extended ID area” has “checksum”. This corresponds to the stored method (special method).
  • the first ECU 10A sets the switching SW flag of the second ECU 13A.
  • a switching message for changing the value from “0” to “1” is transmitted to the second ECU 13A (step S30).
  • the first ECU 10A transmits a communication message (data frame) having “basic ID” as a message for switching the value of the switch SW flag from “0” to “1” to the network.
  • the second ECU 13A processes the communication message with an application, and changes the value of the switching SW flag from “0” to “1” by the application (step S31).
  • the first ECU 10A and the second ECU 13A are respectively switched from the expansion method to the special method, and correspond to the special method.
  • the switching message may be a remote frame, and in that case, the first ECU 10A may obtain the switching result from the second ECU 13A.
  • the first ECU 10A After changing the value of the switch SW flag of the second ECU 13A from “0” to “1”, the first ECU 10A transmits a communication message (remote frame) requesting data constituting predetermined information (Ste S32). At this time, a “basic ID” indicating predetermined information that needs to be transmitted by the second ECU 13A is set in the communication message.
  • the second ECU 13A that has received the communication message requesting the data constituting the predetermined information generates data for transmission from the required predetermined information (step S33), and uses it for detection of alteration of the data. Calculate the checksum to be used. Then, the calculated transmission data and checksum are stored in the corresponding areas of the “extended format F2”, that is, the “target data area” and the “extended ID area” (step S34). Since the value of the switch SW flag is “1”, the data frame is “extended format F2”. However, the first ECU 10A and the second ECU 13A process the data frame as “special format F3”. It has become. Then, the second ECU 13A transmits the communication message storing the transmission data and the checksum to the network (step S35).
  • the first ECU 10A receives the communication message transmitted from the second ECU 13A corresponding to the previously transmitted “basic ID” (step S36) and executes processing such as filtering (step S37). That is, since the first ECU 10A performs filtering by “special filtering” on the communication message, the first ECU 10A filters the communication message only by “basic ID”.
  • the first ECU 10A obtains the “checksum” from the “extended ID area” and sets it in the “extended ID buffer area” of the reception buffer (step S38). Based on the fact that the switch SW flag is “1”, the first ECU 10A determines that the data in the “extended ID area” of the reception buffer is “checksum”. Therefore, the first ECU 10A detects whether or not the “arbitrary data” obtained from the “target data area” of the reception buffer has been modified based on the above-mentioned “checksum”, and detects that it has not been modified. The acquired “arbitrary data” is used for application processing (step S39). When it is detected that “arbitrary data” has been altered, a request is made to retransmit a communication message including the “arbitrary data (target data)” as in the first embodiment.
  • the first ECU 10A receives the first ECU 10A and the second ECU 10A.
  • the value of the switch SW flag of the ECU 13A is returned to “0”. That is, in the first ECU 10A, the value of the switching SW flag is returned from “1” to “0” by the application executed there, and the value of the switching SW flag of the second ECU 13A is changed from “1” to “0”.
  • a communication message (data frame) to be returned to is transmitted to the second ECU 13A (step S40).
  • the second ECU 13A that has received the switching communication message processes the communication message by an application, and changes the value of the switching SW flag from “1” to “0” by the application (step S41).
  • the first ECU 10A and the second ECU 13A are respectively switched from the special method to the expansion method, and correspond to the expansion method.
  • the communication system including the communication device according to the present embodiment has the effects listed below in addition to the effects (1) to (9) described in the first embodiment.
  • each said embodiment can also be implemented with the following aspects.
  • the case where the first ECU 10A on the data receiving side changes the value of the switching SW flag of the second ECU 13A on the data transmitting side is exemplified.
  • the present invention is not limited to this, and the ECU on the data transmission side may change the value of the switch SW flag of the ECU on the data reception side.
  • the second The ECU 13B transmits a communication message for changing the value of the switch SW flag of the first ECU 10B from “0” to “1” to the first ECU 10B (step S50).
  • the first ECU 10B that has received the communication message may change the value of the switch SW flag from “0” to “1” by an application that processes the communication message (step S51).
  • the second SW 13B switch SW flag is changed from “1” to “0” in order to cancel the response to the communication message of “special format F3”.
  • the ECU 13B transmits a communication message for changing the value of the switch SW flag of the first ECU 10B from “1” to “0” to the first ECU 10B (step S52).
  • the first ECU 10B that has received the communication message may change the value of the switch SW flag from “1” to “0” by an application that processes the communication message (step S51).
  • the CAN controller that receives the communication message sets whether or not the check sum is stored in the communication message by the CAN controller that transmits the communication message. It becomes easy to switch the setting of whether or not to store. That is, the applicability of such a communication system is increased and the degree of freedom in design is increased.
  • the filtering executed by the ID filtering 122 is switched to “extended filtering” or “special filtering” by the changeover switch (switching SW flag) is illustrated.
  • the present invention is not limited to this, and filtering performed by ID filtering may be only “special filtering”.
  • filtering performed by ID filtering may be only “special filtering”.
  • the communication system uses only the “basic format” for communication messages, the system does not need to support the extended format. May always apply “special filtering”.
  • the possibility that the “special format” for storing the target data and the checksum corresponding to the target data in one communication message can be applied to the communication system configured by the CAN network is improved.
  • the present invention is not limited to this, and if the modification of “arbitrary data” acquired from the “data area” can be detected, so-called error detection is possible, the value used for the check value is calculated based on what algorithm It may be a value, such as a CRC. Thereby, the design freedom of a communication system can be improved.
  • the present invention is not limited to this, and three or more ECUs may be connected to the communication bus so as to be able to communicate with each other. This increases the availability of the communication system.
  • an ECU that is not compatible with a communication message of “special format” in which “checksum” is included in the “extended ID” is connected in the ECU connected to the communication bus. Also good.
  • the unsupported ECU is set so that the communication message can be determined to be unnecessary based on the “basic ID”, no inconvenience occurs even if the corresponding ECU and the unsupported ECU are mixed. . If the ECU corresponding to the “special format F3” and the non-corresponding ECU can be mixed, the application of the communication device to the communication system is facilitated and the applicability is enhanced.
  • SYMBOLS 1 Vehicle 10, 10A, 10B ... 1st ECU (1st electronic control apparatus), 11 ... Information processing apparatus, 12, 15 ... CAN controller, 13, 13A, 13B ... 2nd ECU, 14 ... Information Processing unit 16 ... Communication bus, 17 ... Physical layer interface, 111 ... Application, 112 ... Arbitrary data, 113 ... Checksum, 114 ... Switch SW flag, 121 ... Transmission / reception circuit, 122 ... ID filtering, 123 ... CPU interface, 124 ... Message buffer, 125 ... Changeover switch, 141 ... Application, M1 ... Basic ID, M2 ... Extended ID (checksum), M3 ... Target data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

Provided are a communication device capable of increasing, with regard to data communicated using the CAN protocol, reliability at a processing point for the data, a communication system provided with the communication device, and a communication method using the communication system. The present invention is a CAN controller which receives a communication message transferred between CAN controllers on the basis of the CAN protocol, such that object data is stored in an object data storage area defined within one frame as an area for storing the object data included in the communication message, and by receiving the communication message in which a checksum is stored which is used for detecting the presence or absence of modifications of the object data in an area different from the object data storage area within the same frame, from the same received communication message, the object data stored in the object data storage area is acquired together with the checksum which is stored in an area different from the object data storage area.

Description

通信装置、通信システム及び通信方法COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD
 本発明は、車両用ネットワークに接続される通信装置及び該通信装置を備える通信システム、及び同通信システムを使用する通信方法に関する。 The present invention relates to a communication device connected to a vehicle network, a communication system including the communication device, and a communication method using the communication system.
 周知のように、車両に搭載された複数の電子制御装置(ECU)は、それぞれがネットワーク接続されることによってそれら電子制御装置の有する情報(車両情報)を相互に送受信可能とする車両ネットワークシステムを構成していることが多い。そして、このような車両ネットワークシステムを構成する通信システムの一つにコントロールエリアネットワーク(CAN)がある。 As is well known, a plurality of electronic control units (ECUs) mounted on a vehicle are connected to each other via a network so that information (vehicle information) held by these electronic control units can be transmitted and received between each other. Often configured. One of communication systems that constitute such a vehicle network system is a control area network (CAN).
 車載用のCANは、通信における1単位となるフレームで送信できるデータ量が最大で64ビット(8バイト)に定められている。このため、車載用のCANでは、1フレームに格納しきれないプログラムなどの大きなデータは、複数に分割され、それら分割されたデータそれぞれが異なるフレームに格納されて転送されるようになっている。ところが、フレーム数の増加は、格納されるデータの他にフレームに付加されている情報、いわゆるオーバーヘッドを増加させるため、これらオーバーヘッドの増加を含めた通信量の増大が無視できない。 In the in-vehicle CAN, the maximum amount of data that can be transmitted in a frame as a unit in communication is set to 64 bits (8 bytes) at the maximum. For this reason, in a vehicle-mounted CAN, large data such as a program that cannot be stored in one frame is divided into a plurality of pieces, and each of the divided data is stored and transferred in different frames. However, the increase in the number of frames increases the information added to the frames in addition to the stored data, so-called overhead, so the increase in the amount of communication including the increase in overhead cannot be ignored.
 そこで、通信量の増大を抑制する技術の一例が、特許文献1に記載されている。 Therefore, an example of a technique for suppressing an increase in communication volume is described in Patent Document 1.
 特許文献1に記載のシステムでは、複数の制御装置(ECU)がCANプロトコルに基づく相互通信の可能な態様で通信線に接続されている。また、この通信線には、オペレータなどの操作により新たな制御プログラムなどの大きなデータを特定のECUに出力できるダイアグ端末を接続することができる。 In the system described in Patent Document 1, a plurality of control devices (ECUs) are connected to a communication line in a manner capable of mutual communication based on the CAN protocol. In addition, a diagnostic terminal capable of outputting large data such as a new control program to a specific ECU can be connected to the communication line by an operation of an operator or the like.
 このダイアグ端末は、大きなデータを転送するとき、CANの拡張フォーマット中に規定されている所定のデータ領域に加えて、所定のデータ領域とは異なる領域に規定されている拡張ID領域などにも転送すべきデータを格納することができる仕様となっている。また、上記特定のECUは、所定のデータ領域に加えて、拡張ID領域などからも転送されたデータを取得して大きなデータを再構成することができるようになっている。これにより、このシステムによれば、ダイアグ端末から特定のECUに対して、所定のデータ領域の大きさに比べて最大で1.39倍の大きさのデータが転送できるようになる。 When transferring large data, this diagnostic terminal transfers to an extended ID area defined in an area different from the predetermined data area in addition to the predetermined data area specified in the CAN extended format. It is a specification that can store data to be stored. In addition to the predetermined data area, the specific ECU can acquire data transferred from an extended ID area or the like to reconstruct large data. Thus, according to this system, it is possible to transfer data having a maximum size of 1.39 times the size of the predetermined data area from the diagnosis terminal to the specific ECU.
特開2010-258990号公報JP 2010-258990 A
 ところで、上述したCANでは、転送するデータの信頼性をプロトコルの規定に基づいて確保する。すなわち、特許文献1に記載のシステムでは、転送するデータの信頼性が、このデータがネットワークから受信された時点では、CANプロトコルに基づいて確保される。その一方、CANプロトコルは、受信後の転送されたデータ、つまりネットワークを介した通信処理の済んだ後のデータにノイズなどによる改変のおそれがあったとしても、その信頼性については何ら担保することができない。このように、通信処理(受信処理)の済んだ後のデータは、それがECUで処理される時点における信頼性までは保証されていない。 By the way, the above-mentioned CAN ensures the reliability of data to be transferred based on the protocol regulations. That is, in the system described in Patent Document 1, the reliability of data to be transferred is ensured based on the CAN protocol when this data is received from the network. On the other hand, the CAN protocol guarantees the reliability even if there is a possibility that the transferred data after reception, that is, the data after communication processing via the network, may be altered due to noise or the like. I can't. As described above, the data after the communication process (reception process) is not guaranteed to the reliability at the time when it is processed by the ECU.
 そこで近年、受信されたデータを処理するECUは、全データの受信完了後、転送された全データのエラーをチェックするチェックサムなどのチェック用のデータをさらに取得するようにしている。そしてECUは、転送された全データの信頼性をチェック用のデータに基づいて検証してから、当該全データに所定の処理を施すようにしている。また他の方法として、特許文献1に記載のようなシステムでは、転送するデータにチェック用のデータを予め含めておき、このデータを受信したECUが、同データからチェック用のデータを抜き出して、当該受信されたデータの信頼性を検証する方法もある。いずれにしても、ECUで処理する時点で、このECUによって受信されたデータに改変等が見つかった場合、この受信データは利用できないため無駄となるなど、データの大きさに比例してその無駄も大きくなる傾向にある。 Therefore, in recent years, an ECU that processes received data has further acquired check data such as a checksum for checking errors in all transferred data after reception of all data is completed. The ECU verifies the reliability of all the transferred data based on the check data, and then performs a predetermined process on the all data. As another method, in the system as described in Patent Document 1, the data to be checked is included in advance in the data to be transferred, and the ECU that has received this data extracts the data for checking from the data, There is also a method for verifying the reliability of the received data. In any case, if modification or the like is found in the data received by the ECU at the time of processing by the ECU, the received data cannot be used and is wasted. It tends to grow.
 本発明は、このような実情に鑑みなされたものであって、その目的は、CANプロトコルにて通信されたデータについて、当該データの処理時点における信頼性を高めることのできる通信装置及び当該通信装置を備える通信システム、及び当該通信システムを使用する通信方法を提供することにある。 The present invention has been made in view of such a situation, and an object of the present invention is to improve the reliability of data communicated by the CAN protocol at the time of processing the data and the communication apparatus. And a communication method using the communication system.
 以下、上記課題を解決するための手段及びその作用効果を記載する。 Hereinafter, means for solving the above-mentioned problems and their effects will be described.
 上記目的を達成するために本発明が提供する通信装置は、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを受信する通信装置であって、前記通信メッセージに含まれる対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に対象データが格納されるとともに、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値が格納されている通信メッセージが受信されることにより、同受信された通信メッセージから、前記対象データ格納領域に格納されている対象データとともに、前記対象データ格納領域とは異なる領域に格納されている前記チェック値を併せて取得する。 In order to achieve the above object, a communication device provided by the present invention is a communication device that receives a communication message transferred between communication devices based on a communication protocol applied to a control area network. The target data is stored in a target data storage area defined in one frame as a target data storage area, and the target data is modified in a different area from the target data storage area in the same frame. By receiving a communication message storing a check value used for detecting the presence or absence of the target data, the target data storage area together with the target data stored in the target data storage area from the received communication message The check values stored in a different area are also acquired.
 上記目的を達成するために本発明が提供する通信方法は、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを受信する通信方法であって、前記通信メッセージに含まれる対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に対象データが格納されるとともに、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値が格納されている通信メッセージを受信する工程と、前記受信した通信メッセージから前記対象データ格納領域に格納されている対象データを取得する工程と、同じく前記受信した通信メッセージから前記対象データ格納領域とは異なる領域に格納されている前記チェック値を取得する工程と、を備える。 In order to achieve the above object, a communication method provided by the present invention is a communication method for receiving a communication message transferred between communication devices based on a communication protocol applied to a control area network. The target data is stored in a target data storage area defined in one frame as a target data storage area, and the target data is modified in a different area from the target data storage area in the same frame. Receiving a communication message in which a check value used for detection of presence / absence is stored, obtaining a target data stored in the target data storage area from the received communication message, and receiving the same Before being stored in an area different from the target data storage area from the communication message And a step of obtaining a check value.
 このような構成もしくは方法によれば、コントロールエリアネットワーク、いわゆるCANの通信プロトコルにおいて、受信する通信装置は、通信装置間で転送の対象とされる対象データと、当該対象データの改変の有無を検出するチェック値とを1つの通信メッセージ(1つのフレーム)から取得することができるようになる。このように、通信装置間で転送される対象データとチェック値とが1つの通信メッセージから取得できるため、チェック値を別途の通信メッセージで取得する場合に比べて、ネットワークにおける通信メッセージの通信量を減らすことができる。これにより、通信メッセージ毎に発生するオーバーヘッドや送信時の調停(アービトレーション)などを減らすことができるようになる。なお、対象データ格納領域は、CANのプロトコルに規定されているデータフィールドに対応する。また、データフィールドは、その内容(データ)をユーザが自由に定義することができる領域となっており、その同領域にユーザが定義した内容(データ)が対象データである。 According to such a configuration or method, in a control area network, so-called CAN communication protocol, the receiving communication device detects the target data to be transferred between the communication devices and whether or not the target data has been altered. The check value to be obtained can be acquired from one communication message (one frame). In this way, since the target data and the check value transferred between the communication devices can be acquired from one communication message, the communication amount of the communication message in the network can be reduced as compared with the case where the check value is acquired as a separate communication message. Can be reduced. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like. The target data storage area corresponds to a data field defined in the CAN protocol. The data field is an area where the user can freely define the contents (data), and the contents (data) defined by the user in the same area are the target data.
 また、受信する通信装置は、1つの通信メッセージから対象データ及びチェック値をそれぞれ取得できるため、対象データとチェック値を異なる通信メッセージにて送った場合に必要とされる2つの通信メッセージの対応関係の管理などを省くことができる。このため、対象データの改変の検出が簡単になり、利便性も向上する。例えば、転送された対象データを処理する装置が、転送する対象データを取得した後、チェック値が送られてくるまでの時間待ちを無くしたり、チェック値が受信できなかったときにチェック値の再送を要求する処理などを省くことができるようになる。 In addition, since the receiving communication device can acquire the target data and the check value from one communication message, the correspondence between the two communication messages required when the target data and the check value are sent in different communication messages. Management can be omitted. For this reason, detection of modification of the target data is simplified and convenience is improved. For example, when the device that processes the transferred target data acquires the target data to be transferred and waits for the check value to be sent, or when the check value cannot be received, the check value is resent. It becomes possible to omit the process of requesting.
 好ましい構成として、前記通信メッセージは、前記コントロールエリアネットワークに適用される通信プロトコルで規定されている拡張フォーマットとして構成されており、前記チェック値が格納される前記対象データ格納領域とは異なる領域として、前記拡張フォーマットに規定されている拡張IDを格納する拡張ID領域が用いられている。 As a preferred configuration, the communication message is configured as an extended format defined by a communication protocol applied to the control area network, and is an area different from the target data storage area in which the check value is stored. An extension ID area for storing an extension ID defined in the extension format is used.
 このような構成によれば、受信する通信装置は、拡張フォーマットに変更を加えずに追加されたチェック値を利用することができる。実際には、基本IDのみを利用し、拡張IDを利用しない通信装置も多く、そのように拡張IDを利用しない通信装置において拡張ID領域を利用することのみで対象データの改変の有無を検出するチェック値が容易に付加されるようになる。また、CANプロトコルに対応した既存の装置を、このような通信装置に変更させるようなことも容易である。 According to such a configuration, the receiving communication device can use the check value added without changing the extended format. Actually, there are many communication devices that use only the basic ID and do not use the extended ID. In such a communication device that does not use the extended ID, the presence or absence of modification of the target data is detected only by using the extended ID area. A check value is easily added. It is also easy to change an existing device that supports the CAN protocol to such a communication device.
 好ましい構成として、前記通信メッセージの要/不要を判断するメッセージフィルタリングを、前記拡張フォーマットに含まれる基本IDのみに基づいて行う。 As a preferred configuration, message filtering for determining whether or not the communication message is necessary is performed based only on the basic ID included in the extended format.
 このような構成によれば、受信する通信装置は、拡張IDに追加されたチェック値がメッセージフィルタリングに影響を及ぼすことを防止される。これにより、チェック値が追加された通信メッセージをより好適に処理できるようになる。 According to such a configuration, the receiving communication device is prevented from affecting the message filtering by the check value added to the extension ID. As a result, the communication message to which the check value is added can be more suitably processed.
 好ましい構成として、前記通信メッセージに前記チェック値を含めるか否かは選択可能になっており、前記チェック値を含めないことが選択されるときには、前記通信メッセージの前記拡張ID領域に格納されている拡張IDを前記基本IDと併せて前記メッセージフィルタリングに用いる。 As a preferred configuration, whether or not to include the check value in the communication message can be selected, and when it is selected not to include the check value, it is stored in the extended ID area of the communication message. The extension ID is used for the message filtering together with the basic ID.
 このような構成によれば、受信する通信装置は、拡張IDを格納する領域を、本来の用途である拡張IDが格納されているとして利用することができるようになり、この通信装置の汎用性を向上させることができるようになる。 According to such a configuration, the receiving communication device can use the area for storing the extension ID as if the extension ID that is the original use is stored. Can be improved.
 好ましい構成として、前記受信された対象データとともに取得されたチェック値に基づいて前記対象データの改変の有無を検出する処理装置を備える。 As a preferred configuration, there is provided a processing device that detects whether or not the target data has been modified based on a check value acquired together with the received target data.
 このような構成によれば、処理装置は受信する通信装置から取得した対象データの改変の有無を同じ通信メッセージに含まれていたチェック値により検出することができる。このように、対象データとそのチェック値とを同じ通信メッセージから取得できるため改変の有無の検出にかかる処理の迅速化が期待できる。 According to such a configuration, the processing device can detect whether or not the target data acquired from the receiving communication device has been altered by the check value included in the same communication message. As described above, since the target data and the check value can be acquired from the same communication message, it is expected that the processing relating to the detection of the presence / absence of alteration is accelerated.
 上記目的を達成するために本発明が提供する通信装置は、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを送信する通信装置であって、前記通信メッセージに含む対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に該対象データを格納するとともに、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値を格納して前記送信する通信メッセージを生成する。 In order to achieve the above object, a communication device provided by the present invention is a communication device that transmits a communication message transferred between communication devices based on a communication protocol applied to a control area network, and includes the communication message. The target data is stored in a target data storage area defined in one frame as a target data storage area, and the target data is modified in a different area from the target data storage area in the same frame. A check value used for presence / absence detection is stored to generate the communication message to be transmitted.
 上記目的を達成するために本発明が提供する通信方法は、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを送信する通信方法であって、前記通信メッセージを送信する工程に先立つ工程として、前記通信メッセージに含む対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に該対象データを格納する工程と、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値を格納する工程と、を備える。 In order to achieve the above object, a communication method provided by the present invention is a communication method for transmitting a communication message transferred between communication devices based on a communication protocol applied to a control area network, wherein the communication message is As a step prior to the step of transmitting, the step of storing the target data in a target data storage region defined in one frame as a region for storing the target data included in the communication message, and the target data in the same frame Storing a check value used for detecting whether or not the target data is altered in an area different from the storage area.
 このような構成もしくは方法によれば、コントロールエリアネットワーク、いわゆるCANの通信プロトコルにおいて、送信する通信装置は、通信装置間で転送の対象とされる対象データと、当該対象データの改変の有無を検出するチェック値とを1つの通信メッセージ(1つのフレーム)に格納することができるようになる。このように、通信装置間で転送される対象データとチェック値とを1つの通信メッセージに格納すれば、チェック値を別途の通信メッセージで送信する場合に比べて、ネットワークにおける通信メッセージの通信量を減らすことができる。これにより、通信メッセージ毎に発生するオーバーヘッドや送信時の調停(アービトレーション)などを減らすことができるようになる。 According to such a configuration or method, in a control area network, a so-called CAN communication protocol, a transmitting communication device detects target data to be transferred between communication devices and whether or not the target data has been altered. The check value to be stored can be stored in one communication message (one frame). As described above, if the target data and the check value transferred between the communication devices are stored in one communication message, the communication amount of the communication message in the network can be reduced as compared with the case where the check value is transmitted as a separate communication message. Can be reduced. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like.
 また、送信する通信装置は、1つの通信メッセージに通信装置間で転送する対象データ及びチェック値とをそれぞれ格納することから、対象データとチェック値を異なる通信メッセージにて送る場合に必要となる2つの通信メッセージの対応関係の管理などを省くことができるようになり、利便性が向上する。例えば、対象データを送信する装置を、対象データを送信した後、チェック値を送るまでの待機時間を無くさせたり、2つのいずれか一方に対する再送要求に対応する処理などを省かせたりすることができるようになる。 Further, since the transmitting communication device stores the target data and the check value to be transferred between the communication devices in one communication message, it is necessary when sending the target data and the check value in different communication messages. This makes it possible to omit the management of the correspondence between two communication messages, thereby improving convenience. For example, the device that transmits the target data may eliminate the waiting time until the check value is transmitted after transmitting the target data, or may omit processing corresponding to a retransmission request for one of the two. become able to.
 好ましい構成として、前記通信メッセージは、前記コントロールエリアネットワークに適用される通信プロトコルで規定されている拡張フォーマットとして構成されており、前記チェック値を格納する前記対象データ格納領域とは異なる領域として、前記拡張フォーマットに規定されている拡張IDを格納する拡張ID領域を用いる。 As a preferred configuration, the communication message is configured as an extended format defined by a communication protocol applied to the control area network, and is an area different from the target data storage area for storing the check value, An extension ID area for storing an extension ID defined in the extension format is used.
 このような構成によれば、送信する通信装置は、拡張フォーマットに変更を加えずにチェック値を追加させることができる。実際には、基本IDのみを利用し、拡張IDを利用しない通信装置も多く、そのように拡張IDを利用しない通信装置において拡張ID領域を利用することのみで対象データの改変の有無を検出するチェック値を容易に付加することができるようになる。また、CANプロトコルに対応した既存の装置を、このような通信装置に変更させるようなことも容易である。 According to such a configuration, the transmitting communication device can add the check value without changing the extended format. Actually, there are many communication devices that use only the basic ID and do not use the extended ID. In such a communication device that does not use the extended ID, the presence or absence of modification of the target data is detected only by using the extended ID area. A check value can be easily added. It is also easy to change an existing device that supports the CAN protocol to such a communication device.
 好ましい構成として、前記拡張ID領域に前記チェック値を格納するか否かは選択可能になっており、前記チェック値を格納しないことが選択されるときには、前記拡張ID領域に前記チェック値を格納しない。 As a preferred configuration, whether or not to store the check value in the extended ID area can be selected, and when it is selected not to store the check value, the check value is not stored in the extended ID area. .
 このような構成によれば、送信する通信装置は、拡張IDを格納する領域に、本来の用途である拡張IDを格納することができるようになり、この通信装置の汎用性を向上させることができるようになる。 According to such a configuration, the transmitting communication apparatus can store the extended ID that is originally intended for use in the area for storing the extended ID, thereby improving the versatility of the communication apparatus. become able to.
 上記目的を達成するために本発明が提供する通信システムは、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信が行われる通信システムであって、前記通信メッセージを送信する通信装置として、上記記載の通信装置を用い、前記通信メッセージを受信する通信装置として、上記記載の通信装置を用いる。 In order to achieve the above object, a communication system provided by the present invention is a communication system in which transmission and reception of a communication message transferred between communication devices based on a communication protocol applied to a control area network is performed. The communication device described above is used as a communication device that transmits a communication message, and the communication device described above is used as a communication device that receives the communication message.
 上記目的を達成するために本発明が提供する通信方法は、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信を、それら通信装置の相互通信にて行う通信方法であって、前記通信メッセージを送信する通信装置が同通信メッセージを送信する通信方法として、上記記載の通信方法を用い、前記通信メッセージを受信する通信装置が同通信メッセージを受信する通信方法として、上記記載の通信方法を用い、前記通信メッセージを送信する通信装置から送信された通信メッセージを、前記通信メッセージを受信する通信装置により取得する。 In order to achieve the above object, a communication method provided by the present invention is configured to transmit and receive a communication message transferred between communication devices based on a communication protocol applied to a control area network by mutual communication between the communication devices. A communication method for performing communication using the communication method described above as a communication method for transmitting the communication message by a communication device for transmitting the communication message, wherein the communication device for receiving the communication message receives the communication message. As a method, the communication method described above is used, and the communication message transmitted from the communication device that transmits the communication message is acquired by the communication device that receives the communication message.
 このような構成もしくは方法によれば、コントロールエリアネットワーク、いわゆるCANの通信プロトコルにおいて、通信システムは、通信装置間で転送の対象とされる対象データと、当該対象データの改変の有無を検出するチェック値とを1つの通信メッセージ(1つのフレーム)に格納させることができる。そして、この1つの通信メッセージから、同通信メッセージに格納された対象データとチェック値とを、それぞれ取得させることができるようになる。 According to such a configuration or method, in a control area network, a so-called CAN communication protocol, the communication system detects the target data to be transferred between communication devices and the presence / absence of alteration of the target data. The value can be stored in one communication message (one frame). Then, the target data and the check value stored in the communication message can be acquired from the one communication message.
 このように、通信装置間で転送される対象データとチェック値とを1つの通信メッセージに格納して送信するとともに受信するようにすれば、チェック値を別途の通信メッセージで送信受信する場合に比べて、ネットワークにおける通信メッセージの通信量を減らすことができる。これにより、通信システムにおける、通信メッセージ毎に発生するオーバーヘッドや送信時の調停(アービトレーション)などを減らすことができるようになる。 In this way, if the target data transferred between communication devices and the check value are stored and transmitted in one communication message, the check value is transmitted and received as a separate communication message. Thus, the communication volume of communication messages in the network can be reduced. As a result, the overhead generated for each communication message in the communication system, arbitration during transmission, and the like can be reduced.
 また、通信システムは、1つの通信メッセージに対象データ及びチェック値をそれぞれ格納して送信受信することから、対象データとチェック値とを異なる通信メッセージにて送る場合に必要となる2つの通信メッセージの対応関係の管理などを省くことができるようになり、利便性が向上する。例えば、対象データを送信する装置、及び、同受信する装置を、対象データを送信受信した後、次にチェック値を送信受信するまでの待機時間を無くすようにさせたり、2つのいずれか一方に対する再送要求に対応する処理などを省かせたりすることができるようになる。これにより、通信システムとして迅速な通信を行わせることなどができる。 In addition, since the communication system stores the target data and the check value in one communication message and transmits and receives them, the two communication messages required when the target data and the check value are transmitted in different communication messages. It becomes possible to omit the management of the correspondence relationship and the convenience is improved. For example, the device that transmits the target data and the device that receives the target data may be configured to eliminate the waiting time until the next check value is transmitted and received after the target data is transmitted and received. It becomes possible to omit the processing corresponding to the retransmission request. Thereby, a quick communication can be performed as a communication system.
 好ましい構成として、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信が行われる通信システムであって、前記通信メッセージを送信する通信装置として上記記載の通信装置を用いるとともに、前記通信メッセージを受信する通信装置として上記記載の通信装置を用い、前記通信メッセージを送信する通信装置には、前記拡張ID領域に前記チェック値を格納するか否かを通知するメッセージを送出する機能を更に設け、前記通信メッセージを受信する通信装置には、前記拡張ID領域に前記チェック値を格納するか否かを通知するメッセージを取得することに基づいて前記拡張ID領域に前記チェック値が含まれているか否かを認識する機能を更に設ける。 As a preferred configuration, a communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network, wherein the communication device described above is used as a communication device for transmitting the communication messages. The communication device described above is used as a communication device that receives the communication message, and notifies the communication device that transmits the communication message whether to store the check value in the extended ID area. A function for transmitting a message is further provided, and the communication device that receives the communication message is provided in the extension ID area based on acquiring a message for notifying whether or not the check value is stored in the extension ID area. A function of recognizing whether or not the check value is included is further provided.
 このような構成によれば、通信メッセージを受信する通信装置は、通信メッセージにチェック値が格納されているか否かが通信メッセージを送信する通信装置により設定されるため、通信システムとして送信受信される通信メッセージにチェック値を格納するか否かの設定を切り換えることが簡単になる。これにより、このような通信システムの適用可能性が高められる。 According to such a configuration, the communication device that receives the communication message is transmitted and received as a communication system because whether or not a check value is stored in the communication message is set by the communication device that transmits the communication message. It becomes easy to switch the setting of whether to store the check value in the communication message. Thereby, the applicability of such a communication system is enhanced.
 好ましい構成として、コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信が行われる通信システムであって、前記通信メッセージを送信する通信装置として上記記載の通信装置を用いるとともに、前記通信メッセージを受信する通信装置として上記記載の通信装置を用い、前記通信メッセージを受信する通信装置には、前記チェック値の前記拡張IDへの格納をリクエストするメッセージを送出する機能を更に設け、前記通信メッセージを送信する通信装置には、前記チェック値の前記拡張IDへの格納をリクエストするメッセージを取得することに基づいて前記拡張ID領域に前記チェック値を格納する機能を更に設ける。 As a preferred configuration, a communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network, wherein the communication device described above is used as a communication device for transmitting the communication messages. A communication device described above is used as a communication device that receives the communication message, and a message requesting storage of the check value in the extension ID is transmitted to the communication device that receives the communication message. A function for storing the check value in the extension ID area based on obtaining a message for requesting storage of the check value in the extension ID. Provide further.
 このような構成によれば、通信メッセージを送信する通信装置は、通信メッセージにチェック値を格納するか否かが通信メッセージを受信する通信装置により設定されるため、通信システムとして送信受信される通信メッセージにチェック値を格納するか否かの設定を切り換えることが簡単になる。これにより、このような通信システムの適用可能性が高められる。 According to such a configuration, the communication device that transmits the communication message is set by the communication device that receives the communication message to determine whether or not to store the check value in the communication message. It becomes easy to switch the setting of whether to store the check value in the message. Thereby, the applicability of such a communication system is enhanced.
本発明に係る通信装置を備える通信システムを具体化した第1の実施形態について、その概略構成を示すブロック図。The block diagram which shows the schematic structure about 1st Embodiment which actualized the communication system provided with the communication apparatus which concerns on this invention. 図1に示す通信装置の概略構成を示すブロック図。The block diagram which shows schematic structure of the communication apparatus shown in FIG. 図1に示す通信システムに用いられるCANプロトコルのデータフレームを模式的に示す模式図であって、(a)は標準フォーマットを示す模式図、(b)は拡張フォーマットを示す模式図、(c)は本実施形態における拡張フォーマットの利用態様を示す模式図。FIG. 2 is a schematic diagram schematically showing a data frame of a CAN protocol used in the communication system shown in FIG. 1, wherein (a) is a schematic diagram showing a standard format, (b) is a schematic diagram showing an extended format, and (c). FIG. 4 is a schematic diagram showing how the extended format is used in this embodiment. 図2に示す通信装置におけるフォーマットの解析手順を示すフローチャート。The flowchart which shows the analysis procedure of the format in the communication apparatus shown in FIG. 図2に示す演算装置が解析されたデータを処理する手順を示すフローチャート。The flowchart which shows the procedure in which the arithmetic unit shown in FIG. 2 processes the analyzed data. 本発明に係る通信装置を備える通信システムを具体化した第2の実施形態について、そのCANプロトコルの拡張フォーマットの利用態様を経時的に示すシーケンス図。The sequence diagram which shows the utilization aspect of the extended format of the CAN protocol about 2nd Embodiment which actualized the communication system provided with the communication apparatus which concerns on this invention with time. 本発明に係る通信装置を備える通信システムを具体化したその他の実施形態について、そのCANプロトコルの拡張フォーマットの利用態様を経時的に示すシーケンス図。The sequence diagram which shows the utilization aspect of the extension format of the CAN protocol about other embodiment which actualized the communication system provided with the communication apparatus which concerns on this invention with time.
 (第1の実施形態)
 本発明に係る通信装置を備える通信システムを具体化した第1の実施形態について、図1~5に従って説明する。
(First embodiment)
A first embodiment embodying a communication system including a communication apparatus according to the present invention will be described with reference to FIGS.
 図1に示すように、車両1は、車両ネットワークシステムとしての通信システムを備えている。通信システムは、第1の電子制御装置(ECU)10と、第2のECU13と、それら第1及び第2のECU10,13を相互通信可能に接続させる通信用バス16とにより構成されている。これにより、第1のECU10及び第2のECU13は、制御に用いられる各種情報を、通信用バス16を介して相互に授受(送信受信)できるようになっている。なお、通信システムは、通信プロトコルとしてCAN(Control Area Network)プロトコルの適用されるCANネットワークとして構成されている。 As shown in FIG. 1, the vehicle 1 includes a communication system as a vehicle network system. The communication system includes a first electronic control unit (ECU) 10, a second ECU 13, and a communication bus 16 that connects the first and second ECUs 10 and 13 so that they can communicate with each other. As a result, the first ECU 10 and the second ECU 13 can exchange (transmit / receive) various information used for control with each other via the communication bus 16. The communication system is configured as a CAN network to which a CAN (Control Area Network) protocol is applied as a communication protocol.
 第1のECU10及び第2のECU13はそれぞれ、車両1の各種制御に用いられる制御装置であって、例えば、駆動系や、走行系や、車体系や、情報機器系等を制御対象としているECUである。例えば、駆動系を制御対象とするECUとしては、エンジン用ECUが挙げられ、走行系を制御対象とするECUとしては、ステアリング用ECUやブレーキ用ECUが挙げられ、車体系を制御するECUとしては、ライト用ECUやウィンドウ用ECUが挙げられ、情報機器系を制御対象とするECUとしては、カーナビゲーション用ECUが挙げられる。 Each of the first ECU 10 and the second ECU 13 is a control device that is used for various controls of the vehicle 1. For example, an ECU that controls a drive system, a traveling system, a vehicle body system, an information equipment system, or the like. It is. For example, an ECU for a drive system is an ECU for an engine, an ECU for a travel system is an ECU for a steering or a brake ECU, and an ECU for controlling a vehicle body system An ECU for a light and an ECU for a window can be mentioned, and an ECU for controlling an information device system includes an ECU for car navigation.
 第1のECU10には、各種制御に必要とされる処理を行う情報処理装置11と、CANプロトコルに基づいて通信メッセージを送信及び受信することができる通信装置としてのCANコントローラ12とが設けられている。情報処理装置11では、例えば、所定の制御機能を提供するアプリケーション(アプリケーションプログラム)111が実行されることで当該所定の制御機能が提供される。 The first ECU 10 is provided with an information processing device 11 that performs processing required for various controls, and a CAN controller 12 as a communication device that can transmit and receive communication messages based on the CAN protocol. Yes. In the information processing apparatus 11, for example, the predetermined control function is provided by executing an application (application program) 111 that provides the predetermined control function.
 同様に、第2のECU13には、各種制御に必要とされる処理を行う情報処理装置14と、CANプロトコルに基づいて通信メッセージを送信及び受信することができる通信装置としてのCANコントローラ15とが設けられている。情報処理装置14では、例えば、所定の制御機能を提供するアプリケーション(アプリケーションプログラム)141が実行されることで当該所定の制御機能が提供される。 Similarly, the second ECU 13 includes an information processing device 14 that performs processing required for various controls, and a CAN controller 15 as a communication device that can transmit and receive communication messages based on the CAN protocol. Is provided. In the information processing apparatus 14, for example, the predetermined control function is provided by executing an application (application program) 141 that provides the predetermined control function.
 また、第1のECU10のCANコントローラ12、及び、第2のECU13のCANコントローラ15が1つの通信用バス16にそれぞれ接続されている。通信用バス16は、CANプロトコルに基づく通信メッセージを伝達可能な通信線などから構成されている。なお、通信用バス16は、通信経路の一部に無線通信を含んでいたり、ゲートウェイなどを介して他のネットワークを経由する経路が含まれていたりしてもよい。各CANコントローラ12,15は、CANプロトコルの規定されるフレームに基づく通信メッセージを、通信用バス16を介して送信及び受信可能に構成されている。なお、CANプロトコルには、通信における1単位となるフレームとして、データフレーム(DF)やリモートフレーム(RF)など4種類のフレームが規定されている。 Also, the CAN controller 12 of the first ECU 10 and the CAN controller 15 of the second ECU 13 are connected to one communication bus 16, respectively. The communication bus 16 includes a communication line that can transmit a communication message based on the CAN protocol. Note that the communication bus 16 may include wireless communication as part of a communication path, or may include a path that passes through another network via a gateway or the like. Each of the CAN controllers 12 and 15 is configured to be able to transmit and receive a communication message based on a frame defined by the CAN protocol via the communication bus 16. In the CAN protocol, four types of frames such as a data frame (DF) and a remote frame (RF) are defined as a frame as a unit in communication.
 ここで、図3を参照して、CANプロトコルの通信メッセージの一つであるデータフレームについて説明する。 Here, with reference to FIG. 3, a data frame which is one of CAN protocol communication messages will be described.
 データフレームは、第1のECU10の情報処理装置11と第2のECU13の情報処理装置14との間で、ユーザにより任意に設定される「対象データ」の転送に用いられるフォーマットである。このユーザにより任意に設定される「対象データ」とは、例えば、プログラムのパラメータや情報処理装置用のアプリケーションソフトウェア、いわゆるリプロデータなどのプログラムに関する情報や、車両のパラメータや車速などの車両に関する情報など、制御の実行に関する各種情報の全部もしくは一部からなるデータである。データフレームは、そのフォーマットとして、図3(a)に示す、「標準フォーマットF1」と、図3(b)に示す、「拡張フォーマットF2」とが規定されている。「標準フォーマットF1」には、「基本ID」を格納する11ビット長の「基本ID領域」と、「データ長」を格納する4ビット長の「データ長領域(DLC)」と、「対象データ」を格納する対象データ格納領域としての最大64ビット長の「データ領域」などが規定されている。「拡張フォーマットF2」には、「標準フォーマットF1」と同様に、「基本ID領域」と、「データ長領域」と、「データ領域」が規定されているとともに、「拡張ID」を格納する18ビット長の「拡張ID領域」が規定されている。 The data frame is a format used for transferring “target data” arbitrarily set by the user between the information processing device 11 of the first ECU 10 and the information processing device 14 of the second ECU 13. The “target data” arbitrarily set by the user is, for example, information on programs such as program parameters and application software for information processing devices, so-called repro data, information on vehicles such as vehicle parameters and vehicle speed, etc. This is data consisting of all or part of various information related to the execution of control. As the format of the data frame, “standard format F1” shown in FIG. 3A and “extended format F2” shown in FIG. 3B are defined. The “standard format F1” includes an 11-bit “basic ID area” for storing the “basic ID”, a “data length area (DLC)” for storing the “data length”, and “target data”. "Data area" having a maximum length of 64 bits is defined as a target data storage area for storing "." As in “standard format F1,” “extended format F2” defines “basic ID area”, “data length area”, and “data area”, and stores “extended ID”. A bit length “extended ID area” is defined.
 このように、データフレームは、「標準フォーマットF1」であれ、「拡張フォーマットF2」であれ、そのフレーム内の「データ領域」に転送の対象とする「対象データ」を格納することが規定されている。この「データ領域」は、その領域の長さを0~8バイト(0~64ビットデータ)の任意のバイト数に変化させられるようになっている。つまり、「データ領域」には、8バイト(64ビット)を超える長さの対象データを格納することができない。しかしながら、転送したい情報の中には、その長さが8バイトを超えるデータもあるため、そうした8バイト以上の長さを有する長い情報は、それらを8バイトずつ分割し、各分割したデータをそれぞれ各別の通信メッセージに転送させるようにしている。また、こうして各別の通信メッセージにより各々送信される分割されたデータは、その受信側で結合されることで、もとの長さのデータに再構成されるようにしている。なお、このようにデータ長の長い情報を分割して転送することは、CANプロトコルのデータフレームによれば避けることができない。 In this way, it is specified that the “target data” to be transferred is stored in the “data area” in the data frame, regardless of whether it is “standard format F1” or “extended format F2”. Yes. This “data area” is configured such that the length of the area can be changed to an arbitrary number of bytes of 0 to 8 bytes (0 to 64 bit data). That is, the “data area” cannot store target data having a length exceeding 8 bytes (64 bits). However, some of the information that you want to transfer has data that exceeds 8 bytes, so long information with a length of 8 bytes or more is divided into 8 bytes each, Each message is forwarded to another communication message. In addition, the divided data transmitted by each different communication message are combined on the receiving side so as to be reconstructed into the original length data. It should be noted that dividing and transferring information having a long data length in this way cannot be avoided according to the data frame of the CAN protocol.
 ところで、本実施形態では、図3(c)に示すように、データフレームのフォーマットとして「拡張フォーマットF2」を用いるものの、同フォーマットの「拡張ID領域」に「拡張ID」に代えてチェック値としての「チェックサム」を格納させる「特殊フォーマットF3」も利用可能になっている。 By the way, in this embodiment, as shown in FIG. 3C, although the “extended format F2” is used as the format of the data frame, the “extended ID area” of the same format is replaced with “extended ID” as a check value. The “special format F3” for storing the “checksum” is also available.
 すなわち、第1のECU10及び第2のECU13は、通信用バス16を介して相互に送受されるデータフレームからなる通信メッセージによって、それらの制御に必要な各種情報を送信及び受信できるようになっている。 That is, the first ECU 10 and the second ECU 13 can transmit and receive various types of information necessary for their control by communication messages composed of data frames transmitted and received via the communication bus 16. Yes.
 次に、図2を参照して、第1のECU10の詳細について説明する。なお、第2のECU13は、その構成が第1のECU10と同様であることから、その詳細な説明を割愛する。つまり、第2のECU13の情報処理装置14は、第1のECU10の情報処理装置11に対応し、第2のECU13のCANコントローラ15は、第1のECU10のCANコントローラ12に対応している。 Next, the details of the first ECU 10 will be described with reference to FIG. The second ECU 13 has the same configuration as that of the first ECU 10, and therefore will not be described in detail. That is, the information processing device 14 of the second ECU 13 corresponds to the information processing device 11 of the first ECU 10, and the CAN controller 15 of the second ECU 13 corresponds to the CAN controller 12 of the first ECU 10.
 第1のECU10の情報処理装置11は、演算装置(CPU)や記憶装置を有するマイクロコンピュータを含み構成されている。つまり情報処理装置11には、制御用プログラム(アプリケーション)の演算処理を実行する演算装置と、その制御用プログラム(アプリケーション)やデータなどが記憶された読み出し専用メモリ(ROM)と、演算装置の演算結果が一時的に記憶される揮発性メモリ(RAM)とが設けられている。これにより、情報処理装置11は、記憶装置に保持されている制御用プログラム(アプリケーション111)を演算装置に読み込み、実行することで、制御対象に対して同アプリケーション111の機能を提供して当該制御対象の制御を行なう。なお、情報処理装置11では、アプリケーション111の動作に第2のECU13の有する1または複数の情報が用いられる。 The information processing device 11 of the first ECU 10 includes a microcomputer having an arithmetic device (CPU) and a storage device. In other words, the information processing apparatus 11 includes an arithmetic device that executes arithmetic processing of a control program (application), a read-only memory (ROM) that stores the control program (application), data, and the like, and arithmetic operations of the arithmetic device. Volatile memory (RAM) is provided in which results are temporarily stored. Accordingly, the information processing apparatus 11 reads the control program (application 111) held in the storage device into the arithmetic device and executes it, thereby providing the function of the application 111 to the control target and performing the control. Control the target. In the information processing apparatus 11, one or more pieces of information that the second ECU 13 has are used for the operation of the application 111.
 情報処理装置11には、第2のECU13との間で送信受信される情報、つまり転送される情報の全部もしくは一部からなる任意データ112と、当該任意データ112の内容の改変の有無を検出するため、当該任意データ112に所定のアルゴリズムを適用されて算出されたチェックサム113とが設けられるようになっている。つまり、情報処理装置11は、複数の通信メッセージが受信されたとき、受信された各通信メッセージの「対象データ(M3)」に基づく任意データ112をそれぞれ取得し、それら取得された複数の任意データ112を結合して1つの情報を再構成することができる。一方、情報処理装置11は、通信メッセージを送信させようとするとき、転送する1つの情報を複数に分割し、それら分割した情報である各任意データ112を生成して、それぞれの任意データ112を通信メッセージの「対象データ(M3)」とさせることができるようにする。 The information processing apparatus 11 detects information transmitted / received to / from the second ECU 13, that is, the arbitrary data 112 consisting of all or part of the transferred information, and whether or not the contents of the arbitrary data 112 are altered. Therefore, a checksum 113 calculated by applying a predetermined algorithm to the arbitrary data 112 is provided. That is, when a plurality of communication messages are received, the information processing apparatus 11 acquires the arbitrary data 112 based on the “target data (M3)” of each received communication message, and the acquired plurality of arbitrary data 112 can be combined to reconstruct one piece of information. On the other hand, when trying to transmit a communication message, the information processing apparatus 11 divides one piece of information to be transferred into a plurality of pieces, generates each piece of arbitrary data 112 that is the divided piece of information, and sets each piece of arbitrary data 112 The communication message can be set as “target data (M3)”.
 つまり、第1のECU10は、第2のECU13から通信メッセージを受信した場合、情報処理装置11の任意データ112には、通信メッセージから読み出された「対象データ(M3)」の値が設定され、チェックサム113には、通信メッセージから読み出された「チェックサム(M2)」の値が設定される。なお、通信メッセージにチェックサムが含まれない場合、チェックサム113には何も設定されない、例えば「0」にクリアされる。 That is, when the first ECU 10 receives the communication message from the second ECU 13, the value of “target data (M3)” read from the communication message is set in the arbitrary data 112 of the information processing apparatus 11. In the checksum 113, the value of “checksum (M2)” read from the communication message is set. When the checksum is not included in the communication message, nothing is set in the checksum 113, for example, it is cleared to “0”.
 第1のECU10には、第2のECU13がチェックサム113の算出に用いるアルゴリズムに対応する検算用のアルゴリズムが設定されている。これにより、情報処理装置11は、任意データ112に対応するチェックサム113に基づいて当該任意データ112の改変の有無を検出することができる。そして、情報処理装置11は、検出の結果、改変されていないことが検出された任意データ112をアプリケーション111の実行に利用する。この場合、任意データ112の改変の有無がアプリケーション111の実行に利用される直前に検出されるため、任意データ112の信頼性が高められ、当該任意データ112を利用するアプリケーション111の動作の信頼性も高められる。 In the first ECU 10, an algorithm for verification corresponding to the algorithm used by the second ECU 13 for calculating the checksum 113 is set. Thereby, the information processing apparatus 11 can detect whether the arbitrary data 112 has been modified based on the checksum 113 corresponding to the arbitrary data 112. Then, the information processing apparatus 11 uses the arbitrary data 112, which has been detected as a result of the detection, not to be modified for the execution of the application 111. In this case, since the presence / absence of alteration of the arbitrary data 112 is detected immediately before being used for the execution of the application 111, the reliability of the arbitrary data 112 is improved, and the reliability of the operation of the application 111 using the arbitrary data 112 is improved. Can also be enhanced.
 一方、第1のECU10から第2のECU13に通信メッセージを送信する場合、情報処理装置11の任意データ112には、アプリケーション111から転送する情報の一部が書き込まれ、チェックサム113には、アプリケーション111から上記転送する任意データ112に対応するチェックサムが書き込まれる。このときアプリケーション111は、任意データ112の改ざんの有無を検出できるように、当該任意データ112に所定のアルゴリズムを適用することに基づいて、該任意データ112に対応するチェックサム113を算出する。なお、この算出されたチェックサム113は、「拡張ID領域」に格納されるためその長さが18ビット長以下となるように算出される。同所定のアルゴリズムに対応する検算用のアルゴリズムが設定されている第2のECU13では、受信した任意データ112の改ざんの有無を、受信した対応するチェックサム113に基づいて検出することができる。 On the other hand, when a communication message is transmitted from the first ECU 10 to the second ECU 13, a part of information transferred from the application 111 is written in the arbitrary data 112 of the information processing apparatus 11, and an application is written in the checksum 113. A checksum corresponding to the arbitrary data 112 transferred from 111 is written. At this time, the application 111 calculates a checksum 113 corresponding to the arbitrary data 112 based on applying a predetermined algorithm to the arbitrary data 112 so that the presence / absence of falsification of the arbitrary data 112 can be detected. Since the calculated checksum 113 is stored in the “extended ID area”, the length is calculated to be 18 bits or less. The second ECU 13 in which the algorithm for verification corresponding to the predetermined algorithm is set can detect whether or not the received arbitrary data 112 has been tampered with based on the received corresponding checksum 113.
 第1のECU10の情報処理装置11には、情報処理装置11が通信メッセージを受信した際、「拡張フォーマットF2」からなる通信メッセージに「チェックサム」が設定されているか否かの判断に用いるフラグである切換SWフラグ114が設定されている。受信する通信メッセージに「チェックサム」が含まれない場合、切換SWフラグ114には、チェックサムが付加されていないことを示す「0」(「オフ」)が設定される。一方、受信する同通信メッセージに「チェックサム」が含まれている場合、切換SWフラグ114には、チェックサムが付加されていることを示す「1」(「オン」)が設定される。つまり、切換SWフラグ114には、データフレームのフォーマットが「拡張フォーマットF2」であるとき「0」が設定され、同フォーマットが「特殊フォーマットF3」であるとき「1」が設定される。なお、データフレームのフォーマットが「基本フォーマットF1」であるとき、切換SWフラグ114の設定値は利用されない。 The information processing device 11 of the first ECU 10 has a flag used to determine whether or not “checksum” is set in the communication message consisting of “extended format F2” when the information processing device 11 receives the communication message. The switch SW flag 114 is set. When the received communication message does not include “checksum”, the switch SW flag 114 is set to “0” (“off”) indicating that no checksum is added. On the other hand, when “checksum” is included in the received communication message, the switch SW flag 114 is set to “1” (“ON”) indicating that the checksum is added. That is, the switch SW flag 114 is set to “0” when the format of the data frame is “extended format F2”, and is set to “1” when the format is “special format F3”. When the data frame format is “basic format F1”, the set value of the switch SW flag 114 is not used.
 また、切換SWフラグ114は、通信メッセージを送信する際、「拡張フォーマットF2」からなる通信メッセージに「チェックサム」を設定するか否かの判断に利用される。つまり、切換SWフラグ114に「0」が設定されている場合、情報処理装置11は、送信させる通信メッセージに「チェックサム」を付加しない「拡張フォーマットF2」とする一方、切換SWフラグ114に「1」が設定されている場合、情報処理装置11は、通信メッセージに「チェックサム」を付加する「特殊フォーマットF3」とする。このように、切換SWフラグ114に設定された値によって、情報処理装置11が通信メッセージにチェック値を含めるか否かは選択可能になっている。 The switch SW flag 114 is used to determine whether or not to set “checksum” in the communication message composed of “extended format F2” when transmitting the communication message. That is, when “0” is set in the switch SW flag 114, the information processing apparatus 11 sets “extended format F2” in which “checksum” is not added to the communication message to be transmitted, while “ When “1” is set, the information processing apparatus 11 sets “special format F3” in which “checksum” is added to the communication message. As described above, whether or not the information processing apparatus 11 includes the check value in the communication message can be selected based on the value set in the switch SW flag 114.
 切換SWフラグ114には、アプリケーション111の動作に基づいて「0」または「1」の値が設定されるようになっており、本実施形態では、アプリケーション111の動作が実行されると切換SWフラグ114に「1」が設定される。 A value of “0” or “1” is set in the switching SW flag 114 based on the operation of the application 111. In this embodiment, when the operation of the application 111 is executed, the switching SW flag is set. 114 is set to “1”.
 情報処理装置11には、CANコントローラ12がデータの授受可能に接続されている。CANコントローラ12は、各種情報を授受可能に情報処理装置11に接続されているとともに、物理層インターフェイス17を介して通信用バス16に接続されている。物理層インターフェイス17は、いわゆるCANトランシーバであって、CANコントローラ12及び通信用バス16にそれぞれ電気的に接続されるとともに、通信用バス16とCANコントローラ12との間の電気的特性を相互変換することにより通信用バス16及びCANコントローラ12間の双方向への通信メッセージの伝達を可能にしている。 The CAN controller 12 is connected to the information processing apparatus 11 so as to be able to exchange data. The CAN controller 12 is connected to the information processing apparatus 11 so that various kinds of information can be exchanged, and is connected to the communication bus 16 via the physical layer interface 17. The physical layer interface 17 is a so-called CAN transceiver, and is electrically connected to the CAN controller 12 and the communication bus 16, and mutually converts electrical characteristics between the communication bus 16 and the CAN controller 12. As a result, communication messages can be transmitted in both directions between the communication bus 16 and the CAN controller 12.
 CANコントローラ12には、通信用バス16を介して通信メッセージを送信したり、受信したりする送受信回路121と、受信された通信メッセージの要/不要を判断する、いわゆるメッセージフィルタリングを行うIDフィルタリング122とが設けられている。また、CANコントローラ12には、通信メッセージが「特殊フォーマットF3」のとき、IDフィルタリング122のフィルタリングを特殊なフィルタリングに切り換えさせるための切換スイッチ125が設けられている。 The CAN controller 12 includes a transmission / reception circuit 121 that transmits and receives a communication message via the communication bus 16, and an ID filtering 122 that performs so-called message filtering that determines necessity / unnecessity of the received communication message. And are provided. The CAN controller 12 is provided with a changeover switch 125 for switching the filtering of the ID filtering 122 to the special filtering when the communication message is “special format F3”.
 さらに、CANコントローラ12には、通信メッセージに設定されている各種データを情報処理装置11との間で授受させるためのCPUインターフェイス123が設けられている。さらに、CPUインターフェイス123には、読み書き可能なメモリであるメッセージバッファ124が設けられており、メッセージバッファ124には、情報処理装置11から読み込み可能な受信バッファ領域、及び書き込み可能な送信バッファ領域がそれぞれ設けられている。なお、受信バッファ領域及び送信バッファ領域は、メッセージバッファ124の所定領域を共用したものであってもよいし、メッセージバッファ124の各別の領域を各別に確保したものであってもよい。 Further, the CAN controller 12 is provided with a CPU interface 123 for sending / receiving various data set in the communication message to / from the information processing apparatus 11. Further, the CPU interface 123 is provided with a message buffer 124 that is a readable / writable memory. The message buffer 124 includes a reception buffer area that can be read from the information processing apparatus 11 and a writable transmission buffer area. Is provided. Note that the reception buffer area and the transmission buffer area may share a predetermined area of the message buffer 124, or may secure different areas of the message buffer 124.
 送受信回路121は、CANプロトコルの機能を実現するものであり、通信用バス16から受信された通信メッセージを物理層インターフェイス17を介して受信ポートRxに受けることにより、当該受けた通信メッセージをCANプロトコルに基づいて解析する。このとき、送受信回路121では、CANプロトコルのリモートフレームやデータフレームに設けることが規定されているCRC(巡回冗長検査)に基づいて通信メッセージの改変の有無が検出される。 The transmission / reception circuit 121 realizes the CAN protocol function. When the communication message received from the communication bus 16 is received by the reception port Rx via the physical layer interface 17, the received communication message is received by the CAN protocol. Analyze based on At this time, the transmission / reception circuit 121 detects the presence / absence of alteration of the communication message based on CRC (Cyclic Redundancy Check) stipulated to be provided in a CAN protocol remote frame or data frame.
 また、送受信回路121は、CPUインターフェイス123から通信用バス16に送信する対象データ(M3)などを受け取ると、当該対象データ(M3)及びCRCなどを含む通信メッセージを作成し送信ポートTxから物理層インターフェイス17を介して通信用バス16に送信する。 When the transmission / reception circuit 121 receives the target data (M3) to be transmitted to the communication bus 16 from the CPU interface 123, the transmission / reception circuit 121 creates a communication message including the target data (M3), CRC, and the like from the transmission port Tx. The data is transmitted to the communication bus 16 via the interface 17.
 切換スイッチ125は、通信メッセージが「拡張フォーマットF2」であるか「特殊フォーマットF3」であるかによって、IDフィルタリング122が実行するフィルタリングの機能を切り換えさせるスイッチであり、同フィルタリング機能の切換を、情報処理装置11の切換SWフラグ114に基づいて切り換えさせる。詳述すると、切換スイッチ125は、情報処理装置11の切換SWフラグ114が「0」(「オフ」)のとき「オフ」に切り換えられて、IDフィルタリング122のフィルタリングを「基本ID」と「拡張ID」とに基づいて行わせるようにする。一方、切換スイッチ125は、同切換SWフラグ114が「1」(「オン」)のとき「オン」に切り換えられて、IDフィルタリング122のフィルタリングを「基本ID」のみに基づいて行わせるようにする。つまり、切換スイッチ125は、アプリケーション111によって、第1のECU10が受信する通信メッセージが「拡張フォーマットF2」の場合、「オフ」に設定され、通信メッセージが「特殊フォーマットF3」の場合、「オン」に設定されるようになっている。 The changeover switch 125 is a switch for switching the filtering function executed by the ID filtering 122 depending on whether the communication message is “extended format F2” or “special format F3”. Switching is performed based on the switching SW flag 114 of the processing device 11. More specifically, the selector switch 125 is switched to “off” when the switch SW flag 114 of the information processing apparatus 11 is “0” (“off”), and filtering of the ID filtering 122 is performed with “basic ID” and “extended”. Based on “ID”. On the other hand, the selector switch 125 is switched to “ON” when the switch SW flag 114 is “1” (“ON”), and causes the filtering of the ID filtering 122 to be performed based only on “basic ID”. . That is, the changeover switch 125 is set to “off” when the communication message received by the first ECU 10 by the application 111 is “extended format F2”, and “on” when the communication message is “special format F3”. Is set to.
 IDフィルタリング122は、受信した通信メッセージが第1のECU10に必要なメッセージであるか、不要なメッセージであるかを、データフレームに含まれている「基本ID」や「拡張ID」に設定されている「IDフィルタ値」を適用することに基づいて判定する。IDフィルタリング122は、必要であると判定した通信メッセージをCPUインターフェイス123に送る一方、不要であると判定した通信メッセージをCPUインターフェイス123には送らず、ここで止める。つまり、IDフィルタリング122は、必要な通信メッセージのみがCPUインターフェイス123に送られるように、通信メッセージのCPUインターフェイス123への伝達を規制する、いわゆるフィルタリングを行なう。これにより、必要であると判定された通信メッセージは、その「対象データ(M3)」が第1のECU10にて利用可能となる一方、不要であると判定された通信メッセージは、その「対象データ」が第1のECU10では利用されないようになる。 The ID filtering 122 sets whether the received communication message is a message required for the first ECU 10 or an unnecessary message in the “basic ID” or “extended ID” included in the data frame. It is determined based on applying the “ID filter value”. The ID filtering 122 sends a communication message determined to be necessary to the CPU interface 123, but stops sending a communication message determined to be unnecessary to the CPU interface 123 instead. That is, the ID filtering 122 performs so-called filtering that restricts transmission of communication messages to the CPU interface 123 so that only necessary communication messages are sent to the CPU interface 123. Thereby, the communication message determined to be necessary can use the “target data (M3)” in the first ECU 10, while the communication message determined to be unnecessary is the “target data”. Is not used in the first ECU 10.
 なお、第1のECU10には、当該第1のECU10に必要な内容を示す「基本ID」や「拡張ID」が設定されているため、それら設定された「基本ID」や「拡張ID」に基づいて、IDフィルタリング122のIDフィルタ値は設定されている。 In addition, since the “basic ID” and “extended ID” indicating the contents necessary for the first ECU 10 are set in the first ECU 10, the set “basic ID” and “extended ID” are set. Based on this, the ID filter value of the ID filtering 122 is set.
 詳述すると、IDフィルタリング122は、受信したデータフレームをCANプロトコルの規定に基づいて「標準フォーマットF1」と判定した場合、「標準フォーマットF1」の「基本ID領域」に設定された「基本ID」に基づいてフィルタリング(基本フィルタリング)を行う。また、IDフィルタリング122は、受信したデータフレームをCANプロトコルの規定に基づいて「拡張フォーマットF2」と判定した場合、「基本ID領域」に設定された「基本ID」と「拡張ID領域」に設定された「拡張ID」とに基づいてフィルタリング(拡張フィルタリング)を行う。さらに、IDフィルタリング122は、通信メッセージが「特殊フォーマットF3」と判定した場合、「基本ID領域」に設定された「基本ID」に基づいてフィルタリング(特殊フィルタリング)を行う。すなわち、IDフィルタリング122は、フィルタリングとして、「基本フィルタリング」と、「拡張フィルタリング」と、「特殊フィルタリング」とを行う。 More specifically, when the ID filtering 122 determines that the received data frame is “standard format F1” based on the CAN protocol, the “basic ID” set in the “basic ID area” of “standard format F1”. Filtering based on (basic filtering). In addition, when the ID filtering 122 determines that the received data frame is “extended format F2” based on the CAN protocol, the ID filtering 122 sets “basic ID” and “extended ID region” set in the “basic ID region”. Filtering (extended filtering) is performed based on the “extended ID”. Further, the ID filtering 122 performs filtering (special filtering) based on the “basic ID” set in the “basic ID area” when the communication message is determined to be “special format F3”. That is, the ID filtering 122 performs “basic filtering”, “extended filtering”, and “special filtering” as filtering.
 詳述すると、IDフィルタリング122は、「基本ID領域」に続くビットである「RTR」(図3(a)参照)が、CANプロトコルにおける2つのバスレベルにおける一方のレベルであるドミナントであることを検出した場合、データフレームを「標準フォーマットF1」であると判定するとともに、「基本フィルタリング」を行う。なお、「RTR」は、リモート・トランスミッション・リクエストの略である。 More specifically, the ID filtering 122 indicates that the bit following the “basic ID area” “RTR” (see FIG. 3A) is a dominant that is one of the two bus levels in the CAN protocol. If detected, the data frame is determined to be “standard format F1” and “basic filtering” is performed. Note that “RTR” is an abbreviation for remote transmission request.
 また、IDフィルタリング122は、「基本ID領域」に続くビットである「SRR」及び「IDE」(図3(b)参照)が、CANプロトコルにおける2つのバスレベルにおける他方のレベルであるリセッシブであることを検出した場合、データフレームを「拡張フォーマットF2」であると仮判定する。この仮判定に加えて、切換スイッチ125が「オフ」に設定されている場合、IDフィルタリング122は、データフレームのフォーマットを「拡張フォーマットF2」であると確定し、「拡張フィルタリング」を行う。一方、この仮判定に加えて、切換スイッチ125が「オン」に設定されている場合、IDフィルタリング122は、データフレームのフォーマットが「特殊フォーマットF3」であると確定し、「特殊フィルタリング」を行う。なお、「SRR」は、サブスティチュート・リモート・リクエスト・ビットの略であり、「IDE」は、アイデンティファイア・エクステンション・ビットの略である。 The ID filtering 122 is a recessive in which “SRR” and “IDE” (see FIG. 3B), which are bits following the “basic ID area”, are the other levels of the two bus levels in the CAN protocol. When this is detected, the data frame is provisionally determined to be “extended format F2”. In addition to this temporary determination, when the changeover switch 125 is set to “off”, the ID filtering 122 determines that the format of the data frame is “extended format F2” and performs “extended filtering”. On the other hand, in addition to this temporary determination, when the changeover switch 125 is set to “ON”, the ID filtering 122 determines that the format of the data frame is “special format F3” and performs “special filtering”. . Note that “SRR” is an abbreviation for the Substitute Remote Request bit, and “IDE” is an abbreviation for the identifier extension bit.
 すなわち、IDフィルタリング122は、通信メッセージが「拡張フォーマットF2」である場合、切換スイッチ125の設定が「オン」又は「オフ」のいずれであるかに基づいて、「拡張フィルタリング」又は「特殊フィルタリング」を行う。「特殊フィルタリング」は、通信メッセージが「特殊フォーマットF3」であるときに行われるフィルタリングであって、「基本フィルタリング」と同様に、「基本ID」のみに基づいて行なわれるフィルタリングである。これにより、IDフィルタリング122は、通信メッセージを「基本ID」のみに基づいてフィルタリングするとともに、「拡張フィルタリング」と同様に、「拡張ID領域」に設定されているデータ(本実施形態ではチェックサム)を含む通信メッセージをCPUインターフェイス123に送る。つまり、「特殊フィルタリング」は、「拡張フィルタリング」に対して、フィルタリングが「基本ID」のみで行われる点が相違する一方、通信メッセージのCPUインターフェイス123への送付は同様に行われる。 That is, when the communication message is “extended format F2”, the ID filtering 122 selects “extended filtering” or “special filtering” based on whether the setting of the changeover switch 125 is “on” or “off”. I do. The “special filtering” is filtering performed when the communication message is in the “special format F3”, and is filtering performed based on only the “basic ID”, similarly to the “basic filtering”. As a result, the ID filtering 122 filters the communication message based only on the “basic ID”, and the data set in the “extended ID area” (checksum in the present embodiment) as in the “extended filtering”. Is sent to the CPU interface 123. That is, “special filtering” is different from “extended filtering” in that filtering is performed only by “basic ID”, while sending a communication message to the CPU interface 123 is performed in the same manner.
 つまり、本実施形態では、IDフィルタリング122は、切換スイッチ125による「オン」設定に基づいて、通信メッセージのフォーマットを「特殊フォーマットF3」と判断し、「特殊フィルタリング」を実行する。これにより、IDフィルタリング122は、フィルタリングには用いられなかったものの通信メッセージの「拡張ID領域」に格納されているデータを、CPUインターフェイス123に送付する。これにより、情報処理装置11は、切換SWフラグ114の設定に基づいて、「拡張ID領域」に格納されたデータを、例えば「チェックサム」として取り扱うことができるようになる。 That is, in this embodiment, the ID filtering 122 determines that the format of the communication message is “special format F3” based on the “ON” setting by the changeover switch 125 and executes “special filtering”. As a result, the ID filtering 122 sends the data stored in the “extended ID area” of the communication message that has not been used for filtering, to the CPU interface 123. Accordingly, the information processing apparatus 11 can handle the data stored in the “extended ID area” as, for example, “checksum” based on the setting of the switching SW flag 114.
 一方、IDフィルタリング122は、CPUインターフェイス123から受ける送信用の通信メッセージをそのまま送受信回路121に伝達する。なお、IDフィルタリング122は、送信用の通信メッセージに含まれる「基本ID」や、「拡張ID」や、「チェックサム」などを確認するようにしてもよい。 On the other hand, the ID filtering 122 transmits the communication message for transmission received from the CPU interface 123 to the transmission / reception circuit 121 as it is. The ID filtering 122 may confirm “basic ID”, “extended ID”, “checksum”, and the like included in the communication message for transmission.
 CPUインターフェイス123は、CANコントローラ12と情報処理装置11との間の通信メッセージの授受を、メッセージバッファ124を介して可能としている。つまり、メッセージバッファ124は、そのデータバッファ領域が、CPUインターフェイス123によるデータの読み書きが可能であるとともに、情報処理装置11からのデータの読み書きが可能となっている。 The CPU interface 123 enables transmission / reception of communication messages between the CAN controller 12 and the information processing apparatus 11 via the message buffer 124. That is, in the message buffer 124, the data buffer area can read and write data by the CPU interface 123, and can read and write data from the information processing apparatus 11.
 メッセージバッファ124には、第1のECU10が受信した通信メッセージの各格納領域のデータが、それら格納領域に対応する所定の領域にそれぞれ格納される受信バッファが設けられている。受信バッファには、所定の領域として、「基本IDバッファ領域」、「拡張IDバッファ領域」、「データ長バッファ領域」、及び「対象データバッファ領域」などが設けられている。メッセージバッファ124は、通信メッセージを受けると、「基本ID」を受信バッファの「基本IDバッファ領域」に、「拡張ID」を「拡張IDバッファ領域」に、「データ長」を「データ長バッファ領域」に、「対象データ」を「対象データバッファ領域」に格納させる。これにより、「基本IDバッファ領域」に「基本ID(M1)」が、「拡張IDバッファ領域」に「拡張ID(M2)」が、「対象データバッファ領域」に「対象データ(M3)」がそれぞれ格納される。なお、切換スイッチ125が「オフ」のとき、受信バッファの「拡張IDバッファ領域」に「拡張ID」が格納される一方、切換スイッチ125が「オン」のとき、通信メッセージのフォーマットが「特殊フォーマットF3」であることから、受信バッファの「拡張IDバッファ領域」には「チェックサム(M2)」が格納される。 The message buffer 124 is provided with a reception buffer in which data in each storage area of the communication message received by the first ECU 10 is stored in a predetermined area corresponding to the storage area. The reception buffer is provided with “basic ID buffer area”, “extended ID buffer area”, “data length buffer area”, “target data buffer area”, and the like as predetermined areas. When the message buffer 124 receives the communication message, the “basic ID” is set in the “basic ID buffer area”, the “extended ID” is set in the “extended ID buffer area”, and the “data length” is set in the “data length buffer area”. The “target data” is stored in the “target data buffer area”. As a result, “basic ID (M1)” is stored in the “basic ID buffer area”, “extended ID (M2)” is displayed in the “extended ID buffer area”, and “target data (M3)” is displayed in the “target data buffer area”. Each is stored. When the changeover switch 125 is “off”, “extended ID” is stored in the “extended ID buffer area” of the reception buffer, while when the changeover switch 125 is “on”, the format of the communication message is “special format”. Since it is “F3”, “Checksum (M2)” is stored in the “Extended ID buffer area” of the reception buffer.
 この受信バッファは、上述の各所定の領域がそれぞれ情報処理装置11による読み出し可能になっている。つまり、情報処理装置11は、受信バッファにデータが格納されたことを検出すると、受信バッファを介して、IDフィルタリング122を通過してきた受信した通信メッセージの各格納領域のデータをそれぞれ読み込むことができる。例えば、情報処理装置11は、受信バッファの「基本IDバッファ領域」から「基本ID」を、「拡張IDバッファ領域」から「拡張ID」を、「データ長バッファ領域」から「データ長」を、「対象データバッファ領域」から「対象データ」をそれぞれ取得する。なお、「対象データ」は、転送される情報の全部、もしくは、一部からなるデータである。情報処理装置11は、「基本ID(M1)」や「拡張ID(M2)」に基づいて、対応する「対象データ(M3)」の内容を判断する。また、情報処理装置11は、切換SWフラグ114が「オフ」のとき、「拡張IDバッファ領域」から「拡張ID」を取得する一方、切換SWフラグ114が「オン」のとき、通信メッセージのフォーマットが「特殊フォーマットF3」であることから、受信バッファの「拡張IDバッファ領域」から「チェックサム(M2)」を取得する。 In this reception buffer, each of the predetermined areas described above can be read by the information processing apparatus 11. That is, when the information processing apparatus 11 detects that data is stored in the reception buffer, the information processing apparatus 11 can read data in each storage area of the received communication message that has passed through the ID filtering 122 via the reception buffer. . For example, the information processing apparatus 11 receives “basic ID” from the “basic ID buffer area” of the reception buffer, “extended ID” from the “extended ID buffer area”, “data length” from the “data length buffer area”, Obtain “target data” from the “target data buffer area”. The “target data” is data including all or a part of the transferred information. The information processing apparatus 11 determines the content of the corresponding “target data (M3)” based on “basic ID (M1)” and “extended ID (M2)”. Further, the information processing apparatus 11 acquires the “extended ID” from the “extended ID buffer area” when the switch SW flag 114 is “off”, while the communication message format when the switch SW flag 114 is “on”. Is “special format F3”, “checksum (M2)” is acquired from the “extended ID buffer area” of the reception buffer.
 また、メッセージバッファ124には、第1のECU10が送信する通信メッセージの各格納領域に対応するデータが、それら格納領域に対応する所定の領域にそれぞれ格納される送信バッファが設けられている。送信バッファには、所定の領域として、「基本IDバッファ領域」、「拡張IDバッファ領域」、「データ長バッファ領域」、及び「対象データバッファ領域」などが設けられている。この送信バッファは、上述の各所定の領域がそれぞれ情報処理装置11からの書き込み可能になっている。 Further, the message buffer 124 is provided with a transmission buffer in which data corresponding to each storage area of the communication message transmitted by the first ECU 10 is stored in a predetermined area corresponding to each storage area. In the transmission buffer, a “basic ID buffer area”, an “extended ID buffer area”, a “data length buffer area”, a “target data buffer area”, and the like are provided as predetermined areas. In the transmission buffer, each of the predetermined areas described above can be written from the information processing apparatus 11.
 メッセージバッファ124には情報処理装置11から、送信バッファの「基本IDバッファ領域」に「基本ID(M1)」が、同「拡張IDバッファ領域」に「拡張ID(M2)」が、同「データ長バッファ領域」に「データ長」が、同「対象データバッファ領域」に「対象データ(M3)」がそれぞれ格納される。なお、情報処理装置11は、切換SWフラグ114が「オフ」のとき、「拡張IDバッファ領域」に「拡張ID」を格納する一方、切換スイッチ125が「オン」のとき、通信メッセージのフォーマットを「特殊フォーマットF3」にすることから、送信バッファの「拡張IDバッファ領域」に「チェックサム113」を格納する。 In the message buffer 124, the “basic ID (M1)” is stored in the “basic ID buffer area” of the transmission buffer, the “extended ID (M2)” is stored in the “extended ID buffer area”, and the “data” is stored in the message buffer 124. “Data length” is stored in the “long buffer area”, and “target data (M3)” is stored in the “target data buffer area”. The information processing apparatus 11 stores the “extended ID” in the “extended ID buffer area” when the switch SW flag 114 is “off”, while the communication message format is changed when the switch 125 is “on”. Since the “special format F3” is selected, “checksum 113” is stored in the “extended ID buffer area” of the transmission buffer.
 送受信回路121は、送信バッファにデータが格納されたことを検出すると、送信バッファから格納された各データを取得し、それら取得したデータである「基本ID(M1)」や、「拡張ID(M2)」や、「データ長」や、「対象データ(M3)」を含む送信用の通信メッセージを生成する。なお、送受信回路121は、切換スイッチ125が「オフ」のとき、「拡張IDバッファ領域」から「拡張ID」を取得する一方、切換スイッチ125が「オン」のとき、通信メッセージのフォーマットを「特殊フォーマットF3」にすることから、送信バッファの「拡張IDバッファ領域」から「チェックサム(M3)」を取得する。 When the transmission / reception circuit 121 detects that the data is stored in the transmission buffer, the transmission / reception circuit 121 acquires each data stored from the transmission buffer, and the acquired data includes a “basic ID (M1)” and an “extended ID (M2)”. ) "," Data length ", and" target data (M3) "are generated. The transmission / reception circuit 121 acquires the “extended ID” from the “extended ID buffer area” when the changeover switch 125 is “off”, while the communication message format is “special” when the changeover switch 125 is “on”. Since “format F3” is selected, “checksum (M3)” is acquired from the “extended ID buffer area” of the transmission buffer.
 このような、通信装置の作用について、図4及び図5に基づいて説明する。 Such an operation of the communication apparatus will be described with reference to FIGS.
 まず、図4を参照して、フィルタリングについて説明する。 First, filtering will be described with reference to FIG.
 IDフィルタリング122は、送受信回路121から通信メッセージを受信すると、フィルタリングの実行を開始する。フィルタリングが実行されると、受信した通信メッセージを「基本ID」に基づいてフィルタリングする(ステップS10)。なお、フィルタリングにより不要な通信メッセージであると判定された場合、フィルタリングの実行は終了される。フィルタリングの実行にて必要な通信メッセージと判定された通信メッセージは、そのデータフレームのフォーマットの種類を区別するため、「IDE」がドミナントであるか否かが判定される(ステップS11)。 When receiving the communication message from the transmission / reception circuit 121, the ID filtering 122 starts executing filtering. When filtering is executed, the received communication message is filtered based on the “basic ID” (step S10). If it is determined by filtering that the communication message is unnecessary, the execution of filtering is terminated. In order to distinguish the format type of the data frame of the communication message determined as the communication message necessary for the execution of filtering, it is determined whether or not “IDE” is dominant (step S11).
 「IDE」がドミナントであると判定された場合、つまりデータフレームが「標準フォーマットF1」であると判定された場合(ステップS11でYES)、IDフィルタリング122は、通信メッセージの各情報領域に格納されているデータをメッセージバッファ124に設けられた受信バッファの対応する領域にそれぞれ書き込む(ステップS13)。このときデータフレームは「標準フォーマットF1」であることから、受信バッファには、「標準ID(M1)」と、「データ長」と、「対象データ(M3)」とが書き込まれる(「標準」の書き込み)。そして、フィルタリングの実行が終了される。 When it is determined that “IDE” is dominant, that is, when it is determined that the data frame is “standard format F1” (YES in step S11), the ID filtering 122 is stored in each information area of the communication message. Are written to the corresponding areas of the reception buffer provided in the message buffer 124 (step S13). At this time, since the data frame is “standard format F1”, “standard ID (M1)”, “data length”, and “target data (M3)” are written in the reception buffer (“standard”). Writing). Then, the execution of filtering is terminated.
 一方、「IDE」がドミナントではないと判定された場合(ステップS11でNO)、IDフィルタリング122は、切換スイッチ125が「オン」に設定されているか否かを判定する(ステップS14)。切換スイッチ125が「オン」ではないと判定された場合(ステップS14でNO)、IDフィルタリング122は、「基本ID」と「拡張ID」とに基づいてフィルタリングを行う、いわゆる「拡張フィルタリング」を行う(ステップS15)。このフィルタリングにより不要な通信メッセージであると判定された場合、フィルタリングの実行が終了される。このフィルタリングの実行にて必要な通信メッセージであると判定された場合、IDフィルタリング122は、通信メッセージの各情報領域に格納されているデータをメッセージバッファ124に設けられた受信バッファの対応する領域にそれぞれ書き込む(ステップS16)。このとき、データフレームは「拡張フォーマットF2」であることから、受信バッファには、「標準ID(M1)」と、「拡張ID(M2)」と、「データ長」と、「対象データ(M3)」とが書き込まれる(「拡張」の書き込み)。そして、フィルタリングの実行が終了される。 On the other hand, when it is determined that “IDE” is not dominant (NO in step S11), the ID filtering 122 determines whether or not the changeover switch 125 is set to “ON” (step S14). When it is determined that the changeover switch 125 is not “ON” (NO in step S14), the ID filtering 122 performs so-called “extended filtering” that performs filtering based on the “basic ID” and the “extended ID”. (Step S15). If the filtering determines that the message is an unnecessary communication message, the filtering is terminated. When it is determined that the message is a communication message necessary for the execution of this filtering, the ID filtering 122 transfers the data stored in each information area of the communication message to the corresponding area of the reception buffer provided in the message buffer 124. Each is written (step S16). At this time, since the data frame is “extended format F2”, the “standard ID (M1)”, “extended ID (M2)”, “data length”, and “target data (M3) are stored in the reception buffer. ) "Is written (" extension "is written). Then, the execution of filtering is terminated.
 また、切換スイッチ125が「オン」である場合(ステップS14でYES)、IDフィルタリング122は、通信メッセージの各情報領域に格納されているデータをメッセージバッファ124に設けられた受信バッファの対応する領域にそれぞれ書き込む(ステップS18)。このとき、データフレームは「特殊フォーマットF3」であることから、「拡張フォーマットF2」と同様に、受信バッファには、「標準ID(M1)」と、「拡張ID(M2)」と、「データ長」と、「対象データ(M3)」とが書き込まれる(「拡張」の書き込み)。そして、フィルタリングの実行が終了される。 When the changeover switch 125 is “ON” (YES in step S14), the ID filtering 122 uses the data stored in each information area of the communication message in the corresponding area of the reception buffer provided in the message buffer 124. (Step S18). At this time, since the data frame is “special format F3”, the “standard ID (M1)”, “extended ID (M2)”, “data” are stored in the reception buffer as in “extended format F2”. "Length" and "Target data (M3)" are written ("Extension" is written). Then, the execution of filtering is terminated.
 このとき、受信バッファの「拡張IDバッファ領域」には、通信メッセージの「拡張ID領域」に設定されているデータが書き込まれる。しかしながら、データフレームのフォーマットが「特殊フォーマットF3」であることから「拡張ID領域」に格納された値は「拡張ID」ではなく、「チェックサム」であるため、受信バッファの「拡張IDバッファ領域」には「チェックサム」が格納されることとなる。 At this time, the data set in the “extended ID area” of the communication message is written in the “extended ID buffer area” of the reception buffer. However, since the format of the data frame is “special format F3”, the value stored in the “extended ID area” is not “extended ID” but “checksum”. “Checksum” is stored in “.”.
 次に、図5を参照して、情報処理装置11によるデータ処理について説明する。 Next, data processing by the information processing apparatus 11 will be described with reference to FIG.
 情報処理装置11は、通信メッセージに含まれるデータが受信バッファに設定されたことを検出すると、所定のデータ処理を開始する。所定のデータ処理が開始されると、情報処理装置11は、切換SWフラグ114が「1」(「オン」)であるか、否かを判断する(ステップS20)。 When the information processing apparatus 11 detects that the data included in the communication message is set in the reception buffer, the information processing apparatus 11 starts predetermined data processing. When the predetermined data processing is started, the information processing apparatus 11 determines whether or not the switch SW flag 114 is “1” (“ON”) (step S20).
 切換SWフラグ114が「1」(「オン」)ではないと判断された場合、つまり「0」(「オフ」)であると判断された場合(ステップS20でNO)、情報処理装置11は、受信バッファの各バッファ領域に設定されたデータを取得する(読み込む)(ステップS21)。そして、情報処理装置11は、読み込んだ「標準ID(M1)」や「拡張ID(M2)」に基づいて、「対象データ(M3)」からなる「任意データ112」の内容を判断するとともに、「任意データ112」に対して、そのまま、所定のデータ処理を行う(ステップS22)。例えば、情報処理装置11は、「任意データ112」の内容が車両1の「速度」であることを「標準ID」に基づいて判断し、アプリケーション111の処理において「任意データ112」に設定された値を「速度」として用いる。 When it is determined that the switching SW flag 114 is not “1” (“ON”), that is, when it is determined that it is “0” (“OFF”) (NO in step S20), the information processing apparatus 11 Data set in each buffer area of the reception buffer is acquired (read) (step S21). The information processing apparatus 11 determines the content of the “arbitrary data 112” including the “target data (M3)” based on the read “standard ID (M1)” and “extended ID (M2)”, and The “arbitrary data 112” is subjected to predetermined data processing as it is (step S22). For example, the information processing apparatus 11 determines that the content of “arbitrary data 112” is “speed” of the vehicle 1 based on “standard ID”, and is set to “arbitrary data 112” in the processing of the application 111. The value is used as “speed”.
 一方、切換SWフラグ114が「1」(「オン」)であると判断された場合(ステップS20でYES)、情報処理装置11は、受信バッファの各バッファ領域に設定されたデータを取得する(読み込む)(ステップS23)。つまり、情報処理装置11は、受信バッファの「標準IDバッファ領域」から「標準ID(M1)」を、「拡張IDバッファ領域」から「チェックサム(M2)」を、「対象データバッファ領域」から「任意データ112」を、それぞれ取得する。そして、情報処理装置11は、「任意データ112」と「チェックサム113」とに、所定の検算用のアルゴリズムを適用して、「任意データ112」のデータに誤りが生じていないか否かを検出する(ステップS24)。つまり、情報処理装置11は、「任意データ112」のデータが改変されている、いわゆるエラーが生じているか否かを検出する。これにより、送受信回路121にて改変が「CRC」によりチェックされた後、情報処理装置11に至るまでの間に「任意データ112(対象データ(M3))」に生じたデータの改変を検出することができるようになる。 On the other hand, when it is determined that the switch SW flag 114 is “1” (“ON”) (YES in step S20), the information processing apparatus 11 acquires data set in each buffer area of the reception buffer ( Read) (step S23). That is, the information processing apparatus 11 obtains “standard ID (M1)” from the “standard ID buffer area” of the reception buffer, “checksum (M2)” from the “extended ID buffer area”, and “target data buffer area”. “Arbitrary data 112” is acquired. Then, the information processing apparatus 11 applies a predetermined algorithm for verification to the “arbitrary data 112” and the “checksum 113” to determine whether or not an error has occurred in the data of the “arbitrary data 112”. Detect (step S24). That is, the information processing apparatus 11 detects whether or not a so-called error has occurred in which the data of “arbitrary data 112” has been altered. Thereby, after the alteration is checked by “CRC” in the transmission / reception circuit 121, the alteration of the data generated in the “arbitrary data 112 (target data (M3))” is detected before reaching the information processing apparatus 11. Will be able to.
 改変の有無の検出により、改変(エラー)が検出されなかった場合(ステップS25でNO)、情報処理装置11は、改変されていない「任意データ112」に対して、上述のステップS22と同様に、所定のデータ処理を行う(ステップS22)。 If no alteration (error) is detected by detecting the presence / absence of alteration (NO in step S25), the information processing apparatus 11 performs the same processing as in step S22 on the “arbitrary data 112” that has not been altered. Then, predetermined data processing is performed (step S22).
 一方、改変の有無の検出により、改変(エラー)が検出された場合(ステップS25でYES)、情報処理装置11は、改変された「任意データ112」を所定のデータ処理に用いないとともに、改変されていない正確な値を得るため、「任意データ112」に対応する「標準ID」に基づいて再送要求を行う(ステップS26)。つまり、情報処理装置11は、データ要求用の通信メッセージであるリモートフレームを、「標準ID」に基づいてCANコントローラ12から発行させる。これにより発行される「標準ID」に基づくリモートフレームは、第2のECU13に当該「標準ID」に対応する「対象データ」を含むデータフレームを再発行させるようにする。このように、情報処理装置11は、値の改変された「任意データ112」を取得したとしても、その後、第2のECU13から再発行された「標準ID」に対応するデータフレームを受信することで、短時間のうちに、「標準ID」に対応する、値の改変されていない適正な「任意データ112」を得ることができるようになる。 On the other hand, when a modification (error) is detected by detecting the presence or absence of modification (YES in step S25), the information processing apparatus 11 does not use the modified “arbitrary data 112” for predetermined data processing and In order to obtain an accurate value that has not been received, a retransmission request is made based on the “standard ID” corresponding to the “arbitrary data 112” (step S26). That is, the information processing apparatus 11 causes the CAN controller 12 to issue a remote frame, which is a communication message for requesting data, based on the “standard ID”. The remote frame based on the “standard ID” thus issued causes the second ECU 13 to reissue a data frame including “target data” corresponding to the “standard ID”. Thus, even if the information processing apparatus 11 acquires the “arbitrary data 112” whose value has been modified, the information processing apparatus 11 thereafter receives a data frame corresponding to the “standard ID” reissued from the second ECU 13. In a short time, it is possible to obtain appropriate “arbitrary data 112” corresponding to the “standard ID” whose value is not altered.
 このように「任意データ112」の値の改変を検出することで、アプリケーション111の実行に用いられる「任意データ112」の値の信頼性が高められるとともに、このように信頼性の高められた「任意データ112」の値を用いて行われるアプリケーション111の実行結果の信頼性も高められるようになる。 By detecting the modification of the value of “arbitrary data 112” in this way, the reliability of the value of “arbitrary data 112” used for execution of the application 111 is enhanced, and thus the reliability is improved. The reliability of the execution result of the application 111 performed using the value of the “arbitrary data 112” is also improved.
 以上説明したように、本実施形態に係る通信装置を備える通信システムは、以下に列記する効果を有する。 As described above, the communication system including the communication device according to the present embodiment has the effects listed below.
 (1)CANプロトコルにおいて、例えば、第1のECU10のCANコントローラ12は、2つのCANコントローラ12,15間で転送の対象とされる対象データ(M3)と、当該対象データ(M3)の改変の有無を検出するチェックサム(M2)とを1つの通信メッセージ(1つのフレーム)から取得することができる。このように、2つのCANコントローラ12,15間で転送される対象データ(M3)とチェックサム(M2)とが1つの通信メッセージから取得できるため、チェックサムM2を別途の通信メッセージで取得する場合に比べて、ネットワークにおける通信メッセージの通信量を減らすことができる。これにより、通信メッセージ毎に発生するオーバーヘッドや送信時の調停(アービトレーション)などを減らすことができるようになる。なお、データ領域は、CANのプロトコルに規定されているデータフィールドに対応する。また、データフィールドは、その内容(データ)をユーザが自由に定義することができる領域となっており、その同領域にユーザが定義した内容(データ)が対象データ(M3)である。 (1) In the CAN protocol, for example, the CAN controller 12 of the first ECU 10 changes the target data (M3) to be transferred between the two CAN controllers 12 and 15 and the target data (M3). The checksum (M2) for detecting presence / absence can be acquired from one communication message (one frame). As described above, since the target data (M3) and the checksum (M2) transferred between the two CAN controllers 12 and 15 can be acquired from one communication message, the checksum M2 is acquired as a separate communication message. Compared to the above, it is possible to reduce the amount of communication messages in the network. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like. The data area corresponds to a data field defined in the CAN protocol. The data field is an area where the user can freely define the content (data), and the content (data) defined by the user in the same area is the target data (M3).
 また、CANコントローラ12は、1つの通信メッセージから対象データ(M3)及びチェックサム(M2)をそれぞれ取得できるため、対象データ(M3)及びチェックサム(M2)を異なる通信メッセージにて送った場合に必要とされる2つの通信メッセージの対応関係の管理などを省くことができる。このため、対象データ(M3)の改変の検出が簡単になり、利便性も向上する。例えば、転送された対象データを処理する装置が、対象データを取得した後、チェックサムが送られてくるまでの時間待ちを無くしたり、チェック値が受信できなかったときにチェック値の再送を要求する処理などを省くことができるようになる。 Further, since the CAN controller 12 can acquire the target data (M3) and the checksum (M2) from one communication message, respectively, when the target data (M3) and the checksum (M2) are sent in different communication messages. It is possible to omit management of the correspondence between two required communication messages. For this reason, detection of modification of the target data (M3) is simplified, and convenience is improved. For example, the device that processes the transferred target data eliminates the waiting time until the checksum is sent after acquiring the target data, or requests the retransmission of the check value when the check value cannot be received. This makes it possible to omit processing to be performed.
 (2)例えば第1のECU10のCANコントローラ12は、「拡張フォーマットF2」に変更を加えずに追加されたチェックサム(M2)を利用することができる。実際には、基本IDのみを利用し、拡張IDを利用しないCANコントローラも多く、そのように拡張IDを利用しないCANコントローラにおいて拡張ID領域を利用することのみで対象データの改変の有無を検出するチェックサム(M2)が容易に付加されるようになる。また、CANプロトコルに対応した既存の装置をこのようなCANコントローラに変更させることも容易になる。 (2) For example, the CAN controller 12 of the first ECU 10 can use the checksum (M2) added without changing the “extended format F2”. Actually, there are many CAN controllers that use only the basic ID and do not use the extended ID. In such a CAN controller that does not use the extended ID, the presence or absence of modification of the target data is detected only by using the extended ID area. A checksum (M2) is easily added. In addition, it becomes easy to change an existing apparatus compatible with the CAN protocol to such a CAN controller.
 (3)例えば第1のECU10のCANコントローラ12は、「特殊フォーマットF3」であると判断された場合、フィルタリングを「基本ID」のみで行うため、「拡張ID」に追加された「チェックサムM2」がIDフィルタリング122で実行されるメッセージフィルタリングに影響を及ぼすことを防止される。これにより、チェック値が追加された通信メッセージをより好適に処理できるようになる。 (3) For example, when the CAN controller 12 of the first ECU 10 determines that the format is “special format F3”, the “checksum M2” added to the “extended ID” is added to perform filtering using only the “basic ID”. "Is prevented from affecting the message filtering performed by the ID filtering 122. As a result, the communication message to which the check value is added can be more suitably processed.
 (4)切換スイッチ125の設定を「オフ」とすれば、CANコントローラ12は「拡張ID」を格納する領域をCANプロトコルにおける本来の用途である「拡張ID」が格納されているとして利用することができるようになり、この通信装置の汎用性を向上させることができるようになる。 (4) If the setting of the changeover switch 125 is set to “off”, the CAN controller 12 uses the area storing the “extended ID” as if the “extended ID” which is the original use in the CAN protocol is stored. As a result, the versatility of the communication apparatus can be improved.
 (5)例えば第1のECU10の情報処理装置11は、取得した対象データ(M3)に基づく任意データ112の改変の有無を同じ通信メッセージに含まれていたチェックサム113により検出する。このように、対象データ(M3)に基づく任意データ112とそのチェックサム113とを同じ通信メッセージから取得できるため改変の有無の検出にかかる処理が迅速化される。 (5) For example, the information processing device 11 of the first ECU 10 detects whether or not the arbitrary data 112 is modified based on the acquired target data (M3) by using the checksum 113 included in the same communication message. Thus, since the arbitrary data 112 based on the target data (M3) and the checksum 113 can be acquired from the same communication message, the process for detecting the presence / absence of alteration is accelerated.
 (6)CANの通信プロトコルにおいて、例えば、第2のECU13のCANコントローラ15は、2つのCANコントローラ12,15間で転送の対象とされる対象データ(M3)と、当該対象データ(M3)の改変の有無を検出するチェックサム(M2)とを1つの通信メッセージ(1つのフレーム)に格納することができるようになる。このように、2つのCANコントローラ12,15間で転送される対象データ(M3)とチェックサム(M2)とを1つの通信メッセージに格納すれば、チェックサム(M2)を別途の通信メッセージで送信する場合に比べて、ネットワークにおける通信メッセージの通信量を減らすことができる。これにより、通信メッセージ毎に発生するオーバーヘッドや送信時の調停(アービトレーション)などを減らすことができるようになる。 (6) In the CAN communication protocol, for example, the CAN controller 15 of the second ECU 13 includes target data (M3) to be transferred between the two CAN controllers 12 and 15, and the target data (M3). The checksum (M2) for detecting the presence or absence of alteration can be stored in one communication message (one frame). In this way, if the target data (M3) and the checksum (M2) transferred between the two CAN controllers 12 and 15 are stored in one communication message, the checksum (M2) is transmitted in a separate communication message. Compared with the case where it carries out, the communication amount of the communication message in a network can be reduced. As a result, it is possible to reduce overhead generated for each communication message, arbitration during transmission, and the like.
 また、例えば、第2のECU13のCANコントローラ15は、1つの通信メッセージに対象データ(M3)及びチェックサム(M2)をそれぞれ格納する。このことから、対象データ(M3)とチェックサム(M2)を異なる通信メッセージにて送る場合に必要となる2つの通信メッセージの対応関係の管理などを省くことができるようになり、利便性が向上する。例えば、対象データを送信する装置を、対象データを送信した後、チェックサムを送るまでの待機時間を無くさせたり、2つのいずれか一方に対する再送要求に対応する処理などを省かせたりすることができるようになる。 Also, for example, the CAN controller 15 of the second ECU 13 stores the target data (M3) and the checksum (M2) in one communication message. This makes it possible to omit the management of the correspondence between the two communication messages required when sending the target data (M3) and the checksum (M2) in different communication messages, improving convenience. To do. For example, the device that transmits the target data may eliminate the waiting time until the checksum is transmitted after transmitting the target data, or may omit processing corresponding to a retransmission request for one of the two. become able to.
 (7)例えば、第2のECU13のCANコントローラ15は、「拡張フォーマットF2」に変更を加えずにチェックサム(M2)を追加させることができる。実際には、基本IDのみを利用し、拡張IDを利用しないCANコントローラも多く、そのように拡張IDを利用しないCANコントローラにおいて拡張ID領域を利用することのみで対象データ(M3)の改変の有無を検出するチェックサム(M2)を容易に付加することができる。また、CANプロトコルに対応した既存の装置を、このようなCANコントローラ12に変更させるようなことも容易である。 (7) For example, the CAN controller 15 of the second ECU 13 can add the checksum (M2) without changing the “extended format F2”. Actually, there are many CAN controllers that use only the basic ID and do not use the extended ID. In such a CAN controller that does not use the extended ID, whether or not the target data (M3) is altered only by using the extended ID area. It is possible to easily add a checksum (M2) for detecting. It is also easy to change an existing apparatus that supports the CAN protocol to such a CAN controller 12.
 (8)例えば、第2のECU13のCANコントローラ15は、切換スイッチ125の設定が「オフ」であれば、拡張IDを格納する領域に、本来の用途である拡張IDを格納することができるようになり、この通信装置の汎用性を向上させることができるようになる。 (8) For example, if the setting of the changeover switch 125 is “OFF”, the CAN controller 15 of the second ECU 13 can store the extended ID, which is the original application, in the area for storing the extended ID. Thus, the versatility of the communication device can be improved.
 (9)CANプロトコルにおいて、通信システムは、2つのCANコントローラ12,15間で転送の対象とされる対象データ(M3)と、当該対象データ(M3)の改変の有無を検出するチェックサム(M2)とを1つの通信メッセージ(1つのフレーム)に格納させることができる。そして、この1つの通信メッセージから、同通信メッセージに格納された対象データ(M3)とチェックサム(M2)とを、それぞれ取得させることができるようになる。 (9) In the CAN protocol, the communication system includes target data (M3) to be transferred between the two CAN controllers 12 and 15, and a checksum (M2) that detects whether the target data (M3) has been altered. ) Can be stored in one communication message (one frame). Then, the target data (M3) and the checksum (M2) stored in the communication message can be acquired from the one communication message.
 このように、2つのCANコントローラ12,15間で転送される対象データ(M3)とチェックサム(M2)とを1つの通信メッセージに格納して送信するとともに受信するようにすれば、チェックサム(M2)を別途の通信メッセージで送信受信する場合に比べて、ネットワークにおける通信メッセージの通信量を減らすことができる。これにより、通信システムにおける、通信メッセージ毎に発生するオーバーヘッドや送信時の調停(アービトレーション)などを減らすことができるようになる。 In this way, if the target data (M3) and the checksum (M2) transferred between the two CAN controllers 12 and 15 are stored in one communication message and transmitted and received, the checksum ( Compared with the case where M2) is transmitted and received as a separate communication message, the communication volume of the communication message in the network can be reduced. As a result, the overhead generated for each communication message in the communication system, arbitration during transmission, and the like can be reduced.
 また、通信システムは、1つの通信メッセージに対象データ(M3)及びチェックサム(M2)をそれぞれ格納して送信受信することができる。このことから、対象データ(M3)とチェックサム(M2)とを異なる通信メッセージにて送る場合に必要となる2つの通信メッセージの対応関係の管理などを省くことができるようになり、通信システムの利便性が向上する。例えば、対象データ(M3)を送信する装置、及び、同受信する装置を、対象データ(M3)を送信受信した後、次にチェックサム(M2)を送信受信するまでの待機時間を無くすようにさせたり、2つのいずれか一方の通信メッセージに対する再送要求に対応する処理を省かせたりすることができるようになる。これにより、通信システムとして迅速な通信を行わせることなどができる。 Further, the communication system can store and receive the target data (M3) and the checksum (M2) in one communication message. From this, it becomes possible to omit the management of the correspondence between two communication messages, which is necessary when the target data (M3) and the checksum (M2) are sent in different communication messages. Convenience is improved. For example, the device that transmits the target data (M3) and the device that receives the target data (M3) receive the target data (M3) and then wait until the next checksum (M2) is transmitted and received. Or the processing corresponding to the retransmission request for one of the two communication messages can be omitted. Thereby, a quick communication can be performed as a communication system.
 (第2の実施形態)
 本発明に係る通信装置を備える通信システムを具体化した第2の実施形態について、図6に従って説明する。本実施形態は、第1のECU10Aと第2のECU13Aにおける処理の一部が、上記第1の実施形態の第1のECU10や第2のECU13と相違するものの、その他の構成については同様であることから、ここでは処理の相違点について説明し、同様な構成についてはその詳細な説明を割愛する。つまり、第1のECU10Aと第2のECU13Aとは、「基本フォーマットF1」、「拡張フォーマットF2」、及び、「特殊フォーマットF3」に対応可能であるものとする。
(Second Embodiment)
A second embodiment that embodies a communication system including a communication apparatus according to the present invention will be described with reference to FIG. In the present embodiment, a part of the processing in the first ECU 10A and the second ECU 13A is different from the first ECU 10 and the second ECU 13 in the first embodiment, but the other configurations are the same. Therefore, here, differences in processing will be described, and detailed description of similar configurations will be omitted. That is, it is assumed that the first ECU 10A and the second ECU 13A can support “basic format F1,” “extended format F2,” and “special format F3”.
 本実施形態では、第1のECU10Aは必要に応じて、第2のECU13Aと第1のECU10Aとの間の通信メッセージのデータフレームのフォーマットを「拡張フォーマットF2」又は「特殊フォーマットF3」の一方に選択し、選択したフォーマットに切り換えることが適宜可能になっている。 In the present embodiment, the first ECU 10A changes the data frame format of the communication message between the second ECU 13A and the first ECU 10A to one of the “extended format F2” or the “special format F3” as necessary. It is possible to select and switch to the selected format as appropriate.
 詳述すると、第1のECU10Aは、そこで実行されるアプリケーションにより適宜、切換SWフラグ114の値が「0」(「オフ」)又は「1」(「オン」)のいずれか一方に選択設定されるようになっている。また、第2のECU13Aも同様に、そこで実行されるアプリケーションにより適宜、切換SWフラグの値が「0」又は「1」に選択設定されるようになっている。なお、第1のECU10A及び第2のECU13Aはそれぞれ、切換SWフラグの値が「0」の場合、データフレームが「拡張フォーマットF2」であること、つまり「拡張ID領域」に「拡張ID」が格納される方式(拡張方式)であることに対応する。一方、第1のECU10A及び第2のECU13Aはそれぞれ、切換SWフラグの値が「1」の場合、データフレームが「特殊フォーマットF3」であること、つまり「拡張ID領域」に「チェックサム」が格納される方式(特殊方式)であることに対応する。 More specifically, in the first ECU 10A, the value of the switch SW flag 114 is appropriately set to either “0” (“off”) or “1” (“on”) depending on the application executed there. It has become so. Similarly, in the second ECU 13A, the value of the switch SW flag is appropriately set to “0” or “1” depending on the application executed there. Each of the first ECU 10A and the second ECU 13A indicates that the data frame is “extended format F2” when the value of the switch SW flag is “0”, that is, “extended ID” is set in the “extended ID area”. This corresponds to the stored method (extended method). On the other hand, each of the first ECU 10A and the second ECU 13A, when the value of the switch SW flag is “1”, indicates that the data frame is “special format F3”, that is, “extended ID area” has “checksum”. This corresponds to the stored method (special method).
 図6に示すように、第1のECU10Aで実行されるアプリケーションが切換SWフラグの値を「0」から「1」に変更するとき、第1のECU10Aは、第2のECU13Aの切換SWフラグの値を「0」から「1」に変更させるための切り換えメッセージを第2のECU13Aに送信する(ステップS30)。例えば、第1のECU10Aは、切換SWフラグの値を「0」から「1」に切り換えさせるメッセージとして「基本ID」を有する通信メッセージ(データフレーム)をネットワークに送信する。その通信メッセージを受信した第2のECU13Aは、当該通信メッセージをアプリケーションにてデータ処理し、当該アプリケーションにより切換SWフラグの値を「0」から「1」に変更させる(ステップS31)。これにより、第1のECU10A及び第2のECU13Aがそれぞれ、拡張方式から特殊方式に切り換えられ、特殊方式に対応する。なお、切り換えメッセージを、リモートフレームとしてもよいし、その場合、第1のECU10Aは、第2のECU13Aから切換結果を得るようにしてもよい。 As shown in FIG. 6, when the application executed by the first ECU 10A changes the value of the switching SW flag from “0” to “1”, the first ECU 10A sets the switching SW flag of the second ECU 13A. A switching message for changing the value from “0” to “1” is transmitted to the second ECU 13A (step S30). For example, the first ECU 10A transmits a communication message (data frame) having “basic ID” as a message for switching the value of the switch SW flag from “0” to “1” to the network. Receiving the communication message, the second ECU 13A processes the communication message with an application, and changes the value of the switching SW flag from “0” to “1” by the application (step S31). Thereby, the first ECU 10A and the second ECU 13A are respectively switched from the expansion method to the special method, and correspond to the special method. Note that the switching message may be a remote frame, and in that case, the first ECU 10A may obtain the switching result from the second ECU 13A.
 第2のECU13Aの切換SWフラグの値を「0」から「1」に変更させた後、第1のECU10Aは、所定の情報を構成するデータを要求する通信メッセージ(リモートフレーム)を送信する(ステップS32)。このとき通信メッセージには、第2のECU13Aが送信する必要のある所定の情報を示す「基本ID」が設定されている。 After changing the value of the switch SW flag of the second ECU 13A from “0” to “1”, the first ECU 10A transmits a communication message (remote frame) requesting data constituting predetermined information ( Step S32). At this time, a “basic ID” indicating predetermined information that needs to be transmitted by the second ECU 13A is set in the communication message.
 所定の情報を構成するデータを要求する通信メッセージを受信した第2のECU13Aは、要求されている所定の情報から送信用のデータを生成する(ステップS33)とともに、当該データの改変の検出に用いられるチェックサムを算出する。そして算出した送信用のデータ及びチェックサムを「拡張フォーマットF2」の対応する領域、つまり「対象データ領域」及び「拡張ID領域」にそれぞれ格納させる(ステップS34)。なお、切換SWフラグの値は「1」であるから、当該データフレームは「拡張フォーマットF2」であるものの、第1のECU10A及び第2のECU13Aでは、「特殊フォーマットF3」として処理されるようになっている。そして、第2のECU13Aは、送信用のデータ及びチェックサムの格納された通信メッセージをネットワークに送信する(ステップS35)。 The second ECU 13A that has received the communication message requesting the data constituting the predetermined information generates data for transmission from the required predetermined information (step S33), and uses it for detection of alteration of the data. Calculate the checksum to be used. Then, the calculated transmission data and checksum are stored in the corresponding areas of the “extended format F2”, that is, the “target data area” and the “extended ID area” (step S34). Since the value of the switch SW flag is “1”, the data frame is “extended format F2”. However, the first ECU 10A and the second ECU 13A process the data frame as “special format F3”. It has become. Then, the second ECU 13A transmits the communication message storing the transmission data and the checksum to the network (step S35).
 第1のECU10Aは、先に送信した「基本ID」に対応して第2のECU13Aから送信された通信メッセージを受信する(ステップS36)とともに、フィルタリングなどの処理を実行する(ステップS37)。つまり、第1のECU10Aは、通信メッセージを「特殊フィルタリング」によるフィルタリングを実行することから、通信メッセージを「基本ID」のみによりフィルタリングする。 The first ECU 10A receives the communication message transmitted from the second ECU 13A corresponding to the previously transmitted “basic ID” (step S36) and executes processing such as filtering (step S37). That is, since the first ECU 10A performs filtering by “special filtering” on the communication message, the first ECU 10A filters the communication message only by “basic ID”.
 一方、第1のECU10Aは、「拡張ID領域」から「チェックサム」を取得し、受信バッファの「拡張IDバッファ領域」に設定する(ステップS38)。第1のECU10Aは、切換SWフラグが「1」であることに基づいて受信バッファの「拡張ID領域」のデータが「チェックサム」であると判断する。そのため、第1のECU10Aは、受信バッファの「対象データ領域」から取得した「任意データ」の改変の有無を上述の「チェックサム」に基づいて検出し、改変されていないことを検出すると、当該取得された「任意データ」をアプリケーションの処理に用いるようにしている(ステップS39)。なお、「任意データ」が改変されていることを検出すると、第1の実施形態と同様に当該「任意データ(対象データ)」を含む通信メッセージの再送を要求する。 On the other hand, the first ECU 10A obtains the “checksum” from the “extended ID area” and sets it in the “extended ID buffer area” of the reception buffer (step S38). Based on the fact that the switch SW flag is “1”, the first ECU 10A determines that the data in the “extended ID area” of the reception buffer is “checksum”. Therefore, the first ECU 10A detects whether or not the “arbitrary data” obtained from the “target data area” of the reception buffer has been modified based on the above-mentioned “checksum”, and detects that it has not been modified. The acquired “arbitrary data” is used for application processing (step S39). When it is detected that “arbitrary data” has been altered, a request is made to retransmit a communication message including the “arbitrary data (target data)” as in the first embodiment.
 このようにして、第2のECU13Aから転送される情報が、1つ又は複数の通信メッセージを介して第1のECU10Aに全て転送された後、第1のECU10Aは、第1のECU10Aや第2のECU13Aの切換SWフラグの値を「0」に戻させる。つまり、第1のECU10Aは、そこで実行されるアプリケーションにより切換SWフラグの値が「1」から「0」に戻されるとともに、第2のECU13Aの切換SWフラグの値を「1」から「0」に戻させる通信メッセージ(データフレーム)を第2のECU13Aに送信する(ステップS40)。そしてその切換用の通信メッセージを受信した第2のECU13Aは、当該通信メッセージをアプリケーションにて処理し、当該アプリケーションにより切換SWフラグの値を「1」から「0」に変更させる(ステップS41)。これにより、第1のECU10A及び第2のECU13Aがそれぞれ、特殊方式から拡張方式に切り換えられ、拡張方式に対応する。 In this way, after all the information transferred from the second ECU 13A has been transferred to the first ECU 10A via one or more communication messages, the first ECU 10A receives the first ECU 10A and the second ECU 10A. The value of the switch SW flag of the ECU 13A is returned to “0”. That is, in the first ECU 10A, the value of the switching SW flag is returned from “1” to “0” by the application executed there, and the value of the switching SW flag of the second ECU 13A is changed from “1” to “0”. A communication message (data frame) to be returned to is transmitted to the second ECU 13A (step S40). Then, the second ECU 13A that has received the switching communication message processes the communication message by an application, and changes the value of the switching SW flag from “1” to “0” by the application (step S41). Thereby, the first ECU 10A and the second ECU 13A are respectively switched from the special method to the expansion method, and correspond to the expansion method.
 以上説明したように、本実施形態に係る通信装置を備える通信システムは、先の第1の実施形態に記載した(1)~(9)の効果に加えて、以下に列記する効果を有する。 As described above, the communication system including the communication device according to the present embodiment has the effects listed below in addition to the effects (1) to (9) described in the first embodiment.
 (10)通信メッセージを送信する第2のECU13AのCANコントローラは、通信メッセージにチェックサムを格納するか否かが通信メッセージを受信する第1のECU10AのCANコントローラにより設定されるため、通信システムとして送信受信される通信メッセージにチェックサムを格納するか否かの設定を切り換えることが簡単になる。これにより、このような通信システムの適用可能性が高められる。 (10) Since the CAN controller of the second ECU 13A that transmits the communication message is set by the CAN controller of the first ECU 10A that receives the communication message, whether or not to store the checksum in the communication message is set as the communication system. It becomes easy to switch the setting of whether or not to store the checksum in the communication message transmitted and received. Thereby, the applicability of such a communication system is enhanced.
 (その他の実施形態)
 なお上記各実施形態は、以下の態様で実施することもできる。
(Other embodiments)
In addition, each said embodiment can also be implemented with the following aspects.
 ・上記第2の実施形態では、データを受信する側の第1のECU10Aが、データを送信する側の第2のECU13Aの切換SWフラグの値を変更させる場合について例示した。しかしこれに限らず、データを送信する側のECUが、データを受信する側のECUの切換SWフラグの値を変更させてもよい。例えば、図7に示すように、「特殊フォーマットF3」の通信メッセージを授受可能にするため、第2のECU13Bの切換SWフラグの値が「0」から「1」に変更されるとき、第2のECU13Bは、第1のECU10Bの切換SWフラグの値を「0」から「1」に変更させる通信メッセージを第1のECU10Bに送信する(ステップS50)。その通信メッセージを受信した第1のECU10Bは、当該通信メッセージをデータ処理するアプリケーションにより切換SWフラグの値を「0」から「1」に変更させる(ステップS51)ようにしてもよい。 In the second embodiment, the case where the first ECU 10A on the data receiving side changes the value of the switching SW flag of the second ECU 13A on the data transmitting side is exemplified. However, the present invention is not limited to this, and the ECU on the data transmission side may change the value of the switch SW flag of the ECU on the data reception side. For example, as shown in FIG. 7, when the value of the switch SW flag of the second ECU 13B is changed from “0” to “1” in order to enable transmission / reception of the communication message of “special format F3”, the second The ECU 13B transmits a communication message for changing the value of the switch SW flag of the first ECU 10B from “0” to “1” to the first ECU 10B (step S50). The first ECU 10B that has received the communication message may change the value of the switch SW flag from “0” to “1” by an application that processes the communication message (step S51).
 そして、情報の転送が終了したら、「特殊フォーマットF3」の通信メッセージへの対応を解除するため、第2のECU13Bの切換SWフラグが「1」から「0」に変更されるとき、第2のECU13Bは、第1のECU10Bの切換SWフラグの値を「1」から「0」に変更させる通信メッセージを第1のECU10Bに送信する(ステップS52)。その通信メッセージを受信した第1のECU10Bは、当該通信メッセージをデータ処理するアプリケーションにより切換SWフラグの値を「1」から「0」に変更させる(ステップS51)ようにしてもよい。 Then, when the transfer of information is completed, the second SW 13B switch SW flag is changed from “1” to “0” in order to cancel the response to the communication message of “special format F3”. The ECU 13B transmits a communication message for changing the value of the switch SW flag of the first ECU 10B from “1” to “0” to the first ECU 10B (step S52). The first ECU 10B that has received the communication message may change the value of the switch SW flag from “1” to “0” by an application that processes the communication message (step S51).
 これにより、通信メッセージを受信するCANコントローラは、通信メッセージにチェックサムが格納されているか否かが通信メッセージを送信するCANコントローラにより設定されるため、通信システムとして送信受信される通信メッセージにチェック値を格納するか否かの設定を切り換えることが簡単になる。すなわち、このような通信システムの適用可能性が高められるとともに、設計自由度が高められるようになる。 Thus, the CAN controller that receives the communication message sets whether or not the check sum is stored in the communication message by the CAN controller that transmits the communication message. It becomes easy to switch the setting of whether or not to store. That is, the applicability of such a communication system is increased and the degree of freedom in design is increased.
 ・上記各実施形態では、IDフィルタリング122にて実行されるフィルタリングが、切換スイッチ(切換SWフラグ)によって、「拡張フィルタリング」又は「特殊フィルタリング」に切り換えられる場合について例示した。しかしこれに限らず、IDフィルタリングにて実行されるフィルタリングを「特殊フィルタリング」だけにしてもよい。例えば、通信システムが、通信メッセージに「基本フォーマット」のみを使用するシステムであれば、同システムは拡張フォーマットに対応する必要がないため、この通信システムで送受される「拡張フォーマット」の通信メッセージには、常に「特殊フィルタリング」を適用するようにしてもよい。これにより、1つの通信メッセージに対象データとそれに対応するチェックサムとを格納する「特殊フォーマット」を、CANネットワークにより構成される通信システムに適用できる可能性が向上するようになる。 In each of the above embodiments, the case where the filtering executed by the ID filtering 122 is switched to “extended filtering” or “special filtering” by the changeover switch (switching SW flag) is illustrated. However, the present invention is not limited to this, and filtering performed by ID filtering may be only “special filtering”. For example, if the communication system uses only the “basic format” for communication messages, the system does not need to support the extended format. May always apply “special filtering”. As a result, the possibility that the “special format” for storing the target data and the checksum corresponding to the target data in one communication message can be applied to the communication system configured by the CAN network is improved.
 ・上記実施形態では、データフレームの「データ領域」から取得された「対象データ(任意データ112)」の改変の検出に、チェック値として「チェックサム」を用いる場合について例示した。しかしこれに限らず、「データ領域」から取得された「任意データ」の改変を検出可能、いわゆる誤り検出可能であるならば、チェック値に用いる値は、どのようなアルゴリズムに基づいて算出された値、例えばCRCなどであってもよい。これにより、通信システムの設計自由度を向上させられるようになる。 In the above embodiment, the case where the “checksum” is used as the check value for the detection of the modification of the “target data (arbitrary data 112)” acquired from the “data area” of the data frame is exemplified. However, the present invention is not limited to this, and if the modification of “arbitrary data” acquired from the “data area” can be detected, so-called error detection is possible, the value used for the check value is calculated based on what algorithm It may be a value, such as a CRC. Thereby, the design freedom of a communication system can be improved.
 ・上記各実施形態では、通信用バス16に第1及び第2のECU10(10A),13(13A)の2つのECUが接続されている場合について例示したが。しかしこれに限らず、通信用バスには3つ以上のECUが相互通信可能に接続されていてもよい。これにより通信システムの利用可能性が高められる。 In each of the above embodiments, the case where the two ECUs 10 (10A) and 13 (13A) are connected to the communication bus 16 is illustrated. However, the present invention is not limited to this, and three or more ECUs may be connected to the communication bus so as to be able to communicate with each other. This increases the availability of the communication system.
 ・またこのとき、通信用バスに接続されているECUのなかに、「拡張ID」に「チェックサム」が含まれている「特殊フォーマット」の通信メッセージに対応していないECUが接続されていてもよい。この場合、未対応のECUは、当該通信メッセージをその「基本ID」に基づいて不要と判定できるように設定しておけば、対応ECUと未対応ECUとが混在されていても不都合は生じない。このように「特殊フォーマットF3」に対応するECUと、未対応のECUとが混在可能な構成にすれば、この通信装置の通信システムへの適用が容易になり、適用可能性が高められる。 At this time, an ECU that is not compatible with a communication message of “special format” in which “checksum” is included in the “extended ID” is connected in the ECU connected to the communication bus. Also good. In this case, if the unsupported ECU is set so that the communication message can be determined to be unnecessary based on the “basic ID”, no inconvenience occurs even if the corresponding ECU and the unsupported ECU are mixed. . If the ECU corresponding to the “special format F3” and the non-corresponding ECU can be mixed, the application of the communication device to the communication system is facilitated and the applicability is enhanced.
 ・上記各実施形態では、第1のECU10(10A)及び第2のECU13(13A)の相互間で制御に必要な情報が転送される場合について例示した。しかしこれに限らず、第1のECU及び第2のECU間では、更新用の制御用プログラムのデータ、いわゆるリプロデータや、更新用のパラメータなどに基づく情報が転送されてもよい。これにより、この通信装置の利用価値が高められるようになる。 In each of the above embodiments, the case where information necessary for control is transferred between the first ECU 10 (10A) and the second ECU 13 (13A) is illustrated. However, the present invention is not limited thereto, and information based on update control program data, so-called repro data, update parameters, and the like may be transferred between the first ECU and the second ECU. Thereby, the utility value of this communication apparatus comes to be raised.
 1…車両、10,10A,10B…第1のECU(第1の電子制御装置)、11…情報処理装置、12,15…CANコントローラ、13,13A,13B…第2のECU、14…情報処理装置、16…通信用バス、17…物理層インターフェイス、111…アプリケーション、112…任意データ、113…チェックサム、114…切換SWフラグ、121…送受信回路、122…IDフィルタリング、123…CPUインターフェイス、124…メッセージバッファ、125…切換スイッチ、141…アプリケーション、M1…基本ID、M2…拡張ID(チェックサム)、M3…対象データ。 DESCRIPTION OF SYMBOLS 1 ... Vehicle 10, 10A, 10B ... 1st ECU (1st electronic control apparatus), 11 ... Information processing apparatus, 12, 15 ... CAN controller, 13, 13A, 13B ... 2nd ECU, 14 ... Information Processing unit 16 ... Communication bus, 17 ... Physical layer interface, 111 ... Application, 112 ... Arbitrary data, 113 ... Checksum, 114 ... Switch SW flag, 121 ... Transmission / reception circuit, 122 ... ID filtering, 123 ... CPU interface, 124 ... Message buffer, 125 ... Changeover switch, 141 ... Application, M1 ... Basic ID, M2 ... Extended ID (checksum), M3 ... Target data.

Claims (14)

  1.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを受信する通信装置であって、
     前記通信メッセージに含まれる対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に対象データが格納されるとともに、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値が格納されている通信メッセージが受信されることにより、同受信された通信メッセージから、前記対象データ格納領域に格納されている対象データとともに、前記対象データ格納領域とは異なる領域に格納されている前記チェック値を併せて取得する
     ことを特徴とする通信装置。
    A communication device that receives a communication message transferred between communication devices based on a communication protocol applied to a control area network,
    The target data is stored in a target data storage area defined in one frame as an area for storing target data included in the communication message, and the target data storage area in the same frame is different from the target data storage area. By receiving a communication message storing a check value used for detecting whether or not the target data is altered, from the received communication message, together with the target data stored in the target data storage area, A communication apparatus, wherein the check value stored in an area different from the target data storage area is acquired together.
  2.  前記通信メッセージは、前記コントロールエリアネットワークに適用される通信プロトコルで規定されている拡張フォーマットとして構成されており、
     前記チェック値が格納される前記対象データ格納領域とは異なる領域として、前記拡張フォーマットに規定されている拡張IDを格納する拡張ID領域が用いられている
     請求項1に記載の通信装置。
    The communication message is configured as an extended format defined by a communication protocol applied to the control area network,
    The communication apparatus according to claim 1, wherein an extension ID area that stores an extension ID defined in the extension format is used as an area different from the target data storage area in which the check value is stored.
  3.  前記通信メッセージの要/不要を判断するメッセージフィルタリングを、前記拡張フォーマットに含まれる基本IDのみに基づいて行う
     請求項2に記載の通信装置。
    The communication device according to claim 2, wherein message filtering for determining whether the communication message is necessary or not is performed based only on a basic ID included in the extended format.
  4.  前記通信メッセージに前記チェック値を含めるか否かは選択可能になっており、前記チェック値を含めないことが選択されるときには、前記通信メッセージの前記拡張ID領域に格納されている拡張IDを前記基本IDと併せて前記メッセージフィルタリングに用いる
     請求項3に記載の通信装置。
    Whether or not to include the check value in the communication message can be selected, and when it is selected not to include the check value, the extension ID stored in the extension ID area of the communication message is set to the extension ID area. The communication apparatus according to claim 3, wherein the communication apparatus is used together with a basic ID for the message filtering.
  5.  前記受信された対象データとともに取得されたチェック値に基づいて前記対象データの改変の有無を検出する処理装置を備える
     請求項1~4のいずれか一項に記載の通信装置。
    The communication device according to any one of claims 1 to 4, further comprising a processing device that detects presence or absence of alteration of the target data based on a check value acquired together with the received target data.
  6.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを送信する通信装置であって、
     前記通信メッセージに含む対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に該対象データを格納するとともに、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値を格納して前記送信する通信メッセージを生成する
     ことを特徴とする通信装置。
    A communication device for transmitting a communication message transferred between communication devices based on a communication protocol applied to a control area network,
    The target data is stored in a target data storage area defined in one frame as a target data storage area included in the communication message, and the target data is stored in a different area from the target data storage area in the same frame. A communication device that stores a check value used to detect whether data has been altered and generates the communication message to be transmitted.
  7.  前記通信メッセージは、前記コントロールエリアネットワークに適用される通信プロトコルで規定されている拡張フォーマットとして構成されており、
     前記チェック値を格納する前記対象データ格納領域とは異なる領域として、前記拡張フォーマットに規定されている拡張IDを格納する拡張ID領域を用いる
     請求項6に記載の通信装置。
    The communication message is configured as an extended format defined by a communication protocol applied to the control area network,
    The communication apparatus according to claim 6, wherein an extension ID area for storing an extension ID defined in the extension format is used as an area different from the target data storage area for storing the check value.
  8.  前記拡張ID領域に前記チェック値を格納するか否かは選択可能になっており、前記チェック値を格納しないことが選択されるときには、前記拡張ID領域に前記チェック値を格納しない
     請求項7に記載の通信装置。
    8. It is possible to select whether to store the check value in the extended ID area, and when it is selected not to store the check value, the check value is not stored in the extended ID area. The communication device described.
  9.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信が行われる通信システムであって、
     前記通信メッセージを送信する通信装置として、請求項6~8のいずれか一項に記載の通信装置を用い、前記通信メッセージを受信する通信装置として、請求項1~5のいずれか一項に記載の通信装置を用いる
     ことを特徴とする通信システム。
    A communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network,
    The communication device according to any one of claims 6 to 8 is used as a communication device that transmits the communication message, and the communication device according to any one of claims 1 to 5 is used as a communication device that receives the communication message. A communication system characterized by using the communication device.
  10.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信が行われる通信システムであって、
     前記通信メッセージを送信する通信装置として請求項8に記載の通信装置を用いるとともに、前記通信メッセージを受信する通信装置として請求項4に記載の通信装置を用い、
     前記通信メッセージを送信する通信装置には、前記拡張ID領域に前記チェック値を格納するか否かを通知するメッセージを送出する機能を更に設け、
     前記通信メッセージを受信する通信装置には、前記拡張ID領域に前記チェック値を格納するか否かを通知するメッセージを取得することに基づいて前記拡張ID領域に前記チェック値が含まれているか否かを認識する機能を更に設ける
     ことを特徴とする通信システム。
    A communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network,
    The communication device according to claim 8 is used as a communication device that transmits the communication message, and the communication device according to claim 4 is used as a communication device that receives the communication message.
    The communication device that transmits the communication message further includes a function of sending a message notifying whether or not to store the check value in the extended ID area,
    Whether or not the communication device that receives the communication message includes the check value in the extended ID area based on obtaining a message for notifying whether or not to store the check value in the extended ID area A communication system, further comprising a function of recognizing the above.
  11.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信が行われる通信システムであって、
     前記通信メッセージを送信する通信装置として請求項8に記載の通信装置を用いるとともに、前記通信メッセージを受信する通信装置として請求項4に記載の通信装置を用い、
     前記通信メッセージを受信する通信装置には、前記チェック値の前記拡張IDへの格納をリクエストするメッセージを送出する機能を更に設け、
     前記通信メッセージを送信する通信装置には、前記チェック値の前記拡張IDへの格納をリクエストするメッセージを取得することに基づいて前記拡張ID領域に前記チェック値を格納する機能を更に設ける
     ことを特徴とする通信システム。
    A communication system for transmitting and receiving communication messages transferred between communication devices based on a communication protocol applied to a control area network,
    The communication device according to claim 8 is used as a communication device that transmits the communication message, and the communication device according to claim 4 is used as a communication device that receives the communication message.
    The communication device that receives the communication message is further provided with a function of sending a message for requesting storage of the check value in the extension ID,
    The communication device that transmits the communication message is further provided with a function of storing the check value in the extension ID area based on obtaining a message for requesting storage of the check value in the extension ID. A communication system.
  12.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを受信する通信方法であって、
     前記通信メッセージに含まれる対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に対象データが格納されるとともに、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値が格納されている通信メッセージを受信する工程と、前記受信した通信メッセージから前記対象データ格納領域に格納されている対象データを取得する工程と、同じく前記受信した通信メッセージから前記対象データ格納領域とは異なる領域に格納されている前記チェック値を取得する工程と、を備える
     ことを特徴とする通信方法。
    A communication method for receiving a communication message transferred between communication devices based on a communication protocol applied to a control area network,
    The target data is stored in a target data storage area defined in one frame as an area for storing the target data included in the communication message, and the target data storage area in the same frame is different from the target data storage area. Receiving a communication message in which a check value used for detecting whether or not the target data is altered is stored; obtaining target data stored in the target data storage area from the received communication message; And obtaining the check value stored in an area different from the target data storage area from the received communication message.
  13.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージを送信する通信方法であって、
     前記通信メッセージを送信する工程に先立つ工程として、前記通信メッセージに含む対象データを格納する領域として一つのフレーム内に規定されている対象データ格納領域に該対象データを格納する工程と、同フレーム内の前記対象データ格納領域とは異なる領域に前記対象データの改変の有無の検出に用いられるチェック値を格納する工程と、を備える
     ことを特徴とする通信方法。
    A communication method for transmitting a communication message transferred between communication devices based on a communication protocol applied to a control area network,
    As a step prior to the step of transmitting the communication message, a step of storing the target data in a target data storage area defined in one frame as an area for storing the target data included in the communication message; Storing a check value used for detecting whether or not the target data has been modified in an area different from the target data storage area.
  14.  コントロールエリアネットワークに適用される通信プロトコルに基づいて通信装置間で転送される通信メッセージの送信受信を、それら通信装置の相互通信にて行う通信方法であって、
     前記通信メッセージを送信する通信装置が同通信メッセージを送信する通信方法として、請求項13に記載の通信方法を用い、
     前記通信メッセージを受信する通信装置が同通信メッセージを受信する通信方法として、請求項12に記載の通信方法を用い、
     前記通信メッセージを送信する通信装置から送信された通信メッセージを、前記通信メッセージを受信する通信装置により取得する
     ことを特徴とする通信方法。
    A communication method for performing transmission and reception of a communication message transferred between communication devices based on a communication protocol applied to a control area network, by mutual communication between the communication devices,
    The communication method according to claim 13, wherein the communication device that transmits the communication message transmits the communication message.
    The communication method according to claim 12, wherein a communication device that receives the communication message receives the communication message.
    A communication method transmitted from a communication device that transmits the communication message is acquired by a communication device that receives the communication message.
PCT/JP2011/074442 2011-10-24 2011-10-24 Communication device, communication system and communication method WO2013061396A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/074442 WO2013061396A1 (en) 2011-10-24 2011-10-24 Communication device, communication system and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/074442 WO2013061396A1 (en) 2011-10-24 2011-10-24 Communication device, communication system and communication method

Publications (1)

Publication Number Publication Date
WO2013061396A1 true WO2013061396A1 (en) 2013-05-02

Family

ID=48167263

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/074442 WO2013061396A1 (en) 2011-10-24 2011-10-24 Communication device, communication system and communication method

Country Status (1)

Country Link
WO (1) WO2013061396A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015088941A (en) * 2013-10-31 2015-05-07 日立オートモティブシステムズ株式会社 Communication control device
EP3300337A1 (en) * 2016-09-27 2018-03-28 Fujitsu Ten Limited Communication method
US20180139052A1 (en) * 2016-11-14 2018-05-17 Toyota Jidosha Kabushiki Kaisha Communication system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06216839A (en) * 1993-01-19 1994-08-05 Matsushita Electric Ind Co Ltd Digital mca system
JP2000114987A (en) * 1998-09-30 2000-04-21 Sanyo Electric Co Ltd Error detecting device
JP2003273950A (en) * 2002-03-14 2003-09-26 Toyota Motor Corp Communication system and communication data monitoring method
JP2010258990A (en) * 2009-04-28 2010-11-11 Autonetworks Technologies Ltd Control system and control program updating method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06216839A (en) * 1993-01-19 1994-08-05 Matsushita Electric Ind Co Ltd Digital mca system
JP2000114987A (en) * 1998-09-30 2000-04-21 Sanyo Electric Co Ltd Error detecting device
JP2003273950A (en) * 2002-03-14 2003-09-26 Toyota Motor Corp Communication system and communication data monitoring method
JP2010258990A (en) * 2009-04-28 2010-11-11 Autonetworks Technologies Ltd Control system and control program updating method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015088941A (en) * 2013-10-31 2015-05-07 日立オートモティブシステムズ株式会社 Communication control device
EP3300337A1 (en) * 2016-09-27 2018-03-28 Fujitsu Ten Limited Communication method
US20180139052A1 (en) * 2016-11-14 2018-05-17 Toyota Jidosha Kabushiki Kaisha Communication system
CN108076046A (en) * 2016-11-14 2018-05-25 丰田自动车株式会社 Communication system
CN108076046B (en) * 2016-11-14 2020-09-01 丰田自动车株式会社 Communication system
US10862687B2 (en) * 2016-11-14 2020-12-08 Toyota Jidosha Kabushiki Kaisha Communication system for suppressing a processing load of an ECU when dealing with fraudulent messages

Similar Documents

Publication Publication Date Title
US10129124B2 (en) Method and apparatus for controlling in-vehicle mass diagnostic communication
US9768979B2 (en) Can communication method and data frame structure for improving communication speed through increase in data amount
JP2014027517A (en) Communication system and communication method
CN109792398B (en) Vehicle-mounted communication system, switching device and vehicle-mounted communication method
US20170155679A1 (en) Method of preventing drive-by hacking, and apparatus and system therefor
JP4987760B2 (en) Relay device, communication system, and communication method
US9596225B2 (en) Out-of-vehicle device interface apparatus and method for protecting in-vehicle network
US20200409678A1 (en) Vehicle software update network
WO2013061396A1 (en) Communication device, communication system and communication method
JP7412506B2 (en) Fraud detection rule update method, fraud detection electronic control unit and in-vehicle network system
JP2014226946A (en) Abnormality response system and abnormality response method for vehicular communication device
KR20160045191A (en) Apparatus and method for updating software of vehicle
JP6524905B2 (en) Electronic control unit
KR20180029854A (en) Diagnostic methods and devices in vehicle network
KR101714526B1 (en) Method and apparatus for protecting hacking in vehicle network
JP2018041200A (en) On-vehicle communication equipment, management device, management method, and monitoring program
WO2014007067A1 (en) Communication system, relay apparatus and communication apparatus
JP5573318B2 (en) In-vehicle information collection device
WO2019221058A1 (en) Vehicle-mounted relay device, communication system, bus determination method, and computer program
JP2017017615A (en) Communication apparatus and communication system
JP2013192092A (en) On-vehicle device
JP4259468B2 (en) Diagnostic system for vehicles
CN114978898A (en) Data transmission control method and device, head-up display and storage medium
JP6032174B2 (en) Communication control device
KR20180038970A (en) Operation method of communication node for selective wakeup in vehicle network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11874564

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11874564

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP