# A Design of a Lightweight In-Vehicle Edge Gateway for the Self-Diagnosis of an Autonomous Vehicle
## 2 Related Works
### A Design of an InV-Management Layer (InV-ML)  
The InV-ML has two functions. First, the InV-ML receives messages from the InV-SRL and extracts only the necessary data, such as source, destination address, etc., from the received messages to makes the received messages lightweight. Only the extracted data are stored in an Address Mapping Table. It must rapidly be mapped to actual data in the Input Message Queue. Figure 3: The block diagram of the hardware devices. Figure 2: The structure of the LI-VEG. Second, if the extracted data are stored in the Address Mapping Table for mapping, the message is stored in the Input Message Queue according to the priority of a message. The Input Message Queue consists of a Priority Multi-Queue and an Event Queue. There are two types of data transferred from sensors: the real time sensing messages processed in the Priority Multi-Queue and the event sensing messages processed in the Event Queue. The event sensing messages is transmitted more rapidly than the real time sensing messages. The Priority Multi-Queue is used to decide a priority between protocols and between inner messages of a protocol. The priority of protocol prevents the collision between protocols. The priority of messages provides emergent messages with higher priority and general messages with higher priority in proportion to the time when a message stays in the Input Message Queue. The Event Queue is used to process Event sensing messages and the messages of the Event Queue have higher priority than those of the Protocol Priority Multi-Queue. The Output messages of InV-ML are processed in the Output Message Queue. The Output Message Queue is similar to an Input Message Queue in terms of function. Figure 4 shows that the LI-VEG stores the received messages in an Input Message Queue and only the necessary data from the message in an Address Mapping Table. Figure 5 shows the process that a message which must be translated in the LI-VEG is made lightweight and is stored in the Input Message Queue. The operational process is as follows. 1. The LI-VEG receives the messages from the ECUs, Actuators, and media of a vehicle and stores them in the Input Message Queue. 2. The LI-VEG extracts only the data necessary for message translation such as source and destination address, and ID from a header for being lightweight. Because there is a cycle field describing a data transmission cycle in the case of FlexRay, the Cycle field must be extracted. 3. Lightweight data are stored in an Address Mapping Table for the rapid message translation. 4. The message in the Input Message Queue is translated in InV-TL and the extracted header information of the Address Mapping Table helps to translate it rapidly. The translated message is stored in the Output Message Queue. 5. The message in the Output Message Queue is transmitted to a destination protocol bus. Figure 4: The flowchart to process the received message. The Field Name of Table 1 consists of Cycle, ID, Priority, Source Protocol, Source Bus Number, Source Address, Destination Protocol, Destination Bus Number, and Destination Address. The header information of a FlexRay message is extracted and each value of the extracted header information is stored in the Ex1 column of Table 1.  
The Cycle field value in the header information of a FlexRay message is stored in the Cycle field in the EX1 of Table 1 and the ID value in the header information of a FlexRay message is stored in the ID field in the EX1 of Table 1. The ID field value in the header information of a CAN message is stored in the ID field in the EX2 of Table 1. Because the header information of the CAN message has no a Cycle field, it remains blank. Priority field value is stored in the Priority field in the EX1 of Table 1. Because the FlexRay uses a timer, not priority, the priority field value is not needed. In the case InV-ML receives a FlexRay message, 0 value is stored in the Priority field.