WO2023145391A1 - 中継装置、プログラム及び、中継方法 - Google Patents

中継装置、プログラム及び、中継方法 Download PDF

Info

Publication number
WO2023145391A1
WO2023145391A1 PCT/JP2023/000044 JP2023000044W WO2023145391A1 WO 2023145391 A1 WO2023145391 A1 WO 2023145391A1 JP 2023000044 W JP2023000044 W JP 2023000044W WO 2023145391 A1 WO2023145391 A1 WO 2023145391A1
Authority
WO
WIPO (PCT)
Prior art keywords
control unit
relay
target data
completed
initialization
Prior art date
Application number
PCT/JP2023/000044
Other languages
English (en)
French (fr)
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 株式会社オートネットワーク技術研究所
Publication of WO2023145391A1 publication Critical patent/WO2023145391A1/ja

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]
    • 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/46Interconnection of networks

Definitions

  • the present disclosure relates to a relay device, a program, and a relay method.
  • This application claims priority based on Japanese Application No. 2022-010260 filed on January 26, 2022, and incorporates all the descriptions described in the Japanese Application.
  • Vehicles are equipped with multiple in-vehicle ECUs (Electronic Control Units) for controlling in-vehicle equipment such as power train systems such as engine control, body systems such as air conditioner control, etc.
  • in-vehicle ECUs are relay devices and are communicably connected by the company network.
  • a relay device relays data transmitted and received between vehicle-mounted ECUs connected via an in-house network (see, for example, Patent Document 1).
  • a relay device is a relay device that is mounted in a vehicle and relays data transmitted and received between a plurality of in-vehicle ECUs, and includes a plurality of communication units for communicating with each of the in-vehicle ECUs.
  • a control unit that has completed processing acquires relay target data to be relayed via a communication unit corresponding to another control unit that has not completed initialization processing, part of the acquired relay target data is The data is stored in the storage unit by writing to the shared area shared with the other control unit for which initialization processing has not been completed.
  • FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system including a relay device according to Embodiment 1;
  • FIG. 3 is a block diagram illustrating the physical configuration of a relay device;
  • FIG. 5 is an explanatory diagram illustrating initialization processing in a plurality of control units;
  • FIG. 5 is an explanatory diagram (correspondence table) exemplifying a correspondence relationship between each of a plurality of control units and an in-vehicle communication unit;
  • FIG. 10 is an explanatory diagram (relay route table) exemplifying relay route information;
  • FIG. 4 is an explanatory diagram (logical configuration diagram) illustrating relay processing of relay target data in a relay device; 6 is a flowchart illustrating processing of the control unit of the relay device; FIG. 11 is a flowchart illustrating processing of a control unit of a relay device according to Embodiment 2 (storing the latest value); FIG. FIG. 11 is an explanatory diagram illustrating initialization processing in a plurality of control units according to the third embodiment (immediately before initialization is completed); 6 is a flowchart illustrating processing of the control unit of the relay device; FIG. 16 is a flowchart illustrating processing of a control unit of a relay device according to Embodiment 4 (buffering mode selection); FIG.
  • Patent Literature 1 does not take into account efficient buffering of data when relaying data immediately after the device itself is started, for example.
  • An object of the present disclosure is to provide a relay device or the like capable of efficiently storing (buffering) data when relaying data transmitted and received between in-vehicle ECUs.
  • a relay device is a relay device that is mounted on a vehicle and relays data transmitted and received between a plurality of vehicle ECUs, and includes a plurality of vehicle ECUs for communicating with each of the vehicle ECUs.
  • one of the acquired relay target data section is stored in the storage section by writing it in a shared area shared with the other control section for which initialization processing has not been completed.
  • each of the plurality of control units included in the relay device performs initialization processing separately, and is activated after the initialization processing, thereby transitioning to a state in which normal operations such as relay processing are performed. do.
  • the initialization processing by each of these plurality of control units may be performed, for example, in a predetermined order, that is, the plurality of control units may sequentially perform initialization processing.
  • these plurality of control units obtain (receive) data acquired (received) via the communication units that they (self-control units) are responsible for according to the control programs executed by the individual control units. Perform relay processing (normal operation).
  • one control unit that has finished initialization processing and started relay processing transfers the acquired relay target data to another control unit corresponding to the communication unit that is the relay destination
  • One control unit writes (buffers) the relay target data in a shared area (storage unit) shared with the other control unit.
  • the other control unit has not yet completed the initialization process and has not yet started the relay process (normal operation). Even in such a case, the one control unit writes (buffers) part of the relay target data out of all the acquired relay target data into the shared area (storage unit), so that the shared area It is possible to suppress depletion or overflow of (storage unit).
  • each of the plurality of control units sequentially performs the initialization process, so that even if the individual control units start relay processing (normal operation) at different timings (relay processing start points), It is possible to limit the data amount of the relay target data to be written in the shared area (storage unit) shared with the control unit. Therefore, it is possible to prevent the storage area from becoming insufficient (buffer overflow) in the shared area (storage unit).
  • control unit that has completed the initialization process writes relay target data having a predetermined priority or higher among the acquired relay target data to the shared area.
  • the relay target data includes multiple types of relay target data, and the priority of the relay target data is determined in advance according to the types. After completing the initialization process, for example, by writing only relay target data whose priority is equal to or higher than a predetermined value to the shared area, the data capacity is less than the total capacity of the acquired (received) relay target data. can be stored (buffered) in the storage unit.
  • the relay target data is a CAN message
  • the control unit that has completed the initialization process responds to the CAN-ID included in the relay target data, A priority of the relay target data is specified.
  • the data to be relayed is a CAN message
  • the priority in the CAN message is specified, for example, by the CAN-ID included in the CAN message.
  • the CAN message includes a CAN-FD message.
  • the smaller the CAN-ID value the higher the transmission priority in arbitration (communication arbitration), and by specifying the priority based on the CAN-ID, communication arbitration in the CAN protocol
  • relatively important CAN messages can be stored (buffered) in the memory. Therefore, for example, a CAN-ID of a predetermined value or less has a priority of 1 (1: buffering target), and a CAN-ID of a value greater than the predetermined value has a priority of 0 (0: buffering).
  • the priority of the data to be relayed can be set.
  • the setting of priority is not limited to the two-level setting indicating whether or not the buffering target is selected, and may be set in multiple levels of three or more levels.
  • the priority may be set using the CAN-ID value itself. In this case, the smaller the CAN-ID value, the higher the priority in buffering.
  • the data transmitted/received between vehicle-mounted ECUs is not limited to a CAN message, It may be an IP packet by TCP/IP protocol. In the case of IP packets, the priority is determined by the port number (TCP port number, UDP port number) defined by the TCP/IP protocol. ring target, low: not buffered) may be determined.
  • the relay target data of the same type writes the latest data to be relayed to the shared area.
  • the latest value of each type of relay target data is stored for each type of relay target data. can be stored (buffered) in the
  • the relay target data is a CAN message
  • the control unit that has completed the initialization process, based on the CAN-ID included in the relay target data, A type determination is made as to whether or not the relay target data are of the same type.
  • the control unit that has finished the initialization process acquires relay target data that is a CAN message, based on the CAN-ID included in the CAN message, the relay target data (CAN message) is of the same type. Since the type determination of whether or not is performed, the type determination can be performed efficiently. In the case of IP packets, the type determination as to whether or not they are of the same type is based on, for example, port numbers (TCP port number, UDP port number) defined in the TCP/IP protocol, or the port number and source address (source address), it may be determined whether or not the IP packets to be relayed are of the same type.
  • port numbers TCP port number, UDP port number
  • source address source address
  • control unit that has completed the initialization process is a buffering target specified by the relay processing start time point of the other control unit that has not completed the initialization process. During the period, the acquired data to be relayed is written in the shared area.
  • the initialization start time (start time) in each control unit, the initialization time required for initialization, and the relay processing start time (relay time) calculated by adding the initialization time to the start time Processing start time) is stored in the storage unit as initialization scheduling information, for example.
  • One control unit that has completed the initialization process refers to the initialization scheduling information based on the relay processing start point of its own (own control unit), and relays information to other control units that have not completed the initialization process.
  • the processing start time is specified, and the relay target data acquired during the buffering target period ending at the relay processing start time of the other control unit is written in the shared area.
  • the buffering target period is set as a shorter period than the period from the start of the relay processing of the control unit that has completed the initialization processing to the start of the relay processing of other control units that have not completed the initialization processing. There is. As a result, even if the period due to the time difference between the start point of the relay processing of one control unit and the start point of the relay processing of the other control unit is longer than the buffering target period, the relay processing of the other control unit With the processing start point as the base point (end point), only the relay target data obtained (received) during the retroactively specified buffering target period can be written to the shared area. As a result, it is possible to efficiently store (buffer) the latest and relatively new relay target data with reference to the relay processing start time of another control unit.
  • the buffering target period is determined based on the transmission cycle of the relay target data.
  • the buffering target period is determined based on the transmission cycle of the relay target data, and is set in advance to be equal to or longer than the transmission cycle, for example.
  • the buffering target period is set to be equal to or longer than the longest transmission cycle among the transmission cycles of each type of relay target data. may By setting the lower limit value of the buffering target period in this way, when the relay target data includes a plurality of types of relay target data, each type of relay target data is acquired and stored at least once. be able to.
  • the buffering target period may be set to be equal to or less than the sum of the transmission periods of the relay target data of each type. By setting the upper limit value of the buffering target period in this way, the buffering target period is prevented from becoming excessively long, and the total capacity of the stored relay target data (buffering target relay target data) is increased. can be suppressed.
  • a plurality of The control unit having a buffering mode and having completed the initialization process partially converts the acquired relay target data in one or more buffering modes selected from the plurality of buffering modes. Write to shared area.
  • the relay device has a plurality of buffering modes for specifying the part to be written when part of the obtained relay target data is written to the shared area.
  • the plurality of buffering modes include, for example, priority mode, latest value mode, and just before completion of initialization mode.
  • the priority mode is selected, the control unit that has completed the initialization process writes relay target data having a predetermined priority or higher among the acquired relay target data to the shared area.
  • the latest value mode is selected, if the acquired relay target data includes a plurality of relay target data of the same type (for example, the same CANID), the control unit that has finished the initialization process sets the relay target data of the same type. Among them, the latest data to be relayed is written to the shared area.
  • the control unit that has completed the initialization process acquires Writes the data to be relayed to the shared area.
  • the control unit that has completed the initialization process shares part of the acquired relay target data by combining the two or more selected buffering modes. Write to region.
  • a program is installed in a vehicle, relays data transmitted and received between a plurality of in-vehicle ECUs, and communicates with each of the in-vehicle ECUs.
  • a computer comprising a plurality of control units corresponding to each of the communication units, and a storage unit accessible from each of the plurality of control units, performs initialization processing for each of the plurality of control units separately, and performs initialization processing. obtains relay target data to be relayed via a communication unit corresponding to another control unit for which initialization processing has not been completed, part of the obtained relay target data is initialized. By writing to the shared area shared with the other control unit for which the conversion processing has not been completed, the processing of storing in the storage unit is executed.
  • An information processing method includes: a plurality of communication units mounted in a vehicle for relaying data transmitted and received between a plurality of in-vehicle ECUs and communicating with each of the in-vehicle ECUs; A computer comprising a plurality of control units corresponding to each of the plurality of communication units and a storage unit accessible from each of the plurality of control units separately performs initialization processing for each of the plurality of control units, When a control unit that has completed initialization acquires relay target data to be relayed via a communication unit corresponding to another control unit that has not completed initialization processing, part of the acquired relay target data is and executing the process of storing in the storage section by writing to the shared area shared with the other control section for which the initialization processing has not been completed.
  • FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system including a relay device 2 according to the first embodiment.
  • FIG. 2 is a block diagram illustrating the physical configuration of the relay device 2.
  • the in-vehicle system S includes a relay device 2 mounted in the vehicle C as a main device, and the relay device 2 is connected to a plurality of in-vehicle ECUs 6 mounted in the vehicle C so as to be communicable.
  • the relay device 2 receives transmission data (communication data) transmitted from each of the plurality of in-vehicle ECUs 6, and relays the transmission data based on header information including a message ID or a transmission destination address included in the transmission data. conduct.
  • the relay device 2 may further be connected to an external server S1 connected to a network outside the vehicle such as the Internet via the communication device 1 outside the vehicle so as to be able to communicate therewith.
  • the relay device 2 may also perform relay processing for transmission data (communication data) transmitted and received between the external server S1 and the in-vehicle ECU 6 mounted in the vehicle C.
  • the vehicle C is equipped with an external communication device 1, a relay device 2, and a plurality of in-vehicle ECUs 6 for controlling various in-vehicle devices (actuators, sensors).
  • the external communication device 1 and the relay device 2 are communicably connected by a harness such as a serial cable.
  • the relay device 2 and the in-vehicle ECU 6 are communicably connected by an in-vehicle network 7 compatible with a communication protocol such as CAN (Control Area Network), CAN-FD, or Ethernet (registered trademark).
  • the vehicle-external communication device 1 includes a vehicle-external communication unit (not shown) and an input/output I/F (not shown) (interface) for communicating with the relay device 2 .
  • the vehicle-external communication unit is a communication device for wireless communication using mobile communication protocols such as LTE, 4G, 5G, and WiFi. send and receive Communication between the external communication device 1 and the external server S1 is performed via an external network such as a public line network or the Internet, for example.
  • the relay device 2 functions as a CAN gateway or an Ethernet switch (layer 2 switch or layer 3 switch) or the like, and further has a function of protocol conversion between different protocols such as CAN protocol and TCP/IP protocol.
  • the relay device 2 distributes and relays power output from a power supply device such as a secondary battery, and supplies power to in-vehicle devices such as actuators connected to its own device (relay device 2). It may be a PLB (Power Lan Box) that also functions as a power distribution device.
  • the relay device 2 may be configured as one function part of a body ECU that controls the vehicle C as a whole.
  • the relay device 2 may be an integrated ECU configured by a central control device such as a vehicle computer and performing overall control of the vehicle C, for example.
  • the relay device 2 includes a control unit 3, a storage unit 4, an in-vehicle communication unit 5, and an input/output I/F 21.
  • the control unit 3 is composed of a CPU (Central Processing Unit) or MPU (Micro Processing Unit), etc. By reading and executing a control program P (program product) and data stored in advance in the storage unit 4, Various control processing and arithmetic processing are performed.
  • CPU Central Processing Unit
  • MPU Micro Processing Unit
  • the control unit 3 is composed of a plurality of control units 3 including a first control unit 31, a second control unit 32, a third control unit 33, and a fourth control unit .
  • the control unit 3 is a multi-core CPU configured with four cores (quad-core)
  • the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 each corresponds to the core.
  • the control unit 3 is not limited to a multi-core CPU, and may be a multi-CPU having a plurality of single-core CPUs, or may have two dual-core CPUs.
  • control unit 3 is configured by four cores (individual control units 3) including the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 is an example.
  • the unit 3 may be composed of, for example, an octo-core.
  • the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 perform initialization processing at different timings.
  • each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 has a corresponding relationship with each in-vehicle communication unit.
  • the storage unit 4 is composed of a volatile memory element such as RAM (Random Access Memory) or a non-volatile memory element such as ROM (Read Only Memory), EEPROM (Electrically Erasable Programmable ROM) or flash memory, A control program P and data to be referred to during processing are stored in advance.
  • the control program P (program product) stored in the storage unit 4 may be the control program P (program product) read from the recording medium 400 readable by the relay device 2 .
  • the control program P may include individual control programs P corresponding to the first control section 31, the second control section 32, the third control section 33, and the fourth control section 34, respectively.
  • the storage unit 4 can be accessed from each of the plurality of cores (the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34) that constitute the control unit 3. It includes a shared area 41 that is used as shared memory by the controller 31 , the second controller 32 , the third controller 33 and the fourth controller 34 .
  • the shared area 41 may be set in an area defined by physical addresses or logical addresses in the storage unit 4 .
  • the shared area 41 may be individually set according to the combination of the first control section 31, the second control section 32, the third control section 33 and the fourth control section 34, respectively.
  • the shared area 41 includes the shared area 41 of the first control unit 31 and the second control unit 32, the shared area 41 of the first control unit 31 and the third control unit 33, and the first control unit 31 and the fourth control unit 34, the shared area 41 of the second control unit 32 and the third control unit 33, the shared area 41 of the second control unit 32 and the fourth control unit 34, and the third control unit 33 and the fourth control unit 34 may include the shared area 41 of
  • the in-vehicle communication unit 5 is an input/output interface that uses a communication protocol such as CAN (Control Area Network), CAN-FD (CAN with Flexible Data Rate), or Ethernet (TCP/IP).
  • the in-vehicle communication unit 5 includes a CAN communication unit 51 configured by a CAN transceiver and an Ethernet communication unit 52 configured by an Ethernet PHY unit, and corresponds to the physical layer for communication between the relay device 2 and the in-vehicle ECU 6. functions as a communication unit.
  • the relay device 2 may be configured such that the number of the in-vehicle communication units 5 and the number of cores and the like that configure the control unit 3 are the same.
  • a plurality of in-vehicle communication units 5 are provided, and each communication line 71 (Ethernet cable 711, CAN bus 712) constituting the in-vehicle network 7, that is, each bus is connected to each in-vehicle communication unit 5.
  • the in-vehicle network 7 is divided into a plurality of buses or segments, and the in-vehicle ECU 6 is connected to each bus or the like according to the function of the in-vehicle ECU 6. good.
  • a control unit 3 of the relay device 2 communicates with an in-vehicle ECU 6 connected to an in-vehicle network 7 via an in-vehicle communication unit 5 .
  • the input/output I/F 21 is, like the input/output I/F of the external communication device 1, a communication interface for serial communication, for example. Via the input/output I/F 21, the relay device 2 is connected to the external communication device 1 and the IG switch 8 for starting and stopping the vehicle C so as to be able to communicate with each other.
  • the connection between the external communication device 1 and the IG switch 8 and the relay device 2 is not limited to the connection via the input/output I/F, and may be the connection via the internal communication unit 5 .
  • FIG. 3 is an explanatory diagram illustrating initialization processing in a plurality of control units 3.
  • the control unit 3 configured by a multi-core includes a first control unit 31, a second control unit 32, a third control unit 33, and a fourth control unit 34 corresponding to each core. include.
  • the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 sequentially start initialization processing, thereby starting normal operation such as relay processing.
  • the point in time (initialization completion point) is different.
  • the order of these initialization processes is defined, for example, in a correspondence table to be described later.
  • the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 start initialization processing in this order.
  • the first control unit 31 performs initialization processing first, and after the initialization of the first control unit 31 is completed, the second control unit 32 starts initialization processing.
  • the third control unit 33 starts initialization processing.
  • the fourth control unit 34 starts initialization processing.
  • the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 each sequentially perform the initialization processing, so that, for example, the first control unit 31 and the fourth control unit 34 There is a time difference between the start of normal operation and the controller 34 . Due to the occurrence of the time difference between the normal operation start points, the first control unit 31 to the fourth control unit 34 are operated from the first control unit 31 to the fourth control unit 34 from the normal operation start point to the fourth control unit 34 start point. Direct relay processing to is not possible.
  • the first control unit 31 among the received (acquired) transmission data, relays data to be relayed via the in-vehicle communication unit 5 handled by the fourth control unit 34 to the first control unit 31 and the fourth control unit. It is stored (buffered) in the shared area 41 of the unit 34 .
  • the storage of the shared area 41 There is a concern that capacity (free space) will be insufficient.
  • the first control unit 31 buffers only a part of the relay target data among all the received relay target data in the shared area 41, thereby reducing the storage capacity (free space) of the shared area 41. Restrain tightness.
  • the first control unit 31 performs the initialization process (completes the initialization process) after itself (the first control unit 31).
  • the buffering process similar to the buffering process for the fourth control unit 34 is performed.
  • the second control unit 32 also performs the same buffering process as the first control unit 31 on the third control unit 33 and the fourth control unit 34 that perform initialization processing after itself.
  • the third control unit 33 also performs the same buffering process as the first control unit 31 on the fourth control unit 34 that performs initialization processing after itself.
  • FIG. 4 is an explanatory diagram (correspondence table) illustrating the correspondence between each of the plurality of control units 3 and the in-vehicle communication unit 5.
  • Information (correspondence information) indicating the correspondence between each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 constituting the control unit 3 and the in-vehicle communication unit 5 is For example, it is stored in the storage unit 4 in a table format (correspondence table).
  • the correspondence table includes, as management items (fields), for example, a core number, an initialization order, an initialization required time, a communication unit number, and a communication unit type.
  • a device number that uniquely indicates each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 that constitute the control unit 3 is stored in the core number management item.
  • core numbers indicating the first control unit 31 (Core1), the second control unit 32 (Core2), the third control unit 33 (Core3), and the fourth control unit 34 (Core4) are stored. be.
  • the CPU number may be stored in this management item.
  • the initialization order management item indicates the order in which the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34, which constitute the control unit 3, start initialization processing. Stored. In this embodiment, initialization processing is performed in the order of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit . By referring to the initialization order, each control unit 3 can identify another control unit 3 that performs initialization processing after itself.
  • the management item of required initialization time stores the time (required time) required for the initialization processing of each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34. .
  • each control unit 3 can derive the point in time when the other control unit 3 that performs the initialization process after itself completes the initialization process.
  • the correspondence table includes initialization scheduling information by including the initialization order and the management items of the initialization order.
  • the device number of the in-vehicle communication unit 5 corresponding to each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 is stored in the communication unit number management item. Based on the corresponding relationship, each control unit 3 transmits and receives transmission data via the in-vehicle communication unit 5 corresponding to itself.
  • the type of protocol of the in-vehicle communication unit 5 corresponding to each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 is stored in the communication unit type management item. Details regarding the correspondence between the individual control units 3 and the in-vehicle communication units 5 will be described later.
  • FIG. 5 is an explanatory diagram (relay route table) exemplifying relay route information.
  • the relay route information used when the relay device 2 relays the transmission data received from the in-vehicle ECU 6 or the external server S1 is stored in the storage unit 4 in the form of a table (relay route table), for example.
  • the management items (fields) of the relay route table include, for example, message ID, relay destination communication unit, transmission cycle, priority, and corresponding port number.
  • the message ID management item stores, for example, a communication data identifier for classifying or identifying transmission data, such as a message ID included in a CAN message.
  • the management item of the relay destination communication unit stores the communication unit number of the in-vehicle communication unit 5 that is the relay destination of the transmission data of the message ID stored in the same record.
  • the communication unit number is a value defined (stored) in the correspondence table.
  • the control unit 3 corresponding to the communication unit number, that is, any one of the first control unit 31, the second control unit 32, the third control unit 33 and the fourth control unit 34 is specified. be able to.
  • the relay route table includes route information (routing information) used when the relay device 2 performs relay processing.
  • the transmission cycle management item stores the transmission cycle of the transmission data of the message ID stored in the same record.
  • the priority management item stores a value indicating the priority of transmission data of message IDs stored in the same record. The priority is determined based on the message ID. In the message ID in the CAN protocol, the smaller the number, the higher the priority given to arbitration (communication mediation). In this embodiment, message IDs less than a predetermined value are set as high priority, and message IDs greater than or equal to the predetermined value are set as low priority.
  • the port number (TCP port number, UDP port number) are stored. Since the relay route table includes management items of corresponding port numbers, when the relay device 2 performs relay processing, the relay route table includes protocol conversion information used for protocol conversion between CAN messages and IP packets.
  • FIG. 6 is an explanatory diagram (logical configuration diagram) exemplifying the relay processing of the relay target data in the relay device 2.
  • a corresponding in-vehicle communication unit 5 is defined for each of the first control unit 31 , the second control unit 32 , the third control unit 33 , and the fourth control unit 34 that configure the control unit 3 .
  • the in-vehicle communication unit 5 corresponding to the first control unit 31 is, for example, the CAN communication unit 51 with the communication unit number C-01.
  • the in-vehicle communication unit 5 corresponding to the second control unit 32 is, for example, the CAN communication unit 51 with the communication unit number C-02.
  • the in-vehicle communication unit 5 corresponding to the third control unit 33 is, for example, the Ethernet communication unit 52 with the communication unit number e-01.
  • the in-vehicle communication unit 5 corresponding to the fourth control unit 34 is, for example, the Ethernet communication unit 52 with the communication unit number e-02.
  • the first control unit 31 is responsible for receiving (acquiring) and transmitting (outputting) transmission data in the CAN communication unit 51 of C-01.
  • the second control unit 32 performs processing for receiving (acquiring) and transmitting (outputting) transmission data in the CAN communication unit 51 of C-02.
  • the third control unit 33 performs processing for receiving (obtaining) and transmitting (outputting) transmission data in the Ethernet communication unit 52 of the e-01.
  • the fourth control unit 34 is responsible for receiving (obtaining) and transmitting (outputting) transmission data in the Ethernet communication unit 52 of the e-02.
  • the storage unit 4 includes a shared area 41 accessible by each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34.
  • the shared area 41 stores the data to be relayed. It is used as a storage area for buffering target data.
  • the first control unit 31 determines (determines) whether or not the CAN message (transmission data) received from the CAN communication unit 51 (C-01) that it owns is to be relayed.
  • the first control unit 31 refers to a relay route table to determine whether or not the CAN message is transmission data (relay target data) to be relayed to the fourth control unit 34 .
  • the first control unit 31 If the CAN message is transmission data (relay target data) to be relayed to the fourth control unit 34 and the fourth control unit 34 has not completed the initialization process, the first control unit 31 The CAN message is stored (buffered) in the shared area 41 . When buffering relay target data such as CAN messages in the shared area 41, the first control unit 31 selects a portion of the relay target data among all the received relay target data based on a predetermined rule. Buffer only. As a result, it is possible to suppress or prevent the free space (free space) of the shared area 41 from becoming insufficient or tight.
  • the fourth control unit 34 acquires the CAN message (relay target data) buffered by the first control unit 31 by referring to the shared area 41, and converts the CAN message into an IP packet.
  • the IP packet is generated by protocol conversion.
  • the fourth control unit 34 includes the data included in the payloads of the plurality of CAN messages in the payload of a single IP packet. Therefore, protocol conversion may be performed.
  • the fourth control unit 34 transmits (outputs) the generated IP packet from its own Ethernet communication unit 52 (e-02) to the in-vehicle ECU 6 connected to the Ethernet communication unit 52 (e-02).
  • the fourth control unit 34 may transmit (output) the generated IP packet using multicast without specifying the in-vehicle ECU 6 as a transmission destination.
  • the control unit 3 (first control unit 31) that has completed the initialization process and another control unit 3 (fourth control unit 31) that has not completed the initialization process
  • a relay process can be performed between the controller 34) and the controller 34). It is possible to suppress or prevent the shortage or tightness of the free space of the shared area 41 by performing the process of only partially relaying the data to be relayed buffered in the shared area 41 .
  • FIG. 7 is a flowchart illustrating processing of the control unit 3 of the relay device 2.
  • the control unit 3 of the relay device 2 steadily performs the following processing, for example, when the vehicle C is activated (the IG switch 8 is turned on).
  • the control unit 3 of the relay device 2 is, for example, a multi-core CPU or the like configured by a plurality of cores or CPUs. and four cores from the fourth controller 34 (controller 3).
  • the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 sequentially perform initialization processing in a predetermined initial order.
  • a core (control unit 3) that has completed initialization processing is a core (control unit 3) that has not completed initialization processing, that is, all cores (control unit 3) that have completed initialization processing after themselves (own cores) 3) Perform the following processing for each.
  • the core (control unit 3) that has completed the initialization process is the first control unit 31 (Core1) that completes the initialization process first, and the other cores that have not completed the initialization process. (Control section 3) will be described as a fourth control section 34 (Core 4) that finally completes the initialization process.
  • the first control unit 31 (control unit 3) of the relay device 2 executes initialization processing (S101).
  • the first control unit 31 of the relay device 2 for example, acquires the ON signal output from the IG switch 8, and starts initialization processing with the ON signal as a trigger.
  • the initialization process is performed in a predetermined required initialization time as shown in the correspondence table, for example, and the initialization process ends (completes) after the required initialization time has elapsed.
  • the first control unit 31 of the relay device 2 becomes the control unit 3 that has completed the initialization process.
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not transmission data has been received (S102). If the transmission data has not been received (S102: NO), the first control unit 31 (control unit 3) of the relay device 2 performs loop processing to execute the processing from S102 again.
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not the received transmission data is data to be relayed to the fourth control unit 34. (S103). If the received transmission data is not the data to be relayed to the fourth control unit 34 (S103: NO), the first control unit 31 (control unit 3) of the relay device 2 repeats the processing from S102, and executes loop processing. I do.
  • the first control unit 31 (control unit 3) of the relay device 2 selects the in-vehicle communication unit as the relay destination of the relay target data. 5 (another control unit 3) is being initialized (S104).
  • the first control unit 31 of the relay device 2 determines whether the fourth control unit 34 is being initialized, that is, whether the fourth control unit 34 has finished (completed) the initialization.
  • the case where the fourth control unit 34 is being initialized means that the fourth control unit 34 has not finished (completed) the initialization, and the fourth control unit 34 has not started the initialization. Also includes The first control unit 31 calculates the initialization completion time of the fourth control unit 34 based on its own initialization completion time (normal operation start time), and the current time is the initialization completion time of the fourth control unit 34. It may be determined whether the fourth control unit 34 has finished (completed) the initialization based on whether or not it has exceeded.
  • the first control unit 31 may refer to, for example, a correspondence table stored in the storage unit 4 in calculating the initialization completion time of the fourth control unit 34 .
  • the initialization completion time of the fourth control unit 34 is based on the initialization completion time (ordinary operation start time) of the first control unit 31, and the second control unit 32 that is initialized later than the first control unit 31, It can be derived by summing the initialization required times of the third control unit 33 and the fourth control unit 34 .
  • the first control unit 31 (control unit 3) of the relay device 2 performs relay processing (normal processing) (S1041).
  • the relay processing is performed by delivering the acquired relay target data to the fourth control unit 34 .
  • the buffering performed when the fourth control unit 34 is being initialized becomes unnecessary, and the first control unit 31 responsible for the CAN communication unit 51 , and the fourth control unit 34 responsible for the Ethernet communication unit 52 , and the relay processing is performed as the normal processing of the relay device 2 .
  • the first control unit 31 (control unit 3) of the relay device 2, based on the priority of the relay target data, It is determined whether or not it is a ring object (S105). If the fourth control unit 34 has not completed the initialization, the first control unit 31 of the relay device 2, for example, refers to the relay route table stored in the storage unit 4 to prioritize the relay target data. Determines whether or not there is a buffering target based on the degree.
  • the priority is determined according to the message ID (CAN-ID) included in the CAN message, and in this embodiment, the value of the message ID is a predetermined value or less CAN
  • the message is set to be buffered.
  • the first control unit 31 (control unit 3) of the relay device 2 stores (buffers) the relay target data in the shared area 41 of the storage unit 4 ( S106). For example, when it is determined that the relay target data is to be buffered by referring to the relay route table, the first control unit 31 of the relay device 2 stores the relay target data in the shared area 41 of the storage unit 4 ( buffering).
  • the shared area 41 is set as a storage area that can also be accessed from the fourth control unit 34, and the fourth control unit 34 that has completed the initialization process refers to the storage area to perform the first control.
  • the relay target data buffered by the unit 31 can be obtained.
  • the first control unit 31 determines whether the relay target data Discard data. As a result, it is possible to suppress or prevent the situation where the shared area 41, which is a storage area for buffering, becomes tight or insufficient, and buffering of relay target data with high priority becomes impossible.
  • the first control unit 31 (control unit 3) of the relay device 2 After executing S106, S1061, or S1041, the first control unit 31 (control unit 3) of the relay device 2 ends the series of processes in this flow. Alternatively, the first control unit 31 (control unit 3) of the relay device 2 may perform loop processing so as to execute the processing from S102 again after executing S106, S1061, or S1041.
  • the fourth control unit 34 (another control unit 3) of the relay device 2 refers to the shared area 41 in the storage unit 4 so that the first control unit 31 stores in the shared area 41.
  • Get (buffered) data to be relayed When the data to be relayed is a plurality of CAN messages and the in-vehicle communication unit 5 handled by the fourth control unit 34 is the Ethernet communication unit 52, the fourth control unit 34 converts the acquired plurality of CAN messages into a single message.
  • the relay processing of the relay target data may be performed by converting the data into an IP packet and outputting the IP packet from the Ethernet communication unit 52 that owns the IP packet.
  • the control unit 3 responsible for the CAN communication unit 51 is arranged rather than the control unit 3 (the third control unit 33 and the fourth control unit 34) responsible for the Ethernet communication unit 52.
  • the control unit 3 responsible for the CAN communication unit 51
  • the control unit 3 responsible for the Ethernet communication unit 52.
  • the buffering processing according to the present embodiment can be preferably applied.
  • the fourth control unit 34 converts multiple CAN messages buffered by the first control unit 31 into a single IP packet, but the present invention is not limited to this.
  • the first control unit 31 may convert a plurality of buffered CAN messages into a single IP packet. That is, the first control unit 31 converts a plurality of CAN messages to be buffered into a single IP packet, and stores (buffers) the converted IP packet in the shared area 41. good.
  • the fourth control unit 34 can acquire the converted IP packet by referring to the shared area 41 and output the IP packet from the Ethernet communication unit 52 that is responsible for itself. , the throughput in the relay process can be further improved.
  • the first control unit 31 that completes the initialization processing first performs the same processing as the processing for the fourth control unit 34 (Core4) that completes the initialization processing last.
  • the second control unit 32 (Core2) and the third control unit 33 (Core3), which are to be initialized later, are also initialized.
  • the second control unit 32 and the third control unit 33 perform the same processing as the fourth control unit 34 on relay target data stored (buffered) in the shared area 41 by the first control unit 31 .
  • the first control unit 31 performs processing for each core (the second control unit 32, the third control unit 33, and the fourth control unit 34) that performs initialization processing after itself, for example, a plurality of processes. Alternatively, threads may be used for parallel processing.
  • the first control unit 31 (Core1) shares the processing from S101 to S103, for example, with the second control unit 32, the third control unit 33, and the fourth control unit 34, which perform initialization processing after itself,
  • the processing from S104 onward may be performed in parallel by individually processing the second control unit 32, the third control unit 33, and the fourth control unit .
  • the second control unit 32 also instructs the third control unit 33 (Core3) and the fourth control unit 34 (Core4), which perform the initialization process after itself, to perform the above flow by the first control unit 31.
  • the third control unit 33 (Core3) performs the same processing as the above-described flow by the first control unit 31 also for the fourth control unit 34 (Core4) which performs initialization processing after itself.
  • the fourth control unit 34 (Core 4) that completes the initialization process last, there is no core (control unit 3) that completes the initialization process after itself, so it is not necessary to perform the processing according to the above flow. It goes without saying.
  • FIG. 8 is a flowchart illustrating processing of the control unit 3 of the relay device 2 according to the second embodiment (storing the latest value). Similarly to the first embodiment, the control unit 3 of the relay device 2 steadily performs the following processing when, for example, the vehicle C is activated (the IG switch 8 is turned on).
  • the first control unit 31 (control unit 3) of the relay device 2 executes initialization processing (S201).
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not transmission data has been received (S202).
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not the received transmission data is data to be relayed to the fourth control unit 34 (S203).
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether the fourth control unit 34 (other control unit 3) corresponding to the in-vehicle communication unit 5, which is the relay destination of the relay target data, is being initialized. It is determined whether or not (S204).
  • the first control unit 31 (control unit 3) of the relay device 2 performs relay processing (normal processing) (S2041).
  • the first control unit 31 of the relay device 2 performs the processes from S201 to S2041 in the same manner as from S101 to S1041 of the first embodiment.
  • the first control unit 31 (control unit 3) of the relay device 2 overwrites and stores the relay target data in the shared area 41 of the storage unit 4 ( buffering) (S205).
  • Data to be relayed to the fourth control unit 34 is buffered in the shared area 41, and the data to be relayed is classified into a plurality of types.
  • the relay target data is a CAN message
  • the type of relay target data is classified by a message ID (CAN-ID)
  • CAN messages with the same message ID are the same type of relay target data, and are different.
  • the CAN message with the message ID becomes data to be relayed of different types.
  • the first control unit 31 of the relay device 2 buffers only the latest relay target data in the shared area 41 with respect to the relay target data of the same type among the acquired plurality of relay target data. As a result, the relay target data that is the same type as the latest relay target data and that has been previously buffered is overwritten with the latest relay target data. In this manner, the first control unit 31 of the relay device 2 stores (buffers) only the latest relay target data in the shared area 41 according to the type of relay target data acquired (received).
  • relay target data of the same type as the relay target data for example, CAN message with the same CAN-ID
  • the first control unit 31 of the relay device 2 buffers only the latest relay target data in the shared area 41 for each type of relay target data, it is not limited to this.
  • the first control unit 31 of the relay device 2 may buffer two (two generations) of relay target data consisting of the latest and one previous relay target data in the shared area 41 .
  • multiple generations of relay target data including the latest and two or more previous relay target data may be buffered in the shared area 41 .
  • the first control unit 31 of the relay device 2 buffers the relay target data of the high priority classification in the second generation according to the priority applied in the first embodiment, and buffers the relay target data of the low priority classification.
  • Relay target data may be buffered in one generation (generation management lower than relay target data of a higher priority category).
  • FIG. 9 is an explanatory diagram illustrating an example of initialization processing in a plurality of control units 3 according to the third embodiment (immediately before initialization is completed).
  • a time difference occurs at the start of normal operation.
  • the time (period) obtained by summing the required initialization times of the third control unit 33 and the fourth control unit 34 .
  • the period due to the time difference between the start times of the normal operation is divided into a period not subject to buffering and a period subject to buffering, and the first control unit 31 processes only data to be relayed received during the period subject to buffering. , is buffered in the shared area 41 .
  • the buffering target period is defined separately in each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34, which are the individual control units 3.
  • each buffering target period is stored in the storage unit 4, for example.
  • the buffering target period may be determined based on the transmission cycle of the relay target data relayed to the fourth control unit 34 .
  • data to be relayed to the fourth control unit 34 i. It may be equal to or longer than the transmission cycle of the relay target data.
  • the buffering target period is set so that the transmission cycle of each type of relay target data is longer than or equal to the longest transmission cycle. It may be set. By setting the lower limit value of the buffering target period in this way, even if the relay target data includes multiple types of relay target data, each type of relay target data is acquired at least once. , can be buffered in the shared area 41 .
  • the buffering target period may be set to be equal to or less than the total value of the transmission cycles of the relay target data of each type.
  • the non-buffering period is located in the first half, and the buffering period is located in the second half.
  • relatively new relay target data including the latest relay target data received immediately before can be obtained based on the normal operation start time of the fourth control unit 34. , can be buffered in the shared area 41 .
  • FIG. 10 is a flowchart illustrating processing of the control unit 3 of the relay device 2.
  • the control unit 3 of the relay device 2 steadily performs the following processing when, for example, the vehicle C is activated (the IG switch 8 is turned on).
  • the first control unit 31 (control unit 3) of the relay device 2 executes initialization processing (S301).
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not transmission data has been received (S302).
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not the received transmission data is data to be relayed to the fourth control unit 34 (S303).
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether the fourth control unit 34 (other control unit 3) corresponding to the in-vehicle communication unit 5, which is the relay destination of the relay target data, is being initialized. It is determined whether or not (S304). When it is determined that the initialization has ended (S304: NO), the first control unit 31 (control unit 3) of the relay device 2 performs relay processing (normal processing) (S3041). The first control unit 31 of the relay device 2 performs the processes from S301 to S3041 in the same manner as S101 to S1041 of the first embodiment.
  • the first control unit 31 (control unit 3) of the relay device 2 determines whether or not it is the buffering target period (S305).
  • the fourth control unit 34 determines whether or not the current time is included in the buffering target period for the fourth control unit 34 .
  • the buffering target period for the fourth control unit 34 is retroactively specified with the relay processing start point of the fourth control unit 34 as a base point (end point).
  • An appropriate period corresponding to the storage capacity of the shared area 41 is set as the buffering target period. It may be set as a period of about 40% of the time difference.
  • the buffering target period for the fourth control unit 34 is based on the transmission cycle of the relay target data relayed to the fourth control unit 34 (Ethernet communication unit 52: e-02), for example, a value equal to or greater than the transmission cycle. may be set.
  • the relay target data includes multiple types of relay target data (CAN messages) such as multiple message IDs
  • buffering is performed so that the transmission cycle of each type of relay target data is longer than or equal to the longest transmission cycle.
  • the period may be set.
  • any type of relay target data can be acquired at least once and buffered in the shared area 41 .
  • the storage unit 4 stores buffering target periods for the fourth control unit 34 and the other control units 3 (the second control unit 32 and the third control unit 33), and the first control unit 31 stores By referring to the section 4, the buffering target period of the fourth control section 34 and the like can be specified.
  • the first control unit 31 for example, by referring to the correspondence table, the fourth control unit 34 based on the initialization completion time (normal operation start time) of the first control unit 31. initialization completion time (normal operation start time) is derived.
  • the first control unit 31 calculates backward (retroactively) the buffering period of the fourth control unit 34 from the derived initialization completion time (normal operation start time) of the fourth control unit 34, so that the fourth control unit 31
  • the start point (time) and end point (time) of the buffering target period of the unit 34 are derived. Needless to say, the end time corresponds to (matches) the initialization completion time (normal operation start time) of the fourth control unit 34 .
  • the first control unit 31 includes, for example, a clock function, etc., and if the current time is between the start time and the end time of the buffering target period of the fourth control unit 34, the current time is the fourth control. It is determined that it is a buffering target period for the unit 34 . If the current time is not between the start time and the end time of the buffering target period of the fourth control unit 34, that is, if it is before the start time of the buffering target period, It is determined that the current time is not a buffering target period for the fourth control unit 34 (buffering non-target period).
  • the first control unit 31 (control unit 3) of the relay device 2 stores (buffers) the relay target data in the shared area 41 of the storage unit 4. (S306). If it is determined that it is the buffering target period, that is, if the current time is included in the buffering target period for the fourth control unit 34, the first control unit 31 of the relay device 2 performs relaying in the same manner as in the process S106 of the first embodiment.
  • the target data is stored (buffered) in the shared area 41 of the storage unit 4 .
  • the first control unit 31 (control unit 3) of the relay device 2 discards the relay target data (S3051). If it is determined that it is not the buffering target period, that is, if the current time is not included in the buffering target period for the fourth control unit 34, the first control unit 31 of the relay device 2 performs Discard data.
  • FIG. 11 is a flowchart illustrating processing of the control unit 3 of the relay device 2 according to the fourth embodiment (buffering mode selection). Similarly to the first embodiment, the control unit 3 of the relay device 2 steadily performs the following processing when, for example, the vehicle C is activated (the IG switch 8 is turned on).
  • the first control unit 31 (control unit 3) of the relay device 2 executes initialization processing (S401).
  • the first control unit 31 of the relay device 2 performs the process of S401 as in S101 of the first embodiment.
  • the first control unit 31 (control unit 3) of the relay device 2 identifies the selected buffering mode (S402).
  • the relay device 2 has a plurality of buffering modes for specifying a part to be written when part of the obtained relay target data is written to the shared area 41 . These multiple buffering modes are based on, for example, the buffering process in each embodiment described above.
  • the plurality of buffering modes include, for example, priority mode, latest value mode, and mode immediately before completion of initialization, and a flag value indicating the currently selected buffering mode is stored in storage unit 4. there is
  • the first control unit 31 of the relay device 2 identifies the currently selected buffering mode by referring to the flag value stored in the storage unit 4, for example.
  • the buffering mode (flag value) may be selected (set) based on an input value input by the operator of the vehicle C in which the relay device 2 is mounted, for example.
  • the buffering mode (flag value) may be selected (set) based on a signal transmitted from an external server S1 operated and managed by the manufacturer of the vehicle C, for example. In this way, by allowing variable setting of the buffering mode, the buffering process to the shared area 41 can be performed in the buffering mode suitable for the vehicle C.
  • the first control unit 31 (control unit 3) of the relay device 2 performs buffering in the selected buffering mode (S403).
  • the plurality of buffering modes include, for example, priority mode, latest value mode, and just before initialization completion mode.
  • the first control unit 31 of the relay device 2 When the priority mode is selected, the first control unit 31 of the relay device 2 writes the relay target data having a predetermined priority or higher among the acquired relay target data to the shared area 41 .
  • the processing of the first control unit 31 in the priority mode may be, for example, processing S102 to S106 of the first embodiment.
  • the first control unit 31 of the relay device 2 When the latest value mode is selected, the first control unit 31 of the relay device 2, if the acquired relay target data includes a plurality of relay target data of the same type (for example, the same CANID), a plurality of relay target data of the same type Among the data, the latest data to be relayed is written in the shared area 41 .
  • the process of the first control unit 31 in the latest value mode priority mode may be, for example, the processes S202 to S205 of the second embodiment.
  • the first control unit 31 of the relay device 2 When the mode immediately before completion of initialization is selected, the first control unit 31 of the relay device 2 performs , writes the acquired data to be relayed to the shared area 41 .
  • the processing of the first control unit 31 in the mode immediately before completion of initialization may be, for example, processing S302 to S306 of the third embodiment.
  • the number of selected buffering modes is not limited to one (singular), and multiple buffering modes may be selected.
  • the first control unit 31 of the relay device 2 selects one of the acquired relay target data by combining the selected two or more buffering modes. Part of it is written in the shared area 41 .

Landscapes

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

Abstract

中継装置は、車両に搭載され、複数の車載ECU間にて送受信されるデータを中継する中継装置であって、前記車載ECUそれぞれと通信するための複数の通信部と、複数の前記通信部それぞれに対応する複数の制御部と、前記複数の制御部それぞれからアクセス可能な記憶部とを備え、前記複数の制御部それぞれは、別個に初期化処理を行い、初期化処理を終了した制御部は、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する。

Description

中継装置、プログラム及び、中継方法
 本開示は、中継装置、プログラム及び、中継方法に関する。
 本出願は、2022年1月26日出願の日本出願第2022-010260号に基づく優先権を主張し、前記日本出願に記載された全ての記載内容を援用するものである。
 車両には、エンジン制御等のパワー・トレーン系、エアコン制御等のボディ系等の車載機器を制御するための複数の車載ECU(Electronic Control Unit)が搭載されており、これら車載ECUは、中継装置と社内ネットワークにより通信可能に接続される。中継装置は、社内ネットワークを介して接続される車載ECU間にて送受信されるデータを中継する(例えば特許文献1参照)。
特開2017-97851号公報
 本開示の一態様に係る中継装置は、車両に搭載され、複数の車載ECU間にて送受信されるデータを中継する中継装置であって、前記車載ECUそれぞれと通信するための複数の通信部と、複数の前記通信部それぞれに対応する複数の制御部と、前記複数の制御部それぞれからアクセス可能な記憶部とを備え、前記複数の制御部それぞれは、別個に初期化処理を行い、初期化処理を終了した制御部は、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する。
実施形態1に係る中継装置を含む車載システムの構成を例示する模式図である。 中継装置の物理構成を例示するブロック図である。 複数の制御部における初期化処理を例示する説明図である。 複数の制御部それぞれと車内通信部との対応関係を例示する説明図(対応関係テーブル)である。 中継経路情報を例示する説明図(中継経路テーブル)である。 中継装置内における中継対象データの中継処理を例示する説明図(論理構成図)である。 中継装置の制御部の処理を例示するフローチャートである。 実施形態2(最新値を記憶)に係る中継装置の制御部の処理を例示するフローチャートである。 実施形態3(初期化完了する直前)に係る複数の制御部における初期化処理を例示する説明図である。 中継装置の制御部の処理を例示するフローチャートである。 実施形態4(バッファリングモード選択)に係る中継装置の制御部の処理を例示するフローチャートである。
[本開示が解決しようとする課題]
 特許文献1に記載の中継装置は、例えば自装置の起動直後等においてデータを中継する際、当該データを効率的にバッファリングする点について考慮されていない。
 本開示は、車載ECU間にて送受信されるデータを中継する際、当該データを効率的に記憶(バッファリング)することができる中継装置等を提供することを目的とする。
[本開示の効果]
 本開示の一態様によれば、車載ECU間にて送受信されるデータを中継する際、当該データを効率的に記憶(バッファリング)する中継装置等を提供することができる。
[本開示の実施形態の説明]
 最初に本開示の実施態様を列挙して説明する。また、以下に記載する実施形態の少なくとも一部を任意に組み合わせてもよい。
(1)本開示の一態様に係る中継装置は、車両に搭載され、複数の車載ECU間にて送受信されるデータを中継する中継装置であって、前記車載ECUそれぞれと通信するための複数の通信部と、複数の前記通信部それぞれに対応する複数の制御部と、前記複数の制御部それぞれからアクセス可能な記憶部とを備え、前記複数の制御部それぞれは、別個に初期化処理を行い、初期化処理を終了した制御部は、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する。
 本態様にあたっては、中継装置は、中継装置が備える複数の制御部それぞれは、別個に初期化処理を行い、当該初期化処理を経て起動することにより、中継処理等の通常動作を行う状態に遷移する。これら複数の制御部それぞれによる初期化処理は、例えば予め定められた順序により行われ、すなわちこれら複数の制御部は、順次に初期化処理を行うものであってもよい。これら複数の制御部は、当該初期化処理を終了後、個々の制御部にて実行される制御プログラムに応じて、自身(自制御部)が担う通信部を介して取得(受信)したデータの中継処理(通常動作)を行う。この際、初期化処理を終了し、中継処理(通常動作)を開始した一の制御部が、取得した中継対象データを、中継先となる通信部に対応する他の制御部に受け渡すにあたり、一の制御部は、当該中継対象データを、当該他の制御部との間で共有される共有領域(記憶部)に書き込む(バッファリングする)。この際、当該他の制御部は、未だ初期化処理を終了しておらず、中継処理(通常動作)を開始していないことが想定される。このような場合であっても、一の制御部は、取得した全ての中継対象データの内、一部の中継対象データを共有領域(記憶部)に書き込む(バッファリングする)ため、当該共有領域(記憶部)が枯渇又はオーバフローすることを抑制することができる。一の制御部が複数の中継対象データを取得した場合であっても、これら複数の中継対象データの内、一部の中継対象データのみをバッファリングすることにより、取得(受信)した中継対象データの総容量よりも、少ないデータ容量の中継対象データを記憶部に記憶(バッファリング)することができる。これにより、複数の制御部それぞれが順次に初期化処理を行うことにより、個々の制御部が、中継処理(通常動作)を開始するタイミング(中継処理開始時点)が異なる場合であっても、他の制御部との間で共有される共有領域(記憶部)に書き込む中継対象データのデータ量を制限することができる。従って、当該共有領域(記憶部)にて記憶領域が不足(バッファオーバーフロー)することを抑制することができる。すなわち、個々の制御部の中継処理開始時点に時間差が生じるものとなるが、当該時間差に対応する期間に受信したデータの全てをバッファリングすることなく、例えば、予め定められたバッファリングモードに基づき、当該受信した全てのデータの一部のデータのみをバッファリングし、共有領域(記憶部)が不足等することを抑制することができる。これにより、中継装置に実装する記憶部の記憶容量を軽減することができる。
(2)本開示の一態様に係る中継装置は、前記初期化処理を終了した制御部は、取得した中継対象データの内、所定の優先度以上の中継対象データを前記共有領域に書き込む。
 本態様にあたっては、中継対象データは、複数種類の中継対象データを含み、当該種類に応じて中継対象データの優先度が予め決定されている。初期化処理を終了した制御部は、例えば、優先度が所定値以上の種類の中継対象データのみを共有領域に書き込むことにより、取得(受信)した中継対象データの総容量よりも、少ないデータ容量の中継対象データを記憶部に記憶(バッファリング)することができる。
(3)本開示の一態様に係る中継装置は、前記中継対象データは、CANメッセージであり、前記初期化処理を終了した制御部は、前記中継対象データに含まれるCAN-IDに応じて、前記中継対象データの優先度を特定する。
 本態様にあたっては、中継対象データはCANメッセージであり、当該CANメッセージにおける優先度は、例えば、CANメッセージに含まれるCAN-IDにより特定される。当該CANメッセージは、CAN-FDメッセージを含む。CANプロコトルを用いる通信において、CAN-IDの値が小さいほどアービトレーション(通信調停)における送信優先権が高く、当該CAN-IDに基づき、優先度を特定することにより、CANプロコトルにおける通信調停に則して、比較的に重要なCANメッセージを記憶部に記憶(バッファリング)することができる。従って、例えば、所定値以下のCAN-IDに対しては優先度1(1:バッファリング対象)として、当該所定値よりも大きい値のCAN-IDに対しては優先度0(0:バッファリング対象外)とするように優先度を示すフラグ値を付与(設定)することにより、中継対象データ(CANメッセージ)の優先度を設定することができる。優先度の設定は、バッファリング対象であるか否かを示す2段階である場合に限定されず、3段階以上となる多段階により優先度の設定がされるものであってもよい。又は、CAN-IDの値そのものを用いて、優先度を設定するものであってもよい。この場合、CAN-IDの値が小さいほど、バッファリングする際の優先度は、高いものとなる。なお、本実施形態において、車載ECU間にて送受信されるデータはCANメッセージに限定されず、TCP/IPプロコトルによるIPパケットであってもよい。IPパケットの場合は、優先度は、TCP/IPのプロトコルにて定義されるポート番号(TCPポート番号、UDPポート番号)によって、優先度、すなわちバッファリングするか否かのフラグ値(高:バッファリング対象、低:バッファリング対象外)を決定するものであってもよい。
(4)本開示の一態様に係る中継装置は、前記初期化処理を終了した制御部は、取得した複数の中継対象データが、同種の中継対象データを含む場合、同種の中継対象データの内、最新の中継対象データを共有領域に書き込む。
 本態様にあたっては、同種の複数の中継対象データの内、最新の中継対象データを共有領域に書き込むことにより、各種それぞれの中継対象データにおいて、当該中継対象データの各種類それぞれの最新値を、記憶部に記憶(バッファリング)することができる。
(5)本開示の一態様に係る中継装置は、前記中継対象データは、CANメッセージであり、前記初期化処理を終了した制御部は、前記中継対象データに含まれるCAN-IDに基づいて、前記中継対象データが同種であるか否かの種別判定を行う。
 本態様にあたっては、初期化処理を終了した制御部は、CANメッセージである中継対象データ取得した場合、CANメッセージに含まれるCAN-IDに基づいて、当該中継対象データ(CANメッセージ)が同種であるか否かの種別判定を行うため、当該種別判定を効率的に行うことができる。IPパケットの場合は、同種であるか否かの種別判定は、例えばTCP/IPのプロトコルにて定義されるポート番号(TCPポート番号、UDPポート番号)又は、当該ポート番号と送信元アドレス(ソースアドレス)との組み合わせに基づき、中継対象データとなるIPパケットが同種であるか否かの種別判定を行うものであってもよい。
(6)本開示の一態様に係る中継装置は、前記初期化処理を終了した制御部は、初期化処理が終了していない前記他の制御部の中継処理開始時点により特定されるバッファリング対象期間にて、取得した中継対象データを前記共有領域に書き込む。
 本態様にあたっては、個々の制御部における初期化の開始時点(開始時刻)、初期化に要する初期化時間、及び当該開始時点に初期化時間を加算することにより算出される中継処理開始時点(中継処理開始時刻)は、例えば、初期化スケジューリング情報として記憶部に記憶されている。初期化処理を終了した一の制御部は、自身(自制御部)の中継処理開始時点に基づき、当該初期化スケジューリング情報を参照して、初期化処理が終了していない他の制御部の中継処理開始時点を特定し、当該他の制御部の中継処理開始時点を終点とするバッファリング対象期間に取得した中継対象データを共有領域に書き込む。当該バッファリング対象期間は、初期化処理を終了した制御部の中継処理開始時点から、初期化処理が終了していない他の制御部の中継処理開始時点までの期間よりも、短い期間として設定してある。これにより、一の制御部の中継処理開始時点と、他の制御部の中継処理開始時点との時間差による期間が、当該バッファリング対象期間よりも長い場合であっても、他の制御部の中継処理開始時点を基点(終点)として、遡及的に特定されるバッファリング対象期間に取得(受信)した中継対象データのみを共有領域に書き込むことができる。これにより、他の制御部の中継処理開始時点を基準に最新、及び比較的に新しい中継対象データを効率的に記憶(バッファリング)することができる。
(7)本開示の一態様に係る中継装置は、前記バッファリング対象期間は、中継対象データの送信周期に基づき決定される。
 本態様にあたっては、バッファリング対象期間は、中継対象データの送信周期に基づき決定されるものであり、例えば、当該送信周期以上として予め設定されている。中継対象データが、複数種類の中継対象データを含む場合、各種類毎の中継対象データそれぞれの送信周期において、最も長い送信周期以上となるようにバッファリング対象期間は、設定されているものであってもよい。このようにバッファリング対象期間の下限値を設定することにより、中継対象データが、複数種類の中継対象データを含む場合、これら各種類毎の中継対象データを、少なくとも1回は取得し、記憶することができる。又は、バッファリング対象期間は、各種類毎の中継対象データそれぞれの送信周期の合算値以下となるように設定されるものであってもよい。このようにバッファリング対象期間の上限値を設定することにより、バッファリング対象期間が過度に長くなることを抑制し、記憶する中継対象データ(バッファリング対象の中継対象データ)による総容量が増加することを抑制することができる。
(8)本開示の一態様に係る中継装置は、前記中継装置は、取得した中継対象データの内の一部を前記共有領域に書き込む際、書き込み対象となる一部を特定するための複数のバッファリングモードを備え、前記初期化処理を終了した制御部は、前記複数のバッファリングモードの内、選択された一つ以上のバッファリングモードにより、取得した中継対象データの内の一部を前記共有領域に書き込む。
 本態様にあたっては、中継装置は、取得した中継対象データの内の一部を共有領域に書き込む際、書き込み対象となる一部を特定するための複数のバッファリングモードを備える。当該複数のバッファリングモードは、例えば、優先度モード、最新値モード、及び初期化完了直前モードを含む。優先度モードが選択された場合、初期化処理を終了した制御部は、取得した中継対象データの内、所定の優先度以上の中継対象データを共有領域に書き込む。最新値モードが選択された場合、初期化処理を終了した制御部は、取得した中継対象データが、同種(例えば、同じCANID)の複数の中継対象データを含む場合、同種の複数の中継対象データの内、最新の中継対象データを共有領域に書き込む。初期化完了直前モードが選択された場合、初期化処理を終了した制御部は、初期化処理が終了していない他の制御部の中継処理開始時点により特定されるバッファリング対象期間にて、取得した中継対象データを共有領域に書き込む。初期化処理を終了した制御部は、2つ以上のバッファリングモードが選択された場合、これら選択された2つ以上のバッファリングモードの組み合わせにより、取得した中継対象データの内の一部を共有領域に書き込む。複数のバッファリングモードにおけるいずれか単一のバッファリングモード、又は2つ以上のバッファリングモードの組み合わせが、選択可能として設定されることにより、中継装置が搭載される車両の型式、種別、又は車両の走行状態等に応じて、適切なバッファリングモードを用いることができ、当該中継装置の可用性を向上させることができる。
(9)本開示の一態様に係るプログラムは、車両に搭載され、複数の車載ECU間にて送受信されるデータを中継し、前記車載ECUそれぞれと通信するための複数の通信部と、複数の前記通信部それぞれに対応する複数の制御部と、前記複数の制御部それぞれからアクセス可能な記憶部とを備えるコンピュータに、前記複数の制御部それぞれを、別個に初期化処理を行い、初期化処理を終了した制御部が、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する処理を実行させる。
 本態様にあたっては、コンピュータを、車載ECU間にて送受信されるデータを中継する際、当該データを効率的に記憶(バッファリング)する中継装置として機能させるプログラムを提供することができる。
(10)本開示の一態様に係る情報処理方法は、車両に搭載され、複数の車載ECU間にて送受信されるデータを中継し、前記車載ECUそれぞれと通信するための複数の通信部と、複数の前記通信部それぞれに対応する複数の制御部と、前記複数の制御部それぞれからアクセス可能な記憶部とを備えるコンピュータに、前記複数の制御部それぞれを、別個に初期化処理を行い、初期化処理を終了した制御部が、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する処理を実行させる。
 本態様にあたっては、コンピュータを、車載ECU間にて送受信されるデータを中継する際、当該データを効率的に記憶(バッファリング)する中継装置として機能させる情報処理方法を提供することができる。
[本開示の実施形態の詳細]
 本開示をその実施の形態を示す図面に基づいて具体的に説明する。本開示の実施形態に係る中継装置2を、以下に図面を参照しつつ説明する。なお、本開示はこれらの例示に限定されるものではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。
(実施形態1)
 以下、実施の形態について図面に基づいて説明する。図1は、実施形態1に係る中継装置2を含む車載システムの構成を例示する模式図である。図2は、中継装置2の物理構成を例示するブロック図である。車載システムSは、車両Cに搭載された中継装置2を主たる装置として構成され、当該中継装置2は、車両Cに搭載される複数の車載ECU6と通信可能に接続される。中継装置2は、複数の車載ECU6それぞれか送信された送信データ(通信データ)を受信し、当該送信データに含まれるメッセージID又は送信先アドレス等を含むヘッダー情報に基づき、送信データの中継処理を行う。当該中継装置2は、更に、車外通信装置1を介して、インターネット等の車外ネットワークに接続される外部サーバS1と、通信可能に接続されるものであってもよい。中継装置2は、当該外部サーバS1と、車両Cに搭載される車載ECU6との間で送受信される送信データ(通信データ)についても、中継処理を行うものであってもよい。
 車両Cには、車外通信装置1、中継装置2、及び種々の車載機器(アクチュエータ、センサ)を制御するための複数の車載ECU6が、搭載されている。車外通信装置1と中継装置2とは、例えばシリアルケーブル等のハーネスにより通信可能に接続されている。中継装置2及び車載ECU6は、CAN(Control Area Network)、CAN-FD又は、Ethernet(登録商標)等の通信プロトコルに対応した車載ネットワーク7によって通信可能に接続されている。
 車外通信装置1は、車外通信部(図示せず)及び、中継装置2と通信するための入出力I/F(図示せず)(インターフェイス)を含む。車外通信部は、LTE、4G、5G、WiFi等の移動体通信のプロトコルを用いて無線通信をするための通信装置であり、車外通信部に接続されたアンテナ11を介して外部サーバS1とデータの送受信を行う。車外通信装置1と外部サーバS1との通信は、例えば公衆回線網又はインターネット等の外部ネットワークを介して行われる。
 中継装置2は、CANゲートウェイ又はイーサネットスイッチ(レイヤー2スイッチ又はレイヤー3スイッチ)等として機能し、更にCANプロコトルとTCP/IPプロトコルとの間など、異なるプロトコル間におけるプロトコル変換を行う機能を有する。中継装置2は、通信に関する中継に加え、二次電池等の電源装置から出力された電力を分配及び中継し、自装置(中継装置2)に接続されるアクチュエータ等の車載機器に電力を供給する電力分配装置としても機能するPLB(Power Lan Box)であってもよい。又は、中継装置2は、車両C全体をコントロールするボディECUの一機能部として構成されるものであってもよい。又は、中継装置2は、例えばヴィークルコンピュータ等の中央制御装置にて構成され、車両Cの全体的な制御を行う統合ECUであってもよい。
 中継装置2は、制御部3、記憶部4、車内通信部5、及び入出力I/F21を含む。制御部3は、CPU(Central Processing Unit)又はMPU(Micro Processing Unit)等により構成してあり、記憶部4に予め記憶された制御プログラムP(プログラム製品)及びデータを読み出して実行することにより、種々の制御処理及び演算処理等を行うようにしてある。
 制御部3は、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34を含む複数の制御部3により構成される。例えば、制御部3が4つのコア(クアッドコア)で構成されるマルチコアCPUである場合、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれは、各コアに対応するものとなる。制御部3はマルチコアCPUである場合に限定されず、シングルコアのCPUを複数有するマルチCPUであってもよく、デュアルコアのCPUを2つ備えるものであってもよい。制御部3が、第1制御部31、第2制御部32、第3制御部33及び第4制御部34による4つのコア(個々の制御部3)によって構成される形態は一例であり、制御部3は、例えばオクトコア等にて構成されるものであってよい。詳細は後述するが、これら第1制御部31、第2制御部32、第3制御部33及び第4制御部34それぞれは、異なるタイミングで初期化処理を行う。更に、第1制御部31、第2制御部32、第3制御部33及び第4制御部34それぞれは、個々の車内通信部と対応関係を有する。
 記憶部4は、RAM(Random Access Memory)等の揮発性のメモリ素子又は、ROM(Read Only Memory)、EEPROM(Electrically Erasable Programmable ROM)若しくはフラッシュメモリ等の不揮発性のメモリ素子により構成してあり、制御プログラムP及び処理時に参照するデータが予め記憶してある。記憶部4に記憶された制御プログラムP(プログラム製品)は、中継装置2が読み取り可能な記録媒体400から読み出された制御プログラムP(プログラム製品)を記憶したものであってもよい。当該制御プログラムPは、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれに対応した個々の制御プログラムPを含むものであってもよい。
 記憶部4は、制御部3を構成する複数のコア等(第1制御部31、第2制御部32、第3制御部33及び第4制御部34)それぞれからアクセス可能であり、これら第1制御部31、第2制御部32、第3制御部33及び第4制御部34によって共有メモリとして用いられる共有領域41を含む。当該共有領域41は、記憶部4の物理アドレス又は論理アドレスにて定義された領域に設定されるものであってもよい。共有領域41は、第1制御部31、第2制御部32、第3制御部33及び第4制御部34それぞれによる組み合わせに応じて、個別に設定されるものであってもよい。すなわち、共有領域41は、第1制御部31及び第2制御部32の共有領域41、第1制御部31及び第3制御部33の共有領域41、及び第1制御部31及び第4制御部34の共有領域41、第2制御部32及び第3制御部33の共有領域41、第2制御部32及び第4制御部34の共有領域41、及び第3制御部33及び第4制御部34の共有領域41を含むものであってもよい。
 車内通信部5は、例えばCAN(Control Area Network)、CAN-FD(CAN with Flexible Data Rate)又はイーサネット(TCP/IP)等の通信プロトコルを用いた入出力インターフェイスである。車内通信部5は、CANトランシーバにて構成されるCAN通信部51、及びイーサネットPHY部にて構成されるイーサネット通信部52を含み、中継装置2と車載ECU6とが通信するための物理層に対応した通信部として機能する。車内通信部5の個数と、制御部3を構成するコア等の個数は、同数となるように、中継装置2は構成されるものであってもよい。
 車内通信部5は、複数個設けられており、車内通信部5夫々に、車載ネットワーク7を構成する通信線71夫々(イーサネットケーブル711、CANバス712)、すなわちバス夫々が接続されている。このように車内通信部5を複数個設けることにより、車載ネットワーク7を複数個のバス又はセグメントに分け、各バス等に車載ECU6を、当該車載ECU6の機能に応じて接続するものであってもよい。中継装置2の制御部3は、車内通信部5を介して車載ネットワーク7に接続されている車載ECU6と相互に通信する。
 入出力I/F21は、車外通信装置1の入出力I/Fと同様に、例えばシリアル通信するための通信インターフェイスである。入出力I/F21を介して、中継装置2は、車外通信装置1、及び車両Cの起動及び停止を行うIGスイッチ8と通信可能に接続される。これら車外通信装置1及びIGスイッチ8と、中継装置2との接続は、入出力I/Fを介す場合に限定されず、車内通信部5を介した接続であってもよい。
 図3は、複数の制御部3における初期化処理を例示する説明図である。例えばマルチコア等(本実施形態ではクアッドコア)にて構成される制御部3は、各コアに対応する第1制御部31、第2制御部32、第3制御部33、及び第4制御部34を含む。
 これら第1制御部31、第2制御部32、第3制御部33、及び第4制御部34は、初期化処理を順次に開始することにより、中継処理等の通常動作を開始する通常動作開始時点(初期化完了時点)が、異なるものとなる。これら初期化処理の順番は、例えば、後述する対応関係テーブルにて定義されている。
 本実施形態においては、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34の順番で、それぞれが初期化処理を開始する。第1制御部31は最先に初期化処理を行い、第1制御部31の初期化完了後、第2制御部32が初期化処理を開始する。第2制御部32の初期化完了後、第3制御部33が初期化処理を開始する。第3制御部33の初期化完了後、第4制御部34が初期化処理を開始する。
 このように第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれが、シーケンシャルに初期化処理を行うことにより、例えば、第1制御部31と第4制御部34とにおいては、通常動作開始時点の時間差が発生する。当該通常動作開始時点の時間差が発生することにより、第1制御部31の通常動作開始時点から、第4制御部34の通常動作開始時点までの間、第1制御部31から第4制御部34への直接的な中継処理は行えないものとなる。このため、第1制御部31は、受信(取得)した送信データの内、第4制御部34が担う車内通信部5を介して中継する中継対象データを、第1制御部31及び第4制御部34の共有領域41に格納(バッファリング)するものとなる。しかしながら、第1制御部31の通常動作開始時点から、第4制御部34の通常動作開始時点まで期間に受信した全ての中継対象データを共有領域41にバッファリングした場合、当該共有領域41の記憶容量(空き領域)が不足することが懸念される。これに対し、第1制御部31は、受信した全ての中継対象データの内、一部の中継対象データのみを共有領域41にバッファリングすることにより、共有領域41の記憶容量(空き領域)が逼迫することを抑制する。
 第1制御部31は、第4制御部34と同様に自身(第1制御部31)よりも後に初期化処理を行う(初期化処理を完了する)第2制御部32及び第3制御部33に対しても、第4制御部34に対するバッファリング処理と同様のバッファリング処理を行う。第2制御部32も、自身よりも後に初期化処理を行う第3制御部33及び第4制御部34に対し、第1制御部31と同様のバッファリング処理を行う。第3制御部33も、自身よりも後に初期化処理を行う第4制御部34に対し、第1制御部31と同様のバッファリング処理を行う。
 図4は、複数の制御部3それぞれと車内通信部5との対応関係を例示する説明図(対応関係テーブル)である。制御部3を構成する第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれと車内通信部5との対応関係を示す情報(対応関係情報)は、例えばテーブル形式(対応関係テーブル)にて、記憶部4に記憶される。対応関係テーブルは、管理項目(フィールド)として、例えば、コア番号、初期化順番、初期化所要時間、通信部番号、及び通信部種類を含む。
 コア番号の管理項目には、制御部3を構成する第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれを一意に示すデバイス番号が格納される。本実施形態においては、第1制御部31(Core1)、第2制御部32(Core2)、第3制御部33(Core3)、及び第4制御部34(Core4)それぞれを示すコア番号が格納される。制御部3が、マルチCPUにて構成される場合、本管理項目には、CPU番号が格納されるものであってもよい。
 初期化順番の管理項目には、制御部3を構成する第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれが、初期化処理を開始する順番が格納される。本実施形態においては、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34の順番にて、初期化処理が行われる。当該初期化順番を参照することにより、個々の制御部3は、自身よりも後に初期化処理を行う他の制御部3を特定することができる。
 初期化所要時間の管理項目には、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれの初期化処理に要する時間(所要時間)が格納される。当該初期化所要時間を参照することにより、個々の制御部3は、自身よりも後に初期化処理を行う他の制御部3が初期化処理を完了する時点を導出することができる。このように対応関係テーブルは、初期化順番及び初期化順番の管理項目を含むことにより、初期化スケジューリング情報を含むものとなる。
 通信部番号の管理項目には、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれに対応する車内通信部5のデバイス番号が格納される。当該対応関係に基づき、個々の制御部3は、自身に対応する車内通信部5を介して送信データの送受信を行う。通信部種類の管理項目には、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれに対応する車内通信部5のプロコトルの種類が格納される。個々の制御部3と車内通信部5との対応関係に関する詳細は、後述する。
 図5は、中継経路情報を例示する説明図(中継経路テーブル)である。中継装置2が、車載ECU6又は外部サーバS1から受信した送信データを中継処理する際に用いられる中継経路情報は、例えばテーブル形式(中継経路テーブル)にて、記憶部4に記憶される。中継経路テーブルの管理項目(フィールド)として、例えば、メッセージID、中継先通信部、送信周期、優先度、及び対応ポート番号を含む。
 メッセージIDの管理項目には、例えば、CANメッセージに含まれるメッセージID等、送信データを分類又は識別するための通信データ識別子が格納される。中継先通信部の管理項目には、同じレコードに格納されるメッセージIDの送信データの中継先となる車内通信部5の通信部番号が格納される。当該通信部番号は、対応関係テーブルにて定義(格納)されている値である。通信部番号を特定することにより、当該通信部番号に対応する制御部3、すなわち第1制御部31、第2制御部32、第3制御部33及び第4制御部34のいずれかを特定することができる。中継経路テーブルは、中継先通信部の管理項目を含むことにより、中継装置2が中継処理を行う際に用いる経路情報(ルーティング情報)を含むものとなる。
 送信周期の管理項目には、同じレコードに格納されるメッセージIDの送信データの送信周期が格納される。優先度の管理項目には、同じレコードに格納されるメッセージIDの送信データの優先度を示す値が格納される。当該優先度は、メッセージIDに基づき決定される。CANプロトコルにおけるメッセージIDは、数値が小さいほど、アービトレーション(通信調停)が優先される。本実施形態においては、所定値未満のメッセージIDは高い優先度として設定され、所定値以上のメッセージIDは低い優先度として設定される。
 対応ポート番号の管理項目には、同じレコードに格納されるメッセージIDの送信データがCANメッセージである場合、当該CANメッセージをIPパケットにプロコトル変換する際、当該IPパケットに含まれるポート番号(TCPポート番号、UDPポート番号)が格納される。中継経路テーブルは、対応ポート番号の管理項目を含むことにより、中継装置2が中継処理を行う際、CANメッセージとIPパケットとのプロコトル変換に用いるプロコトル変換情報を含むものとなる。
 図6は、中継装置2内における中継対象データの中継処理を例示する説明図(論理構成図)である。制御部3を構成する第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれには、対応する車内通信部5が定められている。
 第1制御部31(Core1)に対応する車内通信部5は、例えば、通信部番号がC-01のCAN通信部51である。第2制御部32(Core2)に対応する車内通信部5は、例えば、通信部番号がC-02のCAN通信部51である。第3制御部33(Core3)に対応する車内通信部5は、例えば、通信部番号がe-01のイーサネット通信部52である。第4制御部34(Core4)に対応する車内通信部5は、例えば、通信部番号がe-02のイーサネット通信部52である。
 第1制御部31は、C-01のCAN通信部51における送信データの受信(取得)及び送信(出力)を行う処理を担う。第2制御部32は、C-02のCAN通信部51における送信データの受信(取得)及び送信(出力)を行う処理を担う。第3制御部33は、e-01のイーサネット通信部52における送信データの受信(取得)及び送信(出力)を行う処理を担う。第4制御部34は、e-02のイーサネット通信部52における送信データの受信(取得)及び送信(出力)を行う処理を担う。
 記憶部4には、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34それぞれが、アクセス可能な共有領域41を含む。当該共有領域41は、初期化処理を終了した制御部3が、初期化処理が終了していない他の制御部3に対応する通信部を介して中継する中継対象データを取得した場合、当該中継対象データをバッファリングする記憶領域として用いられる。
 本実施形態における例示において、初期化処理を終了した制御部3を第1制御部31とし、初期化処理が終了していない他の制御部3を第4制御部34として説明する。第1制御部31は、自身が担うCAN通信部51(C-01)から受信したCANメッセージ(送信データ)が、中継対象であるか否かを判断(判定)する。第1制御部31は、例えば、中継経路テーブルを参照して、当該CANメッセージが、第4制御部34に対し中継すべき送信データ(中継対象データ)であるか否かを判定する。
 CANメッセージが第4制御部34に対し中継すべき送信データ(中継対象データ)であって、かつ当該第4制御部34が初期化処理を完成していない場合、第1制御部31は、当該CANメッセージを共有領域41に格納(バッファリング)する。第1制御部31は、CANメッセージ等の中継対象データを共有領域41にバッファリングするにあたり、受信した全ての中継対象データの内、予め定められた所定のルールに基づき、一部の中継対象データのみをバッファリングする。これにより、共有領域41の空き領域(空き容量)が不足又は逼迫することを抑制又は防止することができる。
 第4制御部34は、初期化処理を完了後、共有領域41を参照することにより、第1制御部31がバッファリングしたCANメッセージ(中継対象データ)を取得し、当該CANメッセージをIPパケットにプロコトル変換することにより、当該IPパケットを生成する。第4制御部34は、同一のメッセージIDを含むCANメッセージが、複数個、バッファリングされている場合、当該複数のCANメッセージのペイロードに含まれるデータを、単一のIPパケットのペイロードに含ませることにより、プロコトル変換するものであってもよい。
 第4制御部34は、生成したIPパケットを、自身が担うイーサネット通信部52(e-02)から、当該イーサネット通信部52(e-02)に接続される車載ECU6に送信(出力)する。又は、第4制御部34は、送信先となる車載ECU6を特定することなく、マルチキャストを用いて、生成したIPパケットを送信(出力)するものであってもよい。
 このように共有領域41を用いたバッファリングを行うことにより、初期化処理を終了した制御部3(第1制御部31)と、初期化処理が終了していない他の制御部3(第4制御部34)との間における中継処理を行うことができる。共有領域41にバッファリングされる中継対象データは、一部の中継対象データのみとする処理を行うことにより、共有領域41の空き領域が不足又は逼迫することを抑制又は防止することができる。
 図7は、中継装置2の制御部3の処理を例示するフローチャートである。中継装置2の制御部3は、例えば車両Cが起動状態(IGスイッチ8がオン)にされた際、定常的に以下の処理を行う。中継装置2の制御部3は、例えば、複数のコア又はCPUにより構成されるマルチコアCPU等であり、本実施形態においては、第1制御部31、第2制御部32、第3制御部33、及び第4制御部34からの4つのコア(制御部3)から成る。
 これら第1制御部31、第2制御部32、第3制御部33、及び第4制御部34は、所定の初期順番にて、順次に初期化処理を行う。初期化処理を完了したコア(制御部3)は、初期化処理を完了していないコア(制御部3)、すなわち自身(自コア)よりも後に初期化処理が完了する全てのコア(制御部3)それぞれに対し、以下の処理を行う。本実施形態においては、初期化処理を完了したコア(制御部3)は、最先に初期化処理を完了する第1制御部31(Core1)とし、初期化処理を完了していない他のコア(制御部3)は、最後に初期化処理を完了する第4制御部34(Core4)として説明する。
 中継装置2の第1制御部31(制御部3)は、初期化処理を実行する(S101)。中継装置2の第1制御部31は、例えば、IGスイッチ8から出力されたオン信号を取得し、当該オン信号をトリガーに初期化処理を開始する。初期化処理は、例えば対応関係テーブルにて示されるように所定の初期化所要時間にて行われ、当該初期化所要時間の経過後、初期化処理は終了(完了)する。これにより、中継装置2の第1制御部31は、初期化処理を終了した制御部3となる。
 中継装置2の第1制御部31(制御部3)は、送信データを受信したか否かを判定する(S102)。送信データを受信していない場合(S102:NO)、中継装置2の第1制御部31(制御部3)は、再度S102からの処理を実行すべく、ループ処理を行う。
 送信データを受信した場合(S102:YES)、中継装置2の第1制御部31(制御部3)は、受信した送信データが第4制御部34に対する中継対象データであるか否かを判定する(S103)。受信した送信データが第4制御部34に対する中継対象データでない場合(S103:NO)、中継装置2の第1制御部31(制御部3)は、再度S102からの処理を実行すべく、ループ処理を行う。
 受信した送信データが第4制御部34に対する中継対象データである場合(S103:YES)、中継装置2の第1制御部31(制御部3)は、中継対象データの中継先となる車内通信部5に対応する第4制御部34(他の制御部3)が初期化中であるか否かを判定する(S104)。中継装置2の第1制御部31は、第4制御部34が初期化中であるか否か、すなわち第4制御部34が初期化を終了(完了)したか否かを判定する。
 第4制御部34が初期化中である場合とは、第4制御部34が初期化を終了(完了)していないことを意図し、第4制御部34が初期化を開始していない場合も含む。第1制御部31は、自身の初期化完了時点(通常動作開始時点)を基準に第4制御部34の初期化完了時点を算出し、現時点が、第4制御部34の初期化完了時点を超過しているか否かに基づき、第4制御部34が初期化を終了(完了)したか否かを判定するものであってもよい。
 第1制御部31は、第4制御部34の初期化完了時点を算出するにあたり、例えば、記憶部4に記憶されている対応関係テーブルを参照するものであってもよい。第4制御部34の初期化完了時点は、第1制御部31の初期化完了時点(通常動作開始時点)を基準として、第1制御部31よりも後に初期化を行う第2制御部32、第3制御部33及び第4制御部34の初期化所要時間を合算することにより、導出することができる。
 初期化を終了した(初期化中でない)と判定した場合(S104:NO)、中継装置2の第1制御部31(制御部3)は、中継処理(通常時処理)を行う(S1041)。中継装置2の第1制御部31は、第4制御部34の初期化が終了していると判定した場合、例えば、当該第4制御部34にて実行されているプロセス又はスレッドとプロセス間通信を行うことにより、取得した中継対象データを第4制御部34に受け渡すことにより、中継処理(通常時処理)を行う。第4制御部34の初期化が終了(完了)している場合、当該第4制御部34が初期化中である場合に行うバッファリングは不要となり、CAN通信部51を担う第1制御部31と、イーサネット通信部52を担う第4制御部34とが連関処理を行うことによる中継処理が、中継装置2の通常時処理として行われる。
 初期化を終了していない(初期化中である)と判定した場合(S104:YES)、中継装置2の第1制御部31(制御部3)は、中継対象データの優先度に基づき、バッファリング対象であるか否かを判定する(S105)。第4制御部34が初期化を終了していない場合、中継装置2の第1制御部31は、例えば、記憶部4に記憶されている中継経路テーブルを参照することにより、中継対象データの優先度に基づくバッファリング対象の有無を判定する。例えば中継対象データがCANメッセージの場合、当該CANメッセージに含まれるメッセージID(CAN-ID)に応じて優先度が定められており、本実施形態においては、メッセージIDの値が所定値以下のCANメッセージは、バッファリング対象であると設定されている。
 バッファリング対象であると判定した場合(S105:YES)、中継装置2の第1制御部31(制御部3)は、中継対象データを記憶部4の共有領域41に格納(バッファリング)する(S106)。例えば中継経路テーブルを参照することにより、中継対象データがバッファリング対象であると判定した場合、中継装置2の第1制御部31は、当該中継対象データを記憶部4の共有領域41に格納(バッファリング)する。当該共有領域41は、第4制御部34からもアクセスできる記憶領域として設定されているものであり、初期化処理を終了した第4制御部34は、記憶領域を参照することにより、第1制御部31によってバッファリングされた中継対象データを取得することができる。
 バッファリング対象でない判定した場合(S105:NO)、中継装置2の第1制御部31(制御部3)は、中継対象データを破棄する(S1051)。例えば中継経路テーブルを参照することにより、中継対象データがバッファリング対象でない判定した場合、すなわち当該中継対象データの優先度が低く、バッファリングが不要である場合、第1制御部31は、中継対象データを破棄する。これにより、バッファリングを行うための記憶領域である共有領域41が、逼迫又は不足し、優先度が高い中継対象データのバッファリングが不可となることを抑制又は防止することができる。
 中継装置2の第1制御部31(制御部3)は、S106、S1061、又はS1041の実行後、本フローにおける一連の処理を終了する。又は、中継装置2の第1制御部31(制御部3)は、S106、S1061、又はS1041の実行後、再度S102からの処理を実行すべく、ループ処理を行うものであってもよい。
 中継装置2の第4制御部34(他の制御部3)は、初期化処理を完了後、記憶部4における共有領域41を参照することにより、第1制御部31が当該共有領域41に記憶(バッファリング)した中継対象データを取得する。中継対象データが複数個のCANメッセージであり、第4制御部34が担う車内通信部5がイーサネット通信部52である場合、第4制御部34は、取得した複数のCANメッセージを、単一のIPパケットに変換し、当該IPパケットを自身が担うイーサネット通信部52から出力することにより、中継対象データの中継処理を行うものであってもよい。
 IPパケットにおけるペイロードの格納容量は、CANメッセージにおけるペイロードの格納容量よりも大きいため、このようにバッファリングされた複数のCANメッセージを単一のIPパケットに変換することにより、中継対象データの中継処理を効率的に行うことができる。すなわち、CAN通信部51を担う制御部3(第1制御部31、第2制御部32)を、イーサネット通信部52を担う制御部3(第3制御部33、第4制御部34)よりも、早く初期化処理を完了(終了)させることにより、共有領域41にバッファリングした複数のCANメッセージを、単一のIPパケットに変換して中継することができ、中継処理におけるスループットを向上させることができる。このように個々の制御部3(第1制御部31、第2制御部32、第3制御部33、第4制御部34)が順次に初期化処理を完了する構成を有する中継装置2において、CAN通信部51で受信した送信データをイーサネット通信部52から送信することにより中継処理を行う際、本実施形態によるバッファリング処理を好適に適用することができる。
 本実施形態において、第4制御部34が、第1制御部31がバッファリングした複数のCANメッセージを単一のIPパケットに変換するとしたが、これに限定されない。第1制御部31が、バッファリングした複数のCANメッセージを単一のIPパケットに変換するものであってもよい。すなわち、第1制御部31は、バッファリング対象となる複数のCANメッセージを単一のIPパケットに変換し、当該変換したIPパケットを、共有領域41に記憶(バッファリング)するものであってもよい。これにより、第4制御部34は、初期化処理が完了後、共有領域41を参照することにより、変換されたIPパケットを取得し、当該IPパケットを自身が担うイーサネット通信部52から出力できるため、中継処理におけるスループットを更に向上させることができる。
 上記フローにて、最先に初期化処理を完了する第1制御部31(Core1)は、最後に初期化処理を完了する第4制御部34(Core4)に対する処理と同様の処理を、自身よりも後に初期化処理を行う第2制御部32(Core2)、及び第3制御部33(Core3)に対しても行う。第2制御部32及び第3制御部33は、第1制御部31が共有領域41に記憶(バッファリング)した中継対象データに対し、第4制御部34と同様の処理を行う。
 第1制御部31(Core1)は、自身よりも後に初期化処理を行うそれぞれのコア(第2制御部32、第3制御部33、及び第4制御部34)に対する処理を、例えば複数のプロセス又はスレッドを用いて、並行処理するものであってもよい。第1制御部31(Core1)は、自身よりも後に初期化処理を行う第2制御部32、第3制御部33及び第4制御部34に対し、例えばS101からS103までの処理を共通化し、S104以下の処理を第2制御部32、第3制御部33及び第4制御部34に対し個別に処理することにより、並行処理化するものであってもよい。この際、S103の処理を行うことにより、いずれのコア(第2制御部32、第3制御部33、及び第4制御部34)に対する中継対象データ(中継処理)であるかを特定するものであってもよい。これら処理は本実施形態にて限定されるものでなく、後述する他の実施形態においても同様である。
 第2制御部32(Core2)は、自身よりも後に初期化処理を行う第3制御部33(Core3)、及び第4制御部34(Core4)に対しても、第1制御部31による上記フローと同様の処理を行う。第3制御部33(Core3)は、自身よりも後に初期化処理を行う第4制御部34(Core4)に対しても、第1制御部31による上記フローと同様の処理を行う。最後に初期化処理を完了する第4制御部34(Core4)については、自身よりも後に初期化処理が完了するコア(制御部3)がないため、上記フローによる処理を行うことは不要であることは、言うまでもない。
(実施形態2)
 図8は、実施形態2(最新値を記憶)に係る中継装置2の制御部3の処理を例示するフローチャートである。中継装置2の制御部3は、実施形態1と同様に、例えば車両Cが起動状態(IGスイッチ8がオン)にされた際、定常的に以下の処理を行う。
 中継装置2の第1制御部31(制御部3)は、初期化処理を実行する(S201)。中継装置2の第1制御部31(制御部3)は、送信データを受信したか否かを判定する(S202)。中継装置2の第1制御部31(制御部3)は、受信した送信データが第4制御部34に対する中継対象データであるか否かを判定する(S203)。中継装置2の第1制御部31(制御部3)は、中継対象データの中継先となる車内通信部5に対応する第4制御部34(他の制御部3)が初期化中であるか否かを判定する(S204)。初期化を終了したと判定した場合(S204:NO)、中継装置2の第1制御部31(制御部3)は、中継処理(通常時処理)を行う(S2041)。中継装置2の第1制御部31は、実施形態1のS101からS1041と同様に、S201からS2041までの処理を行う。
 初期化を終了していないと判定した場合(S204:YES)、中継装置2の第1制御部31(制御部3)は、中継対象データを記憶部4の共有領域41に上書きにて格納(バッファリング)する(S205)。共有領域41には、第4制御部34に対する中継対象データがバッファリングされるものとなり、当該中継対象データは複数の種類に分類される。中継対象データの種類は、例えば、当該中継対象データがCANメッセージの場合、メッセージID(CAN-ID)によって区分されるものとなり、同一のメッセージIDのCANメッセージは、同種の中継対象データとなり、異なるメッセージIDのCANメッセージは、異種の中継対象データとなる。
 中継装置2の第1制御部31は、取得した複数の中継対象データの内、同種の中継対象データについては、最新の中継対象データのみを共有領域41にバッファリングする。これにより、最新の中継対象データと同種の中継対象データであって、以前にバッファリングされた古い中継対象データは、当該最新の中継対象データによって上書きされるものとなる。このように中継装置2の第1制御部31は、取得(受信)した中継対象データの種類に応じて、最新の中継対象データのみを共有領域41に格納(バッファリング)する。従って、取得(受信)した中継対象データを共有領域41にバッファリングする際、当該中継対象データと同種の中継対象データ(例えば、同じCAN-IDのCANメッセージ)が既にバッファリングされている場合、当該既にバッファリングされている中継対象データは、上書きされる。
 中継装置2の第1制御部31は、中継対象データの種類毎に、最新の中継対象データのみを共有領域41にバッファリングするとしたが、これに限定されない。中継装置2の第1制御部31は、最新及び当該最新より1つ前の中継対象データからなる2つ(2世代)の中継対象データを共有領域41にバッファリングするものであってもよい。又は、共有領域41の記憶容量に応じて、最新及び当該最新より2つ以上前の中継対象データからなる複数世代の中継対象データを共有領域41にバッファリングするものであってもよい。又は、中継装置2の第1制御部31は、実施形態1にて適用した優先度に応じて、優先度が高い分類の中継対象データは2世代にてバッファリングし、優先度が低い分類の中継対象データは1世代(優先度が高い分類の中継対象データよりも低い世代管理)にてバッファリングするものであってもよい。
(実施形態3)
 図9は、実施形態3(初期化完了する直前)に係る複数の制御部3における初期化処理を例示する説明図である。初期化処理の開始順番に応じて、通常動作開始時点の時間差が発生するものとなり、例えば、第1制御部31と第4制御部34とによる通常動作開始時点の時間差は、第2制御部32、第3制御部33及び第4制御部34の初期化所要時間を合算した時間(期間)となる。この場合、当該通常動作開始時点の時間差による期間は、バッファリング対象外期間と、バッファリング対象期間とに分別され、第1制御部31は、バッファリング対象期間にて受信した中継対象データのみを、共有領域41にバッファリングする。当該バッファリング対象期間は、個々の制御部3となる第1制御部31、第2制御部32、第3制御部33及び第4制御部34それぞれにおいて、別個に定義されているものであってもよく、それぞれのバッファリング対象期間が、例えば記憶部4に記憶されている。
 バッファリング対象期間は、第4制御部34に対し中継される中継対象データの送信周期に基づき決定されるものであってもよい。第4制御部34におけるバッファリング対象期間は、当該第4制御部34に対し中継される中継対象データ、すなわち第4制御部34に対応する車内通信部5(イーサネット通信部52)を介して中継される中継対象データの送信周期以上であってもよい。
 中継対象データが、複数種類(複数のメッセージID等)の中継対象データを含む場合、各種類毎の中継対象データそれぞれの送信周期において、最も長い送信周期以上となるようにバッファリング対象期間は、設定されているものであってもよい。このようにバッファリング対象期間の下限値を設定することにより、中継対象データが、複数種類の中継対象データを含む場合であっても、これら各種類毎の中継対象データを少なくとも1回は取得し、共有領域41にバッファリングすることができる。
 更に、バッファリング対象期間は、各種類毎の中継対象データそれぞれの送信周期の合算値以下となるように設定されるものであってもよい。このようにバッファリング対象期間の上限値を設定することにより、バッファリング対象期間が過度に長くなることを抑制し、バッファリング対象の中継対象データの総容量が、過度に増加することを抑制することができる。
 通常動作開始時点の時間差による期間において、バッファリング対象外期間は前半に位置し、バッファリング対象期間は後半に位置する。これにより、第4制御部34を一例とした場合、当該第4制御部34の通常動作開始時点を基準に、直前に受信された最新の中継対象データを含む、比較的に新しい中継対象データを、共有領域41にバッファリングすることができる。
 図10は、中継装置2の制御部3の処理を例示するフローチャートである。中継装置2の制御部3は、実施形態1と同様に、例えば車両Cが起動状態(IGスイッチ8がオン)にされた際、定常的に以下の処理を行う。中継装置2の第1制御部31(制御部3)は、初期化処理を実行する(S301)。中継装置2の第1制御部31(制御部3)は、送信データを受信したか否かを判定する(S302)。中継装置2の第1制御部31(制御部3)は、受信した送信データが第4制御部34に対する中継対象データであるか否かを判定する(S303)。中継装置2の第1制御部31(制御部3)は、中継対象データの中継先となる車内通信部5に対応する第4制御部34(他の制御部3)が初期化中であるか否かを判定する(S304)。初期化を終了したと判定した場合(S304:NO)、中継装置2の第1制御部31(制御部3)は、中継処理(通常時処理)を行う(S3041)。中継装置2の第1制御部31は、実施形態1のS101からS1041と同様に、S301からS3041までの処理を行う。
 初期化を終了していないと判定した場合(S304:YES)、中継装置2の第1制御部31(制御部3)は、バッファリング対象期間であるか否かを判定する(S305)。第4制御部34が初期化を終了していない場合、中継装置2の第1制御部31は、現時点が第4制御部34に対するバッファリング対象期間に含まれるか否かを判定する。第4制御部34に対するバッファリング対象期間は、当該第4制御部34の中継処理開始時点を基点(終点)として、遡及的に特定される。当該バッファリング対象期間は、共有領域41の記憶容量に応じた適切な期間が設定されるものであり、例えば、第1制御部31及び第4制御部34の通常処理(中継処理)開始時点における時間差の40%程度の期間として設定されるものであってもよい。
 又は、第4制御部34に対するバッファリング対象期間は、第4制御部34(イーサネット通信部52:e-02)に中継される中継対象データの送信周期に基づき、例えば、当該送信周期以上の値が設定されるものであってもよい。中継対象データが、複数のメッセージID等、複数種類の中継対象データ(CANメッセージ)を含む場合、各種類毎の中継対象データそれぞれの送信周期において、最も長い送信周期以上となるようにバッファリング対象期間は、設定されているものであってもよい。これにより、いずれの種類の中継対象データであっても、少なくとも1回は取得し、共有領域41にバッファリングすることができる。
 記憶部4には、第4制御部34及び、他の制御部3(第2制御部32、第3制御部33)におけるバッファリング対象期間が記憶されており、第1制御部31は、記憶部4を参照することにより、第4制御部34等のバッファリング対象期間を特定することができる。第1制御部31は、実施形態1と同様に、例えば、対応関係テーブルを参照することにより、第1制御部31の初期化完了時点(通常動作開始時点)を基準として、第4制御部34の初期化完了時点(通常動作開始時点)を導出する。第1制御部31は、導出した第4制御部34の初期化完了時点(通常動作開始時点)から、第4制御部34のバッファリング対象期間を逆算(遡及)することにより、当該第4制御部34のバッファリング対象期間の開始時点(時刻)と終了時点(時刻)とを導出する。当該終了時刻が、第4制御部34の初期化完了時点(通常動作開始時点)に相当(一致)することは、言うまでもない。
 第1制御部31は、例えば時計機能等を含むものであり、現時点の時刻が、第4制御部34のバッファリング対象期間の開始時刻から終了時刻までの間となる場合、現時点が第4制御部34に対するバッファリング対象期間であると判定する。第1制御部31は、現時点の時刻が、第4制御部34のバッファリング対象期間の開始時刻から終了時刻までの間とならない場合、すなわちバッファリング対象期間の開始時刻よりも前である場合、現時点が第4制御部34に対するバッファリング対象期間ではない(バッファリング対象外期間)と判定する。
 バッファリング対象期間であると判定した場合(S305:YES)、中継装置2の第1制御部31(制御部3)は、中継対象データを記憶部4の共有領域41に格納(バッファリング)する(S306)。バッファリング対象期間であると判定した場合、すなわち現時点が第4制御部34に対するバッファリング対象期間に含まれる場合、中継装置2の第1制御部31は、実施形態1の処理S106と同様に中継対象データを記憶部4の共有領域41に格納(バッファリング)する。
 バッファリング対象期間でない判定した場合(S305:NO)、中継装置2の第1制御部31(制御部3)は、中継対象データを破棄する(S3051)。バッファリング対象期間でない判定した場合、すなわち現時点が第4制御部34に対するバッファリング対象期間に含まれない場合、中継装置2の第1制御部31は、実施形態1の処理S1061と同様に中継対象データを破棄する。
(実施形態4)
 図11は、実施形態4(バッファリングモード選択)に係る中継装置2の制御部3の処理を例示するフローチャートである。中継装置2の制御部3は、実施形態1と同様に、例えば車両Cが起動状態(IGスイッチ8がオン)にされた際、定常的に以下の処理を行う。
 中継装置2の第1制御部31(制御部3)は、初期化処理を実行する(S401)。中継装置2の第1制御部31は、実施形態1のS101と同様に、S401の処理を行う。
 中継装置2の第1制御部31(制御部3)は、選択されたバッファリングモードを特定する(S402)。中継装置2は、取得した中継対象データの内の一部を共有領域41に書き込む際、書き込み対象となる一部を特定するための複数のバッファリングモードを備える。これら、複数のバッファリングモードは、例えば、前述した各実施形態におけるバッファリング処理によるものである。当該複数のバッファリングモードは、例えば、優先度モード、最新値モード、及び初期化完了直前モードを含み、現時点にて選択されているバッファリングモードを示すフラグ値が、記憶部4に記憶されている。
 中継装置2の第1制御部31は、例えば、記憶部4を記憶されているフラグ値を参照することにより、現時点において選択されているバッファリングモードを特定する。バッファリングモード(フラグ値)は、例えば、中継装置2が搭載される車両Cの操作者による入力値に基づき、選択(設定)されるものであってもよい。又は、バッファリングモード(フラグ値)は、例えば、車両Cの製造業者が運用管理する外部サーバS1から送信されたシグナル信号に基づき、選択(設定)されるものであってもよい。このように、バッファリングモードの可変設定を許容することにより、車両Cに対し適切なバッファリングモードにて、共有領域41へのバッファリング処理を行うことができる。
 中継装置2の第1制御部31(制御部3)は、選択されたバッファリングモードにてバッファリングを実施する(S403)。該複数のバッファリングモードは、例えば、優先度モード、最新値モード、及び初期化完了直前モードを含む。
 優先度モードが選択された場合、中継装置2の第1制御部31は、取得した中継対象データの内、所定の優先度以上の中継対象データを共有領域41に書き込む。優先度モードによる第1制御部31の処理は、例えば実施形態1の処理S102からS106を行うものであってもよい。
 最新値モードが選択された場合、中継装置2の第1制御部31は、取得した中継対象データが、同種(例えば、同じCANID)の複数の中継対象データを含む場合、同種の複数の中継対象データの内、最新の中継対象データを共有領域41に書き込む。最新値モード優先度モードによる第1制御部31の処理は、例えば実施形態2の処理S202からS205を行うものであってもよい。
 初期化完了直前モードが選択された場合、中継装置2の第1制御部31は、初期化処理が終了していない他の制御部3の中継処理開始時点により特定されるバッファリング対象期間にて、取得した中継対象データを共有領域41に書き込む。初期化完了直前モードによる第1制御部31の処理は、例えば実施形態3の処理S302からS306を行うものであってもよい。
 選択されるバッファリングモードの個数は、1つ(単数)である場合に限定されず、複数のバッファリングモードが選択されるものであってもよい。中継装置2の第1制御部31は、2つ以上となる複数のバッファリングモードが選択された場合、これら選択された2つ以上のバッファリングモードの組み合わせにより、取得した中継対象データの内の一部を共有領域41に書き込む。
 今回開示された実施形態は全ての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。
 C 車両 
 S 車載システム
 S1 外部サーバ
 1 車外通信装置
 11 アンテナ
 2 中継装置
 21 入出力I/F
 3 制御部
 31 第1制御部(Core1)
 32 第2制御部(Core2)
 33 第3制御部(Core3)
 34 第4制御部(Core4)
 4 記憶部
 41 共有領域
 400 記録媒体
 P 制御プログラム(プログラム製品)
 5 車内通信部
 51 CAN通信部
 52 イーサネット通信部
 6 車載ECU
 7 車載ネットワーク
 71 通信線
 711 イーサネットケーブル
 712 CANバス
 8 IGスイッチ

Claims (10)

  1.  車両に搭載され、複数の車載ECU間にて送受信されるデータを中継する中継装置であって、
     前記車載ECUそれぞれと通信するための複数の通信部と、
     複数の前記通信部それぞれに対応する複数の制御部と、
     前記複数の制御部それぞれからアクセス可能な記憶部とを備え、
     前記複数の制御部それぞれは、別個に初期化処理を行い、
     初期化処理を終了した制御部は、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する
     中継装置。
  2.  前記初期化処理を終了した制御部は、取得した中継対象データの内、所定の優先度以上の中継対象データを前記共有領域に書き込む
     請求項1に記載の中継装置。
  3.  前記中継対象データは、CANメッセージであり、
     前記初期化処理を終了した制御部は、前記中継対象データに含まれるCAN-IDに応じて、前記中継対象データの優先度を特定する
     請求項2に記載の中継装置。
  4.  前記初期化処理を終了した制御部は、取得した複数の中継対象データが、同種の中継対象データを含む場合、同種の中継対象データの内、最新の中継対象データを共有領域に書き込む
     請求項1に記載の中継装置。
  5.  前記中継対象データは、CANメッセージであり、
     前記初期化処理を終了した制御部は、前記中継対象データに含まれるCAN-IDに基づいて、前記中継対象データが同種であるか否かの種別判定を行う
     請求項4に記載の中継装置。
  6.  前記初期化処理を終了した制御部は、初期化処理が終了していない前記他の制御部の中継処理開始時点により特定されるバッファリング対象期間にて、取得した中継対象データを前記共有領域に書き込む
     請求項1に記載の中継装置。
  7.  前記バッファリング対象期間は、中継対象データの送信周期に基づき決定される
     請求項6に記載の中継装置。
  8.  前記中継装置は、取得した中継対象データの内の一部を前記共有領域に書き込む際、書き込み対象となる一部を特定するための複数のバッファリングモードを備え、
     前記初期化処理を終了した制御部は、前記複数のバッファリングモードの内、選択された一つ以上のバッファリングモードにより、取得した中継対象データの内の一部を前記共有領域に書き込む
     請求項1から請求項7のいずれか1項に記載の中継装置。
  9.  車両に搭載され、複数の車載ECU間にて送受信されるデータを中継し、
     前記車載ECUそれぞれと通信するための複数の通信部と、
     複数の前記通信部それぞれに対応する複数の制御部と、
     前記複数の制御部それぞれからアクセス可能な記憶部とを備えるコンピュータに、
     前記複数の制御部それぞれを、別個に初期化処理を行い、
     初期化処理を終了した制御部が、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する
     処理を実行させるプログラム。
  10.  車両に搭載され、複数の車載ECU間にて送受信されるデータを中継し、
     前記車載ECUそれぞれと通信するための複数の通信部と、
     複数の前記通信部それぞれに対応する複数の制御部と、
     前記複数の制御部それぞれからアクセス可能な記憶部とを備えるコンピュータに、
     前記複数の制御部それぞれを、別個に初期化処理を行い、
     初期化処理を終了した制御部が、初期化処理が終了していない他の制御部に対応する通信部を介して中継する中継対象データを取得した場合、取得した中継対象データの内の一部を、初期化処理が終了していない前記他の制御部との間で共有される共有領域に書き込むことにより、前記記憶部に記憶する
     処理を実行させる中継方法。
PCT/JP2023/000044 2022-01-26 2023-01-05 中継装置、プログラム及び、中継方法 WO2023145391A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022010260A JP2023108935A (ja) 2022-01-26 2022-01-26 中継装置、プログラム及び、中継方法
JP2022-010260 2022-01-26

Publications (1)

Publication Number Publication Date
WO2023145391A1 true WO2023145391A1 (ja) 2023-08-03

Family

ID=87471714

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/000044 WO2023145391A1 (ja) 2022-01-26 2023-01-05 中継装置、プログラム及び、中継方法

Country Status (2)

Country Link
JP (1) JP2023108935A (ja)
WO (1) WO2023145391A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05143562A (ja) * 1991-11-19 1993-06-11 Mitsubishi Electric Corp リンク型マルチプロセツサー監視方法
JP2014179838A (ja) * 2013-03-15 2014-09-25 Yamaha Corp 通信装置、およびプログラム
WO2021192961A1 (ja) * 2020-03-26 2021-09-30 株式会社オートネットワーク技術研究所 車載中継装置、情報処理方法及びプログラム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05143562A (ja) * 1991-11-19 1993-06-11 Mitsubishi Electric Corp リンク型マルチプロセツサー監視方法
JP2014179838A (ja) * 2013-03-15 2014-09-25 Yamaha Corp 通信装置、およびプログラム
WO2021192961A1 (ja) * 2020-03-26 2021-09-30 株式会社オートネットワーク技術研究所 車載中継装置、情報処理方法及びプログラム

Also Published As

Publication number Publication date
JP2023108935A (ja) 2023-08-07

Similar Documents

Publication Publication Date Title
US10153825B2 (en) Vehicle-mounted control device
US9224251B2 (en) Gateway device
US8301821B2 (en) Communication module for connecting a serial bus to a plurality of system buses
JP6471739B2 (ja) 車載通信システム
CN107888645B (zh) 车载通信网络
EP3621248A1 (en) Electronic control unit, communication method, and in-vehicle network system
JP2009527168A (ja) バス間でのメッセージの自動ルーティングのためのゲートウェイ
WO2019202965A1 (ja) 車載更新装置、車載更新システム、更新処理方法及び更新処理プログラム
JP7394185B2 (ja) 通信システム
JP7459881B2 (ja) 管理装置、車載システム、通信管理方法および通信管理プログラム
JP6544230B2 (ja) 通信システム
JP7230760B2 (ja) 中継装置および外部装置
WO2023145391A1 (ja) 中継装置、プログラム及び、中継方法
WO2021106604A1 (ja) 車載中継装置、プログラム及び中継方法
JP4839140B2 (ja) 中継接続ユニット
US11405322B2 (en) In-vehicle communication apparatus, communication program, and message transmission method
JP4709037B2 (ja) 車載データベースシステム
JP5728043B2 (ja) ゲートウェイ装置
JP4361540B2 (ja) ゲートウェイ装置、データ転送方法及びプログラム
JP4839115B2 (ja) 車載用データベース分配ノード
JP4581284B2 (ja) 通信システムおよび電子制御装置
US20240089142A1 (en) Vehicle-mounted apparatus and a method for relaying
JP4854598B2 (ja) データ転送制御装置
US11171805B2 (en) Can communication method between ESS battery and power management device
WO2023167124A1 (ja) 車載通信装置、車載通信システム、通信処理装置及び通信方法

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: 23746608

Country of ref document: EP

Kind code of ref document: A1