RELAY APPARATUS, RELAY METHOD AND RELAY PROGRAM
20200204397 ยท 2020-06-25
Inventors
Cpc classification
H04L12/66
ELECTRICITY
International classification
Abstract
A relay apparatus includes a relay unit to which a plurality of communication lines are connected, and that relays a message received from one communication line, by transmitting the message on another communication line, a switch for switching between a connected state where at least two communication lines included in the plurality of communication lines are connected directly and a separated state where the communication lines are separated apart, and a relay rule switching unit for switching a message relay rule for the relay unit depending on a switching state of the switch. The relay apparatus also includes a communication state detection unit that detects a communication state of the communication lines, and switches the switch in accordance with the communication state detected by the communication state detection unit.
Claims
1. A relay apparatus comprising: a relay unit to which a plurality of communication lines are connected, and that is configured to relay a message received from one communication line, by transmitting the message on another communication line; a switch for switching between a connected state where at least two communication lines included in the plurality of communication lines are connected and a separated state where the communication lines are separated apart; and a relay rule switching unit for switching a message relay rule for the relay unit depending on a switching state of the switch.
2. The relay apparatus according to claim 1, further comprising a communication state detection unit configured to detect a communication state of the communication lines, wherein the switch is switched in accordance with the communication state detected by the communication state detection unit.
3. The relay apparatus according to claim 2, wherein the communication state detection unit is configured to detect an amount of messages transmitted/received via the communication lines, and if the message amount is smaller than a predetermined amount, the switch is switched to the connected state, and if the message amount exceeds the predetermined amount, the switch is switched to the separated state.
4. The relay apparatus according to claim 3, further comprising: a relay prohibition unit configured to prohibit the relay unit from relaying a message received from a communication line for which a message amount detected by the communication state detection unit after the switch has been switched to the separated state exceeds a second predetermined amount, to another communication line.
5. The relay apparatus according to claim 1, further comprising: a storage unit configured to store a plurality of sets of relay information in which a message and a relay destination of the message are associated, wherein a message relay rule is switched by reading out one set of the relay information from the storage unit depending on a switching state of the switch.
6. A relay method, wherein a relay apparatus, to which a plurality of communication lines are connected, and that relays a message received from one communication line, by transmitting the message on another communication line: switches between a connected state where at least two communication lines included in the plurality of communication lines are connected and a separated state where the communication lines are separated apart, and switches a message relay rule depending on a switching state.
7. A relay program that causes a relay apparatus that includes a relay unit to which a plurality of communication lines are connected, and that relays a message received from one communication line, by transmitting the message on another communication line, and a switch for switching between a connected state where at least two communication lines included in the plurality of communication lines are connected and a separated state where the communication lines are separated apart, to switch the switch depending on a communication state of the communication lines, and to switch a message relay rule for the relay unit depending on a switching state of the switch.
8. The relay apparatus according to claim 2, further comprising: a storage unit configured to store a plurality of sets of relay information in which a message and a relay destination of the message are associated, wherein a message relay rule is switched by reading out one set of the relay information from the storage unit depending on a switching state of the switch.
9. The relay apparatus according to claim 3, further comprising: a storage unit configured to store a plurality of sets of relay information in which a message and a relay destination of the message are associated, wherein a message relay rule is switched by reading out one set of the relay information from the storage unit depending on a switching state of the switch.
10. The relay apparatus according to claim 4, further comprising: a storage unit configured to store a plurality of sets of relay information in which a message and a relay destination of the message are associated, wherein a message relay rule is switched by reading out one set of the relay information from the storage unit depending on a switching state of the switch.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
System Configuration
[0034]
[0035] For example, the ECUs 2 may include various ECUs such as an ECU for controlling operations of the engine of the vehicle 1, an ECU for locking/unlocking doors, an ECU for turning lights on/off, an ECU for controlling the operation of air-bags, and an ECU for controlling the operation of an ABS (antilock brake system). Each ECU 2 is connected to one of the communication lines 11 to 13 arranged in the vehicle 1, and can transmit/receive messages to/from another ECU 2 via the communication lines 11 to 13 and the gateway 5.
[0036] The gateway 5 is connected to the communication lines 11 to 13 that constitute an in-vehicle network of the vehicle 1, and performs processing for relaying messages transmitted/received between the communication lines 11 to 13. In the example shown in
[0037] Note that, in the communication system according to this embodiment, the ECUs 2 and the gateway 5 transmit/receive messages in accordance with the CAN (controller area network) communication protocol. However, a configuration may also be adopted in which the ECUs 2 and the gateway 5 transmit/receive messages in accordance with a communication protocol other than the CAN communication protocol such as the FlexRay or LIN (local interconnect network) communication protocol. It suffices for the ECUs 2 and the gateway 5 to have a configuration in which a message is transmitted/received at least via bus-type communication lines.
Apparatus Configuration
[0038]
[0039] The communication line 11 is connected to the communication unit 51 of the gateway 5. Also, the first communication line 11H and the second communication line 11L constituting the communication line 11 are connected via a terminating resistor R1, in the vicinity of the communication unit 51. The communication lines 12 and 13 are connected to the bus switching unit 55 of the gateway 5. The bus switching unit 55 has four switches SW1 to SW4, and selectively connects the communication line 12 to the communication line 11 or the communication unit 52 and connects the communication line 13 to the communication line 11 or the communication unit 53, by switching the switches SW1 to SW4.
[0040] Specifically, the first communication line 12H of the communication line 12 is connected to the switch SW1 of the bus switching unit 55, and is connected to the first communication line 11H of the communication line 11 or the communication unit 52 by the switch SW1 being switched. Similarly, the second communication line 12L of the communication line 12 is connected to the switch SW2 of the bus switching unit 55, and is connected to the second communication line 11L of the communication line 11 or the communication unit 52 by the switch SW2 being switched. The first communication line 13H of the communication line 13 is connected to the switch SW3 of the bus switching unit 55, and is connected to the first communication line 11H of the communication line 11 or the communication unit 53 by the switch SW3 being switched. The second communication line 13L of the communication line 13 is connected to the switch SW4 of the bus switching unit 55, and is connected to the second communication line 11L of the communication line 11 or the communication unit 53 by the switch SW4 being switched.
[0041] The communication unit 52 is connected to the bus switching unit 55 via two communication lines, and these two communication lines are connected via a terminating resistor R2. Similarly, the communication unit 53 is connected to the bus switching unit 55 via two communication lines, and these two communication lines are connected via a terminating resistor R3. The communication units 51 to 53 convert a message that has been supplied from the control unit 50 and is to be transmitted, into a differential signal, and output the differential signal to the communication lines 11 to 13 to transmit the message. In addition, the communication units 51 to 53 receive a message by sampling and acquiring the potential difference between the communication lines 11 to 13, and supply the received message to the control unit 50. Each of the communication units 51 to 53 can be realized by using an IC (integrated circuit) for transmitting/receiving messages based on the CAN communication standard, an IC such as a so-called CAN controller, or the like. The communication units 51 to 53 can switch between a normal operation state where a message is transmitted/received and a power saving state where power consumption is reduced without transmitting/receiving a message, under control of the control unit 50.
[0042] The connection state of the four switches SW1 to SW4 of the bus switching unit 55 is switched according to a switching signal supplied from the control unit 50. In this embodiment, the four switches SW1 to SW4 are switched in conjunction with each other according to one switching signal from the control unit 50, but there is no limitation thereto, and a configuration may also be adopted in which the control unit 50 switches the four switches SW1 to SW4 individually. The bus switching unit 55 can connect the communication lines 12 and 13 to the communication line 11 by switching the switches SW1 to SW4 to the communication line 11 side, and thereby achieve the connected state where the three communication lines 11 to 13 are connected directly. Also, the bus switching unit 55 can connect the communication lines 12 and 13 respectively to the communication units 52 and 53 by switching the switches SW1 to SW4 to the communication unit 52 side and the communication unit 53 side, and thereby achieve the separated state where the three communication lines 11 to 13 are connected individually to the respective communication units 51 to 53.
[0043] The control unit 50 of the gateway 5 performs relay processing of a message between the communication lines 11 to 13, switching control processing of the bus switching unit 55, and the like.
[0044] The storage unit 62 is configured by using a nonvolatile memory element such as a flash memory or an EEPROM (electrically erasable programmable read only memory). The storage unit 62 stores a program that is executed by the processing unit 61, data required for executing this program, and the like. In this embodiment, the storage unit 62 stores the relay program 62a that is executed by the processing unit 61 and a first routing map 62b and a second routing map 62c that are used for message relay processing. Note that, in this embodiment, when the communication lines 11 to 13 are in the connected state, the bus switching unit 55 uses the first routing map 62b, and when the communication lines 11 to 13 are in the separated state, uses the second routing map 62c.
[0045] In addition, in this embodiment, in the processing unit 61, a relay processing unit 61a, a communication state detection unit 61b, a bus switching control unit 61c, a relay rule switching unit 61d, a relay prohibition unit 61e, and the like are realized as software-like functional blocks by executing the relay program 62a. The relay processing unit 61a transmits a message received from one of the communication units 51 to 53, on another one of the communication units 51 to 53, based on the first routing map 62b or the second routing map 62c stored in the storage unit 62, thereby performing processing for relaying the message.
[0046] The communication state detection unit 61b performs processing for detecting the communication state of the communication lines 11 to 13 by measuring the amount of messages (the number of bytes, the number of messages, etc.) received on each of the communication units 51 to 53 during a predetermined time period, for example, 1 second or 1 millisecond. If the communication lines 11 to 13 have been switched to the connected state by the bus switching unit 55, it suffices for the communication state detection unit 61b to measure the amount of received messages regarding the communication unit 51 only, since the communication units 52 and 53 are detached from the communication lines 12 and 13. If the communication lines 11 to 13 have been switched to the separated state by the bus switching unit 55, the communication state detection unit 61b individually measures the message amount for each of the communication units 51 to 53.
[0047] The bus switching control unit 61c performs processing for switching the switches SW1 to SW4 of the bus switching unit 55 by generating a switching signal depending on the communication state detected by the communication state detection unit 61b, and outputting the switching signal to the bus switching unit 55. When the communication lines 11 to 13 have been switched to the connected state by the bus switching unit 55, if the message amount of the communication unit 51 detected by the communication state detection unit 61b exceeds a predetermined amount, the bus switching control unit 61c performs control for switching the switches SW1 to SW4 of the bus switching unit 55 so as to bring the communication lines 11 to 13 into the separated state. Also, when the communication lines 11 to 13 have been switched to the separated state by the bus switching unit 55, if the message amounts of the communication units 51 to 53 detected by the communication state detection unit 61b are smaller than the predetermined amount, the bus switching control unit 61c performs control for switching the switches SW1 to SW4 of the bus switching unit 55 so as to bring the communication lines 11 to 13 into the connected state.
[0048] In addition, when switching the communication lines 11 to 13 from the separated state to the connected state, the bus switching control unit 61c performs control for shifting the communication units 52 and 53 to the power saving state such as a sleep state or a standby state. Accordingly, the communication units 52 and 53 stop processing for transmitting/receiving messages via the communication lines 12 and 13. On the contrary, when the communication lines 11 to 13 are switched from the connected state to the separated state, the bus switching control unit 61c performs control for shifting the communication units 52 and 53 from the power saving state to a normal operation state, in other words a state for performing message transmission/receiving processing.
[0049] The relay rule switching unit 61d performs processing for switching the routing map that is used by the relay processing unit 61a for performing relay processing, according to a switch made by the bus switching control unit 61c. When the bus switching control unit 61c switches the communication lines 11 to 13 to the connected state, the relay rule switching unit 61d sets the first routing map 62b stored in the storage unit 62 as a routing map used for relay processing. Also, when the bus switching control unit 61c switches the communication lines 11 to 13 to the separated state, the relay rule switching unit 61d sets the second routing map 62c stored in the storage unit 62, as a routing map used for relay processing.
[0050] When the bus switching control unit 61c has switched the communication lines 11 to 13 to the separated state, the relay prohibition unit 61e performs processing for prohibiting the relay processing unit 61a from relaying a message, based on the amount of messages detected by the communication state detection unit 61b during the predetermined time period. The relay prohibition unit 61e prohibits messages received by any communication unit for which the amount of messages during the predetermined time period detected by the communication state detection unit 61b has exceeded the threshold value from being relayed to another one of the communication units 51 to 53.
[0051] Note that the predetermined amount that is compared with a message amount for the bus switching control unit 61c to perform switching determination and the threshold value that is compared with a message amount for the relay prohibition unit 61e to perform prohibition determination may be the same or different values. In this embodiment, the predetermined amount and threshold value are different values, and the threshold value is larger than the predetermined amount. In addition, the predetermined amount that is compared with a message amount for the bus switching control unit 61c to perform a determination on switching from the connected state to the separated state and the predetermined amount that is compared with a message amount in order to make a determination on switching from the separated state to the connected state may be the same or different values. In this embodiment, these two predetermined amounts are set to be the same value. In addition, the predetermined amount that is compared with a message amount in order to make a determination on switching from the separated state to the connected state may also be different for each of the communication units 51 to 53.
Switching Between Connected State and Separated State
[0052] The gateway 5 according to this embodiment measures the message amount on the communication lines 11 to 13 during the predetermined time period, and if the message amount is smaller than the predetermined amount, brings the communication lines 11 to 13 into the connected state by switching the switches SW1 to SW4 of the bus switching unit 55. In other words, when the communication lines 11 to 13 have been switched to the separated state, and the message amount of each of the communication lines 11 to 13 is smaller than the predetermined amount, the gateway 5 switches the communication lines 11 to 13 from the separated state to the connected state. In this connected state, the three communication lines 11 to 13 are electrically connected, and can be regarded as one communication line. Therefore, all of the ECUs 2 connected to the communication lines 11 to 13 enter a state of being connected to a common communication line, and can directly transmit/receive messages via the common communication line.
[0053] In addition, in the connected state, the gateway 5 shifts the communication units 52 and 53 to the power saving state to stop message transmission/receiving processing. In this state, the gateway 5 is not required to perform message relay processing, but the communication unit 51 is required to be operated in order to measure the amount of messages transmitted/received on the common communication line (the communication lines 11 to 13 in the connected state).
[0054] If the amount of messages transmitted/received on the common communication line during the predetermined time period exceeds the predetermined amount while the communication lines 11 to 13 are in the connected state, the gateway 5 brings the communication lines 11 to 13 into the separated state by switching the switches SW1 to SW4 of the bus switching unit 55. In addition, the gateway 5 shifts the communication units 52 and 53 from the power saving state to the normal operation state, to cause the communication units 52 and 53 to start message transmission/receiving operations. The gateway 5 performs processing for relaying a message received from one of the communication units 51 to 53, by transmitting the message on another one of the communication units 51 to 53.
[0055] In addition, the gateway 5 according to this embodiment relays messages based on a routing map. When control for switching the communication lines 11 to 13 to the connected state or the separated state is performed by switching the switches SW1 to SW4 of the bus switching unit 55 as described above, the configuration of the network constituted by the communication lines 11 to 13 changes. Therefore, the gateway 5 has two routing maps, namely the first routing map 62b and the second routing map 62c stored in the storage unit 62, and switches a routing map used for message relay processing according to switching of the bus switching unit 55.
[0056]
[0057] In this example, a message to which 0x012 (hexadecimal) is assigned as the CAN-ID is a message that needs to be transmitted by the ECU 2A connected to the communication line 11, and received by the ECU 2B connected to communication line 11. A message to which 0x013 is assigned as the CAN-ID is a message that needs to be transmitted by the ECU 2A connected to the communication line 11, and received by the ECU 2C connected to the communication line 12. A message to which 0x015 is assigned as the CAN-ID is a message that needs to be transmitted by the ECU 2A connected to the communication line 11, and received by the ECU 2E connected to the communication line 13.
[0058] When the communication lines 11 to 13 are in the connected state, the gateway 5 performs relay processing using the first routing map 62b illustrated in
[0059] When the communication lines 11 to 13 are in the separated state, the gateway 5 performs relay processing using the second routing map 62c illustrated in
[0060] By the gateway 5 switching a routing map used for message relay processing according to a switch between the connected state and the separated state of the communication lines 11 to 13 made by the bus switching unit 55 in this manner, message relay processing can be appropriately performed for a change in the network configuration constituted by the communication lines 11 to 13. Note that, in this example, a configuration is adopted in which, when the communication lines 11 to 13 are in the connected state, a message does not need to be relayed, but there is no limitation thereto, and, for example, a configuration may also be adopted in which only the communication lines 11 and 12 are connected in the connected state, and the communication line 13 is not connected, and, in such a case, in the first routing map 62b, appropriate values are set in order to relay a message between an ECU 2 connected to the communication line 11 or 12 and an ECU 2 connected to the communication line 13.
Flowchart
[0061]
[0062] When the message amount during the predetermined time period exceeds the predetermined amount (step S2: YES), the bus switching control unit 61c switches the switches SW1 to SW4 by outputting a switching signal to the bus switching unit 55, so as to switch the communication lines 11 to 13 to the separated state (step S3). In addition, the relay rule switching unit 61d of the processing unit 61 switches the routing map used for relay processing from the first routing map 62b to the second routing map 62c (step S4). Moreover, the processing unit 61 shifts the communication units 52 and 53 connected to the communication lines 12 and 13 from the power saving state to the normal operation state by switching the bus switching unit 55 (step S5), and ends the procedure in the connected state.
[0063]
[0064] If the message amount is smaller than the predetermined amount in all of the communication units 51 to 53 (step S22: YES), the bus switching control unit 61c switches the switches SW1 to SW4 by outputting a switching signal to the bus switching unit 55, so as to switch the communication lines 11 to 13 to the connected state (step S25). In addition, the relay rule switching unit 61d of the processing unit 61 switches the routing map used for relay processing from the second routing map 62c to the first routing map 62b (step S26). In addition, the processing unit 61 shifts the communication units 52 and 53 detached from the communication lines 12 and 13 by the bus switching unit 55 being switched, from the normal operation state to the power saving state (step S27), and ends the procedure in the separated state.
Overview
[0065] The communication system according to this embodiment that has the above-described configuration switches the three communication lines 11 to 13 connected to the gateway 5 to the connected state where the three communication lines are directly connected or the separated state where the three communication lines are separated apart, using the switches SW1 to SW4 of the bus switching unit 55. On the directly connected communication lines 11 to 13, each of the ECUs 2 connected to the communication lines 11 to 13 can directly transmit/receive a message to/from another ECU 2 without the gateway 5 relaying the message. Therefore, if a switch is made to the connected state by the bus switching unit 55, the communication units 52 and 53 that transmit/receive a message to/from the communication lines 11 to 13 do not need to operate, and it is possible to shift the communication system to a power saving state and reduce the power consumption. In addition, if the message amount increases on the communication lines 11 to 13 that have been switched to the connected state, the communication load can be distributed and reduced by the communication lines 11 to 13 being switched to the separated state by the bus switching unit 55.
[0066] Such connection and separation of the communication lines 11 to 13 change the network configuration in the communication system. Therefore, the gateway 5 switches the message relay rule according to the network configuration, in other words the switching state of the bus switching unit 55. Specifically, the gateway 5 has a plurality of routing maps in which messages and relay destinations of the messages are associated, and that are stored in the storage unit 62, and selects and uses the first routing map 62b or the second routing map 62c stored in the storage unit 62 according to the switching state of the bus switching unit 55, so as to perform message relay.
[0067] In addition, the gateway 5 detects the communication state of the communication lines 11 to 13, for example, a message amount during a predetermined time period, and switches the switches SW1 to SW4 of the bus switching unit 55 depending on the detected communication state. At this time, the gateway 5 detects a common communication state regarding the communication lines 11 to 13 in a connected state, and individually detects communication states regarding the communication lines 11 to 13 in a separated state. For example, the gateway 5 switches the bus switching unit 55 to bring the communication lines 11 to 13 into the connected state if the message amount is smaller than a predetermined amount, and bring the communication lines 11 to 13 into the separated state if the message amount exceeds the predetermined amount. If the message amount is small, the power consumption of a communication IC and the like that constitute the communication units 52 and 53 is reduced by switching the communication lines 11 to 13 to the connected state, and if the message amount is large, the communication load can be distributed and reduced by switching the communication lines 11 to 13 to the separated state.
[0068] In addition, after switching the switches SW1 to SW4 of the bus switching unit 55 to the separated state due to the message amount exceeding the predetermined amount, the gateway 5 detects a message amount of each of the separated communication lines 11 to 13. If there is a communication line on which the detected message amount exceeds a threshold value (a second predetermined amount) from among the communication lines 11 to 13, the gateway 5 prohibits relay of a message received from this communication line, to another one of the communication lines 11 to 13. Accordingly, if an unauthorized communication apparatus connected to one of the communication lines 11 to 13 delivers an attack of transmitting a large amount of messages, it is possible to reduce the influence on the entire system by removing this communication line from the communication system.
[0069] Note that, in this embodiment, a configuration is adopted in which the gateway 5 uses the switches SW1 to SW4 of the bus switching unit 55 to switch between a state where the three communication lines 11 to 13 are all connected and a state where the three communication lines 11 to 13 are all separated, but there is no limitation thereto. For example, a configuration may also be adopted in which the gateway 5 is capable of switching the switches SW1 and SW2 of the bus switching unit 55 independently, and switching the switches SW3 and SW4 independently, and a switch can be made to a state where the communication lines 11 and 12 are connected and the communication line 13 is separated, a state where the communication lines 11 and 13 are connected and the communication line 12 is separated, or the like. In addition, in this case, the gateway 5 has routing maps that are based on respective switching states, and are stored in the storage unit 62.
[0070] In addition, a configuration is adopted in which the three communication lines 11 to 13 are connected to the gateway 5, but there is no limitation thereto, and a configuration may also be adopted in which two communication lines or four or more communication lines are connected. In addition, the configurations, the set values and the like of the routing maps shown in
[0071] In addition, a configuration is adopted in which the gateway 5 switches the switches SW1 to SW4 of the bus switching unit 55 according to the message amount on the communication lines 11 to 13 during the predetermined time period, but there is no limitation thereto, and a configuration may also be adopted in which a switch is made under another condition. For example, a configuration can be adopted in which the gateway 5 switches the switches SW1 to SW4 of the bus switching unit 55 according to the on/off state of an IG (ignition) switch of the vehicle 1. In this configuration, for example, when the IG switch is off, the gateway 5 brings the communication lines 11 to 13 into the connected state, and when the IG switch is on, brings the communication lines 11 to 13 into the separated state. Accordingly, when the IG switch is switched off, and the engine of the vehicle 1 is stopped, the gateway 5 can switch the communication lines 11 to 13 to the connected state, shift the communication units 52 and 53 to the power saving state, and reduce the consumption of power stored in a battery of the vehicle 1. In addition, when it is highly likely that the message amount will increase since the IG switch has been switched on and ECUs 2 mounted in the vehicle 1 are operated, the gateway 5 can distribute the communication load by switching the communication lines 11 to 13 to the separated state.
[0072] Note that
Modified Example
[0073]
[0074] The gateway 105 according to the modified example includes a control unit 150, six communication units 151 to 156, and two bus switching units 157 and 158. The configuration of the gateway 105 according to the modified example is equivalent to a configuration consisting of two switching control configurations that are the same as the configuration of switching control that is performed by the communication units 51 to 53 and the bus switching unit 55 of the gateway 5 illustrated in
[0075] The control unit 150 of the gateway 105 according to the modified example causes the communication units 151 to 153 to detect the message amounts on the communication lines 111 to 113, and performs control for switching the communication lines 111 to 113 to the connected state or the separated state by switching the switches of the bus switching unit 157 according to this detection result. Also, the control unit 150 causes the communication units 154 to 156 to detect the message amounts on the communication lines 114 to 116, and performs control for switching the communication lines 114 to 116 to the connected state or the separated state by switching the switches of the bus switching unit 158 according to this detection result.
[0076] Note that the control unit 150 can independently control switching between the connected state and the separated state of the communication lines 111 to 113 and switching between the connected state and the separated state of the communication lines 114 to 116. However, in message relay processing that is performed by the control unit 150, a message received from one of the six communication lines 111 to 116 can be relayed to any of the six communication lines 111 to 116. Therefore, the control unit 150 of the gateway 105 according to the modified example has four routing maps stored in the storage unit according to combinations of the connected state or the separated state of the communication lines 111 to 113 and the connected state or the separated state of the communication lines 114 to 116.
[0077]
[0078]
[0079]
[0080]
[0081]
[0082] The above-described gateway 105 according to the modified example is configured to switch between the connected state and the separated state of the six communication lines 111 to 116 divided into two groups each including three communication lines. The number of communication lines, the number of groups of communication lines, and the like, for which the gateway switches between the connected state and the separated state, are not limited to those described in this modified example, and various configurations can be adopted.