# A Design of a Lightweight In-Vehicle Edge Gateway for the Self-Diagnosis of an Autonomous Vehicle
## 2 Related Works
### A Design of the InV-DTL  
The InV-DTL translates the messages received from the Input Message Queue by using the Translation Table and transfers the translated messages to the Output Message Queue of the InV-ML. The InV-DTL works as follows. 1. The InV-DTL receives the original message of the Input Message Queue and the header information of the Address Mapping Table and generates the values of the Translation Table field by using the header information. Figure 6: Message Delivery Scenario. 2. The InV-DTL decomposes the header and trailer from the message. 3. The InV-DTL translates the decomposed messages based on the Translation Table. 4. The InV-DTL gives them sequential numbers from the Translation Table if the translated messages are divided. 5. The translated messages are transferred to the Output Massage Queue of InV-ML. 6. Every protocol is different in the attributes of the Translation Table fields. The Translation Tables such as \"FlexRay to CAN\" Table, \"CAN to FlexRay\" Table, \"MOST to CAN\" Table, and \"Ethernet to MOST\" Table are generated and the Translation Table field values are generated again whenever messages are translated. Figure 7 shows the \"MOST to CAN\" Translation Table translating MOST messages into CAN messages. The \"MOST to CAN\" Translation Table consists of the number of divided messages, Current Message Number, Source Address, Source Protocol Bus Number, Destination Address, Destination Protocol Bus Number, the CAN priority, and the CAN IDs. The CAN ID is used to enter the CAN Bus by Event. Tel ID and Tel Len field are translated into Service type ID of the CAN message by the CAN ID value of the Translation Table. The message numbers are given to every divided message sequentially. Destination Address of the MOST message is translated the Destination node ID of the CAN message by Destination Address and Destination Protocol Bus Number in the Translation Table. The Source Address of the MOST is translated to the Source node ID of the CAN message by Source Address and Source Protocol Bus Number in the Translation Table. The Request not response field value of the CAN message is always fixed as 1, and the Service not message field of the CAN message is always fixed as 0. The CAN Priority field value of the Translation Table is generated by using the Address Mapping Table. It is used to map the Priority field value of CAN message. The fields such as Flbock, Inst, Fkt ID and OP Type are functional blocks of the MOST message. They are not used in the CAN. The Synchronous data and the Asynchronous data are translated to the Data field value of the CAN message. Figure 8 shows the \"CAN to FlexRay\" Translation Table translating CAN messages into FlexRay messages. Because the FlexRay is a protocol based on Timing, a Cycle field is used and a Priority and an ID field are not used when messages are translated. The translated messages enter a destination FlexRay Bus by using a Cycle value. Service type ID of the CAN message is translated into Frame ID of FlexRay message by FlexRay ID of the Translation Table. Message Cycle of the Translation Table is  
Figure 7: The Translation of MOST into CAN message by the Translation Table. generated based on the Address Mapping Table, and is used to decide Cycle count of FlexRay message. Because the State bit, the Payload Length, the Header CRC and the CRC are not included in the CAN message, they are generated by InV-DTL. Figure 9 shows the \"MOST to Ethernet\" Translation Table translating the MOST messages into the Ethernet messages. Because the Ethernet is used as a Backbone with high capacity, an attribute on Bus number is not generated in the Translation Table. Therefore, the Translation speed is the highest when the MOST messages are translated into the Ethernet messages. Destination Address value of the MOST message is translated Destination Address value of the Ethernet message by the Translation Table. Source Address of the MOST message is translated Source Address of the Ethernet message by the Translation Table.