瀏覽代碼

[New feature][AW-CCS][Module_CCS]

2020.09.09 / Folus Wen

Actions:
1. Add Module_CCS task to Apps/.

Files:
1. As follow commit history

Image version: D0.32.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 年之前
父節點
當前提交
8fedc515cd
共有 63 個文件被更改,包括 179047 次插入4 次删除
  1. 16201 0
      EVSE/Projects/AW-CCS/Apps/CCS/Module_CCS.c
  2. 243 0
      EVSE/Projects/AW-CCS/Apps/CCS/Module_CCS.h
  3. 303 0
      EVSE/Projects/AW-CCS/Apps/CCS/NidNmk.c
  4. 94 0
      EVSE/Projects/AW-CCS/Apps/CCS/NidNmk.h
  5. 63 0
      EVSE/Projects/AW-CCS/Apps/CCS/SystemLogMessage.c
  6. 49 0
      EVSE/Projects/AW-CCS/Apps/CCS/SystemLogMessage.h
  7. 2488 0
      EVSE/Projects/AW-CCS/Apps/CCS/define_ccs.h
  8. 5010 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/api/api.c
  9. 180 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/api/api.h
  10. 64 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypes.c
  11. 134 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypes.h
  12. 896 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesDecoder.c
  13. 57 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesDecoder.h
  14. 671 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesEncoder.c
  15. 58 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesEncoder.h
  16. 105 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitInputStream.c
  17. 67 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitInputStream.h
  18. 124 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitOutputStream.c
  19. 85 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitOutputStream.h
  20. 88 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/ByteStream.c
  21. 75 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/ByteStream.h
  22. 930 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/DecoderChannel.c
  23. 441 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/DecoderChannel.h
  24. 106 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIConfig.h
  25. 66 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderDecoder.c
  26. 60 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderDecoder.h
  27. 50 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderEncoder.c
  28. 61 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderEncoder.h
  29. 93 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIOptions.h
  30. 591 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXITypes.h
  31. 704 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EncoderChannel.c
  32. 423 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EncoderChannel.h
  33. 120 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/ErrorCodes.h
  34. 117 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/MethodsBag.c
  35. 70 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/MethodsBag.h
  36. 969 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypes.c
  37. 2934 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypes.h
  38. 345 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesDecoder.c
  39. 65 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesDecoder.h
  40. 281 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesEncoder.c
  41. 68 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesEncoder.h
  42. 992 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypes.c
  43. 2992 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypes.h
  44. 9847 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesDecoder.c
  45. 65 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesDecoder.h
  46. 7011 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesEncoder.c
  47. 68 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesEncoder.h
  48. 1496 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypes.c
  49. 4189 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypes.h
  50. 63551 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesDecoder.c
  51. 65 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesDecoder.h
  52. 44215 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesEncoder.c
  53. 68 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesEncoder.h
  54. 92 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/transport/v2gtp.c
  55. 55 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/transport/v2gtp.h
  56. 255 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypes.c
  57. 935 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypes.h
  58. 4331 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesDecoder.c
  59. 65 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesDecoder.h
  60. 3100 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesEncoder.c
  61. 66 0
      EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesEncoder.h
  62. 38 3
      EVSE/Projects/AW-CCS/Apps/Makefile
  63. 2 1
      EVSE/Projects/AW-CCS/Apps/main.c

+ 16201 - 0
EVSE/Projects/AW-CCS/Apps/CCS/Module_CCS.c

@@ -0,0 +1,16201 @@
+/*
+ * Module_CCS.c
+ *
+ *  Created on: 2020/-3/16
+ *      Author: foluswen
+ */
+#include "Module_CCS.h"
+#include "define_ccs.h"
+#include "main.h"
+
+
+struct SysConfigAndInfo *ShmSysConfigAndInfo;
+struct StatusCodeData *ShmStatusCodeData;
+struct CcsData *ShmCcsData;
+struct InternalComm *ShmInternalComm;
+struct Charger *ShmCharger;
+
+struct appHandEXIDocument ccs_handshake;
+struct dinEXIDocument ccs_exi_doc_DIN;
+struct iso1EXIDocument ccs_exi_doc_ISO1;
+struct iso2EXIDocument ccs_exi_doc_ISO2;
+unsigned char V2GTP_Tx_buf[V2GTP_MSG_TX_BUFFER_SIZE];   //64*1024 = 65,536 = 65.5KB
+unsigned char buf_log_evcomm[SIZE_OF_LOG_BUFFER];
+unsigned char buf_log_evcomm_fork1[SIZE_OF_LOG_BUFFER];
+unsigned char buf_log_evcomm_fork2[SIZE_OF_LOG_BUFFER];
+unsigned char buf_log_evcomm_fork3[SIZE_OF_LOG_BUFFER];
+
+pid_t CP_Detection_Pid = 0;
+pid_t PP_Detection_Pid = 0;
+pid_t Error_Monitor_Pid = 0;
+int TcpAcceptFd;
+enum MsgFlowStatus V2gFlowStatus;
+int RawSock,UdpSock,TcpSock;
+unsigned char *V2gtpMsgRxBuf, *V2gtpMsgTxBuf;
+
+unsigned short Aag[64];
+struct MmeHeader SendMmePacket;
+int SendMmePacketSize;
+unsigned char CsuMac[6],QcaMac[6],EvMac[6],SlacRunId[8];
+struct sockaddr_ll DestSocketAddress;
+struct ifreq Req;
+unsigned int PwmStartTime;
+struct timeb SeqStartTime, SeqEndTime;
+unsigned char AagGroupsNum, MnbcSoundNum, AttenProfileCnt;
+unsigned char NewNmkKey[16], Nid[7];
+
+/*===========================================================================
+FUNCTION: Check_V2G_Flow_Status
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+unsigned char Check_V2G_Flow_Status()
+{
+    unsigned char result = 0;
+
+    switch (ShmCcsData->CommProtocol)
+    {
+        case V2GT_MSG_PROTOCOL_DIN70121:        //0
+        {
+            result = ShmCcsData->V2GMessage_DIN70121.PresentMsgFlowStatus;
+            break;
+        }
+
+        case V2GT_MSG_PROTOCOL_ISO15118_2014:   //1
+        {
+            result = ShmCcsData->V2GMessage_ISO15118_2014.PresentMsgFlowStatus;
+            break;
+        }
+
+        case V2GT_MSG_PROTOCOL_ISO15118_2018:   //2
+        {
+            result = ShmCcsData->V2GMessage_ISO15118_2018.PresentMsgFlowStatus;
+            break;
+        }
+
+        default:
+            break;
+    }
+    return result;
+}
+
+
+/*===========================================================================
+FUNCTION: CAN_Tx_MSG
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int CAN_Tx_MSG(int Fd, unsigned int MsgId, unsigned char SlaveAddress, unsigned char DataLength, unsigned char *SendData)
+{
+#if 0
+    struct can_frame frame;
+    struct timeb StartTime, EndTime;
+    unsigned int tmp = 0;
+    int nbytes = 0;
+    int i = 0;
+
+    //Protection: To avoid unexpected length for CAN bus payload.
+    if (DataLength > 8)
+    {
+        DataLength = 8;
+    }
+
+    memset(&frame, 0, sizeof(struct can_frame));
+    frame.can_id = 0x80000000 | CAN_SEND_DIRECTION | MsgId | SlaveAddress;  //0x80000000: extension ID format
+    frame.can_dlc = DataLength;
+    memcpy(frame.data, SendData, DataLength);
+    nbytes = write(Fd, &frame, sizeof(struct can_frame));
+
+    #if 0
+    DEBUG_PRINTF_EVCOMM_DETAIL("[SeccComm][CAN_Tx_MSG] <%X> ", frame.can_id);
+    for (i = 0; i < frame.can_dlc; i++)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("%02X ", frame.data[i]);
+    }
+    DEBUG_PRINTF_EVCOMM_DETAIL("(%d Bytes)\n", frame.can_dlc);
+    #endif
+
+    return nbytes;
+#else
+    return -1;
+#endif
+}
+
+/*===========================================================================
+FUNCTION: Proc_EVStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_EVStopRes(int Fd)
+{
+    int nbytes;
+    unsigned char Buffer[8];
+
+    memset(Buffer, 0, sizeof(Buffer));
+    if (CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency == TRUE)
+    {
+        Buffer[0] = EV_EMERGENCY_STOP;  //2
+    }
+    else
+    {
+        Buffer[0] = EV_NORMAL_STOP;     //1
+    }
+
+    /*
+    if(strlen(ShmStatusCodeData->PresentStatusCode[0]) > 0)
+    {
+        memcpy(Buffer + 2, ShmStatusCodeData->PresentStatusCode[0], 6);
+    }
+    */
+    Buffer[1] = ShmStatusCodeData->PresentStatusCode[0][0];
+    Buffer[2] = ShmStatusCodeData->PresentStatusCode[0][1];
+    Buffer[3] = ShmStatusCodeData->PresentStatusCode[0][2];
+    Buffer[4] = ShmStatusCodeData->PresentStatusCode[0][3];
+    Buffer[5] = ShmStatusCodeData->PresentStatusCode[0][4];
+    Buffer[6] = ShmStatusCodeData->PresentStatusCode[0][5];
+
+
+    nbytes = CAN_Tx_MSG(Fd, CAN_CMD_EV_STOP_EVENT, ShmInternalComm->SlaveAddress, 7, Buffer);
+    //system("echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle"); //for test only
+
+    //system("echo 0 > /sys/class/gpio/gpio89/value");    //for test
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_EVStopRes] Sending STOP Command to CSU");
+
+    CSUCOMMDC_TASK_FLAG.Send_EVStopReq = FALSE;
+
+    return nbytes;
+}
+
+/*===========================================================================
+FUNCTION: Sniffer_Candump
+DESCRIPTION:
+    1. Only used in End_Process(), which is in fork2 of SeccComm task.
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+    0: accept
+   -1: invalid
+GLOBAL VARIABLES:
+=============================================================================*/
+int Sniffer_Candump(char cmd)
+{
+#if (CANDUMP_PACKETS_SNIFFER_SWITCH == ENABLE)
+    if (cmd == ENABLE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[candump]init");
+        system("cd /mnt/;rm -rf candump/");
+        system("cd /mnt/;mkdir candump");
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[candump]on");
+        system("cd /mnt/candump;candump -l can0 &");
+        return 0;
+    }
+    else if (cmd == DISABLE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[candump]off");
+        system("killall candump");
+
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[candump]save");
+        system("cd /;cp -rfv /mnt/candump /Storage/SystemLog/");
+        return 0;
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm_fork2, "[candump]unexpected cmd(%d)", cmd);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+        return -1;
+    }
+#endif
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: Sniffer_Tcpdump
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Sniffer_Tcpdump(char cmd)
+{
+    #if (TCPDUMP_PACKETS_SNIFFER_SWITCH == ENABLE)
+    if (cmd == ENABLE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[tcpdump]init...");
+        system("cd /mnt/;rm -rf tcpdump/");
+        system("cd /mnt/;mkdir tcpdump");
+
+        unsigned char buf[256];
+        time_t CurrentTime;
+        struct tm *tm;
+        struct timeval tv;
+
+        memset(buf, 0, sizeof(buf));
+        CurrentTime = time(NULL);
+        tm = localtime(&CurrentTime);
+        gettimeofday(&tv, NULL); // get microseconds, 10^-6
+        sprintf((char*)buf,
+                "tcpdump -i eth1 -w /mnt/tcpdump/[%s][%04d%02d%02d-%02d:%02d:%02d.%06d]packets.pcap&",
+                FIRMWARE_VERSION,
+                tm->tm_year + 1900,
+                tm->tm_mon + 1,
+                tm->tm_mday,
+                tm->tm_hour,
+                tm->tm_min,
+                tm->tm_sec,
+                tv.tv_usec
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[tcpdump]on");
+        system(buf);
+        return 0;
+    }
+    else if (cmd == DISABLE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[tcpdump]off");
+        system("killall tcpdump");
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[tcpdump]wait: 2s");
+        sleep(1);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[tcpdump]wait: 1s");
+        sleep(1);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[tcpdump]save");
+        system("cd /;cp -rfv /mnt/tcpdump /Storage/SystemLog/");
+        return 0;
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm, "[tcpdump]unexpected cmd(%d)", cmd);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        return -1;
+    }
+    #endif
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: Check_V2G_Flow_Status_pre
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+unsigned char Check_V2G_Flow_Status_pre()
+{
+    unsigned char result = 0;
+
+    switch (ShmCcsData->CommProtocol)
+    {
+        case V2GT_MSG_PROTOCOL_DIN70121:        //0
+        {
+            result = ShmCcsData->V2GMessage_DIN70121.PresentMsgFlowStatus_pre;
+            break;
+        }
+
+        case V2GT_MSG_PROTOCOL_ISO15118_2014:   //1
+        {
+            result = ShmCcsData->V2GMessage_ISO15118_2014.PresentMsgFlowStatus_pre;
+            break;
+        }
+
+        case V2GT_MSG_PROTOCOL_ISO15118_2018:   //2
+        {
+            result = ShmCcsData->V2GMessage_ISO15118_2018.PresentMsgFlowStatus_pre;
+            break;
+        }
+
+        default:
+            break;
+    }
+    return result;
+}
+
+
+/*===========================================================================
+FUNCTION: Update_V2G_Flow_Status
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+        1. V2gFlowStatus
+
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int Update_V2G_Flow_Status(unsigned int state_new)
+{
+    unsigned char state_now;
+    state_now = Check_V2G_Flow_Status();
+
+    if (EVCOMM_SYS_INFO.End_Process_inused == TRUE ||
+        CSUCOMMDC_TASK_FLAG.FW_Update_Task_inused == TRUE)
+    {
+        if (state_now != Performance_Timeout &&     //253
+            state_now != Sequence_Timeout &&        //254
+            state_now != Other_Fault)               //255
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[Warning]state(%d) change: ignored (End_Process_inused:%d, FW_Update_Task_inused:%d)",
+                    state_new,
+                    EVCOMM_SYS_INFO.End_Process_inused,
+                    CSUCOMMDC_TASK_FLAG.FW_Update_Task_inused
+                    );
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            return -1;
+        }
+    }
+    if (state_now != state_new)
+    {
+        //Step 1: Check if Error Occours
+        if (state_now == Performance_Timeout ||     //253
+            state_now == Sequence_Timeout ||        //254
+            state_now == Other_Fault)               //255
+        {
+            if (state_new != IDLE)
+            {
+                if (EVCOMM_SYS_INFO.State_Change_Ignored_Notice == FALSE)
+                {
+                    EVCOMM_SYS_INFO.State_Change_Ignored_Notice = TRUE;
+                    sprintf((char*)buf_log_evcomm,
+                            "[Warning]state(%d) change: ignored(now in error state(%d))",
+                            state_new,
+                            state_now);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                }
+                return -1;
+            }
+        }
+
+        //Updating the state formally.
+        sprintf((char*)buf_log_evcomm,
+                "%02d >> %02d",
+                state_now,
+                state_new
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        V2gFlowStatus = state_new;
+        state_now = state_new;
+
+        switch (ShmCcsData->CommProtocol)
+        {
+            case V2GT_MSG_PROTOCOL_DIN70121:        //0
+            {
+                ShmCcsData->V2GMessage_DIN70121.PresentMsgFlowStatus_pre = ShmCcsData->V2GMessage_DIN70121.PresentMsgFlowStatus;
+                ShmCcsData->V2GMessage_DIN70121.PresentMsgFlowStatus = V2gFlowStatus;
+                break;
+            }
+
+            case V2GT_MSG_PROTOCOL_ISO15118_2014:   //1
+            {
+                ShmCcsData->V2GMessage_ISO15118_2014.PresentMsgFlowStatus_pre = ShmCcsData->V2GMessage_ISO15118_2014.PresentMsgFlowStatus;
+                ShmCcsData->V2GMessage_ISO15118_2014.PresentMsgFlowStatus = V2gFlowStatus;
+                break;
+            }
+
+            case V2GT_MSG_PROTOCOL_ISO15118_2018:   //2
+            {
+                ShmCcsData->V2GMessage_ISO15118_2018.PresentMsgFlowStatus_pre = ShmCcsData->V2GMessage_ISO15118_2018.PresentMsgFlowStatus;
+                ShmCcsData->V2GMessage_ISO15118_2018.PresentMsgFlowStatus = V2gFlowStatus;
+                break;
+            }
+
+            default:
+                break;
+        }
+    }
+
+    return 0;
+}
+
+double DiffTimeb(struct timeb ST, struct timeb ET)
+{
+    //return milli-second
+    double StartTime, EndTime;
+    double t_diff;
+
+    StartTime = ((double)ST.time)*1000 + (double)ST.millitm;
+    EndTime = ((double)ET.time)*1000 + (double)ET.millitm;
+    t_diff = EndTime - StartTime;
+
+    if (t_diff < 0)
+    {
+        #if 0
+        if (t_diff < -1000)   //1000ms
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[Warning]StartTime(%.02lf) > EndTime(%.02lf), d(%.02lf)",
+                    StartTime,
+                    EndTime,
+                    t_diff);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        }
+        #endif
+
+        return -1;
+    }
+    return t_diff;
+}
+
+double DiffTimeb_fork1_Error_Monitor(struct timeb ST, struct timeb ET)
+{
+    //return milli-second
+    static double StartTime, EndTime;
+    static double t_diff;
+
+    StartTime = ((double)ST.time)*1000 + (double)ST.millitm;
+    EndTime = ((double)ET.time)*1000 + (double)ET.millitm;
+    t_diff = EndTime - StartTime;
+
+    if (t_diff < 0)
+    {
+        #if 0
+        if (t_diff < -1000)   //1000ms
+        {
+            sprintf((char*)buf_log_evcomm_fork2,
+                    "[fork1][Warning]S(%.02lf) > E(%.02lf), d(%.02lf)",
+                    StartTime,
+                    EndTime,
+                    t_diff);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+        }
+        #endif
+
+        return -1;
+    }
+    return t_diff;
+}
+
+double DiffTimeb_fork2_Error_Monitor(struct timeb ST, struct timeb ET)
+{
+    //return milli-second
+    static double StartTime, EndTime;
+    static double t_diff;
+
+    StartTime = ((double)ST.time)*1000 + (double)ST.millitm;
+    EndTime = ((double)ET.time)*1000 + (double)ET.millitm;
+    t_diff = EndTime - StartTime;
+
+    if (t_diff < 0)
+    {
+        #if 0
+        if (t_diff < -1000)   //1000ms
+        {
+            sprintf((char*)buf_log_evcomm_fork2,
+                    "[fork2][Warning]S(%.02lf) > E(%.02lf), d(%.02lf)",
+                    StartTime,
+                    EndTime,
+                    t_diff);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+        }
+        #endif
+
+        return -1;
+    }
+    return t_diff;
+}
+
+int CreateShareMemory()
+{
+    int MeterSMId;
+
+    //create ShmSysConfigAndInfo
+    if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo), IPC_CREAT | 0777)) < 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[main]CreateShareMemory:shmget ShmSysConfigAndInfo NG");
+        return 0;
+    }
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[main]CreateShareMemory:shmat ShmSysConfigAndInfo NG");
+        return 0;
+    }
+    memset(ShmSysConfigAndInfo,0,sizeof(struct SysConfigAndInfo));
+    //create ShmStatusCodeData
+    if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData), IPC_CREAT | 0777)) < 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[main]CreateShareMemory:shmget ShmStatusCodeData NG");
+        return 0;
+    }
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[main]CreateShareMemory:shmat ShmStatusCodeData NG");
+        return 0;
+    }
+    memset(ShmStatusCodeData,0,sizeof(struct StatusCodeData));
+    //create ShmCcsData
+    if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData), IPC_CREAT | 0777)) < 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[main]CreateShareMemory:shmget ShmCcsData NG");
+        return 0;
+    }
+    else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[main]CreateShareMemory:shmat ShmCcsData NG");
+        return 0;
+    }
+    memset(ShmCcsData,0,sizeof(struct CcsData));
+    return 1;
+}
+
+/*===========================================================================
+FUNCTION: ShareMemory_Init
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int ShareMemory_Init()
+{
+    int MeterSMId;
+
+    //create ShmSysConfigAndInfo
+    if ((MeterSMId = shmget(ShmSysConfigAndInfoKey, sizeof(struct SysConfigAndInfo), IPC_CREAT | 0777)) < 0)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmget ShmSysConfigAndInfo NG");
+        return 0;
+    }
+    else if ((ShmSysConfigAndInfo = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "ShareMemory_Init:shmat ShmSysConfigAndInfo NG");
+        return 0;
+    }
+
+    //create ShmStatusCodeData
+    if ((MeterSMId = shmget(ShmStatusCodeKey, sizeof(struct StatusCodeData),  IPC_CREAT | 0777)) < 0)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmget ShmStatusCodeData NG");
+        return 0;
+    }
+    else if ((ShmStatusCodeData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmat ShmStatusCodeData NG");
+        return 0;
+    }
+
+    //create ShmCcsData
+    if ((MeterSMId = shmget(ShmCcsCommKey, sizeof(struct CcsData),  IPC_CREAT | 0777)) < 0)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmget ShmCcsData NG");
+        return 0;
+    }
+    else if ((ShmCcsData = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmat ShmCcsData NG");
+        return 0;
+    }
+
+    //create ShmInternalComm
+    if ((MeterSMId = shmget(ShmInternalCommKey, sizeof(struct InternalComm),   IPC_CREAT | 0777)) < 0)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmget ShmInternalComm NG");
+        return 0;
+    }
+    else if ((ShmInternalComm = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+    {
+    	DEBUG_ERROR("ShareMemory_Init:shmat ShmInternalComm NG");
+        return 0;
+    }
+
+    //Initial ShmCharger
+	if ((MeterSMId = shmget(ShmChargerKey, sizeof(struct Charger), 0777)) < 0)
+	{
+		DEBUG_ERROR("shmget ShmChargerKey NG\r\n");
+		return 0;
+	}
+	else if ((ShmCharger = shmat(MeterSMId, NULL, 0)) == (void *) -1)
+	{
+		DEBUG_ERROR("shmat ShmChargerKey NG\r\n");
+		return 0;
+	}
+
+    //[To-Do] The initialization here is reduntant and should be removed partially.
+    //SHM_Init_supportedAppProtocolRes(ShmCcsData);
+    //SHM_Init_din_SessionSetupRes(ShmCcsData);
+    //SHM_Init_din_ServiceDiscoveryRes(ShmCcsData);
+    //SHM_Init_din_ServiceAndPaymentSelectionRes(ShmCcsData);
+    //SHM_Init_din_ContractAuthenticationRes(ShmCcsData);
+    SHM_Init_din_ChargeParameterDiscoveryRes(ShmCcsData);
+    SHM_Init_din_CableCheckRes(ShmCcsData);
+    SHM_Init_din_PreChargeRes(ShmCcsData);
+    SHM_Init_din_PowerDeliveryRes(ShmCcsData);
+    SHM_Init_din_CurrentDemandRes(ShmCcsData);
+    SHM_Init_din_WeldingDetectionRes(ShmCcsData);
+    SHM_Init_din_SessionStopRes(ShmCcsData);
+
+    return 1;
+}
+
+/*===========================================================================
+FUNCTION: GetEthMac
+DESCRIPTION:
+    1. Accessing current CsuMac address, if Eth = eth1
+    2. The address of eth1(for QCA7000) is a random number, which will be modified
+       after each time of booting up system.
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int GetEthMac(unsigned char *Eth, unsigned char *mac)
+{
+    //Parameters:MAC,IP,Mask,Gateway
+    int fd;
+    unsigned char addr[18], Buffer[128];
+
+    memset(Buffer, 0, sizeof(Buffer));
+    sprintf((char*)Buffer, "cat /sys/class/net/%s/address > /mnt/GetEthInfo", Eth);    //CsuMac (Eth = eth1)
+    system((char*)Buffer);
+    fd = open("/mnt/GetEthInfo", O_RDONLY);
+    if(fd < 0)
+    {
+        system("rm -f /mnt/GetEthInfo");
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "GetEthMac: MAC Address open error");
+        return 0;
+    }
+    memset(mac, 0, 6);
+    memset(addr, 0, sizeof(addr));
+    read(fd, addr, 17);
+    close(fd);
+    system("rm -f /mnt/GetEthInfo");
+    sscanf((char*)addr, "%02x:%02x:%02x:%02x:%02x:%02x", (uint32_t *)&mac[0], (uint32_t *)&mac[1], (uint32_t *)&mac[2], (uint32_t *)&mac[3], (uint32_t *)&mac[4], (uint32_t *)&mac[5]);    //CsuMac (Eth = eth1)
+    sprintf((char*)buf_log_evcomm,
+            "[GetEthMac]EVSE MACAddr(CsuMac): %02x:%02x:%02x:%02x:%02x:%02x",
+            mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);    //CsuMac (Eth = eth1)
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    return 1;
+}
+
+/*===========================================================================
+FUNCTION: ReadAdcVolt
+DESCRIPTION:
+    1. fork1
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+float ReadAdcVolt(unsigned char AdcChannel)
+{
+    //AIN0=CCS GUN Temp 1
+    //AIN1=CCS GUN Temp 2
+    //AIN2=CCS_Proximity/2
+    //AIN3=pilot voltage
+#if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+	return 0;
+#else
+	if(AdcChannel == 3)
+	{
+		int fd,count,AvgTimes;
+		unsigned char SampleBuf[4];
+		float TmpVolt, MinSample, AvgSample = 0;
+
+		fd = open("/sys/bus/iio/devices/iio\\:device0/in_voltage3_raw", O_RDONLY);
+        if(fd > 0)
+        {
+            //system("echo 1 > /sys/class/gpio/gpio89/value");    //for test
+            for(AvgTimes = 0; AvgTimes < 3; AvgTimes++) //period = 60~91 ms(renice -10, , CurrentDemand())
+            {
+                count = 0;
+                MinSample = 2306;
+                //system("echo 1 > /sys/class/gpio/gpio89/value");    //for test
+                while(count < 30)  //period = 21~42ms (renice -10, CurrentDemand())
+                {
+                    //re-sampling period = 3~13ms (renice -10, SLAC())
+                    //system("echo 1 > /sys/class/gpio/gpio89/value");    //for test
+                    read(fd, SampleBuf, 4); //period = 3.2~10ms (renice -10, SLAC())
+                    //system("echo 0 > /sys/class/gpio/gpio89/value");    //for test
+                    TmpVolt = atoi((char*)SampleBuf);
+
+                    if((TmpVolt < 2306) && (TmpVolt > 0))//positive voltage
+                    {
+                        if(TmpVolt < MinSample)
+                        {
+                            MinSample = TmpVolt;
+                        }
+                        count++;
+                    }
+                    lseek(fd, 0, SEEK_SET);
+                }
+                //system("echo 0 > /sys/class/gpio/gpio89/value");    //for test
+                AvgSample += MinSample;
+            }
+            AvgSample /= AvgTimes;
+            close(fd);
+            //system("echo 0 > /sys/class/gpio/gpio89/value");    //for test
+            return ((0.954-(1.8*AvgSample/4095))/0.06);
+        }
+		else
+		{
+			return -1;
+		}
+	}
+	else
+	{
+		FILE *fp;
+		unsigned char str[64];
+		unsigned char AdcValue[8];
+
+		if(AdcChannel > 7)
+		{
+		    return -1;
+		}
+
+		memset(str,0,sizeof(str));
+		memset(AdcValue,0,sizeof(AdcValue));
+		sprintf((char*)str, "cat /sys/bus/iio/devices/iio\\:device0/in_voltage%d_raw", AdcChannel);
+		fp=popen((char*)str, "r");
+		if(fgets((char*)AdcValue,sizeof(AdcValue),fp) == NULL)
+		{
+		    pclose(fp);
+		    return -1;
+		}
+		pclose(fp);
+		//Vin =  Vref *D / (2^n - 1)
+		return ((float)1.8*(float)atoi((char*)AdcValue))/4095;
+	}
+#endif
+
+}
+
+/*===========================================================================
+FUNCTION: ReadAdcVolt
+DESCRIPTION:
+    //AIN0=CCS GUN Temp 1
+    //AIN1=CCS GUN Temp 2
+    //AIN2=CCS_Proximity/2
+    //AIN3=pilot voltage
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+float ReadAdcVolt_PP_fork3()
+{
+#if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+	return 0;
+#else
+    int fd, AvgTimes;
+    unsigned char SampleBuf[4];
+    float TmpVolt = 0;
+    float AvgSample = 0;
+    float V_pp = 0;
+
+    fd = open("/sys/bus/iio/devices/iio\\:device0/in_voltage2_raw", O_RDONLY); //PP
+    if(fd > 0)
+    {
+        for(AvgTimes = 0; AvgTimes < 5; AvgTimes++) //get 5 samples
+        {
+            read(fd, SampleBuf, 4);
+            TmpVolt = atoi((char*)SampleBuf);
+            lseek(fd, 0, SEEK_SET);
+
+            AvgSample += TmpVolt;
+        }
+        close(fd);
+        AvgSample /= AvgTimes;
+        V_pp = (3.6*AvgSample)/4095;    //PP
+
+        #if 0
+        printf("PP_adc = %.02f, PP_v = %.02f\n", AvgSample, V_pp);
+        usleep(3000000); //300ms
+        #endif
+        usleep(20000);  //20ms
+
+        return V_pp;
+    }
+    else
+    {
+        return -1;
+    }
+#endif
+}
+
+/*===========================================================================
+FUNCTION: Qca7kPowerReset
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Qca7kPowerReset()
+{
+    printf("\n[CCS Board]Reset QCA7000...\n");
+    system("echo 1 > /sys/class/gpio/gpio88/value");
+    usleep(500000);
+    system("echo 0 > /sys/class/gpio/gpio88/value");
+}
+
+/*===========================================================================
+FUNCTION: SwitchCpStateE
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int SwitchCpStateE(unsigned char OnOff)
+{
+	/*
+	 *	TODO: Request CP change to state E
+	 */
+    if((OnOff != ENABLE) && (OnOff != DISABLE))
+    {
+        return -1;
+    }
+
+    struct ChargingInfoData *ccs;
+    ccs = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    ccs->SwitchCpStateE_status = OnOff;
+
+    //OnOff = 1 => switch State to E
+    //OnOff = 0 => return noraml
+    #if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+    {
+        if(OnOff == DISABLE)
+        {
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SwitchCpStateE: released\n");
+            CSUCOMMAC_SHM.CpSetStateE = DISABLE;
+        }
+        else
+        {
+            OutputCpPwmDuty(100); //set CP duty as 100, firstly.
+            CSUCOMMAC_SHM.CpSetStateE = ENABLE;
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SwitchCpStateE: enabled!\n");
+        }
+    }
+    #else //CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED
+    {
+        if(OnOff == DISABLE)
+        {
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SwitchCpStateE: released\n");
+            system("echo 0 > /sys/class/gpio/gpio86/value");
+        }
+        else
+        {
+            OutputCpPwmDuty(100); //set CP duty as 100, firstly.
+            system("echo 1 > /sys/class/gpio/gpio86/value");
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SwitchCpStateE: enabled!\n");
+        }
+    }
+    #endif
+
+    if (ccs->SwitchCpStateE_status_pre != ccs->SwitchCpStateE_status)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "SwitchCpStateE: %d >> %d",
+                ccs->SwitchCpStateE_status_pre,
+                ccs->SwitchCpStateE_status
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        ccs->SwitchCpStateE_status_pre = ccs->SwitchCpStateE_status;
+    }
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: OutputCpPwmDuty
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int OutputCpPwmDuty(unsigned char Duty)
+{
+#if ((CCS_ENERGY_TRANSFER_MODE != MODE_AC_SINGLE_PHASE_CORE) && (CCS_ENERGY_TRANSFER_MODE != MODE_AC_THREE_PHASE_CORE))
+    int DutyInNanoSec;
+#endif
+    struct ChargingInfoData *ccs;
+    ccs = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    if((Duty < 0)||(Duty > 100))
+    {
+        return -1;
+    }
+
+#if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+    {
+        CSUCOMMAC_SHM.CpSetPWMDuty = Duty;
+    }
+#else //CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED
+    {
+        DutyInNanoSec = 10000 * Duty;
+        sprintf((char*)buf_log_evcomm, "echo %d > /sys/class/pwm/pwmchip0/pwm0/duty_cycle", DutyInNanoSec);//nanoseconds
+        system((char*)buf_log_evcomm);
+    }
+#endif
+
+    ccs->CpDuty = Duty;
+
+    //CP Duty
+    if (ccs->CpDuty != ccs->CpDuty_pre)
+    {
+        //memset(buf_log_evcomm, 0, sizeof(buf_log_evcomm));
+        sprintf((char*)buf_log_evcomm, "CP Duty: %d %% >> %d %%", ccs->CpDuty_pre, ccs->CpDuty);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        ccs->CpDuty_pre = ccs->CpDuty;
+    }
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: Check_Plugin_Status_Update_fork1
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+//#if SAVE_SYS_LOG_MSG_EVCOMM_SWITCH == ENABLE
+void Check_Plugin_Status_Update_fork1(struct ChargingInfoData *ccs)
+{
+    if (ccs->ConnectorPlugIn != ccs->ConnectorPlugIn_new)
+    {
+        sprintf((char*)buf_log_evcomm_fork1, "[fork1]Plugin: %d >> %d (CP=%.2fV, PP=%.2fV)",
+                ccs->ConnectorPlugIn,
+                ccs->ConnectorPlugIn_new,
+                ccs->CpVoltage,
+                ccs->PpVoltage
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork1);
+
+        ccs->ConnectorPlugIn_pre = ccs->ConnectorPlugIn;
+        ccs->ConnectorPlugIn = ccs->ConnectorPlugIn_new;
+        //ccs->CpVoltage_pre = ccs->CpVoltage;
+    }
+}
+//#endif
+
+/*===========================================================================
+FUNCTION: ConnectorPlugIn
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+	0: Unplug
+	1: Plug-in
+GLOBAL VARIABLES:
+=============================================================================*/
+int CheckConnectorPlugIn()
+{
+	/*
+	 *	TODO: Return connector status depedon CP
+	 */
+
+    static struct ChargingInfoData *ccs;
+    ccs = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+#if (CP_PROTECTION_MECHANISM == ENABLE)
+    return (int)ccs->ConnectorPlugIn;
+#else
+    return TRUE;
+#endif
+}
+
+/*===========================================================================
+FUNCTION: Check_CP_State_Error_fork1
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_CP_State_Error_fork1(struct ChargingInfoData *ccs)
+{
+#if (CP_PROTECTION_MECHANISM == DISABLE)
+    {
+        return -1;
+    }
+#endif
+
+    unsigned char state = 0;
+#if ((CCS_ENERGY_TRANSFER_MODE != MODE_AC_SINGLE_PHASE_CORE) && (CCS_ENERGY_TRANSFER_MODE != MODE_AC_THREE_PHASE_CORE))
+    double time_diff = 0;
+#endif
+    state = Check_V2G_Flow_Status();
+
+    //SLAC, SLAAC, SDP, ..., ChargeParameterDiscovery
+    if (state >= CM_SLAC_PARM_CONF &&   //by considering 15118(SLAC first)
+        state < ChargeParameterDiscoveryRequest &&
+        state != IDLE &&
+        state != CM_SET_KEY_REQ &&
+        state != CM_SET_KEY_CNF &&
+        state != CM_VALIDATE_REQ &&
+        state != CM_VALIDATE_CNF)
+    {
+        #if (SLAC_FIRST_RESPONSE_METHOD == SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES)
+        {
+            if((ccs->CpState != 2) && (ccs->CpState != 3))
+            {
+                if (ccs->CpState_err == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork1][CP][Error]before CPD");    //CPD: ChargeParameterDiscoveryRequest
+                    //CPD: ChargeParameterDiscovery
+                }
+                ccs->CpState_err = TRUE;
+            }
+        }
+        #else
+        {
+            if(ccs->CpState != 3)
+            {
+                if (ccs->CpState_err == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork1][CP][Error]before CPD");    //CPD: ChargeParameterDiscoveryRequest
+                    //CPD: ChargeParameterDiscovery
+                }
+                ccs->CpState_err = TRUE;
+            }
+        }
+        #endif
+    }
+
+    #if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+    {
+        //ChargeParameterDiscovery
+        if(state >= ChargeParameterDiscoveryRequest &&        //35
+           state <= ChargeParameterDiscoveryResponse)         //36
+        {
+            if(ccs->CpState != 3)
+            {
+                if (ccs->CpState_err == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CP][Error]CPD");
+                    //PRC: Precharge
+                    //CUD: CurrentDemand
+                }
+                ccs->CpState_err = TRUE;
+            }
+        }
+
+        //ChargingStatus
+        if(state >= ChargingStatusRequest &&        //43
+           state <= ChargingStatusResponse)         //44
+        {
+            if(ccs->CpState != 4 && ccs->CpState != 5)
+            {
+                if (ccs->CpState_err == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CP][Error]CGS");
+                    //PRC: Precharge
+                    //CUD: CurrentDemand
+                }
+                ccs->CpState_err = TRUE;
+            }
+        }
+    }
+    #else //CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED
+    {
+        //ChargeParameterDiscovery, CableCheck
+        if (state >= ChargeParameterDiscoveryRequest &&     //35
+            state <= CableCheckResponse)                    //38
+        {
+            if(ccs->CableCheckPreCountDownDone == FALSE &&
+            state >= CableCheckRequest)
+            {
+                ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+                time_diff = DiffTimeb_fork1_Error_Monitor(EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_Start, EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+                if(time_diff >= V2G_SECC_CP_Timeout_CableCheck)   //2 sec
+                {
+                    sprintf((char*)buf_log_evcomm_fork1,
+                            "[fork1][CP]check C(4),D(5): ON (%.02lf of %dms)",
+                            time_diff,
+                            V2G_SECC_CP_Timeout_CableCheck);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork1);
+                    ccs->CableCheckPreCountDownDone = TRUE;
+                }
+            }
+
+            if(ccs->CableCheckPreCountDownDone == TRUE)
+            {
+                if(ccs->CpState != 4 && ccs->CpState != 5)
+                {
+                    if (ccs->CpState_err == FALSE)
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CP][Error]CPD and CCK (after CNT)");
+                        //CPD: ChargeParameterDiscovery
+                        //CCK: CableCheck
+                        //CNT: count down
+                    }
+                    ccs->CpState_err = TRUE;
+                }
+            }
+            else
+            {
+                if(ccs->CpState != 3 && ccs->CpState != 4 && ccs->CpState != 5)
+                {
+                    if (ccs->CpState_err == FALSE)
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CP][Error]CPD and CCK (before CNT)");
+                        //CPD: ChargeParameterDiscovery
+                        //CCK: CableCheck
+                        //CNT: count down
+                    }
+                    ccs->CpState_err = TRUE;
+                }
+            }
+        }
+
+        //Precharge, CurrentDemand
+        if(state >= PreChargeRequest &&      //39
+        state <= CurrentDemandResponse)   //46
+        {
+            if(ccs->CpState != 4 && ccs->CpState != 5)
+            {
+                if (ccs->CpState_err == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CP][Error]PRC and CUD");
+                    //PRC: Precharge
+                    //CUD: CurrentDemand
+                }
+                ccs->CpState_err = TRUE;
+            }
+        }
+    }
+    #endif
+
+    if(ccs->CpState_err == TRUE && ccs->CpState_err_logged == FALSE)
+    {
+        OutputCpPwmDuty(100);
+        //system("echo 1 > /sys/class/gpio/gpio89/value");    //for test
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_CP_State_Error (023889)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+        Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+        sprintf((char*)buf_log_evcomm_fork1, "[fork1][Erorr]CP(%d) Error in state %d(%d)",
+                ccs->CpState,
+                state,
+                ccs->CableCheckPreCountDownDone
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork1);
+        ccs->CpState_err_logged = TRUE;
+    }
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: Check_CP_State_Update_fork1
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+//#if SAVE_SYS_LOG_MSG_EVCOMM_SWITCH == ENABLE
+void Check_CP_State_Update_fork1(struct ChargingInfoData *ccs)
+{
+    //CP State
+    if (ccs->CpState != ccs->CpState_pre)
+    {
+        sprintf((char*)buf_log_evcomm_fork1, "[fork1]CP State: %d >> %d (%.2fV)",
+                ccs->CpState_pre,
+                ccs->CpState,
+                ccs->CpVoltage
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork1);
+
+        ccs->CpState_pre = ccs->CpState;
+    }
+}
+//#endif
+
+/*===========================================================================
+FUNCTION: CP_Detection
+DESCRIPTION:
+        1. In order to detect CP in efficient response time, we creat an independent
+           thead for this procedure.
+
+        2. The priority of this thread is set as the same as other tasks.
+
+        3. fork1
+
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void CP_Detection()
+{
+    pid_t tmp = 0;
+ //   struct timeb StartTime, EndTime;
+#if ((CCS_ENERGY_TRANSFER_MODE != MODE_AC_SINGLE_PHASE_CORE) && (CCS_ENERGY_TRANSFER_MODE != MODE_AC_THREE_PHASE_CORE))
+    unsigned char Statetmp;
+    float TotalTmpVolt;
+#endif
+    struct ChargingInfoData *ccs;
+
+    ccs = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    if(CP_Detection_Pid == 0)
+    {
+        tmp = fork();
+        if(tmp > 0)
+        {
+            CP_Detection_Pid = tmp;
+
+            #if 1
+            unsigned char buf[64];
+            memset(buf, 0, sizeof(buf));
+            //sprintf((char*)buf, "renice -20 -p %d", tmp);
+            sprintf((char*)buf, "renice -10 -p %d", tmp);
+            system((char*)buf);
+            #endif
+
+            return;
+        }
+    }
+
+    while(1)
+    {
+        //ADC_Voltage = (1+RE62/RE63)*0.9 - (RE62/RE63)*Pilot_Voltage,  RE62/RE63=0.06
+        //=>Pilot_Voltage=(0.954-ADC_Voltage)/0.06
+
+        #if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+        {
+            ccs->CpVoltage = ShmInternalComm->AC_CpPositiveVoltage;
+            ccs->CpState = ShmInternalComm->AC_CpPresentState;
+        }
+        #else //CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED
+        {
+            TotalTmpVolt = ReadAdcVolt(3);
+
+            ccs->CpVoltage = TotalTmpVolt;
+
+            if (ccs->CpVoltage_pre != ccs->CpVoltage)
+            {
+                ccs->CpVoltage_pre = ccs->CpVoltage;
+            }
+
+            //printf("TotalTmpVolt = %.02f\n", TotalTmpVolt);
+
+            //If CP voltage is higer than 13.5V
+            if(TotalTmpVolt >= 13.5)
+            {
+                //Pilot Error
+                if((ccs->CpState == 1) &&
+                (TotalTmpVolt < 13.75))
+                {
+                    //V_cp = 13.5 ~ 13.75
+                    Statetmp = 1;
+                }
+                else
+                {
+                    //V_cp = 13.5 ~
+                    Statetmp = 8;
+                }
+            }
+            else if((TotalTmpVolt >= 10.5) && (TotalTmpVolt < 13.5)) //V_cp = 10.5 ~ 13.5
+            {
+                //State A (12V)
+                if((ccs->CpState >= 2) &&
+                (ccs->CpState <= 3) &&
+                (TotalTmpVolt < 10.75))
+                {
+                    if((ccs->CpDuty >= 5) &&
+                    (ccs->CpDuty < 100))
+                    {
+                        Statetmp = 3;
+                    }
+                    else
+                    {
+                        Statetmp = 2;
+                    }
+                }
+                else if((ccs->CpState == 8) &&
+                        (TotalTmpVolt >= 13.25))
+                {
+                    Statetmp = 8;
+                }
+                else
+                {
+                    Statetmp = 1;
+                }
+            }
+            else if((TotalTmpVolt >= 7.5) && (TotalTmpVolt < 10.5))
+            {
+                //State B (9V)
+                if((ccs->CpState == 4) && (TotalTmpVolt < 7.75))
+                {
+                    Statetmp = 4;
+                }
+                else if((ccs->CpState == 1) && (TotalTmpVolt >= 10.25))
+                {
+                    Statetmp = 1;
+                }
+                else
+                {
+                    if((ccs->CpDuty >= 5) && (ccs->CpDuty < 100))
+                    {
+                        Statetmp = 3;
+                    }
+                    else
+                    {
+                        Statetmp = 2;
+                    }
+                }
+            }
+            else if((TotalTmpVolt >= 4.5) && (TotalTmpVolt < 7.5))
+            {
+                //State C (6V)
+                if((ccs->CpState == 5) && (TotalTmpVolt < 4.75))
+                {
+                    Statetmp = 5;
+                }
+                else if((ccs->CpState >= 2) && (ccs->CpState <= 3) && (TotalTmpVolt >= 7.25))
+                {
+                    if((ccs->CpDuty >= 5)&&(ccs->CpDuty < 100))
+                    {
+                        Statetmp = 3;
+                    }
+                    else
+                    {
+                        Statetmp = 2;
+                    }
+                }
+                else
+                {
+                    Statetmp = 4;
+                }
+            }
+            else if((TotalTmpVolt >= 1.5) && (TotalTmpVolt < 4.5))
+            {
+                //State D (3V)
+                if((ccs->CpState == 6)&&(TotalTmpVolt < 1.75))
+                {
+                    Statetmp = 6;
+                }
+                else if((ccs->CpState == 4)&&(TotalTmpVolt >= 4.25))
+                {
+                    Statetmp = 4;
+                }
+                else
+                {
+                    Statetmp = 5;
+                }
+            }
+            else if((TotalTmpVolt >= -1.5) && (TotalTmpVolt < 1.5)) //V_cp = -1.5V ~ 1.5V
+            {
+                //State E (0V)
+                if((ccs->CpState == 8) &&
+                (TotalTmpVolt < -1.25))
+                {
+                    Statetmp = 8;
+                }
+                else if((ccs->CpState == 5) &&
+                        (TotalTmpVolt >= 1.25))
+                {
+                    Statetmp = 5;
+                }
+                else
+                {
+                    Statetmp = 6;
+                }
+            }
+            else if((TotalTmpVolt >= -13.5) && (TotalTmpVolt < -10.5)) //V_cp = -10.5V ~ -13.5V
+            {
+                //State F (-12V)
+                if((ccs->CpState == 8) &&
+                (TotalTmpVolt >= -10.75))
+                {
+                    Statetmp = 8;
+                }
+                else
+                {
+                    Statetmp = 7;
+                }
+            }
+            else
+            {
+                //null
+            }
+
+            ccs->CpState = Statetmp;
+        }
+        #endif
+
+        Check_CP_State_Update_fork1(ccs);
+        Check_CP_State_Error_fork1(ccs);
+
+        //Updating Plugin status
+        #if (PP_PROTECTION_MECHANISM == ENABLE)
+        if((ccs->CpState >= 2 ) && (ccs->CpState <= 5 ) && (ccs->PpVoltage >= 1.0)) //PP >= 1.0V
+        #else
+        if((ccs->CpState >= 2 ) && (ccs->CpState <= 5 ))
+        #endif
+        {
+            ccs->ConnectorPlugIn_new = TRUE;
+        }
+        else
+        {
+            ccs->ConnectorPlugIn_new = FALSE;
+            OutputCpPwmDuty(100);
+        }
+
+        Check_Plugin_Status_Update_fork1(ccs);
+
+        //ftime(&EndTime);
+        //DEBUG_PRINTF_EVCOMM_DETAIL("duration:%.02lf\n", DiffTimeb(StartTime, EndTime));
+    }//while
+}
+
+/*===========================================================================
+FUNCTION: PP_Detection
+DESCRIPTION:
+    0. SeccComm fork3
+    1. In order to detect CP in efficient response time, we creat an independent
+       thead for this procedure.
+
+    2. The priority of this thread is set as the same as other tasks.
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PP_Detection()
+{
+    pid_t tmp = 0;
+ //   struct timeb StartTime, EndTime;
+#if ((CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED))
+    //unsigned char Statetmp;
+#endif
+    float TotalTmpVolt;
+
+    if(PP_Detection_Pid == 0)
+    {
+        tmp = fork();
+        if(tmp > 0)
+        {
+            PP_Detection_Pid = tmp;
+
+            #if 0
+            unsigned char buf[64];
+            memset(buf, 0, sizeof(buf));
+            sprintf((char*)buf, "renice -20 -p %d", tmp);
+            system(buf);
+            #endif
+
+            return;
+        }
+    }
+
+    while(1)
+    {
+        TotalTmpVolt = ReadAdcVolt_PP_fork3();
+
+        EVCOMM_SYS_INFO.PpVoltage = TotalTmpVolt;
+
+        if (EVCOMM_SYS_INFO.PpVoltage_pre != EVCOMM_SYS_INFO.PpVoltage)
+        {
+            if ((EVCOMM_SYS_INFO.PpVoltage_pre < 0.5 && EVCOMM_SYS_INFO.PpVoltage >= 1.0) ||
+                 (EVCOMM_SYS_INFO.PpVoltage_pre >= 1.0 && EVCOMM_SYS_INFO.PpVoltage < 0.5))
+            {
+                sprintf((char*)buf_log_evcomm_fork3,
+                        "[fork3]PP(%.2f >> %.2fV)",
+                        EVCOMM_SYS_INFO.PpVoltage_pre,
+                        EVCOMM_SYS_INFO.PpVoltage
+                        );
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork3);
+                EVCOMM_SYS_INFO.PpVoltage_pre = EVCOMM_SYS_INFO.PpVoltage;
+            }
+        }
+
+        #if 0
+        sleep(5);
+        printf("V_pp = %.02f\n", TotalTmpVolt);
+        #endif
+    }//while
+}
+
+/*===========================================================================
+FUNCTION: Error_Monitor
+DESCRIPTION:
+    1. This function only works in SeccComm fork2.
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Error_Monitor()
+{
+    pid_t tmp = 0;
+    double time_diff = 0;
+    unsigned char status = 0;
+    struct ChargingInfoData *ccs;
+    ccs = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    if(Error_Monitor_Pid == 0)
+    {
+        tmp = fork();   //SeccComm fork2
+        if(tmp > 0)
+        {
+            Error_Monitor_Pid = tmp;
+
+            #if 0
+            unsigned char buf[64];
+            memset(buf, 0, sizeof(buf));
+            sprintf((char*)buf, "renice -20 -p %d", tmp);
+            system(buf);
+            #endif
+
+            return;
+        }
+    }
+
+    while(1)
+    {
+        //Step 0
+        if (EVCOMM_SYS_INFO.End_Process_inused == TRUE)
+        {
+            //If the End_Process is in processing, disable Error_Monitor.
+            continue;
+        }
+
+        //Step1 1: Check and Response to Plugin Status
+        if(CheckConnectorPlugIn() == FALSE)
+        {
+            status = Check_V2G_Flow_Status();
+            if (status > IDLE &&
+                status < Performance_Timeout &&
+                status != CM_SET_KEY_REQ &&
+                status != CM_SET_KEY_CNF &&
+                EVCOMM_SYS_INFO.End_Process_inused == FALSE)
+            {
+                #if (CP_PROTECTION_MECHANISM == ENABLE)
+                //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2] Emergency Stop (due to Connector is plugged out during communication.)");
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2]Plug out Error => End_Process");
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_CP_State_Error (023889)
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                End_Process();
+                #else
+                //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "CP_PROTECTION_MECHANISM is disabled. Emergency Stop: skipped" );
+                #endif
+            }
+        }
+
+
+        //Step 2: Check for V2G_SECC_Sequence_Timeout
+        //#if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+        #if 1
+        status = Check_V2G_Flow_Status();
+        if (status >= SupportedAppProtocolRequest &&
+            status < SessionStopRequest)
+        {
+            ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_End);
+            time_diff = DiffTimeb_fork2_Error_Monitor(EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start, EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_End);
+            if(time_diff > V2G_SECC_Sequence_Timeout)   //60s
+            {
+                sprintf((char*)buf_log_evcomm_fork2,
+                        "[fork2]V2G_SECC_Sequence_Timeout in state %d - (%.02lf of %d ms)\n",
+                        status,
+                        time_diff,
+                        V2G_SECC_Sequence_Timeout);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+                Update_V2G_Flow_Status(Sequence_Timeout);
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_TIMEOUT_V2G_Sequence_Time (023844)
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 4;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+                End_Process();
+                break;
+            }
+            else if (time_diff > 4000) //4s
+            {
+                //Check for CSU command of "Stop by EVSE"
+                if (EVCOMM_SYS_INFO.DC_EVSEStatus == EVSE_Shutdown)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error_Monitor]EVSE_Shutdown");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                else if (EVCOMM_SYS_INFO.DC_EVSEStatus == EVSE_EmergencyShutdown)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error_Monitor]EVSE_EmergencyShutdown");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                else if (ShmInternalComm->ChargingPermission == FALSE)
+                {
+                    if (status >= ChargeParameterDiscoveryRequest)  //&& status < SessionStopRequest
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error_Monitor]ChargingPermission = FALSE");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                else
+                {
+                    //null
+                }
+            }
+            else
+            {
+                //null
+            }
+        }
+        #endif
+
+
+        //Step 3: Check and Response to Error V2gFlowStatus
+        status = Check_V2G_Flow_Status();
+        if (status == Performance_Timeout ||
+            status == Sequence_Timeout ||
+            status == Other_Fault)
+        {
+            sprintf((char*)buf_log_evcomm_fork2,
+                    "[fork2]Timeout or Fault State(%d) => End_Process",
+                    status);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+            //Normal Stop
+            //alarm and duty to 100%
+            //OutputCpPwmDuty(100);
+            //SwitchCpStateE(ENABLE); //Set CP duty as 100% and set CP state as E (0V).
+            //[Joseph/ To-Do] Set State E (0V) via GPIO setting
+            End_Process();
+        }
+
+
+        //Step 4: Check and Response to CP State Error
+        if(ccs->CpState_err == TRUE)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2]CP Error => End_Process");
+            Update_V2G_Flow_Status(Other_Fault);
+            //Update_ShmStatusCode(); //[To-Do] to be implemented
+            //CCS_SECC_CP_State_Error (023889)
+            ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+            ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+            ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+            ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+            ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+            ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+            CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+            End_Process();
+        }
+
+
+        //Step 5: Check and Response to Shutdown Commnad from CSU
+        if (EVCOMM_SYS_INFO.DC_EVSEStatus == EVSE_Shutdown ||
+            EVCOMM_SYS_INFO.DC_EVSEStatus == EVSE_EmergencyShutdown)
+        {
+            if (Check_V2G_Flow_Status() <= SLACC_SDP_TCP_Connection)
+            {
+                sprintf((char*)buf_log_evcomm_fork2,
+                        "[fork2]EVSE Shutdown(%d) => End_Process",
+                        EVCOMM_SYS_INFO.DC_EVSEStatus);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+                Update_V2G_Flow_Status(Other_Fault);
+                End_Process();
+            }
+        }
+
+
+        //Step 6: Check and Response to SessionStop
+        status = Check_V2G_Flow_Status();
+        if (status == SessionStopResponse)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2]SessionStopResponse => End_Process");
+            End_Process();
+        }
+
+        //Step 7: Check for ChargingPermission from TRUE to FALSE before V2G Messages
+        if ((ShmInternalComm->ChargingPermission == FALSE) &&
+            (ShmInternalComm->ChargingPermission_pre == TRUE) &&
+            (ccs->CpState >= 3) && (ccs->CpState <=5))
+        {
+            if (status >= CM_SLAC_PARM_REQ &&
+                status != CM_SET_KEY_REQ &&
+                status != CM_SET_KEY_CNF &&
+                status <= SLACC_SDP_TCP_Connection)
+            {
+                sprintf((char*)buf_log_evcomm_fork2,
+                        "[fork2]Permission OFF before V2G msg(%d) => End_Process",
+                        ShmInternalComm->ChargingPermission);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+                Update_V2G_Flow_Status(Other_Fault);
+                End_Process();
+            }
+        }
+
+        //Step 8: DC OVP Protection
+        if (CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED &&
+            status > CableCheckResponse &&
+            status <= SessionStopRequest &&
+            status != ChargingStatusRequest &&
+            status != ChargingStatusResponse &&
+            EVCOMM_SYS_INFO.EvBatteryMaxVoltage != 0)
+        {
+            //Part A: OVP Protection
+            if (EVCOMM_SYS_INFO.PresentChargingVoltage >= (EVCOMM_SYS_INFO.EvBatteryMaxVoltage * 1.02)) // 2%
+            {
+                sprintf((char*)buf_log_evcomm_fork2,
+                        "[fork2][Error]OVP => End_Process (%.02f > %.02f)",
+                        EVCOMM_SYS_INFO.PresentChargingVoltage,
+                        (EVCOMM_SYS_INFO.EvBatteryMaxVoltage * 1.02));
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+
+                Update_V2G_Flow_Status(Other_Fault);
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //System CCS output OVP (012219)
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+                End_Process();
+            }
+
+            //Part B: Over Voltage Request Protection
+            if (EVCOMM_SYS_INFO.EvBatterytargetVoltage >= (EVCOMM_SYS_INFO.EvBatteryMaxVoltage * 1.02))
+            {
+                sprintf((char*)buf_log_evcomm_fork2,
+                        "[fork2]Over V Req => End_Process (%.02f > %.02f)",
+                        EVCOMM_SYS_INFO.EvBatterytargetVoltage,
+                        (EVCOMM_SYS_INFO.EvBatteryMaxVoltage * 1.02)
+                        );
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm_fork2);
+
+                Update_V2G_Flow_Status(Other_Fault);
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //System CCS output OVP (012219)
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+                End_Process();
+            }
+        }
+
+        //Step 9: Check 60V
+        if (CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED &&
+            ShmInternalComm->ChargingPermission == TRUE &&
+            status < CableCheckRequest)
+        {
+            if (EVCOMM_SYS_INFO.PresentChargingVoltage >= 60)  //60V
+            {
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2]DC Output Voltage is over 60V => End_Process");
+                Update_V2G_Flow_Status(Other_Fault);
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_Unexpected_60V_Before_Charing_Error (023890)
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 9;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 0;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                //Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+                End_Process();
+            }
+        }
+
+        //Step 10: Check if the connector is unplug from plugin
+        if (EVCOMM_SYS_INFO.ConnectorPlugIn_pre == TRUE && EVCOMM_SYS_INFO.ConnectorPlugIn == FALSE)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2]Unplug Reset => End_Process");
+            Update_V2G_Flow_Status(Other_Fault);
+            End_Process();
+        }
+
+    }//while
+}
+
+
+/*===========================================================================
+FUNCTION: SendSetKey
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int SendSetKey()
+{
+    int i = 0;
+    unsigned char nRandValue = 0x0;
+    unsigned char ConstString[16] = "PhihongKey000000";
+
+    memset(&SendMmePacket,0,sizeof(struct MmeHeader));
+    memcpy(SendMmePacket.ODA,QcaMac,6);
+    memcpy(SendMmePacket.OSA,CsuMac,6);
+    SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+    SendMmePacket.MMV = 0x01;
+    SendMmePacket.MMTYPE = MMTYPE_CM_SET_KEY_REQ;
+    SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+    SendMmePacketSize = 0;
+    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x01;//Fixed value (0x01) to indicate ��NMK��
+    memset(SendMmePacket.MMENTRY+SendMmePacketSize,0,4);//My Nonce, Fixed value(0x00000000), encrypted payload not used
+    SendMmePacketSize+=4;
+    memset(SendMmePacket.MMENTRY+SendMmePacketSize,0,4);//Your Nonce, Fixed value(0x00000000), encrypted payload not used
+    SendMmePacketSize+=4;
+    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x04;//PID, Fixed value (0x04) to indicate ��HLE protocol��
+    memset(SendMmePacket.MMENTRY+SendMmePacketSize,0,2);//PRN, Fixed value(0x00), encrypted payload not used
+    SendMmePacketSize+=2;
+    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x00;//PMN, Fixed value(0x00) encrypted payload not used
+    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x01;//CCo Capablility
+    srand(time(NULL));
+    for (i = 10; i < 16; i++)
+    {
+        nRandValue = (rand()%62) + 1;
+        if((nRandValue>=0)&&(nRandValue<=9))  // 0 ~ 9
+        {
+            ConstString[i]= nRandValue + 0x30;
+        }
+        else if((nRandValue>=10)&&(nRandValue<=35)) // A ~ Z
+        {
+            ConstString[i]= nRandValue -10 + 0x41;
+        }
+        else if((nRandValue>=36)&&(nRandValue<=61)) // a ~ z
+        {
+            ConstString[i]= nRandValue -37 + 0x61;
+        }
+        else
+        {
+            ConstString[i]= 0x30;
+        }
+    }
+    memset(NewNmkKey,0,sizeof(NewNmkKey));
+    memset(Nid,0,sizeof(Nid));
+    HPAVKeyNMK(NewNmkKey, (char*)ConstString);
+    HPAVKeyNID(Nid,NewNmkKey,DEFAULT_LEVEL);
+    memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,Nid,sizeof(Nid));    //NID, 54 LSBs contain the NID 2 MSBs = 0b00
+    SendMmePacketSize+=sizeof(Nid);
+    SendMmePacket.MMENTRY[SendMmePacketSize++]=0x01;//NewEKS,Fixed value (0x01)to indicate ��NMK��
+    memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,NewNmkKey,sizeof(NewNmkKey));//NewKey
+    SendMmePacketSize += sizeof(NewNmkKey);
+    SendMmePacketSize += 19;  //the size before MMENTRY
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[QCA7K][Tx]CM_SET_KEY_REQ");
+    i = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+    Update_V2G_Flow_Status(CM_SET_KEY_REQ);
+    DEBUG_PRINTF_EVCOMM_DETAIL("SendSetKey: send size =%d\n",i);
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: GetQca7kMac
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int GetQca7kMac()
+{
+    struct QcaVendorMmeHeader SendPacket;
+
+    memset(&SendPacket, 0, sizeof(struct QcaVendorMmeHeader));
+    memset(SendPacket.ODA, 0xFF, 6);    //broadcast
+    memcpy(SendPacket.OSA, CsuMac, 6);
+    SendPacket.MTYPE = htons(EtherType_HomePlug);
+    SendPacket.MMV = 0x00;
+    SendPacket.MMTYPE = MMTYPE_VENDOR_VS_NW_INFO;
+    SendPacket.OUI[0] = 0x00;
+    SendPacket.OUI[1] = 0xB0;
+    SendPacket.OUI[2] = 0x52;
+
+    DEBUG_PRINTF_EVCOMM_DETAIL("GetQca7kMac: send size =%d\n", sendto(RawSock, &SendPacket, 20, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll)));
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "Req for QCA7K MacAddr");
+
+    return 0;
+}
+
+
+
+/*===========================================================================
+FUNCTION: Array_Check_All_Zero
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+    result:
+    (1) TRUE: all zero
+    (2) FALSE: not all zero
+GLOBAL VARIABLES:
+=============================================================================*/
+int Array_Check_All_Zero(unsigned char *ptr, int size)
+{
+    int result = TRUE;
+    int i = 0;
+
+    for (i = 0; i < size; i++)
+    {
+        if (ptr[i] != 0)
+        {
+            result = FALSE;
+            break;
+        }
+    }
+    return result;
+}
+
+/*===========================================================================
+FUNCTION: Array_Compare_Identity
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+    result = FALSE (not identical)
+    result = TRUE  (identical)
+GLOBAL VARIABLES:
+=============================================================================*/
+int Array_Compare_Identity(unsigned char *ptrA, unsigned char *ptrB, int size)
+{
+    int result = TRUE;
+    int i = 0;
+
+    for (i = 0; i < size; i++)
+    {
+        if (ptrA[i] != ptrB[i])
+        {
+            result = FALSE;
+
+            #if 0
+            sprintf((char*)buf_log_evcomm,
+                    "[Array_Compare_Identity]%02X%02X%02X%02X%02X%02X,%02X%02X%02X%02X%02X%02X(%d)\n",
+                    ptrA[0], ptrA[1], ptrA[2], ptrA[3], ptrA[4], ptrA[5],
+                    ptrB[0], ptrB[1], ptrB[2], ptrB[3], ptrB[4], ptrB[5],
+                    result);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            #endif
+            break;
+        }
+    }
+    return result;
+}
+
+
+/*===========================================================================
+FUNCTION: SLAC_DB_Search_EvMac_idx
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+    idx = -1 (not found)
+GLOBAL VARIABLES:
+=============================================================================*/
+int SLAC_DB_Search_EvMac_idx(struct EVCC_SLAC_DATA_TYPE *evcc, unsigned char *EvMac_in)
+{
+    int idx = -1;
+    int i = 0;
+
+    if (evcc->arrayLen == 0)
+    {
+        //printf("[SLAC_DB_Search_EvMac_idx]arrayLen is empty (%d)\n", evcc->arrayLen);
+        //no need to search
+    }
+    else if (evcc->arrayLen > EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE)
+    {
+        //error
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR][SLAC_DB_Search_EvMac_idx]DB length(%d) > %d",
+                evcc->arrayLen,
+                EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        evcc->arrayLen = 0; //reset
+    }
+    else
+    {
+        //start searching
+        for (i = 0; i < evcc->arrayLen; i++)
+        {
+            //printf("[SLAC_DB_Search_EvMac_idx]checking DB[%d]...\n", i);
+            if (Array_Compare_Identity(evcc->array[i].EvMac, EvMac_in, SLAC_EVMAC_LENGTH) == TRUE)
+            {
+                //printf("[SLAC_DB_Search_EvMac_idx]identical at DB[%d]...\n", i);
+                idx = i;
+                break;
+            }
+        }
+    }
+
+    //printf("[SLAC_DB_Search_EvMac_idx]return = %d\n", idx);
+    return idx;
+}
+
+/*===========================================================================
+FUNCTION: SLAC_DB_Check_EvMac_RunID_Matching
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+    res = FALSE (unmatched)
+    res = TRUE  (matched)
+GLOBAL VARIABLES:
+=============================================================================*/
+int SLAC_DB_Check_EvMac_RunID_Matching(struct EVCC_SLAC_DATA_TYPE *evcc, unsigned char *EvMac_in, unsigned char *RunID_in)
+{
+    int res = FALSE;
+    int idx = -1;
+
+    idx = SLAC_DB_Search_EvMac_idx(evcc, EvMac_in);
+
+    if (idx >= 0)
+    {
+        res = Array_Compare_Identity(evcc->array[idx].RunID, RunID_in, SLAC_RUNID_LENGTH);
+    }
+    else
+    {
+        //not found the EvMac data in DB
+        res = FALSE;
+    }
+
+    return res;
+}
+
+/*===========================================================================
+FUNCTION: SLAC_DB_Add
+DESCRIPTION:
+    1. Saving each CM_SLAC_PARM_REQ data into EVCC database if its
+       EvMac and RunID data are different, respectively.
+
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+    idx = saved index (must be a positive value)
+GLOBAL VARIABLES:
+=============================================================================*/
+int SLAC_DB_Add(unsigned char *EvMac_in, unsigned char *RunID_in)
+{
+    int idx = -1;
+
+    //Search if this EvMac and RunID already exists
+    idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+    if (idx < 0)   //not exist, yet.
+    {
+        if (SLAC_INFO.arrayLen < EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE)  //20
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[SLAC_DB_Add]data does not exist => added to %d-th",
+                    SLAC_INFO.arrayLen);
+            DEBUG_PRINTF_EVCOMM_DETAIL("%s\n", buf_log_evcomm);
+
+            if (SLAC_INFO.arrayLen >= 0)
+            {
+                memset(&SLAC_INFO.array[SLAC_INFO.arrayLen], 0, sizeof(struct EVCC_SLAC_DATA_ARRAY_TYPE));
+                memcpy(SLAC_INFO.array[SLAC_INFO.arrayLen].EvMac, EvMac_in, SLAC_EVMAC_LENGTH);
+                memcpy(SLAC_INFO.array[SLAC_INFO.arrayLen].RunID, RunID_in, SLAC_RUNID_LENGTH);
+                idx = SLAC_INFO.arrayLen;
+                SLAC_INFO.arrayLen++;
+            }
+            else
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[ERROR][SLAC_DB_Add]arrayLen: unexpected(%d)",
+                        SLAC_INFO.arrayLen);
+                DEBUG_PRINTF_EVCOMM_DETAIL("%s\n", buf_log_evcomm);
+
+                SLAC_INFO.arrayLen = 0;
+            }
+        }
+        else
+        {
+            //DB is full
+            sprintf((char*)buf_log_evcomm,
+                    "[SLAC_DB_Add]DB is full(%d) => bypass",
+                    SLAC_INFO.arrayLen);
+            DEBUG_PRINTF_EVCOMM_DETAIL("%s\n", buf_log_evcomm);
+        }
+    }
+    else
+    {
+        #if 0
+        sprintf((char*)buf_log_evcomm,
+                "[SLAC_DB_Add]EvMac: existed (%d)",
+                idx);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+
+        //Check RunID
+        if (Array_Compare_Identity(SLAC_INFO.array[idx].RunID, RunID_in, SLAC_RUNID_LENGTH) == TRUE)
+        {
+            //RunID is the same
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC_DB_Add]RunID: same");
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC_DB_Add]RunID: diff");
+        }
+
+        //Reset all corresponding parameters
+        #if 0
+        sprintf((char*)buf_log_evcomm,
+                "[SLAC_DB_Add]EvMac: reset para(%d)",
+                idx);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+
+        memset(&SLAC_INFO.array[idx], 0, sizeof(struct EVCC_SLAC_DATA_ARRAY_TYPE));
+        memcpy(SLAC_INFO.array[idx].EvMac, EvMac_in, SLAC_EVMAC_LENGTH);
+        memcpy(SLAC_INFO.array[idx].RunID, RunID_in, SLAC_RUNID_LENGTH);
+    }
+    return idx;
+}
+
+/*===========================================================================
+FUNCTION: SLAC_DB_Reset
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int SLAC_DB_Reset()
+{
+    memset(&SLAC_INFO, 0, sizeof(struct EVCC_SLAC_DATA_TYPE));
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC_DB_Reset]DONE");
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: MmeProcess
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int MmeProcess(unsigned char *Buffer, int DataLength)
+{
+    //struct ethhdr	*EthPacket;
+    struct MmeHeader *MmePacket;
+    static unsigned char counter;
+    unsigned char state = 0;
+    unsigned char *EvMac_in;
+    unsigned char *RunID_in;
+    int Rtn = 0;
+    int idx = 0;
+
+    MmePacket = (struct MmeHeader *)Buffer;
+    state = Check_V2G_Flow_Status();
+
+    #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("***********************************\n");
+        DEBUG_PRINTF_EVCOMM_DETAIL("******* Received MME Packet *******\n");
+        DEBUG_PRINTF_EVCOMM_DETAIL("***********************************\n");
+        DEBUG_PRINTF_EVCOMM_DETAIL("DataLength=%d\n",DataLength);
+        DEBUG_PRINTF_EVCOMM_DETAIL("ODA: %02x:%02x:%02x:%02x:%02x:%02x\n", //Destination MAC Address
+            MmePacket->ODA[0], MmePacket->ODA[1],
+            MmePacket->ODA[2], MmePacket->ODA[3],
+            MmePacket->ODA[4], MmePacket->ODA[5]);
+        DEBUG_PRINTF_EVCOMM_DETAIL("OSA: %02x:%02x:%02x:%02x:%02x:%02x\n", //Source MAC Address (EV MAC)
+            MmePacket->OSA[0], MmePacket->OSA[1],
+            MmePacket->OSA[2], MmePacket->OSA[3],
+            MmePacket->OSA[4], MmePacket->OSA[5]);
+        DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(MmePacket->MTYPE));
+        DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", MmePacket->MMV);
+        DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", MmePacket->MMTYPE);
+        DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n",
+            MmePacket->FMI[0],MmePacket->FMI[1]);
+    }
+    #endif
+
+    #if (SLAC_FIRST_RESPONSE_METHOD == SET_NO_PWM_IF_NOT_GET_PERMISSION)
+    {
+        //Check CP as 5%
+        if (EVCOMM_SYS_INFO.CpState != 3 &&
+            EVCOMM_SYS_INFO.CpState != 4 &&
+            MmePacket->MMTYPE != MMTYPE_CM_SET_KEY_CNF &&
+            MmePacket->MMTYPE != MMTYPE_VENDOR_VS_HOST_ACTION &&
+            MmePacket->MMTYPE != MMTYPE_VENDOR_ATTEN_CHAR &&
+            MmePacket->MMTYPE != MMTYPE_VENDOR_VS_NW_INFO_CNF
+           )
+        {
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC]ignored(wrong CP state)");
+            return 0;
+        }
+    }
+    #endif
+
+    //[To-Do] Adding a pre-check filter mechanism for Source and Destination MAC Address
+
+    //check if the destination address is broadcast or EVSE itself, it can be ignore if not belong to itself.
+    switch(MmePacket->MMTYPE)
+    {
+	    case MMTYPE_CM_SET_KEY_CNF:
+		{
+	        DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_SET_KEY_CNF ---\n");
+	        DEBUG_PRINTF_EVCOMM_DETAIL("Result: 0x%x\n", MmePacket->MMENTRY[0]);
+
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[QCA7K][Rx]CM_SET_KEY_CNF (SetKey: DONE)");
+            Update_V2G_Flow_Status(CM_SET_KEY_CNF);
+	        break;
+		}
+
+	    case MMTYPE_CM_SLAC_PARM_REQ:
+		{
+            //Check QCA7000 status
+            if (EVCOMM_SYS_INFO.QCA7K_SetKeyDone == FALSE)
+            {
+                //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx]CM_SLAC_PARM_REQ: ignored(QCA7K init...)");
+                break;
+            }
+
+            //Check error state
+            state = Check_V2G_Flow_Status();
+            if (state == Performance_Timeout ||     //253
+                state == Sequence_Timeout ||        //254
+                state == Other_Fault)               //255
+            {
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx]CM_SLAC_PARM_REQ: ignored(in error state)");
+				break;
+            }
+
+            //Printing EV MAC Address
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx]CM_SLAC_PARM_REQ");
+
+            //Avoid Coupled SLAC_PARM_REQ
+            if (CheckConnectorPlugIn() == FALSE)  //12V(State 1)
+            {
+                #if 0
+                sprintf((char*)buf_log_evcomm,
+                        "[WARNING][SLAC][Rx]CM_SLAC_PARM_REQ: ignored(coupled SLAC,%d)",
+                        CheckConnectorPlugIn());
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                #endif
+                break;
+            }
+
+            //[TC_SECC_VTB_CmSlacParm_003] SECURITY_TYPE needs to be 0x00 (no security)
+            if (MmePacket->MMENTRY[1] != 0)
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[WARNING][SLAC][Rx]CM_SLAC_PARM_REQ: ignored(invalid SECURITY_TYPE,%d)", //Source MAC Address (EV MAC)
+                        MmePacket->MMENTRY[1]);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                break;
+            }
+
+            //=================== Legal CM_SLAC_PARM_REQ Zone =================
+
+            Update_V2G_Flow_Status(CM_SLAC_PARM_REQ);
+
+            #if (SLAC_FIRST_RESPONSE_METHOD == SET_5_PWM_ONCE_RX_CM_SLAC_PARM_REQ)
+            {
+                //Once receiving CM_SLAC_PARM_REQ, set PWM as 5%
+                SwitchCpStateE(DISABLE);
+                OutputCpPwmDuty(5);
+            }
+            #endif
+
+            //Checking if this SLAC Req comes before 5% PWM (for 15118)
+            if(ShmInternalComm->ChargingPermission == FALSE)
+            {
+                //Sniffer_Tcpdump(ENABLE);
+                sprintf((char*)buf_log_evcomm, "Check Permission: %d (SLAC first => START)", ShmInternalComm->ChargingPermission);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            }
+
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_SLAC_PARM_REQ ---\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                    MmePacket->MMENTRY[2], MmePacket->MMENTRY[3],
+                    MmePacket->MMENTRY[4], MmePacket->MMENTRY[5],
+                    MmePacket->MMENTRY[6], MmePacket->MMENTRY[7],
+                    MmePacket->MMENTRY[8], MmePacket->MMENTRY[9]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("CipherSuiteSetSize: 0x%x\n", MmePacket->MMENTRY[10]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("CipherSuite [1]: 0x%x,0x%x\n",
+                    MmePacket->MMENTRY[11], MmePacket->MMENTRY[12]);
+            }
+            #endif
+
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                //Saving each CM_SLAC_PARM_REQ data into EVCC database
+                EvMac_in = &MmePacket->OSA[0];
+                RunID_in = &MmePacket->MMENTRY[2];
+                idx = SLAC_DB_Add(EvMac_in, RunID_in); //(EvMac, RunID)
+
+                if (idx < 0)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[WARNING][CM_SLAC_PARM_REQ]DB is full or errors occour(%d) => ignore",
+                            idx);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    break;
+                }
+
+                //Select the 1st EV MAC address
+                if (SLAC_INFO.arrayLen == 1)   //1st Req
+                {
+                    #if 1
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx]CM_SLAC_PARM_REQ[%d](%02X:%02X:%02X:%02X:%02X:%02X,%02X%02X%02X%02X%02X%02X%02X%02X):selected",
+                            (idx + 1),
+                            MmePacket->OSA[0], MmePacket->OSA[1], MmePacket->OSA[2], MmePacket->OSA[3], MmePacket->OSA[4], MmePacket->OSA[5],
+                            MmePacket->MMENTRY[2], MmePacket->MMENTRY[3], MmePacket->MMENTRY[4], MmePacket->MMENTRY[5],
+                            MmePacket->MMENTRY[6], MmePacket->MMENTRY[7], MmePacket->MMENTRY[8], MmePacket->MMENTRY[9]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    #endif
+                    /*
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][EVMAC][%d-th]%02X:%02X:%02X:%02X:%02X:%02X (selected)", //Source MAC Address (EV MAC)
+                            SLAC_INFO.arrayLen,
+                            MmePacket->OSA[0], MmePacket->OSA[1],
+                            MmePacket->OSA[2], MmePacket->OSA[3],
+                            MmePacket->OSA[4], MmePacket->OSA[5]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][RunID][%d-th]%02X%02X%02X%02X%02X%02X%02X%02X (selected)", //RunID (from EVCC)
+                            SLAC_INFO.arrayLen,
+                            MmePacket->MMENTRY[2], MmePacket->MMENTRY[3],
+                            MmePacket->MMENTRY[4], MmePacket->MMENTRY[5],
+                            MmePacket->MMENTRY[6], MmePacket->MMENTRY[7],
+                            MmePacket->MMENTRY[8], MmePacket->MMENTRY[9]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    */
+                }
+                else    //2nd Req
+                {
+                    #if 1
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx]CM_SLAC_PARM_REQ[%d](%02X:%02X:%02X:%02X:%02X:%02X,%02X%02X%02X%02X%02X%02X%02X%02X):not selected",
+                            (idx + 1),
+                            MmePacket->OSA[0], MmePacket->OSA[1], MmePacket->OSA[2], MmePacket->OSA[3], MmePacket->OSA[4], MmePacket->OSA[5],
+                            MmePacket->MMENTRY[2], MmePacket->MMENTRY[3], MmePacket->MMENTRY[4], MmePacket->MMENTRY[5],
+                            MmePacket->MMENTRY[6], MmePacket->MMENTRY[7], MmePacket->MMENTRY[8], MmePacket->MMENTRY[9]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    #endif
+                    /*
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][EVMAC][%d-th]%02X:%02X:%02X:%02X:%02X:%02X (not selected)", //Source MAC Address (EV MAC)
+                            SLAC_INFO.arrayLen,
+                            MmePacket->OSA[0], MmePacket->OSA[1],
+                            MmePacket->OSA[2], MmePacket->OSA[3],
+                            MmePacket->OSA[4], MmePacket->OSA[5]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][RunID][%d-th]%02X%02X%02X%02X%02X%02X%02X%02X (not selected)", //RunID (from EVCC)
+                            SLAC_INFO.arrayLen,
+                            MmePacket->MMENTRY[2], MmePacket->MMENTRY[3],
+                            MmePacket->MMENTRY[4], MmePacket->MMENTRY[5],
+                            MmePacket->MMENTRY[6], MmePacket->MMENTRY[7],
+                            MmePacket->MMENTRY[8], MmePacket->MMENTRY[9]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    */
+                }
+                memcpy(EvMac, MmePacket->OSA, sizeof(EvMac));
+                memcpy(DestSocketAddress.sll_addr, MmePacket->OSA, SLAC_EVMAC_LENGTH);
+                memcpy(SlacRunId, MmePacket->MMENTRY + 2, SLAC_RUNID_LENGTH);
+                memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+                memcpy(SendMmePacket.ODA, MmePacket->OSA, 6);
+                memcpy(SendMmePacket.OSA, CsuMac, 6);
+                SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+                SendMmePacket.MMV = MmePacket->MMV;
+                SendMmePacket.MMTYPE = MMTYPE_CM_SLAC_PARM_CNF;
+                SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+                SendMmePacketSize = 0;
+                memset(SendMmePacket.MMENTRY, 0xFF, 6); //M-SOUND_TARGET(6-byte:0xFFFFFFFFFFFF): Fixed value indicating that M-Sounds to be sent as Ethernet broadcast
+                SendMmePacketSize += 6;
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = C_EV_match_MNBC; //NUM_SOUNDS(0x0A): Number of M-Sounds to be transmitted by the EV GP Station during the SLAC process
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 6; //Time_Out(0x06): unit = 100ms
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x01; //RESP_TYPE(0x01): Fixed value indicating ��Other GP station��, 0x00 �V HLE of the STA, 0x01 �V Another GP STA, 0x02 �V 0xFF �V Reserved
+                memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, SLAC_INFO.array[idx].EvMac, 6); //FORWARDING_STA(MAC Address of the EV HLE)
+                SendMmePacketSize += 6;
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0; //APPLICATION_TYPE(0x00): 0x00(PEV-EVSE Association), 0x01-0xFF(Reserved)
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0; //SECURITY_TYPE(0x00): 0x00(No Security), 0x01(Public Key Signature), 0x02-0xFF(Reserved)
+                memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, SlacRunId, SLAC_RUNID_LENGTH); //RunID (8-byte)
+                SendMmePacketSize += SLAC_RUNID_LENGTH;
+                SendMmePacketSize += 19;      //the size before MMENTRY
+
+                #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Response MME Packet *****\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.OSA[0],SendMmePacket.OSA[1],SendMmePacket.OSA[2],SendMmePacket.OSA[3],SendMmePacket.OSA[4],SendMmePacket.OSA[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(SendMmePacket.MTYPE));
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", SendMmePacket.MMV);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", SendMmePacket.MMTYPE);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n", SendMmePacket.FMI[0],SendMmePacket.FMI[1]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("--- CM_SLAC_PARM_CNF ---\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("M-SOUND_TARGET: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                           SendMmePacket.MMENTRY[0],SendMmePacket.MMENTRY[1],SendMmePacket.MMENTRY[2],SendMmePacket.MMENTRY[3],
+                           SendMmePacket.MMENTRY[4],SendMmePacket.MMENTRY[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("NUM_SOUNDS: 0x%x\n", SendMmePacket.MMENTRY[6]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("Time_Out: 0x%x\n", SendMmePacket.MMENTRY[7]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RESP_TYPE: 0x%x\n", SendMmePacket.MMENTRY[8]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("M-FORWARDING_STA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.MMENTRY[9],SendMmePacket.MMENTRY[10],SendMmePacket.MMENTRY[11],SendMmePacket.MMENTRY[12],
+                           SendMmePacket.MMENTRY[13],SendMmePacket.MMENTRY[14]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", SendMmePacket.MMENTRY[15]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", SendMmePacket.MMENTRY[16]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                           SendMmePacket.MMENTRY[17],SendMmePacket.MMENTRY[18],SendMmePacket.MMENTRY[19],SendMmePacket.MMENTRY[20],
+                           SendMmePacket.MMENTRY[21],SendMmePacket.MMENTRY[22],SendMmePacket.MMENTRY[23],SendMmePacket.MMENTRY[24]);
+                }
+                #endif
+
+                Update_V2G_Flow_Status(CM_SLAC_PARM_CONF);
+                Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+
+                DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n",SendMmePacketSize,Rtn);
+
+                ftime(&SeqStartTime);
+                break;
+            }
+            #else
+            {
+                memcpy(EvMac, MmePacket->OSA, sizeof(EvMac));
+                memcpy(DestSocketAddress.sll_addr, MmePacket->OSA, sizeof(EvMac));
+                memcpy(SlacRunId,MmePacket->MMENTRY + 2, sizeof(SlacRunId));
+                memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+                memcpy(SendMmePacket.ODA, MmePacket->OSA, 6);
+                memcpy(SendMmePacket.OSA, CsuMac, 6);
+                SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+                SendMmePacket.MMV = MmePacket->MMV;
+                SendMmePacket.MMTYPE = MMTYPE_CM_SLAC_PARM_CNF;
+                SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+                SendMmePacketSize = 0;
+                memset(SendMmePacket.MMENTRY, 0xFF, 6); //M-SOUND_TARGET(6-byte:0xFFFFFFFFFFFF): Fixed value indicating that M-Sounds to be sent as Ethernet broadcast
+                SendMmePacketSize += 6;
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = C_EV_match_MNBC; //NUM_SOUNDS(0x0A): Number of M-Sounds to be transmitted by the EV GP Station during the SLAC process
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 6; //Time_Out(0x06): unit = 100ms
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x01; //RESP_TYPE(0x01): Fixed value indicating ��Other GP station��, 0x00 �V HLE of the STA, 0x01 �V Another GP STA, 0x02 �V 0xFF �V Reserved
+                memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, EvMac, 6); //FORWARDING_STA(MAC Address of the EV HLE)
+                SendMmePacketSize += 6;
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0; //APPLICATION_TYPE(0x00): 0x00(PEV-EVSE Association), 0x01-0xFF(Reserved)
+                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0; //SECURITY_TYPE(0x00): 0x00(No Security), 0x01(Public Key Signature), 0x02-0xFF(Reserved)
+                memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, SlacRunId, sizeof(SlacRunId)); //RunID (8-byte)
+                SendMmePacketSize += sizeof(SlacRunId);
+                SendMmePacketSize += 19;      //the size before MMENTRY
+
+                #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Response MME Packet *****\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.OSA[0],SendMmePacket.OSA[1],SendMmePacket.OSA[2],SendMmePacket.OSA[3],SendMmePacket.OSA[4],SendMmePacket.OSA[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(SendMmePacket.MTYPE));
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", SendMmePacket.MMV);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", SendMmePacket.MMTYPE);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n", SendMmePacket.FMI[0],SendMmePacket.FMI[1]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("--- CM_SLAC_PARM_CNF ---\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("M-SOUND_TARGET: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                           SendMmePacket.MMENTRY[0],SendMmePacket.MMENTRY[1],SendMmePacket.MMENTRY[2],SendMmePacket.MMENTRY[3],
+                           SendMmePacket.MMENTRY[4],SendMmePacket.MMENTRY[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("NUM_SOUNDS: 0x%x\n", SendMmePacket.MMENTRY[6]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("Time_Out: 0x%x\n", SendMmePacket.MMENTRY[7]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RESP_TYPE: 0x%x\n", SendMmePacket.MMENTRY[8]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("M-FORWARDING_STA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.MMENTRY[9],SendMmePacket.MMENTRY[10],SendMmePacket.MMENTRY[11],SendMmePacket.MMENTRY[12],
+                           SendMmePacket.MMENTRY[13],SendMmePacket.MMENTRY[14]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", SendMmePacket.MMENTRY[15]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", SendMmePacket.MMENTRY[16]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                           SendMmePacket.MMENTRY[17],SendMmePacket.MMENTRY[18],SendMmePacket.MMENTRY[19],SendMmePacket.MMENTRY[20],
+                           SendMmePacket.MMENTRY[21],SendMmePacket.MMENTRY[22],SendMmePacket.MMENTRY[23],SendMmePacket.MMENTRY[24]);
+                }
+                #endif
+
+                Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+                Update_V2G_Flow_Status(CM_SLAC_PARM_CONF);
+
+                DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n",SendMmePacketSize,Rtn);
+
+                ftime(&SeqStartTime);
+                counter = 0;
+                break;
+            }
+            #endif
+		}
+
+	    case MMTYPE_CM_START_ATTEN_CHAR_IND:
+		{
+            if(V2gFlowStatus >= CM_ATTEN_CHAR_IND)
+            {
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[WARNING][SLAC][Rx]CM_START_ATTEN_CHAR_IND: ignored(timeup)");
+                break;
+            }
+
+            //Avoid Coupled CM_START_ATTEN_CHAR_IND
+            if (CheckConnectorPlugIn() == FALSE)  //12V(State 1)
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[WARNING][SLAC][Rx]CM_START_ATTEN_CHAR_IND: ignored(coupled SLAC,%d)",
+                        CheckConnectorPlugIn());
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                break;
+            }
+
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_START_ATTEN_CHAR_IND (counter : %d/3 ) ---\n",counter + 1);
+                DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("NUM_SOUNDS: 0x%x\n", MmePacket->MMENTRY[2]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("Time_Out 0x%x\n", MmePacket->MMENTRY[3]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("RESP_TYPE 0x%x\n", MmePacket->MMENTRY[4]);    //Fixed value (0x01) indicating ��other Green PHY station��
+                DEBUG_PRINTF_EVCOMM_DETAIL("FORWARDING_STA: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                       MmePacket->MMENTRY[5],MmePacket->MMENTRY[6],MmePacket->MMENTRY[7],MmePacket->MMENTRY[8],
+                       MmePacket->MMENTRY[9],MmePacket->MMENTRY[10]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                       MmePacket->MMENTRY[11],MmePacket->MMENTRY[12],MmePacket->MMENTRY[13],MmePacket->MMENTRY[14],
+                       MmePacket->MMENTRY[15],MmePacket->MMENTRY[16],MmePacket->MMENTRY[17],MmePacket->MMENTRY[18]);
+            }
+            #endif
+
+            //New SLAC architecture designed by Joseph
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                EvMac_in = &MmePacket->OSA[0];
+                RunID_in = &MmePacket->MMENTRY[11];
+                idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+                if (idx >= 0)
+                {
+                    Update_V2G_Flow_Status(CM_START_ATTEN_CHAR_IND);
+
+                    //[TC_SECC_VTB_AttenuationCharacterization_013]
+                    if (MmePacket->MMENTRY[0] != 0) //APPLICATION_TYPE must be 0x00(EV-EVSE Matching)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Rx][CM_START_ATTEN_CHAR_IND]APPLICATION_TYPE(%d): invalid => ignore Req",
+                                MmePacket->MMENTRY[0]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_AttenuationCharacterization_014]
+                    if (MmePacket->MMENTRY[1] != 0) //SECURITY_TYPE must be 0x00(No Security)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Rx][CM_START_ATTEN_CHAR_IND]SECURITY_TYPE(%d): invalid => ignore Req",
+                                MmePacket->MMENTRY[1]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_AttenuationCharacterization_017]
+                    if (MmePacket->MMENTRY[4] != 0x01) //RESP_TYPE must be 0x01(Send to another GP STA(EV))
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Rx][CM_START_ATTEN_CHAR_IND]RESP_TYPE(%d): invalid => ignore Req",
+                                MmePacket->MMENTRY[4]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_AttenuationCharacterization_021]
+                    //FORWARDING_STA: MAC Address of the EV HLE (station which the measurement results shall be sent to)
+                    if (Array_Compare_Identity(EvMac_in, &MmePacket->MMENTRY[5], SLAC_EVMAC_LENGTH) == FALSE)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Rx][CM_START_ATTEN_CHAR_IND]FORWARDING_STA(%02X:%02X:%02X:%02X:%02X:%02X): invalid => ignore Req",
+                                MmePacket->MMENTRY[5], MmePacket->MMENTRY[6],
+                                MmePacket->MMENTRY[7], MmePacket->MMENTRY[8],
+                                MmePacket->MMENTRY[9], MmePacket->MMENTRY[10]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                        SLAC_INFO.array[idx].StartAttenCharErr = TRUE;
+                        break;
+                    }
+
+                    //Check RunID
+                    if (SLAC_DB_Check_EvMac_RunID_Matching(&SLAC_INFO, EvMac_in, RunID_in) == TRUE)
+                    {
+                        SLAC_INFO.array[idx].MnbcSoundNum = MmePacket->MMENTRY[2];
+                        SLAC_INFO.array[idx].StartAttenCharCnt++;
+
+                        #if 0
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_START_ATTEN_CHAR_IND[%d]:%d-th",
+                                (idx + 1),
+                                SLAC_INFO.array[idx].StartAttenCharCnt);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        #endif
+
+                        if (SLAC_INFO.array[idx].StartAttenCharCnt == 1)
+                        {
+                            memset(SLAC_INFO.array[idx].AAG, 0, sizeof(SLAC_INFO.array[idx].AAG));
+                            SLAC_INFO.array[idx].AttenProfileCnt = 0;
+                            ftime(&SeqStartTime);       //start TT_EVSE_match_MNBC
+                        }
+                        else if (SLAC_INFO.array[idx].StartAttenCharCnt >= 3)
+                        {
+                            sprintf((char*)buf_log_evcomm,
+                                    "[WARNING][SLAC][Rx][CM_START_ATTEN_CHAR_IND]counter(%d): unexpected",
+                                    SLAC_INFO.array[idx].StartAttenCharCnt);
+                        }
+                        else
+                        {
+                            //null
+                        }
+                    }
+                    else
+                    {
+                        //This RunID is not matched with this EvMac,
+                        //or this RunID is not found in DB.
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Rx][CM_START_ATTEN_CHAR_IND]EvMac-RunID: unmatched => ignore Req");
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                        //Response: ignore
+                    }
+                }
+                else
+                {
+                    //this msg source is not in database
+                    //ignore
+                }
+                break;
+            }
+            #else   //Old SLAC architecture designed by Vern
+            {
+                MnbcSoundNum = MmePacket->MMENTRY[2];
+                Update_V2G_Flow_Status(CM_START_ATTEN_CHAR_IND);
+                counter++;
+                if(counter == 1)
+                {
+                    memset(Aag, 0, sizeof(Aag));
+                    AttenProfileCnt = 0;
+                    ftime(&SeqStartTime);       //start TT_EVSE_match_MNBC
+                }
+                else if(counter >= 3)
+                {
+                    counter = 0;
+                }
+                break;
+            }
+            #endif
+		}
+
+	    case MMTYPE_CM_MNBC_SOUND_IND:
+		{
+	        if(V2gFlowStatus >= CM_ATTEN_CHAR_IND)
+	        {
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[WARNING][SLAC][Rx]CM_MNBC_SOUND_IND: ignored(timeup)");
+                break;
+            }
+
+            //Avoid Coupled CM_MNBC_SOUND_IND
+            if (CheckConnectorPlugIn() == FALSE)  //12V(State 1)
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[WARNING][SLAC][Rx]CM_MNBC_SOUND_IND: ignored(coupled SLAC,%d)",
+                        CheckConnectorPlugIn());
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                break;
+            }
+
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_MNBC_SOUND_IND (counter : %d/%d) ---\n",counter + 1 , MnbcSoundNum);
+                DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SenderID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                       MmePacket->MMENTRY[2],MmePacket->MMENTRY[3],MmePacket->MMENTRY[4],MmePacket->MMENTRY[5],
+                       MmePacket->MMENTRY[6],MmePacket->MMENTRY[7],MmePacket->MMENTRY[8],MmePacket->MMENTRY[9],
+                       MmePacket->MMENTRY[10],MmePacket->MMENTRY[11],MmePacket->MMENTRY[12],MmePacket->MMENTRY[13],
+                       MmePacket->MMENTRY[14],MmePacket->MMENTRY[15],MmePacket->MMENTRY[16],MmePacket->MMENTRY[17],
+                       MmePacket->MMENTRY[18]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("Cnt: 0x%x\n", MmePacket->MMENTRY[19]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                       MmePacket->MMENTRY[20],MmePacket->MMENTRY[21],MmePacket->MMENTRY[22],MmePacket->MMENTRY[23],
+                       MmePacket->MMENTRY[24],MmePacket->MMENTRY[25],MmePacket->MMENTRY[26],MmePacket->MMENTRY[27]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                       MmePacket->MMENTRY[28],MmePacket->MMENTRY[29],MmePacket->MMENTRY[30],MmePacket->MMENTRY[31],
+                       MmePacket->MMENTRY[32],MmePacket->MMENTRY[33],MmePacket->MMENTRY[34],MmePacket->MMENTRY[35]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("Rnd: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                       MmePacket->MMENTRY[36],MmePacket->MMENTRY[37],MmePacket->MMENTRY[38],MmePacket->MMENTRY[39],
+                       MmePacket->MMENTRY[40],MmePacket->MMENTRY[41],MmePacket->MMENTRY[42],MmePacket->MMENTRY[43],
+                       MmePacket->MMENTRY[44],MmePacket->MMENTRY[45],MmePacket->MMENTRY[46],MmePacket->MMENTRY[47],
+                       MmePacket->MMENTRY[48],MmePacket->MMENTRY[49],MmePacket->MMENTRY[50],MmePacket->MMENTRY[51]);
+            }
+            #endif
+
+
+            //New SLAC architecture designed by Joseph
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                EvMac_in = &MmePacket->OSA[0];
+                RunID_in = &MmePacket->MMENTRY[20];
+                idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+                if (idx >= 0)
+                {
+                    Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
+
+                    //Check for RunID
+                    if (SLAC_DB_Check_EvMac_RunID_Matching(&SLAC_INFO, EvMac_in, RunID_in) == TRUE)
+                    {
+                        SLAC_INFO.array[idx].MnbcSoundCnt++;
+
+                        /*
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_MNBC_SOUND_IND[%d]:%d-th",
+                                (idx + 1),
+                                SLAC_INFO.array[idx].MnbcSoundCnt);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        */
+                    }
+                    else
+                    {
+                        //RunID is not matched or does not exist.
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Rx]CM_MNBC_SOUND_IND]EvMac-RunID: unmatched");
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    }
+                }
+                else
+                {
+                    //ignore
+                    sprintf((char*)buf_log_evcomm,
+                            "[WARNING][SLAC][Rx]CM_MNBC_SOUND_IND]EvMac does not exist");
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                }
+                break;
+            }
+            #else   //Old SLAC architecture designed by Vern
+            {
+                Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
+                counter++;
+                break;
+            }
+            #endif
+		}
+
+	    case MMTYPE_CM_ATTEN_PROFILE_IND:
+		{
+	        if(V2gFlowStatus >= CM_ATTEN_CHAR_IND)
+	        {
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[WARNING][SLAC][Rx]CM_ATTEN_PROFILE_IND: ignore(timeup)");
+				break;
+			}
+
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_ATTEN_PROFILE_IND (counter : %d/%d) ---\n", counter, MnbcSoundNum);
+                DEBUG_PRINTF_EVCOMM_DETAIL("EV MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                       MmePacket->MMENTRY[0], MmePacket->MMENTRY[1], MmePacket->MMENTRY[2], MmePacket->MMENTRY[3],
+                       MmePacket->MMENTRY[4], MmePacket->MMENTRY[5]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("NumGroups: 0x%x\n", MmePacket->MMENTRY[6]);  //NumGroups, Number of AAG Groups (ex: 0x3A = 58)
+                //NumGroups: Number of OFDM carrier groups used for the SLAC signal characterization.
+                //AAG[i]: Average Attenuation of Group i (i = 1 ~ 58)
+                DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: 0x%x\n", MmePacket->MMENTRY[7]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("AAG: \n");
+
+                for(Rtn = 0; Rtn < MmePacket->MMENTRY[6]; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[8 + Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+            }
+            #endif
+
+            //New SLAC architecture designed by Joseph
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                EvMac_in = &MmePacket->MMENTRY[0]; //[CAUTION] The EvMac address is not &MmePacket->OSA[0]
+                //[CAUTION] There is no RunID information of CM_ATTEN_PROFILE_IND
+                //          packet, which means SECC cannot use the RunID to
+                //          distinguish those SLAC request with identical EvMac
+                //          but with different RunID.
+                idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+                /*
+                printf("%d, %d, %d, %d\n",
+                        idx,
+                        SLAC_INFO.array[idx].AagGroupsNum,
+                        MmePacket->MMENTRY[6],
+                        SLAC_INFO.array[idx].AttenProfileCnt);
+                */
+
+                if (idx >= 0)
+                {
+                    SLAC_INFO.array[idx].AttenProfileCnt++;
+
+                    /*
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx]CM_ATTEN_PROFILE_IND[%d]:%d-th",
+                            (idx + 1),
+                            SLAC_INFO.array[idx].AttenProfileCnt);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    */
+
+                    //printf("%d, %d\n", SLAC_INFO.array[idx].AagGroupsNum, MmePacket->MMENTRY[6]);
+
+                    SLAC_INFO.array[idx].AagGroupsNum = MmePacket->MMENTRY[6];
+                    ////NumGroups, Number of AAG Groups (ex: 0x3A = 58)
+
+                    for(Rtn = 0; Rtn < SLAC_INFO.array[idx].AagGroupsNum; Rtn++) //ex:58
+                    {
+                        SLAC_INFO.array[idx].AAG[Rtn] += MmePacket->MMENTRY[8 + Rtn];
+                    }
+
+                    Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
+                    break;
+                }
+                else
+                {
+                    //The EvMac is not in the database
+                    //ignore
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx][CM_ATTEN_PROFILE_IND]EvMac(%02X%02X%02X%02X%02X%02X): not exist => ignore",
+                            EvMac_in[0], EvMac_in[1], EvMac_in[2], EvMac_in[3], EvMac_in[4], EvMac_in[5]);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    break;
+                }
+            }
+            #else   //Old SLAC architecture designed by Vern
+            {
+                AagGroupsNum = MmePacket->MMENTRY[6];
+                for(Rtn = 0; Rtn < MmePacket->MMENTRY[6]; Rtn++)
+                {
+                    Aag[Rtn] += MmePacket->MMENTRY[8 + Rtn];
+                }
+                AttenProfileCnt++;
+                Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
+                break;
+            }
+            #endif
+		}
+
+	    case MMTYPE_CM_ATTEN_CHAR_RSP:
+		{
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_ATTEN_CHAR_RSP ---\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ADDRESS: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                       MmePacket->MMENTRY[2],MmePacket->MMENTRY[3],MmePacket->MMENTRY[4],MmePacket->MMENTRY[5],
+                       MmePacket->MMENTRY[6],MmePacket->MMENTRY[7]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                       MmePacket->MMENTRY[8],MmePacket->MMENTRY[9],MmePacket->MMENTRY[10],MmePacket->MMENTRY[11],
+                       MmePacket->MMENTRY[12],MmePacket->MMENTRY[13],MmePacket->MMENTRY[14],MmePacket->MMENTRY[15]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: \n");
+                for(Rtn = 0; Rtn < 17; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[16 + Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: \n");
+                for(Rtn = 0; Rtn < 17; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[33 + Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("Result: 0x%x\n", MmePacket->MMENTRY[50]);    //Fixed value of 0x00 indicates a successful SLAC process
+            }
+            #endif
+
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                //Check ODA (Destination Address)
+                if (Array_Compare_Identity(CsuMac, MmePacket->ODA, SLAC_EVSE_MAC_LENGTH) == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx][CM_ATTEN_CHAR_RSP]wrong ODA: ignore");
+                    break;
+                }
+
+                EvMac_in = &MmePacket->OSA[0];
+                RunID_in = &MmePacket->MMENTRY[8];
+                idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+                //Check Parameters
+                if ((MmePacket->MMENTRY[0] != 0) ||   //[TC_SECC_VTB_AttenuationCharacterization_005] applicationType must be 0x00
+                    (MmePacket->MMENTRY[1] != 0) ||   //[TC_SECC_VTB_AttenuationCharacterization_006] securityType must be 0x00
+                    (SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in) < 0) || //[TC_SECC_VTB_AttenuationCharacterization_007] sourceAddress cannot not be all zero
+                    (SLAC_DB_Check_EvMac_RunID_Matching(&SLAC_INFO, EvMac_in, RunID_in) == FALSE) ||    //[TC_SECC_VTB_AttenuationCharacterization_008] check for invalid runID
+                    (Array_Check_All_Zero(&MmePacket->MMENTRY[16], 17) == FALSE) ||  //[TC_SECC_VTB_AttenuationCharacterization_009] SourceID(17 bytes) must be all zero.
+                    (Array_Check_All_Zero(&MmePacket->MMENTRY[33], 17) == FALSE) ||  //[TC_SECC_VTB_AttenuationCharacterization_009] RESP_ID (17 bytes) must be all zero.
+                    (MmePacket->MMENTRY[50] != 0)   //Result:  must be 0x00(Success)
+                    )
+                {
+                    EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry++;
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[WARNING][SLAC][Rx]CM_ATTEN_CHAR_RSP:invalid para(%d,%d,%d,%d,%d) => %d-th retry",
+                            MmePacket->MMENTRY[0],  //applicationType must be 0x00
+                            MmePacket->MMENTRY[1],  //securityType must be 0x00
+                            SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in),
+                            SLAC_DB_Check_EvMac_RunID_Matching(&SLAC_INFO, EvMac_in, RunID_in),
+                            MmePacket->MMENTRY[50],
+                            EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry
+                            );
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    if (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry <= 2)   //limited to 2 retries
+                    {
+                        Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
+                        ftime(&SeqStartTime);
+                        break;
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR][SLAC][Rx]CM_ATTEN_CHAR_RSP:invalid para => 2-retry fail => End_Process");
+                        Update_V2G_Flow_Status(Other_Fault);
+                        break;
+                    }
+                }
+                else
+                {
+                    //The CM_ATTEN_CHAR_IND is legal
+                    SLAC_INFO.array[idx].AttenCharRspCnt++;
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx]CM_ATTEN_CHAR_RSP[%d]:%d-th",
+                            (idx + 1),
+                            SLAC_INFO.array[idx].AttenCharRspCnt);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry = 0;
+                    Update_V2G_Flow_Status(CM_ATTEN_CHAR_RSP);
+                    ftime(&SeqStartTime);
+                    break;
+                }
+            }
+            #else
+            {
+                //Check Parameters
+                if ((MmePacket->MMENTRY[0] != 0) ||   //[TC_SECC_VTB_AttenuationCharacterization_005] applicationType must be 0x00
+                    (MmePacket->MMENTRY[1] != 0) ||   //[TC_SECC_VTB_AttenuationCharacterization_006] securityType must be 0x00
+                    (Array_Compare_Identity(SLAC_INFO.array[0].EvMac, &MmePacket->MMENTRY[2], 6) == TRUE) || //[TC_SECC_VTB_AttenuationCharacterization_007] sourceAddress cannot not be all zero
+                    (Array_Compare_Identity(SLAC_INFO.array[0].RunID, &MmePacket->MMENTRY[8], 8) == TRUE)    //[TC_SECC_VTB_AttenuationCharacterization_008] check for invalid runID
+                    )
+                {
+                    EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry++;
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[WARNING][SLAC][Rx]CM_ATTEN_CHAR_RSP: invalid parameters(%d-th)",
+                            EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    if (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry <= 2)   //limited to 2 retries
+                    {
+                        Update_V2G_Flow_Status(CM_MNBC_SOUND_IND);
+                        ftime(&SeqStartTime);
+                        break;
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]CM_ATTEN_CHAR_RSP: invalid parameters => End_Process");
+                        Update_V2G_Flow_Status(Other_Fault);
+                        ftime(&SeqStartTime);
+                        break;
+                    }
+                }
+                else
+                {
+                    EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry = 0;
+                    Update_V2G_Flow_Status(CM_ATTEN_CHAR_RSP);
+                    ftime(&SeqStartTime);
+                    break;
+                }
+            }
+            #endif
+		}
+
+	    case MMTYPE_CM_VALIDATE_REQ:   //BCB Toggle
+		{
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_VALIDATE_REQ ---\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("Signal Type: 0x%x\n", MmePacket->MMENTRY[0]);    //Fixed value (0x00) to indicate ��PEV S2 toggles on control pilot line��
+                DEBUG_PRINTF_EVCOMM_DETAIL("Timer: 0x%x\n", MmePacket->MMENTRY[1]);    //Fixed value In the first VALIDATE Request-Response exchange, the Timer field shall be set to zero.
+                DEBUG_PRINTF_EVCOMM_DETAIL("Result: 0x%x\n", MmePacket->MMENTRY[2]);    //Fixed value In the first VALIDATE Request-Response exchange, the Result field shall be set to 0x01 = ��ready��.
+            }
+            #endif
+
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                counter = 0;
+
+                EvMac_in = &MmePacket->OSA[0];
+                idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+                if (idx >= 0)
+                {
+                    Update_V2G_Flow_Status(CM_VALIDATE_CNF);
+                    SLAC_INFO.array[idx].ValidateReqCnt++;
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx]CM_VALIDATE_REQ[%d]:%d-th",
+                            (idx + 1),
+                            SLAC_INFO.array[idx].ValidateReqCnt);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+
+                    //[To-Do] Protection
+
+
+                    memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+                    memcpy(SendMmePacket.ODA, EvMac_in, SLAC_EVMAC_LENGTH);
+                    memcpy(SendMmePacket.OSA, CsuMac, 6);
+                    SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+                    SendMmePacket.MMV = 0x01;
+                    SendMmePacket.MMTYPE = MMTYPE_CM_VALIDATE_CNF;
+                    SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+                    SendMmePacketSize = 0;
+
+                    if(counter == 0)
+                    {
+                        //The First MMTYPE_CM_VALIDATE_REQ because Unicast
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //SignalType(0x00): Fixed value to indicate "EV S2 toggles on control pilot line"
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //ToggleNum(0x00): Fixed value. In the first VALIDATE Request-Response exchange, the ToggleNum field shall be set to zero.
+
+                        #if (SUPPORT_BCB_TOGGLE_FUNCTION == ENABLE)
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = 1;    //0x01 = Ready
+                        #else
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = 4;    //0x04 = Not Required
+                        #endif
+                    }
+                    else
+                    {
+                        //The Second MMTYPE_CM_VALIDATE_REQ because Broadcast
+                        unsigned char PreStatus = 3;
+                        unsigned char ToggleNum = 0;
+                        ftime(&SeqStartTime);
+                        while(1)
+                        {
+                            if((EVCOMM_SYS_INFO.CpState == 4) && (PreStatus == 3))
+                            {
+                                ToggleNum++;
+                                PreStatus = 4;
+                            }
+                            else
+                            {
+                                PreStatus = 3;
+                            }
+
+                            ftime(&SeqEndTime);
+                            if(DiffTimeb(SeqStartTime, SeqEndTime) >= (SendMmePacket.MMENTRY[1]*100 + 100))
+                            {
+                                SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //Fixed value to indicate "PEV S2 toggles on control pilot line"
+                                SendMmePacket.MMENTRY[SendMmePacketSize++] = ToggleNum;
+
+                                #if (SUPPORT_BCB_TOGGLE_FUNCTION == ENABLE)
+                                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 2;    //0x02 = Success
+                                #else
+                                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 4;    //0x04 = Not Required
+                                #endif
+
+                                break;
+                            }
+                        }
+                    }
+                    SendMmePacketSize += 19;      //the size before MMENTRY
+                    Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+                    ftime(&SeqStartTime);
+                }
+                else
+                {
+                    //EvMac does not exist.
+                    //ignore
+                }
+                break;
+            }
+            #else
+            {
+                counter = 0;
+
+                for(Rtn = 0; Rtn < 6; Rtn++)
+                {
+                    if(MmePacket->ODA[Rtn] != CsuMac[Rtn])
+                    {
+                        counter = 1;
+                        break;
+                    }
+                }
+
+                memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+                memcpy(SendMmePacket.ODA, EvMac,6);
+                memcpy(SendMmePacket.OSA, CsuMac,6);
+                SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+                SendMmePacket.MMV = 0x01;
+                SendMmePacket.MMTYPE = MMTYPE_CM_VALIDATE_CNF;
+                SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+                SendMmePacketSize = 0;
+                if(counter == 0)
+                {
+                    //The First MMTYPE_CM_VALIDATE_REQ because Unicast
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //Fixed value to indicate ��PEV S2 toggles on control pilot line��
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //Fixed value In the first VALIDATE Request-Response exchange, the ToggleNum field shall be set to zero.
+                    #if (SUPPORT_BCB_TOGGLE_FUNCTION == ENABLE)
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 1;    //0x01 = Ready
+                    #else
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 4;    //0x04 = Not Required
+                    #endif
+                }
+                else
+                {
+                    //The Second MMTYPE_CM_VALIDATE_REQ because Broadcast
+                    unsigned char PreStatus = 3, ToggleNum = 0;
+                    ftime(&SeqStartTime);
+                    while(1)
+                    {
+                        ftime(&SeqEndTime);
+                        if((EVCOMM_SYS_INFO.CpState == 4) && (PreStatus == 3))
+                        {
+                            ToggleNum++;
+                            PreStatus = 4;
+                        }
+                        else
+                        {
+                            PreStatus = 3;
+                        }
+                        if(DiffTimeb(SeqStartTime, SeqEndTime) >= (SendMmePacket.MMENTRY[1]*100 + 100))
+                        {
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //Fixed value to indicate ��PEV S2 toggles on control pilot line��
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = ToggleNum;
+                            #if (SUPPORT_BCB_TOGGLE_FUNCTION == ENABLE)
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = 2;    //0x02 = Success
+                            #else
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = 4;    //0x04 = Not Required
+                            #endif
+                            break;
+                        }
+                    }
+                }
+                SendMmePacketSize += 19;      //the size before MMENTRY
+                Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+                Update_V2G_Flow_Status(CM_VALIDATE_CNF);
+                ftime(&SeqStartTime);
+                break;
+            }
+            #endif
+		}
+
+	    case MMTYPE_CM_SLAC_MATCH_REQ:
+		{
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_CM_SLAC_MATCH_REQ ---\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", MmePacket->MMENTRY[0]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", MmePacket->MMENTRY[1]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("MVFLength: 0x%x, 0x%x\n", MmePacket->MMENTRY[2],MmePacket->MMENTRY[3]);    //Fixed value (0x3E) for matching
+                DEBUG_PRINTF_EVCOMM_DETAIL("PEV ID: \n");
+                for(Rtn=0; Rtn<17; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[4+Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("PEV MAC: \n");
+                for(Rtn=0; Rtn<6; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[21+Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("EVSE ID: \n");
+                for(Rtn=0; Rtn<17; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[27+Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("EVSE MAC: \n");
+                for(Rtn=0; Rtn<6; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[44+Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("RunID: \n");
+                for(Rtn=0; Rtn<8; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[50+Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: \n");
+                for(Rtn=0; Rtn<8; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",MmePacket->MMENTRY[58+Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+            }
+            #endif
+
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx]CM_SLAC_MATCH_REQ");
+
+                //Check ODA (Destination Address)
+                if (Array_Compare_Identity(CsuMac, MmePacket->ODA, SLAC_EVSE_MAC_LENGTH) == FALSE)
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx][CM_SLAC_MATCH_REQ]wrong ODA: ignore");
+                    //break; //patch for DEKRA I2SE EVCC (another EVSE MAC Address protection comes as below.)
+                }
+
+                EvMac_in = &MmePacket->OSA[0];
+                RunID_in = &MmePacket->MMENTRY[50];
+                idx = SLAC_DB_Search_EvMac_idx(&SLAC_INFO, EvMac_in);
+
+                if (idx >= 0)
+                {
+                    Update_V2G_Flow_Status(CM_SLAC_MATCH_REQ);
+
+                    SLAC_INFO.array[idx].MatchReqNum++;
+
+                    sprintf((char*)buf_log_evcomm,
+                            "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]:%d-th",
+                            (idx + 1),
+                            SLAC_INFO.array[idx].MatchReqNum);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    //[TC_SECC_VTB_CmSlacMatch_007] APPLICATION_TYPE must be 0x00(EV-EVSE Matching)
+                    //[TC_SECC_VTB_CmSlacMatch_008]
+                    if (MmePacket->MMENTRY[0] != 0)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]:wrong APPLICATION_TYPE(%d)",
+                                (idx + 1),
+                                MmePacket->MMENTRY[0]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_009] SECURITY_TYPE must be 0x00(No Security)
+                    //[TC_SECC_VTB_CmSlacMatch_010]
+                    if (MmePacket->MMENTRY[1] != 0)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]:wrong SECURITY_TYPE(%d)",
+                                (idx + 1),
+                                MmePacket->MMENTRY[1]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_011] MVFLength must be 0x3E(MatchVarField Length)
+                    //[TC_SECC_VTB_CmSlacMatch_012]
+                    if (MmePacket->MMENTRY[2] != 0x3E || MmePacket->MMENTRY[3] != 0x00)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]:wrong MVFLength(%d,%d)",
+                                (idx + 1),
+                                MmePacket->MMENTRY[2],
+                                MmePacket->MMENTRY[3]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_013] EV ID (muxt be all zero)
+                    //[TC_SECC_VTB_CmSlacMatch_014]
+                    if (Array_Check_All_Zero(&MmePacket->MMENTRY[4], 17) == FALSE)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]: wrong EV ID",
+                                (idx + 1));
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_015] EV MAC
+                    //[TC_SECC_VTB_CmSlacMatch_016]
+                    if (Array_Compare_Identity(EvMac_in, &MmePacket->MMENTRY[21], SLAC_EVMAC_LENGTH) == FALSE)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]: wrong EV MAC(%02X:%02X:%02X:%02X:%02X:%02X)",
+                                (idx + 1),
+                                MmePacket->MMENTRY[21], MmePacket->MMENTRY[22], MmePacket->MMENTRY[23],
+                                MmePacket->MMENTRY[24], MmePacket->MMENTRY[25], MmePacket->MMENTRY[26]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_017] EVSE ID should be all zero
+                    //[TC_SECC_VTB_CmSlacMatch_018]
+                    if (Array_Check_All_Zero(&MmePacket->MMENTRY[27], 17) == FALSE)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]: wrong EVSE ID",
+                                (idx + 1));
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_019] EVSE MAC
+                    //[TC_SECC_VTB_CmSlacMatch_020]
+                    if (Array_Compare_Identity(CsuMac, &MmePacket->MMENTRY[44], SLAC_EVSE_MAC_LENGTH) == FALSE)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Rx]CM_SLAC_MATCH_REQ[%d]: wrong EVSE MAC(%02X:%02X:%02X:%02X:%02X:%02X)",
+                                (idx + 1),
+                                MmePacket->MMENTRY[44], MmePacket->MMENTRY[45], MmePacket->MMENTRY[46],
+                                MmePacket->MMENTRY[47], MmePacket->MMENTRY[48], MmePacket->MMENTRY[49]);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        break;
+                    }
+
+                    //[TC_SECC_VTB_CmSlacMatch_021]runID: Check RunID
+                    //[TC_SECC_VTB_CmSlacMatch_022]
+                    if (SLAC_DB_Check_EvMac_RunID_Matching(&SLAC_INFO, EvMac_in, RunID_in) == TRUE &&
+                       (idx == 0)) //only setup a successful link establishment with the first SLAC Req instance
+                    {
+                        memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+            	        memcpy(SendMmePacket.ODA, MmePacket->OSA, 6);
+            	        memcpy(SendMmePacket.OSA, CsuMac, 6);
+            	        SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+            	        SendMmePacket.MMV = MmePacket->MMV;
+            	        SendMmePacket.MMTYPE = MMTYPE_CM_SLAC_MATCH_CNF;
+            	        SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+            	        SendMmePacketSize = 0;
+            	        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x00;    //APPLICATION_TYPE: Fixed value (0x00: EV-EVSE matching)
+            	        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x00;    //SECURITY_TYPE: Fixed value (0x00: No Security)
+            	        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x56;    //MVFLength: MatchVarField Length (Fixed value: 0x0056)
+            	        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x00;    //MVFLength: MatchVarField Length (Fixed value: 0x0056)
+            	        memset(SendMmePacket.MMENTRY + SendMmePacketSize, 0, 17);         //EV ID
+            	        SendMmePacketSize += 17;
+            	        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, EvMac_in, SLAC_EVMAC_LENGTH); //EV MAC
+            	        SendMmePacketSize += 6;
+            	        memset(SendMmePacket.MMENTRY + SendMmePacketSize, 0, 17);         //EVSE ID
+            	        SendMmePacketSize += 17;
+            	        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, CsuMac, 6);     //EVSE MAC
+            	        SendMmePacketSize += 6;
+            	        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, RunID_in, SLAC_RUNID_LENGTH);
+            	        SendMmePacketSize += SLAC_RUNID_LENGTH;
+            	        memset(SendMmePacket.MMENTRY + SendMmePacketSize, 0, 8);    //RSVD
+            	        SendMmePacketSize += 8;
+            	        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, Nid, sizeof(Nid));   //NID: Network ID given by the CCo(EVSE)
+            	        SendMmePacketSize += sizeof(Nid);                                      //NID caculated from the random NMK that will be set.
+            	        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0x00;          //RSVD
+            	        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, NewNmkKey, sizeof(NewNmkKey)); //NMK: Random value
+            	        SendMmePacketSize += sizeof(NewNmkKey);                                          //NMK: Private NMK of the EVSE (random value)
+            	        SendMmePacketSize += 19;      //the size before MMENTRY
+
+                        #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+                        {
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Response MME Packet *****\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                                   SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                                   SendMmePacket.OSA[0],SendMmePacket.OSA[1],SendMmePacket.OSA[2],SendMmePacket.OSA[3],SendMmePacket.OSA[4],SendMmePacket.OSA[5]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(SendMmePacket.MTYPE));
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", SendMmePacket.MMV);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", SendMmePacket.MMTYPE);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n", SendMmePacket.FMI[0],SendMmePacket.FMI[1]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("--- CM_SLAC_MATCH_CNF ---\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", SendMmePacket.MMENTRY[0]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", SendMmePacket.MMENTRY[1]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MVFLength: 0x%x, 0x%x\n", SendMmePacket.MMENTRY[2],SendMmePacket.MMENTRY[3]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("PEV ID: \n");
+                            for(Rtn=0; Rtn<17; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[4+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("PEV MAC: \n");
+                            for(Rtn=0; Rtn<6; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[21+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("EVSE ID: \n");
+                            for(Rtn=0; Rtn<17; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[27+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("EVSE MAC: \n");
+                            for(Rtn=0; Rtn<6; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[44+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("RunID: \n");
+                            for(Rtn=0; Rtn<8; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[50+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: \n");
+                            for(Rtn=0; Rtn<8; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[58+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("NID: \n");
+                            for(Rtn=0; Rtn<7; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[66+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: 0x%x\n", SendMmePacket.MMENTRY[73]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("NMK: \n");
+                            for(Rtn=0; Rtn<16; Rtn++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[74+Rtn]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                        }
+                        #endif
+
+                        Update_V2G_Flow_Status(CM_SLAC_MATCH_CNF);
+            	        Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+
+
+            	        DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n",SendMmePacketSize,Rtn);
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Tx]CM_SLAC_MATCH_CNF[%d]",
+                                (idx + 1));
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                        ftime(&SeqStartTime);
+                    }
+                    else
+                    {
+                        //RunID does not match and it's not the first SLAC request
+                        //Reset the SLAC database to embrace SLAC retry
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CM_SLAC_MATCH_REQ]No Real MATCH_REQ");
+                        SLAC_DB_Reset();
+                    }
+                }
+                else
+                {
+                    //OSA(EvMac) does not exist
+                }
+                break;
+            }
+            #else
+            {
+                Update_V2G_Flow_Status(CM_SLAC_MATCH_REQ);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Rx]CM_SLAC_MATCH_REQ");
+
+                memset(&SendMmePacket,0,sizeof(struct MmeHeader));
+                memcpy(SendMmePacket.ODA,MmePacket->OSA,6);
+                memcpy(SendMmePacket.OSA,CsuMac,6);
+                SendMmePacket.MTYPE=htons(EtherType_HomePlug);
+                SendMmePacket.MMV=MmePacket->MMV;
+                SendMmePacket.MMTYPE=MMTYPE_CM_SLAC_MATCH_CNF;
+                SendMmePacket.FMI[0]=SendMmePacket.FMI[1]=0;
+                SendMmePacketSize=0;
+                SendMmePacket.MMENTRY[SendMmePacketSize++]=0x00;    //Fixed value (0x00) indicating ��PEV-EVSE matching��
+                SendMmePacket.MMENTRY[SendMmePacketSize++]=0x00;    //Fixed value (0x00) indicating ��No Security��
+                SendMmePacket.MMENTRY[SendMmePacketSize++]=0x56;    //Fixed value (0x0056) for matching
+                SendMmePacket.MMENTRY[SendMmePacketSize++]=0x00;    //Fixed value (0x0056) for matching
+                memset(SendMmePacket.MMENTRY+SendMmePacketSize,0,17);    //PEV ID
+                SendMmePacketSize+=17;
+                memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,EvMac,6);
+                SendMmePacketSize+=6;
+                memset(SendMmePacket.MMENTRY+SendMmePacketSize,0,17);    //EVSE ID
+                SendMmePacketSize+=17;
+                memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,CsuMac,6);
+                SendMmePacketSize+=6;
+                memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,SlacRunId,sizeof(SlacRunId));
+                SendMmePacketSize+=sizeof(SlacRunId);
+                memset(SendMmePacket.MMENTRY+SendMmePacketSize,0,8);    //RSVD
+                SendMmePacketSize+=8;
+                memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,Nid,sizeof(Nid));
+                SendMmePacketSize+=sizeof(Nid);
+                SendMmePacket.MMENTRY[SendMmePacketSize++]=0x00;    //RSVD
+                memcpy(SendMmePacket.MMENTRY+SendMmePacketSize,NewNmkKey,sizeof(NewNmkKey));
+                SendMmePacketSize+=sizeof(NewNmkKey);
+                SendMmePacketSize+=19;      //the size before MMENTRY
+
+                #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Response MME Packet *****\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                           SendMmePacket.OSA[0],SendMmePacket.OSA[1],SendMmePacket.OSA[2],SendMmePacket.OSA[3],SendMmePacket.OSA[4],SendMmePacket.OSA[5]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(SendMmePacket.MTYPE));
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", SendMmePacket.MMV);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", SendMmePacket.MMTYPE);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n", SendMmePacket.FMI[0],SendMmePacket.FMI[1]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("--- CM_SLAC_MATCH_CNF ---\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", SendMmePacket.MMENTRY[0]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", SendMmePacket.MMENTRY[1]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("MVFLength: 0x%x, 0x%x\n", SendMmePacket.MMENTRY[2],SendMmePacket.MMENTRY[3]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("PEV ID: \n");
+                    for(Rtn=0; Rtn<17; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[4+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("PEV MAC: \n");
+                    for(Rtn=0; Rtn<6; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[21+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("EVSE ID: \n");
+                    for(Rtn=0; Rtn<17; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[27+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("EVSE MAC: \n");
+                    for(Rtn=0; Rtn<6; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[44+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RunID: \n");
+                    for(Rtn=0; Rtn<8; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[50+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: \n");
+                    for(Rtn=0; Rtn<8; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[58+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("NID: \n");
+                    for(Rtn=0; Rtn<7; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[66+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    DEBUG_PRINTF_EVCOMM_DETAIL("RSVD: 0x%x\n", SendMmePacket.MMENTRY[73]);
+                    DEBUG_PRINTF_EVCOMM_DETAIL("NMK: \n");
+                    for(Rtn=0; Rtn<16; Rtn++)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[74+Rtn]);
+                    }
+                    DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                #endif
+
+                Update_V2G_Flow_Status(CM_SLAC_MATCH_CNF);
+                Rtn = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+
+
+                DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n",SendMmePacketSize,Rtn);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[SLAC][Tx]CM_SLAC_MATCH_CNF");
+
+                ftime(&SeqStartTime);
+                break;
+            }
+            #endif
+		}
+
+	    case MMTYPE_VENDOR_VS_HOST_ACTION:
+	    {
+	        struct QcaVendorMmeHeader *RecvPacket;
+	        RecvPacket = (struct QcaVendorMmeHeader *)Buffer;
+
+	        DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_VENDOR_VS_HOST_ACTION ---\n");
+
+	        switch (RecvPacket->MBODY[0])
+	        {
+		        case 0x00:
+		            //Loader (Device Softloader or Bootloader) ready
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: Loader Ready\n");
+		            break;
+
+		        case 0x01:
+		            //Firmware Upgrade Ready
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: Firmware Upgrade Ready\n");
+		            break;
+
+		        case 0x02:
+		            //PIB Update Ready
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: PIB Update Ready\n");
+		            break;
+
+		        case 0x03:
+		            //Firmware Upgrade and PIB Update ready
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: Firmware Upgrade and PIB Update ready\n");
+		            break;
+
+		        case 0x04:
+		            //Loader (Bootloader) ready to receive SDRAM configuration.
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: Loader ready to receive SDRAM configuration\n");
+		            break;
+
+		        case 0x05:
+		            //Reset to Factory Defaults.
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: Reset to Factory Defaults\n");
+		            break;
+
+		        default:
+		            //Reserved
+		            DEBUG_PRINTF_EVCOMM_DETAIL("QCA7K: Reserved\n");
+		            break;
+	        }
+			break;
+	    }
+
+	    case MMTYPE_VENDOR_ATTEN_CHAR:
+		{
+	        DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_VENDOR_ATTEN_CHAR ---\n");
+	        break;
+		}
+
+	    case MMTYPE_VENDOR_VS_NW_INFO_CNF:
+		{
+            memcpy(QcaMac, MmePacket->OSA, 6);
+
+            sprintf((char*)buf_log_evcomm,
+                    "[QCA7K][Rx][VENDOR_VS_NW_INFO_CNF]Got QCA7K MacAddr:%02X:%02X:%02X:%02X:%02X:%02X (comm:OK)",
+                     QcaMac[0],  QcaMac[1],  QcaMac[2],  QcaMac[3],  QcaMac[4],  QcaMac[5]);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+	        DEBUG_PRINTF_EVCOMM_DETAIL("--- MMTYPE_VENDOR_VS_NW_INFO_CNF ---\n");
+	        DEBUG_PRINTF_EVCOMM_DETAIL("QcaMac: %02x:%02x:%02x:%02x:%02x:%02x\n",
+	                QcaMac[0],
+                    QcaMac[1],
+                    QcaMac[2],
+                    QcaMac[3],
+                    QcaMac[4],
+                    QcaMac[5]);
+
+	        Update_V2G_Flow_Status(CM_SET_KEY_REQ);
+            ftime(&SeqStartTime);
+            break;
+		}
+
+	    default:
+		{
+	        break;
+		}
+    }
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: SlacComm
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int SlacComm()
+{
+    static unsigned char qca7k_comm_retry = 0;
+    unsigned char *EvMac_in;
+    unsigned char *RunID_in;
+    double t_diff = 0;
+    int packet_size = 0;
+    int count = 0;
+    //int idx = 0;
+    int i = 0;
+
+    if(RawSock >= 0)
+    {
+        memset(V2gtpMsgRxBuf, 0, V2GTP_MSG_RX_BUFFER_SIZE);
+        packet_size = recvfrom(RawSock, V2gtpMsgRxBuf, V2GTP_MSG_RX_BUFFER_SIZE, 0, NULL, NULL);
+        if(packet_size > 0)
+        {
+            /*#ifdef Debug
+               DEBUG_PRINTF_EVCOMM_DETAIL("Raw Data: ");
+               for(count=0;count<packet_size;count++)
+                DEBUG_PRINTF_EVCOMM_DETAIL("0x%x, ",V2gtpMsgRxBuf[count]);
+               DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+             #endif*/
+            MmeProcess(V2gtpMsgRxBuf, packet_size);
+        }
+    }
+
+    switch(Check_V2G_Flow_Status())
+    {
+	    case IDLE:
+		{
+	        if(RawSock < 0)
+	        {
+	            RawSock = socket(PF_PACKET, SOCK_RAW, htons(EtherType_HomePlug));
+
+	            sprintf((char*)buf_log_evcomm, "[RawSock]opened(%d)", RawSock);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+	            if(RawSock == -1)
+	            {
+	                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SlacComm:Failed to create socket");
+	                Update_V2G_Flow_Status(Other_Fault);
+	                return -1;
+	            }
+
+	            if (setsockopt(RawSock, SOL_SOCKET, SO_BINDTODEVICE, QcaInterface, 4) < 0)
+	            {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SlacComm:Set SO_BINDTODEVICE NG");
+                    Update_V2G_Flow_Status(Other_Fault);
+                    return -1;
+                }
+
+                struct timeval tv;
+	            tv.tv_sec = 0;
+		        tv.tv_usec = 100000;  //100ms (Rx timeout)
+	            if (setsockopt(RawSock, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(struct	timeval)) < 0)
+	            {
+	                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SlacComm:Set SO_RCVTIMEO NG");
+	                Update_V2G_Flow_Status(Other_Fault);
+	                return -1;
+	            }
+
+                tv.tv_usec = 100000;  //100ms (Tx timeout)
+                if (setsockopt(RawSock, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(struct	timeval)) < 0)
+	            {
+	                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SlacComm:Set SO_SNDTIMEO NG");
+	                Update_V2G_Flow_Status(Other_Fault);
+	                return -1;
+	            }
+
+	            memset(&Req, 0, sizeof(struct ifreq));
+	            strcpy( (char*)Req.ifr_name, QcaInterface);
+
+	            if (ioctl(RawSock, SIOCGIFINDEX, &Req) < 0)
+	            {
+	                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SlacComm: ioctl NG");
+	                Update_V2G_Flow_Status(Other_Fault);
+	                return -1;
+	            }
+
+	            memset( &DestSocketAddress, 0, sizeof(struct sockaddr_ll));
+	            DestSocketAddress.sll_ifindex = Req.ifr_ifindex;
+	            DestSocketAddress.sll_halen = ETH_ALEN;
+
+                PwmStartTime = 0;
+
+                EVCOMM_SYS_INFO.QCA7K_SetKeyDone = FALSE;
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[QCA7K]connecting...");
+                //Get QCA7K MAC address
+                GetQca7kMac();
+                ftime(&SeqStartTime);
+                break;
+	        }
+	        else   //RawSock: opened
+	        {
+                if(EVCOMM_SYS_INFO.QCA7K_SetKeyDone == FALSE)
+                {
+                    ftime(&SeqEndTime);
+                    t_diff = DiffTimeb(SeqStartTime, SeqEndTime);
+
+                    if (t_diff > V2G_SECC_QCA7000_GET_MAC_ADDR_REQ_RETRY_PERIOD)   //3 secs
+                    {
+                        qca7k_comm_retry++;
+                        sprintf((char*)buf_log_evcomm,
+                                "Re-try connecting...(%.02lf/%dms)",
+                                t_diff,
+                                V2G_SECC_QCA7000_GET_MAC_ADDR_REQ_RETRY_PERIOD);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                        GetQca7kMac(); //re-send req
+                        ftime(&SeqStartTime);
+                        break;
+                    }
+                    else
+                    {
+                        //null
+                    }
+
+                    //Retry by 3 times
+                    if (qca7k_comm_retry >= 3)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[Error]Comm: fail (retry by %d times)",
+                                qca7k_comm_retry);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                        //Update_ShmStatusCode(); //[To-Do] to be implemented
+                        //CCS_SECCC_TIMEOUT_QCA7000_COMM (023892): The firmware code of QCA7000 may not be installed, yet
+                        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                        ShmStatusCodeData->PresentStatusCode[0][4] = 9;
+                        ShmStatusCodeData->PresentStatusCode[0][5] = 2;
+                        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+                        Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+
+                        Update_V2G_Flow_Status(Sequence_Timeout);
+                        qca7k_comm_retry = 0;
+                        break;
+                    }
+                }
+                else    //RawSock: opened; Set Key: DONE
+                {
+                    if((CheckConnectorPlugIn() == TRUE) && (ShmInternalComm->ChargingPermission == TRUE))
+                    {
+                        if(PwmStartTime <= 0)
+                        {
+                            //Sniffer_Tcpdump(ENABLE);
+                            //#if (TCPDUMP_PACKETS_SNIFFER_SWITCH == ENABLE)
+                            //sleep(1);   //wait for tcpdump to be ready.
+                            //#endif
+                            SwitchCpStateE(DISABLE);
+                            OutputCpPwmDuty(5);
+                            PwmStartTime = time(NULL);
+                        }
+                        else
+                        {
+                            if((time(NULL) - PwmStartTime) > TT_EVSE_SLAC_init)
+                            {
+                                sprintf((char*)buf_log_evcomm,
+                                        "SlacComm: Wait CM_SLAC_PARM_REQ Timeout - TT_EVSE_SLAC_init, NowTime(%ld)-PwmStartTime(%d)>%d (sec)",
+                                        time(NULL),
+                                        PwmStartTime,
+                                        TT_EVSE_SLAC_init);
+                                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                                //CCS_SECC_TIMEOUT_SLAC_TT_EVSE_SLAC_init (023809)
+                                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                                ShmStatusCodeData->PresentStatusCode[0][4] = 0;
+                                ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+                                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                                Update_V2G_Flow_Status(Sequence_Timeout);
+                                PwmStartTime = 0;
+                                return -1;
+                            }
+                            else
+                            {
+                                //waiting for CM_SLAC_PARM_REQ
+                            }
+                        }
+                    }
+                    else
+                    {
+                        PwmStartTime = 0;
+                    }
+                }
+	        }
+	        break;
+		}
+
+	    case CM_SET_KEY_REQ:   //13
+		{
+	        //CM_SET_KEY_REQ
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[QCA7K][Rx]CM_SET_KEY_REQ");
+            ftime(&SeqEndTime);
+            t_diff = DiffTimeb(SeqStartTime, SeqEndTime);
+            if (t_diff > V2G_SECC_QCA7000_COMM_TIMEOUT)   //10 seconds
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[QCA7K]Failed on SetKey => End_Process (%.02lf/%dms)",
+                        t_diff,
+                        V2G_SECC_QCA7000_COMM_TIMEOUT);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECCC_TIMEOUT_QCA7000_COMM (023892): The firmware code of QCA7000 may not be installed, yet
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 9;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 2;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+
+                Update_V2G_Flow_Status(Sequence_Timeout);
+            }
+            else if (t_diff > V2G_SECC_QCA7000_SEND_SET_KEY_PERIOD)  //2 seconds
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[QCA7K]SetKey: proceed (%.02lf/%dms)",
+                        t_diff,
+                        V2G_SECC_QCA7000_SEND_SET_KEY_PERIOD);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                SendSetKey();
+                ftime(&SeqStartTime);
+            }
+            else
+            {
+                //null
+            }
+	        break;
+		}
+
+	    case CM_SET_KEY_CNF:   //14
+		{
+            sprintf((char*)buf_log_evcomm,
+                    "[SECCReady]Wait: plugin(%d), matached(%d), permission(%d)...",
+                    CheckConnectorPlugIn(),
+                    CSUCOMMDC_TASK_FLAG.matched,
+                    ShmInternalComm->ChargingPermission
+                    );
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            EVCOMM_SYS_INFO.QCA7K_SetKeyDone = TRUE;
+            PwmStartTime = 0;
+            Update_V2G_Flow_Status(IDLE);
+	        break;
+		}
+
+	    case CM_SLAC_PARM_CONF:
+		{
+	        ftime(&SeqEndTime);
+	        if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_match_sequence)
+	        {
+	            sprintf((char*)buf_log_evcomm,
+                        "SlacComm: Wait CM_START_ATTEN_CHAR_IND Timeout - TT_match_sequence (%.02lf of %dms)",
+                        DiffTimeb(SeqStartTime, SeqEndTime),
+                        TT_match_sequence);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_TIMEOUT_CM_START_ATTEN_CHAR_IND (023811):
+                //[Possible Reason] CCS Board image might not be updated properly. The 2nd reboot process is not finished.
+                //[Verification Method] By tying reboot command to the terminal and see if it could be executed immediately.
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 1;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+
+	            Update_V2G_Flow_Status(Sequence_Timeout);
+	            return -1;
+	        }
+	        break;
+		}
+
+	    case CM_START_ATTEN_CHAR_IND:
+		{
+	        ftime(&SeqEndTime);
+	        if(DiffTimeb(SeqStartTime, SeqEndTime) > (TP_EV_batch_msg_interval))    //one more time interval for tolerance
+	        {
+	            sprintf((char*)buf_log_evcomm,
+                        "SlacComm: Wait CM_MNBC_SOUND_IND Timeout - TP_EV_batch_msg_interval (%.02lf of %dms)",
+                        DiffTimeb(SeqStartTime, SeqEndTime),
+                        TP_EV_batch_msg_interval);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_TIMEOUT_SLAC_CM_MNBC_SOUND_IND (023818):
+                //[Possible Reason] CCS Board image might not be updated properly. The 2nd reboot process is not finished.
+                //[Verification Method] By tying reboot command to the terminal and see if it could be executed immediately.
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+
+	            Update_V2G_Flow_Status(Sequence_Timeout);
+	            return -1;
+	        }
+	        break;
+		}
+
+	    case CM_MNBC_SOUND_IND:
+		{
+            #if (NEW_SLAC_ARCHITECTURE_SWITCH == ENABLE)
+            {
+                ftime(&SeqEndTime);
+                t_diff = DiffTimeb(SeqStartTime, SeqEndTime);
+                //printf("time:%.02lf, profilNum:%d\n",DiffTimeb(SeqStartTime, SeqEndTime),AttenProfileCnt);  //added by Vern
+    	        if(t_diff > TT_EVSE_match_MNBC ||
+                  (SLAC_INFO.array[0].AttenProfileCnt >= SLAC_INFO.array[0].MnbcSoundNum) ||
+                  (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry > 0)) //TC_SECC_VTB_AttenuationCharacterization_003
+                {
+                    //Wait for other SLAC Req sets
+                    if ((SLAC_INFO.arrayLen >= 2) &&
+                        (t_diff < TT_EVSE_match_MNBC) &&
+                        (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry == 0)) //not a retry
+                    {
+                        break;
+                    }
+
+                    //Check if it is a timeup response
+                    if (t_diff > TT_EVSE_match_MNBC)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[WARNING][SLAC][Tx]CM_ATTEN_CHAR_IND[%d]: timeup(%.2f/%dms) => send",
+                                (i + 1),
+                                t_diff,
+                                TT_EVSE_match_MNBC);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    }
+
+                    //Sending all CM_ATTEN_CHAR_IND according to all corresponding SLAC Req sets
+                    for (i = 0; i < SLAC_INFO.arrayLen; i++)
+                    {
+                        if ((SLAC_INFO.array[i].AttenProfileCnt == 0) ||
+                            (SLAC_INFO.array[i].AagGroupsNum == 0) ||
+                            (SLAC_INFO.array[i].StartAttenCharCnt == 0) ||
+                            (SLAC_INFO.array[i].MnbcSoundNum != 10) || //received in CM_START_ATTEN_CHAR_IND
+                            (SLAC_INFO.array[i].StartAttenCharErr == TRUE)
+                           )
+                        {
+                            //Ignoring those SLAC request sets without sending CM_MNBC_SOUND_IND(CM_ATTEN_PROFILE_IND)
+                            sprintf((char*)buf_log_evcomm,
+                                    "[WARNING][SLAC][Tx]CM_ATTEN_CHAR_IND[%d]: para err(%d,%d,%d,%d,%d) => canceled",
+                                    (i + 1),
+                                    SLAC_INFO.array[i].AttenProfileCnt,
+                                    SLAC_INFO.array[i].AagGroupsNum,
+                                    SLAC_INFO.array[i].StartAttenCharCnt,
+                                    SLAC_INFO.array[i].MnbcSoundNum,
+                                    SLAC_INFO.array[i].StartAttenCharErr);
+                            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                            continue;
+                        }
+
+                        //In CM_ATTEN_CHAR_IND retry process, here only re-send this message according to the 1st coming SLAC request
+                        if ((EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry > 0) && (i != 0))
+                        {
+                            sprintf((char*)buf_log_evcomm,
+                                    "[NOTE][SLAC][Tx]CM_ATTEN_CHAR_IND[%d]: canceled",
+                                    (i + 1));
+                            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                            break;
+                        }
+
+                        EvMac_in = SLAC_INFO.array[i].EvMac;
+                        RunID_in = SLAC_INFO.array[i].RunID;
+
+                        memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+                        memcpy(SendMmePacket.ODA, EvMac_in, SLAC_EVMAC_LENGTH);
+                        memcpy(SendMmePacket.OSA, CsuMac, 6);
+                        SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+                        SendMmePacket.MMV = 0x01;
+                        SendMmePacket.MMTYPE = MMTYPE_CM_ATTEN_CHAR_IND;
+                        SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+                        SendMmePacketSize = 0;
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //APPLICATION_TYPE(0x00: EV-EVSE Matching)
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //SECURITY_TYPE(0x00: No Security)
+                        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, EvMac_in, SLAC_EVMAC_LENGTH); //SOURCE_ADDRESS, MAC address of the EV Host
+                        SendMmePacketSize += SLAC_EVMAC_LENGTH;
+                        memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, RunID_in, SLAC_RUNID_LENGTH);
+                        SendMmePacketSize += SLAC_RUNID_LENGTH;
+                        memset(SendMmePacket.MMENTRY + SendMmePacketSize, 0, 17); //SOURCE_ID(0x00)
+                        SendMmePacketSize += 17;
+                        memset(SendMmePacket.MMENTRY + SendMmePacketSize, 0, 17); //RESP_ID(0x00)
+                        SendMmePacketSize += 17;
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = SLAC_INFO.array[i].AttenProfileCnt; //NumSounds: Number of M-Sounds used for generation of the ATTEN_PROFILE
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = SLAC_INFO.array[i].AagGroupsNum;    //NumGroups
+
+                        for(count = 0; count < SLAC_INFO.array[i].AagGroupsNum; count++)
+                        {
+                            unsigned char TmpAag;
+                            TmpAag = ((SLAC_INFO.array[i].AAG[count] / SLAC_INFO.array[i].AttenProfileCnt) & 0xFF);
+                            SLAC_INFO.array[i].AAG_quality_ori += (float) TmpAag;   //original signal quality
+
+                            #if (SUDO_PSD_PARAMETER_MECHANISM == ENABLE)    //default: ENABLE
+                                #if 1
+                                //TC_SECC_VTB_AttenuationCharacterization_019
+                                TmpAag = TmpAag >> 1;   //new method proposed by Joseph (divided by 2)
+                                #else
+                                if(TmpAag >= 39)        //original method proposed by Vern
+                                {
+                                    TmpAag = 37;
+                                }
+                                #endif
+                            #endif
+                            SendMmePacket.MMENTRY[SendMmePacketSize++] = TmpAag;
+                            SLAC_INFO.array[i].AAG_quality_refined += (float) TmpAag;   //refined signal quality
+                        }
+                        SendMmePacketSize += 19;      //the size before MMENTRY
+
+                        #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
+                        {
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Send MME Packet *****\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                                   SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                                   SendMmePacket.OSA[0],SendMmePacket.OSA[1],SendMmePacket.OSA[2],SendMmePacket.OSA[3],SendMmePacket.OSA[4],SendMmePacket.OSA[5]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(SendMmePacket.MTYPE));
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", SendMmePacket.MMV);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", SendMmePacket.MMTYPE);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n", SendMmePacket.FMI[0],SendMmePacket.FMI[1]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("--- CM_ATTEN_CHAR_IND ---\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", SendMmePacket.MMENTRY[0]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", SendMmePacket.MMENTRY[1]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ADDRESS: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                                   SendMmePacket.MMENTRY[2],SendMmePacket.MMENTRY[3],SendMmePacket.MMENTRY[4],SendMmePacket.MMENTRY[5],
+                                   SendMmePacket.MMENTRY[6],SendMmePacket.MMENTRY[7]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                                   SendMmePacket.MMENTRY[8],SendMmePacket.MMENTRY[9],SendMmePacket.MMENTRY[10],SendMmePacket.MMENTRY[11],
+                                   SendMmePacket.MMENTRY[12],SendMmePacket.MMENTRY[13],SendMmePacket.MMENTRY[14],SendMmePacket.MMENTRY[15]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: \n");
+                            for(count=0; count<17; count++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[16+count]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: \n");
+                            for(count=0; count<17; count++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[33+count]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                            DEBUG_PRINTF_EVCOMM_DETAIL("NumSounds: 0x%x\n", SendMmePacket.MMENTRY[50]);
+                            DEBUG_PRINTF_EVCOMM_DETAIL("ATTEN_PROFILE: \n");
+                            for(count=0; count<AagGroupsNum; count++)
+                            {
+                                DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[51+count]);
+                            }
+                            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                        }
+                        #endif
+
+                        count = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+
+                        SLAC_INFO.array[i].AAG_quality_ori /= SLAC_INFO.array[i].AagGroupsNum;
+                        SLAC_INFO.array[i].AAG_quality_refined /= SLAC_INFO.array[i].AagGroupsNum;
+
+                        //Print log if this CM_ATTEN_CHAR_IND belongs to RETRY Tx message.
+                        if (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry > 0)
+                        {
+                            sprintf((char*)buf_log_evcomm,
+                                    "[SLAC][Tx]CM_ATTEN_CHAR_IND[%d]: %d-th resend (Q=%.2f/%.2f)(%d/%d)",
+                                    (i + 1),
+                                    EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry,
+                                    SLAC_INFO.array[i].AAG_quality_refined,
+                                    SLAC_INFO.array[i].AAG_quality_ori,
+                                    SLAC_INFO.array[i].AttenProfileCnt,
+                                    SLAC_INFO.array[i].MnbcSoundNum);
+                            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        }
+                        else if (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry == 0)
+                        {
+                            sprintf((char*)buf_log_evcomm,
+                                    "[SLAC][Tx]CM_ATTEN_CHAR_IND[%d]: Q=%.2f/%.2f(%d/%d)",
+                                    (i + 1),
+                                    SLAC_INFO.array[i].AAG_quality_refined,
+                                    SLAC_INFO.array[i].AAG_quality_ori,
+                                    SLAC_INFO.array[i].AttenProfileCnt,
+                                    SLAC_INFO.array[i].MnbcSoundNum);
+                            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        }
+                        else
+                        {
+                            sprintf((char*)buf_log_evcomm,
+                                    "[SLAC][Tx]CM_ATTEN_CHAR_IND[%d]: unexpected CM_ATTEN_CHAR_IND_retry(%d))",
+                                    i,
+                                    EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry);
+                            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        }
+
+                        DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n", SendMmePacketSize,count);
+                    } //end of for loop
+
+                    Update_V2G_Flow_Status(CM_ATTEN_CHAR_IND);
+                    ftime(&SeqStartTime);
+    	        }
+    	        break;
+            }
+            #else
+            {
+                ftime(&SeqEndTime);
+                //printf("time:%.02lf, profilNum:%d\n",DiffTimeb(SeqStartTime, SeqEndTime),AttenProfileCnt);  //added by Vern
+
+    	        if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_EVSE_match_MNBC || (AttenProfileCnt >= MnbcSoundNum) || (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry > 0))
+                {
+                    memset(&SendMmePacket, 0, sizeof(struct MmeHeader));
+                    memcpy(SendMmePacket.ODA, EvMac, 6);
+                    memcpy(SendMmePacket.OSA, CsuMac, 6);
+                    SendMmePacket.MTYPE = htons(EtherType_HomePlug);
+                    SendMmePacket.MMV = 0x01;
+                    SendMmePacket.MMTYPE = MMTYPE_CM_ATTEN_CHAR_IND;
+                    SendMmePacket.FMI[0] = SendMmePacket.FMI[1] = 0;
+                    SendMmePacketSize = 0;
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //APPLICATION_TYPE(0x00: EV-EVSE Matching)
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = 0;    //SECURITY_TYPE(0x00: No Security)
+                    memcpy(SendMmePacket.MMENTRY + SendMmePacketSize, EvMac, 6); //SOURCE_ADDRESS, MAC address of the EV Host
+                    SendMmePacketSize += 6;
+                    memcpy(SendMmePacket.MMENTRY+SendMmePacketSize, SlacRunId, sizeof(SlacRunId));
+                    SendMmePacketSize += sizeof(SlacRunId);
+                    memset(SendMmePacket.MMENTRY+SendMmePacketSize, 0, 17);    //SOURCE_ID
+                    SendMmePacketSize += 17;
+                    memset(SendMmePacket.MMENTRY+SendMmePacketSize, 0, 17);    //RESP_ID
+                    SendMmePacketSize += 17;
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = AttenProfileCnt;    //NumSounds
+                    SendMmePacket.MMENTRY[SendMmePacketSize++] = AagGroupsNum;    //NumGroups
+                    for(count=0; count < AagGroupsNum; count++)
+                    {
+                        unsigned char TmpAag;
+                        TmpAag = ((Aag[count] / AttenProfileCnt) & 0xFF);
+                        #if (SUDO_PSD_PARAMETER_MECHANISM == ENABLE)    //default: ENABLE
+                            #if 1
+                            //TC_SECC_VTB_AttenuationCharacterization_019
+                            TmpAag = TmpAag >> 1;   //new method proposed by Joseph (divided by 2)
+                            #else
+                            if(TmpAag >= 39)        //original method proposed by Vern
+                            {
+                                /*
+                                // [To-do] If this statement is enabled, SLAC will fail due to timeout.
+                                {
+                                    unsigned char TmpBuf[64];
+                                    memset(TmpBuf,0,sizeof(TmpBuf));
+                                    sprintf((char*)TmpBuf,"SlacComm: bad Aag[%d]=%d",count,TmpAag);
+                                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", TmpBuf);
+                                }
+                                */
+                                printf("%d,", TmpAag);
+                                TmpAag = 37;
+                            }
+                            #endif
+                        #endif
+                        SendMmePacket.MMENTRY[SendMmePacketSize++] = TmpAag;
+                    }
+                    SendMmePacketSize += 19;      //the size before MMENTRY
+
+                    #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == TRUE)
+                    {
+                        DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Send MME Packet *****\n");
+                        DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.ODA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                               SendMmePacket.ODA[0],SendMmePacket.ODA[1],SendMmePacket.ODA[2],SendMmePacket.ODA[3],SendMmePacket.ODA[4],SendMmePacket.ODA[5]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacket.OSA: %02x:%02x:%02x:%02x:%02x:%02x:\n",
+                               SendMmePacket.OSA[0],SendMmePacket.OSA[1],SendMmePacket.OSA[2],SendMmePacket.OSA[3],SendMmePacket.OSA[4],SendMmePacket.OSA[5]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("MTYPE: 0x%x\n", htons(SendMmePacket.MTYPE));
+                        DEBUG_PRINTF_EVCOMM_DETAIL("MMV: 0x%x\n", SendMmePacket.MMV);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("MMTYPE: 0x%x\n", SendMmePacket.MMTYPE);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("FMI 0x%x, 0x%x\n", SendMmePacket.FMI[0],SendMmePacket.FMI[1]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("--- CM_ATTEN_CHAR_IND ---\n");
+                        DEBUG_PRINTF_EVCOMM_DETAIL("APPLICATION_TYPE: 0x%x\n", SendMmePacket.MMENTRY[0]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("SECURITY_TYPE: 0x%x\n", SendMmePacket.MMENTRY[1]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ADDRESS: %02x:%02x:%02x:%02x:%02x:%02x\n",
+                               SendMmePacket.MMENTRY[2],SendMmePacket.MMENTRY[3],SendMmePacket.MMENTRY[4],SendMmePacket.MMENTRY[5],
+                               SendMmePacket.MMENTRY[6],SendMmePacket.MMENTRY[7]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("RunID: %02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x\n",
+                               SendMmePacket.MMENTRY[8],SendMmePacket.MMENTRY[9],SendMmePacket.MMENTRY[10],SendMmePacket.MMENTRY[11],
+                               SendMmePacket.MMENTRY[12],SendMmePacket.MMENTRY[13],SendMmePacket.MMENTRY[14],SendMmePacket.MMENTRY[15]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("SOURCE_ID: \n");
+                        for(count=0; count<17; count++)
+                        {
+                            DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[16+count]);
+                        }
+                        DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                        DEBUG_PRINTF_EVCOMM_DETAIL("RESP_ID: \n");
+                        for(count=0; count<17; count++)
+                        {
+                            DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[33+count]);
+                        }
+                        DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                        DEBUG_PRINTF_EVCOMM_DETAIL("NumSounds: 0x%x\n", SendMmePacket.MMENTRY[50]);
+                        DEBUG_PRINTF_EVCOMM_DETAIL("ATTEN_PROFILE: \n");
+                        for(count=0; count<AagGroupsNum; count++)
+                        {
+                            DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ",SendMmePacket.MMENTRY[51+count]);
+                        }
+                        DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                    }
+                    #endif
+
+                    Update_V2G_Flow_Status(CM_ATTEN_CHAR_IND);
+                    count = sendto(RawSock, &SendMmePacket, SendMmePacketSize, 0, (struct sockaddr*)&DestSocketAddress, sizeof(struct sockaddr_ll));
+
+                    //Print log if this CM_ATTEN_CHAR_IND belongs to RETRY Tx message.
+                    if (EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry > 0)
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "[SLAC][Tx]CM_ATTEN_CHAR_IND: resend(%d-th)",
+                                EVCOMM_SYS_INFO.CM_ATTEN_CHAR_IND_retry);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    }
+
+                    DEBUG_PRINTF_EVCOMM_DETAIL("SendMmePacketSize=%d,Rtn=%d\n", SendMmePacketSize,count);
+
+                    ftime(&SeqStartTime);
+    	        }
+    	        break;
+            }
+            #endif
+		}
+
+	    case CM_ATTEN_CHAR_IND:
+		{
+	        ftime(&SeqEndTime);
+	        //if(DiffTimeb(SeqStartTime, SeqEndTime)>TT_match_response)
+	        if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_match_response)     //extended to 400ms due to the response of CM_ATTEN_CHAR.RSP of some EVCC is slower than 200ms.
+	        {
+	            sprintf((char*)buf_log_evcomm,
+                        "SlacComm: Wait CM_ATTEN_CHAR_RSP Timeout - TT_match_response (%.02lf of %dms)",
+                        DiffTimeb(SeqStartTime, SeqEndTime),
+                        TT_match_response);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_TIMEOUT_SLAC_CM_ATTEN_CHAR_RSP (023814):
+                //[Possible Reason] Frequent on BMW i3, need to drive the EV a bit.
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+
+	            Update_V2G_Flow_Status(Sequence_Timeout);
+	            return -1;
+	        }
+	        break;
+		}
+
+	    case CM_ATTEN_CHAR_RSP:
+		{
+	        ftime(&SeqEndTime);
+	        if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_EVSE_match_session)
+	        {
+	            sprintf((char*)buf_log_evcomm,
+                        "SlacComm: Wait CM_VALIDATE_REQ_1ST or CM_SLAC_MATCH_REQ Timeout - TT_EVSE_match_session (%.02lf of %dms)",
+                        DiffTimeb(SeqStartTime, SeqEndTime),
+                        TT_EVSE_match_session);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_TIMEOUT_SLAC_CM_VALIDATE_REQ_1ST__CM_SLAC_MATCH_REQ (023815):
+                //[Possible Reason] Frequent on BMW i3, need to drive the EV a bit.
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 5;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+
+	            Update_V2G_Flow_Status(Sequence_Timeout);
+	            return -1;
+	        }
+	        break;
+		}
+
+	    case CM_VALIDATE_CNF:
+		{
+	        ftime(&SeqEndTime);
+	        if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_match_sequence)
+	        {
+	            sprintf((char*)buf_log_evcomm,
+                        "SlacComm: Wait CM_VALIDATE_REQ_2ND or CM_SLAC_MATCH_REQ Timeout - TT_match_sequence (%.02lf of %dms)",
+                        DiffTimeb(SeqStartTime, SeqEndTime),
+                        TT_match_sequence);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                //Update_ShmStatusCode(); //[To-Do] to be implemented
+                //CCS_SECC_TIMEOUT_SLAC_CM_VALIDATE_REQ_2ND__CM_SLAC_MATCH_REQ (023819):
+                //[Possible Reason] Frequent on BMW i3, need to drive the EV a bit.
+                ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                ShmStatusCodeData->PresentStatusCode[0][4] = 1;
+                ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+                CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = FALSE;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+
+	            Update_V2G_Flow_Status(Sequence_Timeout);
+	            return -1;
+	        }
+	        break;
+		}
+
+	    case CM_SLAC_MATCH_CNF:
+		{
+	        if(UdpSock > 0)
+	        {
+	            close(UdpSock);
+	            UdpSock = -1;
+	        }
+	        if(TcpSock > 0)
+	        {
+	            close(TcpSock);
+	            TcpSock = -1;
+	        }
+	        ftime(&SeqStartTime);
+            V2gTcpConnected();
+            Update_V2G_Flow_Status(SLACC_SDP_UDP_Connection);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SLAAC,SDP,UDP: connecting...");
+	        break;
+		}
+
+		default:
+		{
+		    break;
+		}
+    }
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: V2gMsgDecoder
+DESCRIPTION:
+        1. Decode the V2GTP messages inside "msg" and save the decoded
+           messages in ccs_exi_doc_DIN, ccs_exi_doc_ISO1, and ccs_exi_doc_ISO2,
+           respectively.
+
+        2. After decoding, V2gMsg_Process() could then use
+           ccs_exi_doc_DIN, ccs_exi_doc_ISO1, or ccs_exi_doc_ISO2
+           to deal with the corresponding Response messages, respectively.
+
+PRE-CONDITION:
+        1. msg_length > 0
+
+INPUT:
+        1. msg
+        2. msg_length
+
+OUTPUT:
+        1. ccs_exi_doc_DIN     //global variable
+           ccs_exi_doc_ISO1
+           ccs_exi_doc_ISO2
+
+        2. v2g_state            //Status Flag
+                                //indicating the V2gMsg_Process_din to proceed
+                                  the next process.
+        3. return value         // < 0: ERROR
+                                // > 0: Message Type
+
+GLOBAL VARIABLES:
+=============================================================================*/
+int V2gMsgDecoder(unsigned char *msg, unsigned int msg_length, unsigned int v2g_state)
+{
+    int errn = 0;
+
+    //Checking the minimum Header size requirement
+    if(msg_length < V2GTP_MSG_HEADER_LENGTH)   //The minimum requirement should be 8-byte header.
+    {
+        errn = -1;
+        return errn;
+    }
+
+    //Decode the 1st V2GMSG: AppProtocol
+    if(v2g_state == SupportedAppProtocolRequest)   //17
+    {
+        if ((errn = API_V2GMSG_EXI_Decoder_AppProtocol(msg, msg_length, &ccs_handshake)) < 0)
+        {
+            DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR = %d (DEC)]V2gMsgDecoder: SupportedAppProtocolRequest()\n", errn);
+        }
+        else    //decoded successfully.
+        {
+            //PRINT_XML_DOC_supportedAppProtocolReq(&ccs_handshake);
+        }
+    }
+    //Decode the subsequent V2GMSG (DIN 70121, ISO 15118-2, ISO 15118-20)
+    else if(v2g_state > SupportedAppProtocolRequest && v2g_state <= SessionStopResponse)
+    {
+        //Decoding according to its own protocol
+        switch (ShmCcsData->CommProtocol)
+        {
+            case V2GT_MSG_PROTOCOL_DIN70121:        //0
+            {
+                //DIN
+                if((errn = API_V2GMSG_EXI_Decoder_DIN(msg, msg_length, &ccs_exi_doc_DIN)) < 0)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR = %d (DEC)]V2gMsgDecoder: API_V2GMSG_EXI_Decoder_DIN()",
+                            errn);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                }
+                break;
+            }
+
+            case V2GT_MSG_PROTOCOL_ISO15118_2014:   //1
+            {
+                //ISO1
+                if((errn = API_V2GMSG_EXI_Decoder_ISO1(msg, msg_length, &ccs_exi_doc_ISO1)) < 0)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR = %d (DEC)]V2gMsgDecoder: API_V2GMSG_EXI_Decoder_ISO1()",
+                            errn);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                }
+                break;
+            }
+
+            case V2GT_MSG_PROTOCOL_ISO15118_2018:   //2
+            {
+                //ISO2
+                if((errn = API_V2GMSG_EXI_Decoder_ISO2(msg, msg_length, &ccs_exi_doc_ISO2)) < 0)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR = %d (DEC)]V2gMsgDecoder: API_V2GMSG_EXI_Decoder_ISO2()",
+                            errn);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                }
+                break;
+            }
+
+            default:
+                break;
+        }
+    }
+    else
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR = %d (DEC)]V2gMsgDecoder: Unexpected v2g_state\n", errn);
+        errn = -1;
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: encode_din_V2GTP_stream
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int encode_din_V2GTP_stream(bitstream_t *v2g_tx_stream, struct dinEXIDocument *ccs_exi_doc_DIN)
+{
+    int errn = 0;
+    *v2g_tx_stream->pos = V2GTP_HEADER_LENGTH;
+
+    errn = encode_dinExiDocument(v2g_tx_stream, ccs_exi_doc_DIN);
+    if (errn == 0)
+    {
+        //successfully encoded
+        errn = write_v2gtpHeader(v2g_tx_stream->data, (*v2g_tx_stream->pos) - V2GTP_HEADER_LENGTH, V2GTP_EXI_TYPE);
+        v2g_tx_stream->size = *v2g_tx_stream->pos;	//total length of the encoded V2GMSG.
+
+        if (errn != 0)
+        {
+            DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][encode_din_V2GTP_stream]write_v2gtpHeader(): %d (DEC)\n", errn);
+        }
+    }
+    else
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][encode_din_V2GTP_stream]encode_dinExiDocument(): %d (DEC)\n", errn);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: encode_iso1_V2GTP_stream
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int encode_iso1_V2GTP_stream(bitstream_t *v2g_tx_stream, struct iso1EXIDocument *ccs_exi_doc_ISO1)
+{
+    int errn = 0;
+    *v2g_tx_stream->pos = V2GTP_HEADER_LENGTH;
+
+    errn = encode_iso1ExiDocument(v2g_tx_stream, ccs_exi_doc_ISO1);
+    if (errn == 0)
+    {
+        //successfully encoded
+        errn = write_v2gtpHeader(v2g_tx_stream->data, (*v2g_tx_stream->pos) - V2GTP_HEADER_LENGTH, V2GTP_EXI_TYPE);
+        v2g_tx_stream->size = *v2g_tx_stream->pos;	//total length of the encoded V2GMSG.
+
+        if (errn != 0)
+        {
+            DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][encode_iso1_V2GTP_stream]write_v2gtpHeader(): %d (DEC)\n", errn);
+        }
+    }
+    else
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][encode_iso1_V2GTP_stream]encode_iso1ExiDocument(): %d (DEC)\n", errn);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: encode_iso2_V2GTP_stream
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int encode_iso2_V2GTP_stream(bitstream_t *v2g_tx_stream, struct iso2EXIDocument *ccs_exi_doc_ISO2)
+{
+    int errn = 0;
+    *v2g_tx_stream->pos = V2GTP_HEADER_LENGTH;
+
+    errn = encode_iso2ExiDocument(v2g_tx_stream, ccs_exi_doc_ISO2);
+    if (errn == 0)
+    {
+        //successfully encoded
+        errn = write_v2gtpHeader(v2g_tx_stream->data, (*v2g_tx_stream->pos) - V2GTP_HEADER_LENGTH, V2GTP_EXI_TYPE);
+        v2g_tx_stream->size = *v2g_tx_stream->pos;	//total length of the encoded V2GMSG.
+
+        if (errn != 0)
+        {
+            DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][encode_iso2_V2GTP_stream]write_v2gtpHeader(): %d (DEC)\n", errn);
+        }
+    }
+    else
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][encode_iso2_V2GTP_stream]encode_iso2ExiDocument(): %d (DEC)\n", errn);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: send_encoded_din_V2GTP_Stream
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int send_encoded_din_V2GTP_Stream(int AcceptFd, bitstream_t *v2g_tx_stream, struct dinEXIDocument *ccs_exi_doc_DIN)
+{
+    int errn = 0;
+
+    // STEP 1: =========== Encoding into EXI and Composing into V2GTP Stream ==========
+    errn = encode_din_V2GTP_stream(v2g_tx_stream, ccs_exi_doc_DIN);
+
+    // STEP 2: =========== Send Response Packet  ===========
+    int rtn = 0;
+    rtn = send(AcceptFd, v2g_tx_stream->data, v2g_tx_stream->size, 0);
+
+	if (rtn == v2g_tx_stream->size)
+    {
+        /*
+        DEBUG_PRINTF_EVCOMM_DETAIL("[SeccComm][send_encoded_din_V2GTP_Stream] Response Message is sent ( %d / %d ). (Bytes, DEC): OK\n",
+                rtn, v2g_tx_stream->size);
+        */
+
+        //Reset all EXI doc Req/Res _isUsed Flags after each Res Tx
+
+    }
+    else if (rtn >= 0)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][send_encoded_din_V2GTP_Stream]Imcomplete Tx ( %d / %d ). (Bytes, DEC): FAIL\n", rtn, v2g_tx_stream->size);
+    }
+    else
+    {
+        errn = rtn;
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][send_encoded_din_V2GTP_Stream]send(): %d (DEC)\n", errn);
+    }
+
+    //STEP 3: ========= Reset V2G MSG Flags ==========
+    init_dinBodyType(&ccs_exi_doc_DIN->V2G_Message.Body);
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: send_encoded_iso1_V2GTP_Stream
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int send_encoded_iso1_V2GTP_Stream(int AcceptFd, bitstream_t *v2g_tx_stream, struct iso1EXIDocument *ccs_exi_doc_ISO1)
+{
+    int errn = 0;
+
+    // STEP 1: =========== Encoding into EXI and Composing into V2GTP Stream ==========
+    errn = encode_iso1_V2GTP_stream(v2g_tx_stream, ccs_exi_doc_ISO1);
+
+    // STEP 2: =========== Send Response Packet  ===========
+    int rtn = 0;
+    rtn = send(AcceptFd, v2g_tx_stream->data, v2g_tx_stream->size, 0);
+
+	if (rtn == v2g_tx_stream->size)
+    {
+        /*
+        DEBUG_PRINTF_EVCOMM_DETAIL("[SeccComm][send_encoded_iso1_V2GTP_Stream] Response Message is sent ( %d / %d ). (Bytes, DEC): OK\n",
+                rtn, v2g_tx_stream->size);
+        */
+
+        //Reset all EXI doc Req/Res _isUsed Flags after each Res Tx
+
+    }
+    else if (rtn >= 0)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][send_encoded_iso1_V2GTP_Stream]Imcomplete Tx ( %d / %d ). (Bytes, DEC): FAIL\n", rtn, v2g_tx_stream->size);
+    }
+    else
+    {
+        errn = rtn;
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][send_encoded_iso1_V2GTP_Stream]send(): %d (DEC)\n", errn);
+    }
+
+    //STEP 3: ========= Reset V2G MSG Flags ==========
+    init_iso1BodyType(&ccs_exi_doc_ISO1->V2G_Message.Body);
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: send_encoded_iso2_V2GTP_Stream
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int send_encoded_iso2_V2GTP_Stream(int AcceptFd, bitstream_t *v2g_tx_stream, struct iso2EXIDocument *ccs_exi_doc_ISO2)
+{
+    int errn = 0;
+
+    // STEP 1: =========== Encoding into EXI and Composing into V2GTP Stream ==========
+    errn = encode_iso2_V2GTP_stream(v2g_tx_stream, ccs_exi_doc_ISO2);
+
+    // STEP 2: =========== Send Response Packet  ===========
+    int rtn = 0;
+    rtn = send(AcceptFd, v2g_tx_stream->data, v2g_tx_stream->size, 0);
+
+	if (rtn == v2g_tx_stream->size)
+    {
+        /*
+        DEBUG_PRINTF_EVCOMM_DETAIL("[SeccComm][send_encoded_iso2_V2GTP_Stream] Response Message is sent ( %d / %d ). (Bytes, DEC): OK\n",
+                rtn, v2g_tx_stream->size);
+        */
+
+        //Reset all EXI doc Req/Res _isUsed Flags after each Res Tx
+
+    }
+    else if (rtn >= 0)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][SeccComm][send_encoded_iso2_V2GTP_Stream]Imcomplete Tx ( %d / %d ). (Bytes, DEC): FAIL\n",
+                                    rtn, v2g_tx_stream->size);
+    }
+    else
+    {
+        errn = rtn;
+        DEBUG_PRINTF_EVCOMM_DETAIL("[ERROR][send_encoded_iso2_V2GTP_Stream]send(): %d (DEC)\n", errn);
+    }
+
+    //STEP 3: ========= Reset V2G MSG Flags ==========
+    init_iso2BodyType(&ccs_exi_doc_ISO2->V2G_Message.Body);
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Check_din_V2G_Rx_MSG_SessionID
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_din_V2G_Rx_MSG_SessionID(struct dinEXIDocument *exi_doc_DIN)
+{
+    int i = 0;
+    int leng = 0;
+    int errn = 0;
+    leng = exi_doc_DIN->V2G_Message.Header.SessionID.bytesLen;
+
+    //Step 1: Check SessionID Length
+    if (leng != 8)  //8-byte
+    {
+        sprintf((char*)buf_log_evcomm, "[ERROR]SessionID: incorrect length(%d)", leng);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+    }
+    else
+    {
+        //Step 2-1: Check SessionID content
+        for (i = 0; i < leng; i++)
+        {
+            if (exi_doc_DIN->V2G_Message.Header.SessionID.bytes[i] != EVCOMM_SYS_INFO.SessionID[i])
+            {
+                errn = -2;
+                break;
+            }
+        }
+    }
+
+    //Step 2-2: Print Incorrect ID
+    if (errn == -2) //incorrect ID
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]SessionID: incorrect ID(RX:%02X%02X%02X%02X%02X%02X%02X%02X, ORI:%02X%02X%02X%02X%02X%02X%02X%02X)",
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[0],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[1],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[2],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[3],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[4],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[5],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[6],
+                exi_doc_DIN->V2G_Message.Header.SessionID.bytes[7],
+                EVCOMM_SYS_INFO.SessionID[0],
+                EVCOMM_SYS_INFO.SessionID[1],
+                EVCOMM_SYS_INFO.SessionID[2],
+                EVCOMM_SYS_INFO.SessionID[3],
+                EVCOMM_SYS_INFO.SessionID[4],
+                EVCOMM_SYS_INFO.SessionID[5],
+                EVCOMM_SYS_INFO.SessionID[6],
+                EVCOMM_SYS_INFO.SessionID[7]
+            );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    //Step 3: Correct SessionID for Res Message
+    if (errn != 0)
+    {
+        exi_doc_DIN->V2G_Message.Header.SessionID.bytesLen = 8;
+        memset(exi_doc_DIN->V2G_Message.Header.SessionID.bytes, 0, 8);
+        memcpy(exi_doc_DIN->V2G_Message.Header.SessionID.bytes, EVCOMM_SYS_INFO.SessionID, 8);
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Check_iso1_V2G_Rx_MSG_SessionID
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_iso1_V2G_Rx_MSG_SessionID(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    int i = 0;
+    int leng = 0;
+    int errn = 0;
+    leng = exi_doc_ISO1->V2G_Message.Header.SessionID.bytesLen;
+
+    //Step 1: Check SessionID Length
+    if (leng != 8)  //8-byte
+    {
+        sprintf((char*)buf_log_evcomm, "[ERROR]SessionID: incorrect length(%d)", leng);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+    }
+    else
+    {
+        //Step 2-1: Check SessionID content
+        for (i = 0; i < leng; i++)
+        {
+            if (exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[i] != EVCOMM_SYS_INFO.SessionID[i])
+            {
+                errn = -2;
+                break;
+            }
+        }
+    }
+
+    //Step 2-2: Print Incorrect ID
+    if (errn == -2) //incorrect ID
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]SessionID: incorrect ID(RX:%02X%02X%02X%02X%02X%02X%02X%02X, ORI:%02X%02X%02X%02X%02X%02X%02X%02X)",
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[0],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[1],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[2],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[3],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[4],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[5],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[6],
+                exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[7],
+                EVCOMM_SYS_INFO.SessionID[0],
+                EVCOMM_SYS_INFO.SessionID[1],
+                EVCOMM_SYS_INFO.SessionID[2],
+                EVCOMM_SYS_INFO.SessionID[3],
+                EVCOMM_SYS_INFO.SessionID[4],
+                EVCOMM_SYS_INFO.SessionID[5],
+                EVCOMM_SYS_INFO.SessionID[6],
+                EVCOMM_SYS_INFO.SessionID[7]
+            );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    //Step 3: Correct SessionID for Res Message
+    if (errn != 0)
+    {
+        exi_doc_ISO1->V2G_Message.Header.SessionID.bytesLen = 8;
+        memset(exi_doc_ISO1->V2G_Message.Header.SessionID.bytes, 0, 8);
+        memcpy(exi_doc_ISO1->V2G_Message.Header.SessionID.bytes, EVCOMM_SYS_INFO.SessionID, 8);
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Check_iso2_V2G_Rx_MSG_SessionID
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_iso2_V2G_Rx_MSG_SessionID(struct iso2EXIDocument *exi_doc_ISO2)
+{
+    int i = 0;
+    int leng = 0;
+    int errn = 0;
+    leng = exi_doc_ISO2->V2G_Message.Header.SessionID.bytesLen;
+
+    //Step 1: Check SessionID Length
+    if (leng != 8)  //8-byte
+    {
+        sprintf((char*)buf_log_evcomm, "[ERROR]SessionID: incorrect length(%d)", leng);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+    }
+    else
+    {
+        //Step 2-1: Check SessionID content
+        for (i = 0; i < leng; i++)
+        {
+            if (exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[i] != EVCOMM_SYS_INFO.SessionID[i])
+            {
+                errn = -2;
+                break;
+            }
+        }
+    }
+
+    //Step 2-2: Print Incorrect ID
+    if (errn == -2) //incorrect ID
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]SessionID: incorrect ID(RX:%02X%02X%02X%02X%02X%02X%02X%02X, ORI:%02X%02X%02X%02X%02X%02X%02X%02X)",
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[0],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[1],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[2],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[3],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[4],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[5],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[6],
+                exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[7],
+                EVCOMM_SYS_INFO.SessionID[0],
+                EVCOMM_SYS_INFO.SessionID[1],
+                EVCOMM_SYS_INFO.SessionID[2],
+                EVCOMM_SYS_INFO.SessionID[3],
+                EVCOMM_SYS_INFO.SessionID[4],
+                EVCOMM_SYS_INFO.SessionID[5],
+                EVCOMM_SYS_INFO.SessionID[6],
+                EVCOMM_SYS_INFO.SessionID[7]
+            );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    //Step 3: Correct SessionID for Res Message
+    if (errn != 0)
+    {
+        exi_doc_ISO2->V2G_Message.Header.SessionID.bytesLen = 8;
+        memset(exi_doc_ISO2->V2G_Message.Header.SessionID.bytes, 0, 8);
+        memcpy(exi_doc_ISO2->V2G_Message.Header.SessionID.bytes, EVCOMM_SYS_INFO.SessionID, 8);
+    }
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: GetSchemaID_of_Protocol
+DESCRIPTION:
+    1. Get the SchemaID accroding to the input target
+        *V2GT_MSG_PROTOCOL_DIN70121: choose DIN 70121
+        *V2GT_MSG_PROTOCOL_ISO15118_2014: choose ISO 15118-2 (ed1)
+        *V2GT_MSG_PROTOCOL_ISO15118_2018: choose ISO 15118-20 (ed2)
+        *V2GT_MSG_PROTOCOL_HIGHEST_PRIORITY: choose the one with the highest priority
+
+    2. [To-do] Checking Major and Minor version
+    3. The parsing method will not support those private protocols,
+       such as "usr:tesla...," since "tesla" is 5 bytes but "din" and "iso" are 3 bytes.
+
+    4. [To-do] If the target is selected as DIN," but there is no DIN.
+               However, if EV and EVSE all support ISO, how to use ISO instead?
+
+PRE-CONDITION:
+INPUT:
+    1. target: target protocol
+
+OUTPUT:
+    1. id: SchemaID of selected protocol by EVSE
+    2. ShmCcsData->CommProtocol  (selected protocol)
+    3. SupportedAppProtocol_result
+        (1) appHandresponseCodeType_OK_SuccessfulNegotiation = 0,
+        (2) appHandresponseCodeType_OK_SuccessfulNegotiationWithMinorDeviation = 1,
+        (3) appHandresponseCodeType_Failed_NoNegotiation = 2
+
+GLOBAL VARIABLES:
+    1. ccs_handshake
+    2. ShmCcsData
+=============================================================================*/
+int GetSchemaID_of_Protocol(unsigned char target)
+{
+    int i = 0;
+    int ii = 0;
+    int id = 0;
+    //unsigned char tmp = 0;
+    unsigned char pri = 20; //priority = 1(highest)~20(lowerest)
+    char num[10];
+
+    //struct CCS_ProtocolNamespacestructCharacters pro;
+
+    //Choose the 1st protocol as default.
+    //id = CCS_HANDSHAKE_PROTOCOLS.array[0].SchemaID;
+    id = -1;
+    ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_DIN70121;
+
+    for(i = 0; i < CCS_HANDSHAKE_PROTOCOLS.arrayLen; i++)
+    {
+        //Checking for <ProtocolNamespace>urn:din:70121:2012:MsgDef</ProtocolNamespace>
+        //[To-Do] Ignoring the priority from EV and force DIN 70121 as our only option. (for temp)
+
+        //[CAUTION] The parsing method will not support those private protocols, such as "usr:tesla..."
+        num[0] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[8];
+        num[1] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[9];
+        num[2] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[10];
+        num[3] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[11];
+        num[4] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[12];
+        num[5] = '\0';
+
+        if (atoi(num) == 70121)
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[GetSchemaID_of_Protocol]supported(%d-th/%d): DIN 70121(%d:v%d.%d;id=%d,pri=%d)",
+                    (i+1),
+                    CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                    atoi(num),
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            if (target == V2GT_MSG_PROTOCOL_DIN70121)
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[GetSchemaID_of_Protocol]selected(%d-th/%d): DIN 70121(%d:v%d.%d;id=%d,pri=%d)",
+                        (i+1),
+                        CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                        atoi(num),
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                if (CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor == DIN_SPEC_70121_2012_VersionNumberMajor)
+                {
+                    if (CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor == DIN_SPEC_70121_2012_VersionNumberMinor)
+                    {
+                        EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_OK_SuccessfulNegotiation;
+                    }
+                    else
+                    {   //[TC_SECC_VTB_SupportedAppProtocol_005]
+                        EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_OK_SuccessfulNegotiationWithMinorDeviation;
+                    }
+                    id = CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID;
+                    ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_DIN70121;
+                    return id;
+                }
+                else
+                {
+                    //keep looking for the suitable protocol
+                }
+            }
+            else if (target == V2GT_MSG_PROTOCOL_HIGHEST_PRIORITY)
+            {
+                if (pri > CCS_HANDSHAKE_PROTOCOLS.array[i].Priority)
+                {
+                    ii = i;
+                    id = CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID;
+                    pri = CCS_HANDSHAKE_PROTOCOLS.array[i].Priority;
+                    ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_DIN70121;
+                }
+                else
+                {
+                    //not using this SchemaID, and keep looking for that SchemaID with higer priority
+                }
+            }
+            else
+            {
+                //null
+            }
+        }
+        else if (atoi(num) == 15118)
+        {
+            //urn:din:70121:2012:MsgDef
+            //urn:iso:15118:2:2013:MsgDef
+            memset(num, 0, sizeof(num));
+            num[0] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[16];
+            num[1] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[17];
+            num[2] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[18];
+            num[3] = CCS_HANDSHAKE_PROTOCOLS.array[i].ProtocolNamespace.characters[19];
+            num[4] = '\0';
+
+            if (atoi(num) < 2018 && atoi(num) >= 2010)
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[GetSchemaID_of_Protocol]supported(%d-th/%d): ISO 15118-2(ed1,%d:v%d.%d;id=%d,pri=%d)",
+                        (i+1),
+                        CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                        atoi(num),
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                if (target == V2GT_MSG_PROTOCOL_ISO15118_2014)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[GetSchemaID_of_Protocol]selected(%d-th/%d): ISO 15118-2,ed1(%d:v%d.%d;id=%d,pri=%d)",
+                            (i+1),
+                            CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                            atoi(num),
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    if (CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor == ISO1_15118_2013_VersionNumberMajor)
+                    {
+                        if (CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor == ISO1_15118_2013_VersionNumberMinor)
+                        {
+                            EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_OK_SuccessfulNegotiation;
+                        }
+                        else
+                        {
+                            EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_OK_SuccessfulNegotiationWithMinorDeviation;
+                        }
+                        id = CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID;
+                        ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_ISO15118_2014;
+                        return id;
+                    }
+                    else
+                    {
+                        //keep looking for the suitable protocol
+                    }
+                }
+                else if (target == V2GT_MSG_PROTOCOL_HIGHEST_PRIORITY)
+                {
+                    if (pri > CCS_HANDSHAKE_PROTOCOLS.array[i].Priority)
+                    {
+                        ii = i;
+                        id = CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID;
+                        pri = CCS_HANDSHAKE_PROTOCOLS.array[i].Priority;
+                        ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_ISO15118_2014;
+                    }
+                    else
+                    {
+                        //not using this SchemaID, and keep looking for that SchemaID with higer priority
+                    }
+                }
+                else
+                {
+                    //null
+                }
+            }
+            else if (atoi(num) >= 2018 && atoi(num) <= 2100)    // >= 2018
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[GetSchemaID_of_Protocol]supported(%d-th/%d): ISO 15118-20(ed2,%d:v%d.%d;id=%d,pri=%d)",
+                        (i+1),
+                        CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                        atoi(num),
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                if (target == V2GT_MSG_PROTOCOL_ISO15118_2018)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[GetSchemaID_of_Protocol]selected(%d-th/%d): ISO 15118-20,ed2(%d:v%d.%d;id=%d,pri=%d)",
+                            (i+1),
+                            CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                            atoi(num),
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                            CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                    if (CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor == ISO2_15118_2018_VersionNumberMajor)
+                    {
+                        if (CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor == ISO2_15118_2018_VersionNumberMinor)
+                        {
+                            EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_OK_SuccessfulNegotiation;
+                        }
+                        else
+                        {
+                            EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_OK_SuccessfulNegotiationWithMinorDeviation;
+                        }
+                        id = CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID;
+                        ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_ISO15118_2018;
+                        return id;
+                    }
+                    else
+                    {
+                        //keep looking for the suitable protocol
+                    }
+                }
+                else if (target == V2GT_MSG_PROTOCOL_HIGHEST_PRIORITY)
+                {
+                    if (pri > CCS_HANDSHAKE_PROTOCOLS.array[i].Priority)
+                    {
+                        ii = i;
+                        id = CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID;
+                        pri = CCS_HANDSHAKE_PROTOCOLS.array[i].Priority;
+                        ShmCcsData->CommProtocol = V2GT_MSG_PROTOCOL_ISO15118_2018;
+                    }
+                    else
+                    {
+                        //not using this SchemaID, and keep looking for that SchemaID with higer priority
+                    }
+                }
+                else
+                {
+                    //null
+                }
+            }
+            else
+            {
+                //Unexpected Year
+                sprintf((char*)buf_log_evcomm,
+                        "[GetSchemaID_of_Protocol]unsupported(%d-th/%d): ISO 15118-X(unexpected year:%d,v%d.%d),id=%d,pri=%d",
+                        (i+1),
+                        CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                        atoi(num),
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                        CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                //return -1;
+            }
+        }
+        else
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[GetSchemaID_of_Protocol]unsupported protocol(%d-th/%d)(%d:v%d.%d;id=%d,pri=%d)",
+                    (i+1),
+                    CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+                    atoi(num),
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMajor,
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].VersionNumberMinor,
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].SchemaID,
+                    CCS_HANDSHAKE_PROTOCOLS.array[i].Priority);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            //return -1;
+        }
+    }
+
+    //The final result of highest priority protocol
+    sprintf((char*)buf_log_evcomm,
+            "[GetSchemaID_of_Protocol]selected(%d-th/%d): pro=%d(0:DIN,1:ISO1,2:ISO2);id=%d,pri=%d",
+            (ii+1),
+            CCS_HANDSHAKE_PROTOCOLS.arrayLen,
+            ShmCcsData->CommProtocol,
+            id,
+            pri);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+    if (id < 0)
+    {
+        EVCOMM_SYS_INFO.SupportedAppProtocol_result = appHandresponseCodeType_Failed_NoNegotiation;
+    }
+
+    return id;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_supportedAppProtocolRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_supportedAppProtocolRes(int AcceptFd)
+{
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingInfoData *sys;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    //STEP 1: =========== Setting the Response Message ===========
+	init_appHandEXIDocument(&ccs_handshake);
+    ccs_handshake.supportedAppProtocolRes.ResponseCode = appHandresponseCodeType_OK_SuccessfulNegotiation;
+	ccs_handshake.supportedAppProtocolRes_isUsed = 1u;
+
+    //select the 1st one as the default
+    ccs_handshake.supportedAppProtocolRes.SchemaID = CCS_HANDSHAKE_PROTOCOLS.array[0].SchemaID;
+    ccs_handshake.supportedAppProtocolRes.SchemaID_isUsed = 1u;
+    int id = 0;
+    id = GetSchemaID_of_Protocol(V2GT_MSG_PROTOCOL_PREFERENCE); //output: EVCOMM_SYS_INFO.SupportedAppProtocol_result
+    ccs_handshake.supportedAppProtocolRes.ResponseCode = EVCOMM_SYS_INFO.SupportedAppProtocol_result;   //updating the response code
+    if (id < 0)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error]No avalible CCS protocol (id = %d, preference = %d)",
+                id,
+                V2GT_MSG_PROTOCOL_PREFERENCE);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    else
+    {
+        //selected SchemaID
+        ccs_handshake.supportedAppProtocolRes.SchemaID = (unsigned char) id;
+    }
+
+
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_supportedAppProtocolRes]EVSE_Shutdown => End_Process");
+        ccs_handshake.supportedAppProtocolRes.ResponseCode = appHandresponseCodeType_Failed_NoNegotiation;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_supportedAppProtocolRes]EVSE_EmergencyShutdown => End_Process");
+        ccs_handshake.supportedAppProtocolRes.ResponseCode = appHandresponseCodeType_Failed_NoNegotiation;
+        errn = -1;
+    }
+    else
+    {
+        //null
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][DIN][supportedAppProtocolRes]Permission OFF");
+        ccs_handshake.supportedAppProtocolRes.ResponseCode = appHandresponseCodeType_Failed_NoNegotiation;
+        //errn = -1;
+    }
+
+    #if (CP_PROTECTION_MECHANISM == ENABLE)
+    {
+        #if (SLAC_FIRST_RESPONSE_METHOD == SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES)
+        {
+            //Detect for CP State should be 9V with 5% PWM or 100%PWM (State B1, B2)
+            if (sys->CpState != 2 && sys->CpState != 3)  //State B1, B2
+            {
+                ccs_handshake.supportedAppProtocolRes.ResponseCode = appHandresponseCodeType_Failed_NoNegotiation;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+                Update_V2G_Flow_Status(Other_Fault);
+                sprintf((char*)buf_log_evcomm,
+                        "[Proc_supportedAppProtocolRes]Emergency Stop by CP Error (%d, %.02f V)\n",
+                        sys->CpState,
+                        sys->CpVoltage);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            }
+        }
+        #else
+        {
+            //Detect for CP State should be 9V (State B)
+            if (sys->CpState != 3)  //B2
+            {
+                ccs_handshake.supportedAppProtocolRes.ResponseCode = appHandresponseCodeType_Failed_NoNegotiation;
+                CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+                Update_V2G_Flow_Status(Other_Fault);
+                sprintf((char*)buf_log_evcomm,
+                        "[Proc_supportedAppProtocolRes]Emergency Stop by CP Error (%d, %.02f V)\n",
+                        sys->CpState,
+                        sys->CpVoltage);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            }
+        }
+        #endif
+    }
+    #endif
+
+
+    //STEP 2: =========== Encode into EXI ===========
+    if ((errn = API_V2GMSG_EXI_Encoder_AppProtocol(&ccs_handshake, &v2g_tx_stream)) !=0)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("\n[Error]API_V2GMSG_EXI_Encoder_AppProtocol\n");
+        return errn;
+    }
+
+    //STEP 3: =========== Send Response Packet ===========
+    int Rtn = 0;
+	Rtn = send(AcceptFd, v2g_tx_stream.data, v2g_tx_stream.size, 0);
+    //Rtn = send(6, v2g_tx_stream.data, v2g_tx_stream.size, 0);
+
+    DEBUG_PRINTF_EVCOMM_DETAIL("Send V2GTP Packet Size = %d, Rtn = %d (Bytes, DEC)\n", v2g_tx_stream.size, Rtn);
+
+    if (Rtn < 0)
+    {
+        return Rtn;
+    }
+
+    //STEP 4: =========== Save into Share Memory =========
+	//[Joseph, To-Do] Adding a mechanism to choose DIN 70121 as our 1st priority. (for multiple protocols)
+
+    //STEP 5: =========== Updating the Flow State Flag =========
+    if (id < 0)
+    {
+        errn = -1;
+    }
+
+    //STEP 6: ===========  Reset Flags ============
+    //Reset all EXI doc Req/Res _isUsed Flags after each Res Tx
+    init_appHandEXIDocument(&ccs_handshake);
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_supportedAppProtocolReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_supportedAppProtocolReq(int AcceptFd)
+{
+    //[Joseph, To-Do] analysis on Req message and choose the prefered protocol
+    //Default: DIN 70121 (find SchemaID)
+    int errn = 0;
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]supportedAppProtocolReq");
+    SHM_Save_din_supportedAppProtocolReq(ShmCcsData, &ccs_handshake, ShmSysConfigAndInfo);
+
+    errn = Proc_supportedAppProtocolRes(AcceptFd);
+    if (errn == 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Tx]supportedAppProtocolRes");
+    }
+    else
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("[Error]Proc_supportedAppProtocolRes(): %d (DEC)\n", errn);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_SessionSetupRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_SessionSetupRes(int AcceptFd)
+{
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingInfoData *sys;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinSessionSetupResType(&ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes);
+
+
+    // ====== [BODY (1/2) ResponseCode ======
+    ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes_isUsed = 1u;
+    ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = dinresponseCodeType_OK_NewSessionEstablished;
+
+
+    //[HEADER] Assign Res SessionID
+    ccs_exi_doc_DIN.V2G_Message.Header.SessionID.bytesLen = 8;
+    memset(ccs_exi_doc_DIN.V2G_Message.Header.SessionID.bytes, 0, 8);
+    memcpy(ccs_exi_doc_DIN.V2G_Message.Header.SessionID.bytes, EVCOMM_SYS_INFO.SessionID, 8);
+
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = dinresponseCodeType_FAILED_SequenceError;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //#if PARAMETER_NORMAL_MODE == ENABLE
+    //SHM_Read_din_V2GMSG_Header(&ccs_exi_doc_DIN, ShmCcsData);
+    //#endif
+
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+	    #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = dinresponseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_SessionSetupRes]Emergency Stop by CP Error (%d)\n",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_SessionSetupRes]Emergency Stop by CP Error (%d): ignored\n",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    //Check for shutdown commands from EVSE(DC Main Board)
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = dinresponseCodeType_FAILED;
+        sprintf((char*)buf_log_evcomm, "[Proc_din_SessionSetupRes]Stop by EVSE(%d:normal, %d:emergency): (%d)\n",
+                EVSE_Shutdown,
+                EVSE_EmergencyShutdown,
+                sys->DC_EVSEStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][DIN][SessionSetupRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = dinresponseCodeType_FAILED;
+        errn = -1;
+    }
+
+    // ====== [BODY (2/3) EVSEID ======
+    //EVSEID = all zero
+    memset(ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.EVSEID.bytes, 0, sizeof(ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.EVSEID.bytes));
+    ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.EVSEID.bytesLen = 15;  //max: DIN = 32, ISO1/ISO2 = 37 bytes
+
+    // ====== [BODY (3/3) DateTimeNow ======
+    ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.DateTimeNow_isUsed = 1u;
+    ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.DateTimeNow = (int64_t)time(NULL);   //[Joseph] Format: Unix Time Stamp
+
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ///////////SHM_Read_din_SessionSetupRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #endif
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_SessionSetupRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_SessionSetupRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_SessionSetupRes(int AcceptFd)
+{
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingInfoData *sys;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1SessionSetupResType(&ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes);
+
+    // ====== [BODY (1/2) ResponseCode ======
+    ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes_isUsed = 1u;
+    ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.ResponseCode = iso1responseCodeType_OK_NewSessionEstablished;
+
+
+    //[HEADER] Assign Res SessionID
+    ccs_exi_doc_ISO1.V2G_Message.Header.SessionID.bytesLen = 8;
+    memset(ccs_exi_doc_ISO1.V2G_Message.Header.SessionID.bytes, 0, 8);
+    memcpy(ccs_exi_doc_ISO1.V2G_Message.Header.SessionID.bytes, EVCOMM_SYS_INFO.SessionID, 8);
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //#if PARAMETER_NORMAL_MODE == ENABLE
+    //SHM_Read_iso1_V2GMSG_Header(&ccs_exi_doc_ISO1, ShmCcsData);
+    //#endif
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.ResponseCode = iso1responseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_SessionSetupRes]Emergency Stop by CP Error (%d)\n",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_SessionSetupRes]Emergency Stop by CP Error (%d): ignored\n",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    //Check for shutdown commands from EVSE(DC Main Board)
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.ResponseCode = iso1responseCodeType_FAILED;
+        sprintf((char*)buf_log_evcomm, "[Proc_iso1_SessionSetupRes]Stop by EVSE(%d:normal, %d:emergency): (%d)\n",
+                EVSE_Shutdown,
+                EVSE_EmergencyShutdown,
+                sys->DC_EVSEStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][ISO1][SessionSetupRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = iso1responseCodeType_FAILED;
+        errn = -1;
+    }
+
+    // ====== [BODY (2/3) EVSEID ======
+    //EVSEID = all zero
+    memset(ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.EVSEID.characters, 0, sizeof(ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.EVSEID.characters));
+    ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.EVSEID.charactersLen = 15;  //max: DIN = 32, ISO1/ISO2 = 37 bytes
+
+    // ====== [BODY (3/3) DateTimeNow ======
+    ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.EVSETimeStamp_isUsed = 1u;
+    ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.EVSETimeStamp = (int64_t)time(NULL);   //[Joseph] Format: Unix Time Stamp
+
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ///////////SHM_Read_iso1_SessionSetupRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #endif
+
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_SessionSetupRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso2_SessionSetupRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso2_SessionSetupRes(int AcceptFd)
+{
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingInfoData *sys;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+
+    init_iso2BodyType(&ccs_exi_doc_ISO2.V2G_Message.Body);
+    init_iso2SessionSetupResType(&ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes);
+
+    // ====== [BODY (1/2) ResponseCode ======
+    ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes_isUsed = 1u;
+    ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.ResponseCode = iso2responseCodeType_OK_NewSessionEstablished;
+
+
+    //[HEADER] Assign Res SessionID
+    ccs_exi_doc_ISO2.V2G_Message.Header.SessionID.bytesLen = 8;
+    memset(ccs_exi_doc_ISO2.V2G_Message.Header.SessionID.bytes, 0, 8);
+    memcpy(ccs_exi_doc_ISO2.V2G_Message.Header.SessionID.bytes, EVCOMM_SYS_INFO.SessionID, 8);
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.SessionSetupRes.ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //#if PARAMETER_NORMAL_MODE == ENABLE
+    //SHM_Read_iso2_V2GMSG_Header(&ccs_exi_doc_ISO2, ShmCcsData);
+    //#endif
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.ResponseCode = iso2responseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso2_SessionSetupRes]Emergency Stop by CP Error (%d)",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso2_SessionSetupRes]Emergency Stop by CP Error (%d): ignored",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    //Check for shutdown commands from EVSE(DC Main Board)
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.ResponseCode = iso2responseCodeType_FAILED;
+        sprintf((char*)buf_log_evcomm, "[Proc_iso2_SessionSetupRes]Stop by EVSE(%d:normal, %d:emergency): (%d)\n",
+                EVSE_Shutdown,
+                EVSE_EmergencyShutdown,
+                sys->DC_EVSEStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][ISO2][SessionSetupRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.SessionSetupRes.ResponseCode = iso2responseCodeType_FAILED;
+        errn = -1;
+    }
+
+    // ====== [BODY (2/3) EVSEID ======
+    //EVSEID = all zero
+    memset(ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.EVSEID.characters, 0, sizeof(ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.EVSEID.characters));
+    ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.EVSEID.charactersLen = 15;  //max: DIN = 32, ISO1/ISO2 = 37 bytes
+
+    // ====== [BODY (3/3) DateTimeNow ======
+    ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.EVSETimeStamp_isUsed = 1u;
+    ccs_exi_doc_ISO2.V2G_Message.Body.SessionSetupRes.EVSETimeStamp = (int64_t)time(NULL);   //[Joseph] Format: Unix Time Stamp
+
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ///////////SHM_Read_iso2_SessionSetupRes(&ccs_exi_doc_ISO2, ShmCcsData);
+    #endif
+
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_iso2_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO2) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso2_SessionSetupRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+        2. ccs_exi_doc_DIN
+=============================================================================*/
+int Proc_din_SessionSetupReq(int AcceptFd)
+{
+    int errn = 0;
+
+    DEBUG_PRINTF_EVCOMM_DETAIL("\n[Proc_din_SessionSetupReq]Got SessionSetupReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_SessionSetupReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_SessionSetupReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    errn = Proc_din_SessionSetupRes(AcceptFd);
+    if (errn == 0)
+    {
+    	//successfully send response.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]SessionSetupRes");
+    }
+    else
+    {
+    	sprintf((char*)buf_log_evcomm,
+                "[Error]Proc_din_SessionSetupRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+        2. ccs_exi_doc_ISO1
+=============================================================================*/
+int Proc_iso1_SessionSetupReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("\n[Proc_iso1_SessionSetupReq]Got SessionSetupReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_SessionSetupReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_SessionSetupReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    errn = Proc_iso1_SessionSetupRes(AcceptFd);
+    if (errn == 0)
+    {
+        //successfully send response.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]SessionSetupRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error]Proc_iso1_SessionSetupRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso2_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+        2. ccs_exi_doc_ISO2
+=============================================================================*/
+int Proc_iso2_SessionSetupReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("\n[Proc_iso2_SessionSetupReq]Got SessionSetupReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO2_SessionSetupReq(&ccs_exi_doc_ISO2);
+
+    //Save into Share Memory
+    SHM_Save_iso2_SessionSetupReq(ShmCcsData, &ccs_exi_doc_ISO2, ShmSysConfigAndInfo);
+
+    errn = Proc_iso2_SessionSetupRes(AcceptFd);
+    if (errn == 0)
+    {
+        //successfully send response.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO2][V2G][Tx]SessionSetupRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error]Proc_iso2_SessionSetupRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_ServiceDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ServiceDiscoveryRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct ChargingInfoData *sys;
+    //struct ServiceDiscoveryRequest_DIN70121 *req;
+    struct ServiceDiscoveryResponse_DIN70121 *res;
+
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+    //req = &ShmCcsData->V2GMessage_DIN70121.ServiceDiscoveryRequest;
+    res = &ShmCcsData->V2GMessage_DIN70121.ServiceDiscoveryResponse;
+
+
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinServiceDiscoveryResType(&ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes);
+
+    //[1/4] Response Code
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes_isUsed = 1u;
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = dinresponseCodeType_OK;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode =  dinresponseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+	    errn = -1;
+        sprintf((char*)buf_log_evcomm, "[Proc_din_ServiceDiscoveryRes]Emergency Stop by CP Error (%d)", sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_ServiceDiscoveryRes]Emergency Stop by CP Error (%d): ignored",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = dinresponseCodeType_FAILED;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ServiceDiscoveryRes]shutdown by EVSE");
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][DIN][ServiceDiscoveryRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = dinresponseCodeType_FAILED;
+        errn = -1;
+    }
+
+    //[2/4] PaymentOptions
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.PaymentOptions.PaymentOption.arrayLen = 1u;
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.PaymentOptions.PaymentOption.array[0] = dinpaymentOptionType_ExternalPayment; //1
+
+    //[3/4] Charge Service
+    res->ChargeService_DIN70121.Services.ServiceTag.ServiceID = 1;
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceTag.ServiceID = (unsigned short) res->ChargeService_DIN70121.Services.ServiceTag.ServiceID;
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceTag.ServiceCategory = dinserviceCategoryType_EVCharging;
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.FreeService = 1; //[Joseph] for test
+    ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.EnergyTransferType = dinEVSESupportedEnergyTransferType_DC_extended;
+
+    //[4/4] Service List (null, not be uesed for now.)
+    //#if PARAMETER_NORMAL_MODE == ENABLE
+    ///////////////SHM_Read_din_ServiceDiscoveryRes(&ccs_exi_doc_DIN, ShmCcsData);
+    //#endif
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        errn = -1;
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ServiceDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ServiceDiscoveryRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct ChargingInfoData *sys;
+    //struct ServiceDiscoveryRequest_ISO15118_2014 *req;
+    struct ServiceDiscoveryResponse_ISO15118_2014 *res;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+    //req = &ShmCcsData->V2GMessage_ISO15118_2014.ServiceDiscoveryRequest;
+    res = &ShmCcsData->V2GMessage_ISO15118_2014.ServiceDiscoveryResponse;
+
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1ServiceDiscoveryResType(&ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes);
+
+    //[1/4] Response Code
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes_isUsed = 1u;
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = iso1responseCodeType_OK;
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = iso1responseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_ServiceDiscoveryRes]Emergency Stop by CP Error (%d)",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_ServiceDiscoveryRes]Emergency Stop by CP Error (%d): ignored",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = iso1responseCodeType_FAILED;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ServiceDiscoveryRes]shutdown by EVSE");
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][ISO1][ServiceDiscoveryRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.ServiceDiscoveryRes.ResponseCode = iso1responseCodeType_FAILED;
+        errn = -1;
+    }
+
+    //[2/4] PaymentOptionList
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.PaymentOptionList.PaymentOption.arrayLen = 1u;
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.PaymentOptionList.PaymentOption.array[0] = iso1paymentOptionType_ExternalPayment; //1
+
+    //[3/4] Charge Service
+    res->ChargeService.Services.ServiceID = 1;
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceID = (unsigned short) res->ChargeService.Services.ServiceID;
+    //ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceName_isUsed = 1;   //new in ISO1, not be used, yet.
+    //ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceName.charactersLen = xxx;
+    //ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceName.characters[i] = xxx;
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.ServiceCategory = iso1serviceCategoryType_EVCharging;
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.FreeService = 1; //[Joseph] for test
+    ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.SupportedEnergyTransferMode.EnergyTransferMode.arrayLen = 1u;    //[ISO1] max = 6
+
+    switch (ShmCcsData->EnergyTransferMode)
+    {
+        case DC_extended:
+        {
+            ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.SupportedEnergyTransferMode.EnergyTransferMode.array[0] = iso1EnergyTransferModeType_DC_extended;
+            break;
+        }
+
+        case AC_single_phase_core:
+        {
+            ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.SupportedEnergyTransferMode.EnergyTransferMode.array[0] = iso1EnergyTransferModeType_AC_single_phase_core;
+            break;
+        }
+
+        case AC_three_phase_core:
+        {
+            ccs_exi_doc_ISO1.V2G_Message.Body.ServiceDiscoveryRes.ChargeService.SupportedEnergyTransferMode.EnergyTransferMode.array[0] = iso1EnergyTransferModeType_AC_three_phase_core;
+            break;
+        }
+
+        default:
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[ISO1][ServiceDiscoveryRes][Warning]unexpected EnergyTransferMode(%d)",
+                    ShmCcsData->EnergyTransferMode);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            break;
+        }
+    }
+
+
+    //[4/4] Service List (null, not be uesed for now.)
+    //#if PARAMETER_NORMAL_MODE == ENABLE
+    ///////////////SHM_Read_iso1_ServiceDiscoveryRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    //#endif
+
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        errn = -1;
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_ServiceDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ServiceDiscoveryReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("\n[SeccComm][Proc_din_ServiceDiscoveryReq]Got ServiceDiscoveryReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_ServiceDiscoveryReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_ServiceDiscoveryReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    errn = Proc_din_ServiceDiscoveryRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]ServiceDiscoveryRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_din_ServiceDiscoveryReq]Proc_din_ServiceDiscoveryRes(): %d (DEC)",
+                errn
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ServiceDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ServiceDiscoveryReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("\n[SeccComm][Proc_iso1_ServiceDiscoveryReq]Got ServiceDiscoveryReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_ServiceDiscoveryReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_ServiceDiscoveryReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    errn = Proc_iso1_ServiceDiscoveryRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]ServiceDiscoveryRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_ServiceDiscoveryReq]Proc_iso1_ServiceDiscoveryRes(): %d (DEC)",
+                errn
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_ServiceAndPaymentSelectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ServiceAndPaymentSelectionRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct ServiceAndPaymentSelectionRequest_DIN70121 *req;
+    //struct ServiceAndPaymentSelectionResponse_DIN70121 *res;
+    struct ServiceDiscoveryResponse_DIN70121 *sd_res;
+    struct ChargingInfoData *sys;
+
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    req = &ShmCcsData->V2GMessage_DIN70121.ServiceAndPaymentSelectionRequest;
+    //res = &ShmCcsData->V2GMessage_DIN70121.ServiceAndPaymentSelectionResponse;
+    sd_res = &ShmCcsData->V2GMessage_DIN70121.ServiceDiscoveryResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinServicePaymentSelectionResType(&ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes);
+
+    //[1/1] Response Code
+    ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes_isUsed = 1u;
+    ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_OK;
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //Check for SelectedPaymentOption (TC_SECC_VTB_ServicePaymentSelection_007)
+    if (req->SelectedPaymentOption != ExternalPayment)  //1
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED_PaymentSelectionInvalid;
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]unexpected SelectedPaymentOption(%d) => End_Process (EIM only, no PnC, yet.)",
+                req->SelectedPaymentOption);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_Payment SelectionInvalid (023762)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 6;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 2;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+    //Check for ServiceID (TC_SECC_VTB_ServicePaymentSelection_004)
+    if (req->SelectedServiceList.SelectedService[0].ServiceID != sd_res->ChargeService_DIN70121.Services.ServiceTag.ServiceID)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED_ServiceSelectionInvalid;  //8
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]Wrong selected ServiceID(%d) => End_Process",
+                req->SelectedServiceList.SelectedService[0].ServiceID);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_ServiceSelectionInvalid (023764)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 6;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_ServiceAndPaymentSelectionRes]Emergency Stop by CP Error (%d)",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_ServiceAndPaymentSelectionRes]Emergency Stop by CP Error (%d): ignored due to function is disabled",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ServiceAndPaymentSelectionRes]shutdown by EVSE");
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED;
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][DIN][ServicePaymentSelectionRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.ServicePaymentSelectionRes.ResponseCode = dinresponseCodeType_FAILED;
+        errn = -1;
+    }
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ServiceAndPaymentSelectionRes]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ServiceAndPaymentSelectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ServiceAndPaymentSelectionRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct ServiceAndPaymentSelectionRequest_ISO15118_2014 *req;
+    //struct ServiceAndPaymentSelectionResponse_ISO15118_2014 *res;
+    struct ServiceDiscoveryResponse_ISO15118_2014 *sd_res;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    req = &ShmCcsData->V2GMessage_ISO15118_2014.ServiceAndPaymentSelectionRequest;
+    //res = &ShmCcsData->V2GMessage_ISO15118_2014.ServiceAndPaymentSelectionResponse;
+    sd_res = &ShmCcsData->V2GMessage_ISO15118_2014.ServiceDiscoveryResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1PaymentServiceSelectionResType(&ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes);
+
+    //[1/1] Response Code
+    ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes_isUsed = 1u;
+    ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_OK;
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //Check for SelectedPaymentOption (TC_SECC_VTB_ServicePaymentSelection_007)
+    if (req->SelectedPaymentOption != ExternalPayment)  //1
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED_PaymentSelectionInvalid;
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]unexpected SelectedPaymentOption(%d) => End_Process (EIM only, no PnC, yet.)",
+                req->SelectedPaymentOption);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_Payment SelectionInvalid (023762)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 6;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 2;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+
+    //Check for ServiceID (TC_SECC_VTB_ServicePaymentSelection_004)
+    if (req->SelectedServiceList.SelectedService[0].ServiceID != sd_res->ChargeService.Services.ServiceID)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED_ServiceSelectionInvalid;  //8
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]Wrong selected ServiceID(%d) => End_Process",
+                req->SelectedServiceList.SelectedService[0].ServiceID);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_ServiceSelectionInvalid (023764)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 6;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+
+    //Detect for CP State should be 9V (State B)
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        #if CP_PROTECTION_MECHANISM == ENABLE
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_ServiceAndPaymentSelectionRes]Emergency Stop by CP Error (%d)",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #else
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_ServiceAndPaymentSelectionRes]Emergency Stop by CP Error (%d): ignored due to function is disabled",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        #endif
+    }
+
+    if (sys->DC_EVSEStatus == EVSE_Shutdown ||
+        sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ServiceAndPaymentSelectionRes]shutdown by EVSE");
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED;
+        errn = -1;
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][ISO1][PaymentServiceSelectionRes]Permission OFF");
+        ccs_exi_doc_ISO1.V2G_Message.Body.PaymentServiceSelectionRes.ResponseCode = iso1responseCodeType_FAILED;
+        errn = -1;
+    }
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ServiceAndPaymentSelectionRes]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_ServiceAndPaymentSelectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ServiceAndPaymentSelectionReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("[SeccComm][Proc_din_ServiceAndPaymentSelectionReq]Got ServiceAndPaymentSelectionReq");
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_ServiceAndPaymentSelectionReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_ServiceAndPaymentSelectionReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    errn = Proc_din_ServiceAndPaymentSelectionRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]ServiceAndPaymentSelectionRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+        "[Error][Proc_iso1_ServiceAndPaymentSelectionReq]Proc_iso1_ServiceAndPaymentSelectionRes(): %d (DEC)",
+        errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ServiceAndPaymentSelectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ServiceAndPaymentSelectionReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("[SeccComm][Proc_iso1_ServiceAndPaymentSelectionReq]Got ServiceAndPaymentSelectionReq");
+
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_ServiceAndPaymentSelectionReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_ServiceAndPaymentSelectionReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    errn = Proc_iso1_ServiceAndPaymentSelectionRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]ServiceAndPaymentSelectionRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_iso1_ServiceAndPaymentSelectionReq]Proc_iso1_ServiceAndPaymentSelectionRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_ContractAuthenticationRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ContractAuthenticationRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingInfoData *sys;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinContractAuthenticationResType(&ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes_isUsed = 1u;
+
+    //[BODY (1/2)] ResponseCode
+    ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_OK;
+    ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.EVSEProcessing = dinEVSEProcessingType_Ongoing; //0
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //Detect for CP State should be 9V (State B)
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_FAILED;
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.EVSEProcessing =  dinEVSEProcessingType_Finished;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_ContractAuthenticationRes]Emergency Stop by CP Error (%d)",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_FAILED;
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.EVSEProcessing =  dinEVSEProcessingType_Finished;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_FAILED;
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.EVSEProcessing =  dinEVSEProcessingType_Finished;
+        errn = -1;
+    }
+
+    //[BODY (2/2)] EVSEProcessing
+    if(ShmInternalComm->ChargingPermission == TRUE)
+    {
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.EVSEProcessing = dinEVSEProcessingType_Finished; //0
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "CSU Permission: OK");
+
+        #if (SLAC_FIRST_RESPONSE_METHOD == SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES)
+        {
+            //Set PWM as 5% (for SLAC first case)
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "Set PWM as 5%%");
+            SwitchCpStateE(DISABLE);
+            OutputCpPwmDuty(5);
+        }
+        #endif
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][DIN][ContractAuthenticationRes]Permission OFF");
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.ResponseCode = dinresponseCodeType_FAILED;
+        ccs_exi_doc_DIN.V2G_Message.Body.ContractAuthenticationRes.EVSEProcessing =  dinEVSEProcessingType_Finished;
+        errn = -1;
+    }
+
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ////////////SHM_Read_din_ContractAuthenticationRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #endif
+
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ChargeParameterDiscoveryRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_AuthorizationRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_AuthorizationRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingInfoData *sys;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1AuthorizationResType(&ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes_isUsed = 1u;
+
+    //[BODY (1/2)] ResponseCode
+    ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = iso1responseCodeType_OK;
+    ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.EVSEProcessing = iso1EVSEProcessingType_Ongoing; //0
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //Detect for CP State should be 9V (State B)
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 2) && (sys->CpState != 3))  //State B1, B2
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = iso1responseCodeType_FAILED;
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.EVSEProcessing =  iso1EVSEProcessingType_Finished;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_AuthorizationRes]Emergency Stop by CP Error (%d)",
+                sys->CpState);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = FAILED_ISO15118_2014;
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.EVSEProcessing =  iso1EVSEProcessingType_Finished;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = FAILED_ISO15118_2014;
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.EVSEProcessing =  iso1EVSEProcessingType_Finished;
+        errn = -1;
+    }
+    //[BODY (2/2)] EVSEProcessing
+    //Check for Permission from CSU
+    if(ShmInternalComm->ChargingPermission == TRUE)
+    {
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.EVSEProcessing = iso1EVSEProcessingType_Finished; //0
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "CSU Permission: OK");
+
+        #if (SLAC_FIRST_RESPONSE_METHOD == SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES)
+        {
+            //Set PWM as 5% (for SLAC first case)
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "Set PWM as 5%%");
+            SwitchCpStateE(DISABLE);
+            OutputCpPwmDuty(5);
+        }
+        #endif
+    }
+
+    //Check for Permission Changing from TRUE to FALSE
+    if (ShmInternalComm->ChargingPermission_pre == TRUE &&
+        ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][ISO1][AuthorizationRes]Permission OFF");
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.ResponseCode = FAILED_ISO15118_2014;
+        ccs_exi_doc_ISO1.V2G_Message.Body.AuthorizationRes.EVSEProcessing =  iso1EVSEProcessingType_Finished;
+        errn = -1;
+    }
+
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ////////////SHM_Read_iso1_AuthorizationRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #endif
+
+
+    // ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ChargeParameterDiscoveryRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_ContractAuthenticationReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ContractAuthenticationReq(int AcceptFd)
+{
+    int errn = 0;
+
+        DEBUG_PRINTF_EVCOMM_DETAIL("\n[SeccComm][Proc_din_ContractAuthenticationReq]Got Proc_din_ContractAuthenticationReq\n");
+
+
+        //Print the decoded XML Document
+        PRINT_XML_DOC_DIN_ContractAuthenticationReq(&ccs_exi_doc_DIN);
+
+        //Save into Share Memory
+        SHM_Save_din_ContractAuthenticationReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+        errn = Proc_din_ContractAuthenticationRes(AcceptFd);
+        if (errn == 0)
+        {
+            //send response successfully.
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]ContractAuthenticationRes");
+        }
+        else
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[Error][SeccComm][Proc_din_ContractAuthenticationReq]Proc_iso1_AuthenticationRes(): %d (DEC)",
+                    errn);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        }
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_AuthenticationReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_AuthenticationReq(int AcceptFd)
+{
+    int errn = 0;
+    DEBUG_PRINTF_EVCOMM_DETAIL("\n[SeccComm][Proc_iso1_AuthenticationReq]Got AuthorizationReq\n");
+
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_AuthorizationReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_AuthorizationReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    errn = Proc_iso1_AuthorizationRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]AuthorizationRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_AuthenticationReq]Proc_iso1_AuthenticationRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_dinDC_EVSEStatusType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_dinDC_EVSEStatusType(struct DC_EVSEStatusType_DIN70121 *in)
+{
+	in->EVSEIsolationStatus = dinisolationLevelType_Valid;
+	//	dinisolationLevelType_Invalid = 0,
+	//	dinisolationLevelType_Valid = 1, (default)
+	//	dinisolationLevelType_Warning = 2,
+	//	dinisolationLevelType_Fault = 3
+
+	in->EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+	// dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	// dinDC_EVSEStatusCodeType_EVSE_Ready = 1, (default)
+	// dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	// dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	// dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	// dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	// dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	// dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+	// dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+	// dinDC_EVSEStatusCodeType_Reserved_A = 9,
+	// dinDC_EVSEStatusCodeType_Reserved_B = 10,
+	// dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+	in->EVSENotification = dinEVSENotificationType_None;
+	// dinEVSENotificationType_None = 0, (default)
+	// dinEVSENotificationType_StopCharging = 1,
+	// dinEVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_dinPhysicalValueType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_dinPhysicalValueType(struct PhysicalValueType_DIN70121 *obj, short value, int multiplier, unsigned char unit)
+{
+    obj->Value = value;
+    obj->Multiplier = multiplier;
+    obj->Unit =unit;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_ChargeParameterDiscoveryRes(struct CcsData *shm_ccs)
+{
+	struct ChargeParameterDiscoveryResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.ChargeParameterDiscoveryResponse;
+
+	//----- [BODY (1/5)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/5)] EVSEProcessing -----
+    in->EVSEProcessing = dinEVSEProcessingType_Ongoing;    //0
+    // 	dinEVSEProcessingType_Finished = 0,
+    //	dinEVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/5)] SAScheduleList of SASchedules -----
+	//be fixed in another function.
+
+    //-----  [BODY (4/5)] AC_EVSEChargeParameter of EVSEChargeParameter -----
+    //ignore, since DIN doesn't support AC
+
+    //----- [BODY (5/5)] DC_EVSEChargeParameter of EVSEChargeParameter -----
+	struct DC_EVSEChargeParameterType_DIN70121 *in_para;
+	in_para = &in->DC_EVSEChargeParameter;
+
+    //DC_EVSEStatus
+	SHM_Init_dinDC_EVSEStatusType(&in_para->DC_EVSEStatus);
+    in_para->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;
+
+    short value = 0; int multiplier = 0; unsigned char unit = 0;
+
+    //EVSEMaximumCurrentLimit
+    value = 600; multiplier = -1; unit = A_DIN70121;    //60A
+	SHM_Save_dinPhysicalValueType(&in_para->EVSEMaximumCurrentLimit, value, multiplier, unit);
+
+    //EVSEMaximumPowerLimit
+    value = 3000; multiplier = 1; unit = W_DIN70121;    //30KW
+	SHM_Save_dinPhysicalValueType(&in_para->EVSEMaximumPowerLimit, value, multiplier, unit);
+
+    //EVSEMaximumVoltageLimit
+    value = 7500; multiplier = -1; unit = V_DIN70121;   //750V
+	SHM_Save_dinPhysicalValueType(&in_para->EVSEMaximumVoltageLimit, value, multiplier, unit);
+
+    //EVSEMinimumVoltageLimit
+    value = 1500; multiplier = -1; unit = V_DIN70121;   //150V
+	SHM_Save_dinPhysicalValueType(&in_para->EVSEMinimumVoltageLimit, value, multiplier, unit);
+
+
+    //EVSEMinimumCurrentLimit
+    value = 10; multiplier = -1; unit = A_DIN70121;     //1A
+	SHM_Save_dinPhysicalValueType(&in_para->EVSEMinimumCurrentLimit, value, multiplier, unit);
+
+    //EVSECurrentRegulationTolerance
+    value = 10; multiplier = -1; unit = A_DIN70121;      //1A
+	SHM_Save_dinPhysicalValueType(&in_para->EVSECurrentRegulationTolerance, value, multiplier, unit);
+
+    //EVSEPeakCurrentRipple
+    value = 2; multiplier = -1; unit = A_DIN70121;      //0.2A
+	SHM_Save_dinPhysicalValueType(&in_para->EVSEPeakCurrentRipple, value, multiplier, unit);
+
+    //EVSEEnergyToBeDelivered (optional)
+    //SHM_Save_dinPhysicalValueType(&out_para->EVSEEnergyToBeDelivered, &in_para->EVSEEnergyToBeDelivered);
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_ChargeParameterDiscoveryRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinChargeParameterDiscoveryResType(&ccs_exi_doc_DIN.V2G_Message.Body.ChargeParameterDiscoveryRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.ChargeParameterDiscoveryRes_isUsed = 1u;
+
+    //----- [BODY (1/5)] ResponseCode -----
+    struct dinChargeParameterDiscoveryResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.ChargeParameterDiscoveryRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/5)] EVSEProcessing -----
+    res->EVSEProcessing = dinEVSEProcessingType_Finished; //0
+    // 	dinEVSEProcessingType_Finished = 0,
+    //	dinEVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/5)] SAScheduleList of SASchedules -----
+    res->SAScheduleList_isUsed = 1u;
+    struct dinSAScheduleListType *list;
+    list = &res->SAScheduleList;
+    //
+    list->SAScheduleTuple.arrayLen = 1;
+    list->SAScheduleTuple.array[0].SAScheduleTupleID = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleID = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.arrayLen = 1;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval_isUsed = 1u;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.start = 0;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration = xxx
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration_isUsed = 1u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval_isUsed = 0u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval.xxx
+    //list->SAScheduleTuple.array[0].SalesTariff.xxx
+    //list->SAScheduleTuple.array[0].SalesTariff_isUsed = 0u;
+
+
+    //-----  [BODY (4/5)] AC_EVSEChargeParameter of EVSEChargeParameter -----
+    //ignore, since DIN doesn't support AC
+
+    //----- [BODY (5/5)] DC_EVSEChargeParameter of EVSEChargeParameter -----
+    res->DC_EVSEChargeParameter_isUsed = 1u;
+    struct dinDC_EVSEChargeParameterType *para;
+    para = &res->DC_EVSEChargeParameter;
+
+    //DC_EVSEStatus
+    para->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    para->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1,
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+
+    para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+    // dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+    // dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+    // dinDC_EVSEStatusCodeType_Reserved_A = 9,
+    // dinDC_EVSEStatusCodeType_Reserved_B = 10,
+    // dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+    para->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    para->DC_EVSEStatus.EVSENotification = dinEVSENotificationType_None;
+    // dinEVSENotificationType_None = 0,
+    // dinEVSENotificationType_StopCharging = 1,
+    // dinEVSENotificationType_ReNegotiation = 2
+
+    //EVSEMaximumCurrentLimit
+    para->EVSEMaximumCurrentLimit.Value = 2400;
+    para->EVSEMaximumCurrentLimit.Multiplier = -1;
+    para->EVSEMaximumCurrentLimit.Unit_isUsed = 1u;
+    para->EVSEMaximumCurrentLimit.Unit = dinunitSymbolType_A;
+    //	dinunitSymbolType_h = 0,
+    //	dinunitSymbolType_m = 1,
+    //	dinunitSymbolType_s = 2,
+    //	dinunitSymbolType_A = 3,
+    //	dinunitSymbolType_Ah = 4,
+    //	dinunitSymbolType_V = 5,
+    //	dinunitSymbolType_VA = 6,
+    //	dinunitSymbolType_W = 7,
+    //	dinunitSymbolType_W_s = 8,
+    //	dinunitSymbolType_Wh = 9
+
+    //EVSEMaximumPowerLimit
+    para->EVSEMaximumPowerLimit.Value = 6000;
+    para->EVSEMaximumPowerLimit.Multiplier = 1;
+    para->EVSEMaximumPowerLimit.Unit_isUsed = 1u;
+    para->EVSEMaximumPowerLimit.Unit = dinunitSymbolType_W;
+
+
+    //EVSEMaximumVoltageLimit
+    para->EVSEMaximumVoltageLimit.Value = 7500;
+    para->EVSEMaximumVoltageLimit.Multiplier = -1;
+    para->EVSEMaximumVoltageLimit.Unit_isUsed = 1u;
+    para->EVSEMaximumVoltageLimit.Unit = dinunitSymbolType_V;
+
+    //EVSEMinimumVoltageLimit
+    para->EVSEMinimumVoltageLimit.Value = 1500;
+    para->EVSEMinimumVoltageLimit.Multiplier = -1;
+    para->EVSEMinimumVoltageLimit.Unit_isUsed = 1u;
+    para->EVSEMinimumVoltageLimit.Unit = dinunitSymbolType_V;
+
+
+    //EVSEMinimumCurrentLimit
+    para->EVSEMinimumCurrentLimit.Value = 20;
+    para->EVSEMinimumCurrentLimit.Multiplier = -1;
+    para->EVSEMinimumCurrentLimit.Unit_isUsed = 1u;
+    para->EVSEMinimumCurrentLimit.Unit = dinunitSymbolType_A;
+
+    //EVSECurrentRegulationTolerance_isUsed
+    para->EVSECurrentRegulationTolerance_isUsed = 1u;
+    //EVSECurrentRegulationTolerance
+    para->EVSECurrentRegulationTolerance.Value = 10;
+    para->EVSECurrentRegulationTolerance.Multiplier = -1;
+    para->EVSECurrentRegulationTolerance.Unit_isUsed = 1u;
+    para->EVSECurrentRegulationTolerance.Unit = dinunitSymbolType_A;
+
+
+    //EVSEEnergyToBeDelivered_isUsed
+    para->EVSEEnergyToBeDelivered_isUsed = 1u;
+    //EVSEPeakCurrentRipple
+    para->EVSEPeakCurrentRipple.Value = 2;
+    para->EVSEPeakCurrentRipple.Multiplier = -1;
+    para->EVSEPeakCurrentRipple.Unit_isUsed = 1u;
+    para->EVSEPeakCurrentRipple.Unit = dinunitSymbolType_A;
+
+
+    //EVSEEnergyToBeDelivered (optional)
+    /*
+    para->EVSEEnergyToBeDelivered.Value = 360;
+    para->EVSEEnergyToBeDelivered.Multiplier = 3;
+    para->EVSEEnergyToBeDelivered.Unit_isUsed = 1u;
+    para->EVSEEnergyToBeDelivered.Unit = dinunitSymbolType_Wh;
+    */
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_ChargeParameterDiscoveryRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1ChargeParameterDiscoveryResType(&ccs_exi_doc_ISO1.V2G_Message.Body.ChargeParameterDiscoveryRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.ChargeParameterDiscoveryRes_isUsed = 1u;
+
+    //----- [BODY (1/5)] ResponseCode -----
+    struct iso1ChargeParameterDiscoveryResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.ChargeParameterDiscoveryRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+
+    //----- [BODY (2/5)] EVSEProcessing -----
+    res->EVSEProcessing = iso1EVSEProcessingType_Finished; //0
+    // 	iso1EVSEProcessingType_Finished = 0,
+    //	iso1EVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/5)] SAScheduleList of SASchedules -----
+    res->SAScheduleList_isUsed = 1u;
+    struct iso1SAScheduleListType *list;
+    list = &res->SAScheduleList;
+    //
+    list->SAScheduleTuple.arrayLen = 1;
+    list->SAScheduleTuple.array[0].SAScheduleTupleID = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.arrayLen = 1;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval_isUsed = 1u;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.start = 0;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration = xxx
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration_isUsed = 1u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval_isUsed = 0u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval.xxx
+    //list->SAScheduleTuple.array[0].SalesTariff.xxx
+    //list->SAScheduleTuple.array[0].SalesTariff_isUsed = 0u;
+
+
+    //-----  [BODY (4/5)] AC_EVSEChargeParameter of EVSEChargeParameter -----
+    //ignore, since our ISO1 doesn't support AC, yet
+
+    //----- [BODY (5/5)] DC_EVSEChargeParameter of EVSEChargeParameter -----
+    res->DC_EVSEChargeParameter_isUsed = 1u;
+    struct iso1DC_EVSEChargeParameterType *para;
+    para = &res->DC_EVSEChargeParameter;
+
+    //DC_EVSEStatus
+    para->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    para->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid;
+    //	iso1isolationLevelType_Invalid = 0,
+    //	iso1isolationLevelType_Valid = 1,
+    //	iso1isolationLevelType_Warning = 2,
+    //	iso1isolationLevelType_Fault = 3
+
+    para->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+    // iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+    // iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+    // iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+    // iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+    // iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+    para->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    para->DC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    // iso1EVSENotificationType_None = 0,
+    // iso1EVSENotificationType_StopCharging = 1,
+    // iso1EVSENotificationType_ReNegotiation = 2
+
+    //EVSEMaximumCurrentLimit
+    para->EVSEMaximumCurrentLimit.Value = 2400;
+    para->EVSEMaximumCurrentLimit.Multiplier = -1;
+    //para->EVSEMaximumCurrentLimit.Unit_isUsed = 1u;
+    para->EVSEMaximumCurrentLimit.Unit = iso1unitSymbolType_A;
+    //iso1unitSymbolType_h = 0,
+	//iso1unitSymbolType_m = 1,
+	//iso1unitSymbolType_s = 2,
+	//iso1unitSymbolType_A = 3,
+	//iso1unitSymbolType_V = 4,
+	//iso1unitSymbolType_W = 5,
+	//iso1unitSymbolType_Wh = 6
+
+    //EVSEMaximumPowerLimit
+    para->EVSEMaximumPowerLimit.Value = 6000;
+    para->EVSEMaximumPowerLimit.Multiplier = 1;
+    //para->EVSEMaximumPowerLimit.Unit_isUsed = 1u;
+    para->EVSEMaximumPowerLimit.Unit = iso1unitSymbolType_W;
+
+
+    //EVSEMaximumVoltageLimit
+    para->EVSEMaximumVoltageLimit.Value = 7500;
+    para->EVSEMaximumVoltageLimit.Multiplier = -1;
+    //para->EVSEMaximumVoltageLimit.Unit_isUsed = 1u;
+    para->EVSEMaximumVoltageLimit.Unit = iso1unitSymbolType_V;
+
+    //EVSEMinimumVoltageLimit
+    para->EVSEMinimumVoltageLimit.Value = 1500;
+    para->EVSEMinimumVoltageLimit.Multiplier = -1;
+    //para->EVSEMinimumVoltageLimit.Unit_isUsed = 1u;
+    para->EVSEMinimumVoltageLimit.Unit = iso1unitSymbolType_V;
+
+
+    //EVSEMinimumCurrentLimit
+    para->EVSEMinimumCurrentLimit.Value = 20;
+    para->EVSEMinimumCurrentLimit.Multiplier = -1;
+    //para->EVSEMinimumCurrentLimit.Unit_isUsed = 1u;
+    para->EVSEMinimumCurrentLimit.Unit = iso1unitSymbolType_A;
+
+    //EVSECurrentRegulationTolerance_isUsed
+    para->EVSECurrentRegulationTolerance_isUsed = 1u;
+    //EVSECurrentRegulationTolerance
+    para->EVSECurrentRegulationTolerance.Value = 10;
+    para->EVSECurrentRegulationTolerance.Multiplier = -1;
+    //para->EVSECurrentRegulationTolerance.Unit_isUsed = 1u;
+    para->EVSECurrentRegulationTolerance.Unit = iso1unitSymbolType_A;
+
+
+    //EVSEEnergyToBeDelivered_isUsed
+    para->EVSEEnergyToBeDelivered_isUsed = 1u;
+    //EVSEPeakCurrentRipple
+    para->EVSEPeakCurrentRipple.Value = 2;
+    para->EVSEPeakCurrentRipple.Multiplier = -1;
+    //para->EVSEPeakCurrentRipple.Unit_isUsed = 1u;
+    para->EVSEPeakCurrentRipple.Unit = iso1unitSymbolType_A;
+
+
+    //EVSEEnergyToBeDelivered (optional)
+    /*
+    para->EVSEEnergyToBeDelivered.Value = 360;
+    para->EVSEEnergyToBeDelivered.Multiplier = 3;
+    para->EVSEEnergyToBeDelivered.Unit_isUsed = 1u;
+    para->EVSEEnergyToBeDelivered.Unit = iso1unitSymbolType_Wh;
+    */
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ChargeParameterDiscoveryRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct ChargeParameterDiscoveryResponse_DIN70121 *res;
+    struct ChargeParameterDiscoveryRequest_DIN70121 *req;
+    struct DC_EVSEChargeParameterType_DIN70121 *dc_para;
+    struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ShmCcsData->V2GMessage_DIN70121.ChargeParameterDiscoveryResponse;
+    req = &ShmCcsData->V2GMessage_DIN70121.ChargeParameterDiscoveryRequest;
+    dc_para = &ShmCcsData->V2GMessage_DIN70121.ChargeParameterDiscoveryResponse.DC_EVSEChargeParameter;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    res->ResponseCode = OK_DIN70121;
+    res->EVSEProcessing =  Ongoing_DIN70121;
+    dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;    //1
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        res->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        res->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //[TC_SECC_VTB_ChargeParameterDiscovery_005]
+    if (sys->EvBatteryMaxCurrent < 0)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]EvBatteryMaxCurrent is negative(%.02f) => End_Process",
+                sys->EvBatteryMaxCurrent);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        res->ResponseCode = dinresponseCodeType_FAILED_WrongChargeParameter;    //16
+        res->EVSEProcessing = Finished_DIN70121;
+        dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_WrongChargeParameter (023775)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 5;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+
+    //STEP 2: ============ Modify Parameters of ShmCcsData ============
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMaximumPowerLimit, (int) (sys->AvailableChargingPower * 10), W_DIN70121);
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMaximumCurrentLimit, (int) (sys->AvailableChargingCurrent * 10), A_DIN70121);
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMaximumVoltageLimit, (int) (sys->MaximumChargingVoltage * 10), V_DIN70121);
+
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMinimumVoltageLimit, 1500, V_DIN70121); //150V
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMinimumCurrentLimit, 10, A_DIN70121); //1A
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSECurrentRegulationTolerance, 10, A_DIN70121); //1A
+    SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEPeakCurrentRipple, 2, A_DIN70121);   //0.2A
+    //SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEEnergyToBeDelivered, 0, WH_DIN70121); //optional
+
+    #if PATCH_FOR_BMW_I3_BUG_EVSEMAXIMUMVOLTAGELIMIT_599V == ENABLE
+    if (sys->EvBatteryMaxVoltage <= 500)
+    {
+        SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMaximumVoltageLimit, (int) (500 * 10), V_DIN70121);  //500V
+    }
+    #endif
+
+    //for test with Tesla Model 3, 10A
+    //SAVE_PhysicalValueType_DIN70121(&dc_para->EVSEMaximumCurrentLimit, (int) (10 * 10), A_DIN70121);   //10A, for testing with Tesla Model 3
+
+
+    //Check for EnergyTransferMode [TC_SECC_VTB_ChargeParameterDiscovery_004]
+    if (req->EVRequestedEnergyTransferType != DC_extended)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]Wrong EVRequestedEnergyTransferType(%d,%d)",
+                req->EVRequestedEnergyTransferType,
+                dinEVSESupportedEnergyTransferType_DC_extended);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        res->ResponseCode = FAILED_WrongEnergyTransferType_DIN70121;
+        res->EVSEProcessing = Finished_DIN70121;
+        dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_WrongEnergyTransferMode (023774)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+    }
+
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ChargeParameterDiscoveryRes]EVSE_Shutdown");
+        res->ResponseCode = FAILED_DIN70121;
+        res->EVSEProcessing = Finished_DIN70121;
+        dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ChargeParameterDiscoveryRes]EVSE_EmergencyShutdown");
+        res->ResponseCode = FAILED_DIN70121;
+        res->EVSEProcessing = Finished_DIN70121;
+        dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        errn = -1;
+    }
+
+    //Detect for CP State should be 9V (State B)
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if (sys->CpState != 3)  //State B1, B2
+    {
+        res->ResponseCode = FAILED_DIN70121;
+        dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        res->EVSEProcessing = Finished_DIN70121;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_ChargeParameterDiscoveryRes]Emergency Stop by CP Error (%d, %.02f V)\n",
+                sys->CpState,
+                sys->CpVoltage);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //Check for Permission from CSU
+    if (ShmInternalComm->ChargingPermission == TRUE)
+    {
+        res->EVSEProcessing = Finished_DIN70121;
+    }
+
+    //Check for Permission Off
+    if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][DIN][ChargeParameterDiscoveryRes]Permission OFF");
+        res->ResponseCode = FAILED_DIN70121;
+        res->EVSEProcessing = Finished_DIN70121;
+        dc_para->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+    }
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_ChargeParameterDiscoveryRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_ChargeParameterDiscoveryRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ChargeParameterDiscoveryRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STPE 5: ============ Update Flags ============
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ChargeParameterDiscoveryRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct ChargeParameterDiscoveryResponse_ISO15118_2014 *res;
+    struct ChargeParameterDiscoveryRequest_ISO15118_2014 *req;
+    struct DC_EVSEChargeParameterType_ISO15118_2014 *dc_para;
+    struct AC_EVSEChargeParameterType_ISO15118_2014 *ac_para;
+    struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ShmCcsData->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryResponse;
+    req = &ShmCcsData->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryRequest;
+    dc_para = &ShmCcsData->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryResponse.DC_EVSEChargeParameter;
+    ac_para = &ShmCcsData->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryResponse.AC_EVSEChargeParameter;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    res->ResponseCode = OK_ISO15118_2014;
+    res->EVSEProcessing =  iso1EVSEProcessingType_Ongoing;
+    dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;    //1
+    ac_para->AC_EVSEStatus.RCD = ShmInternalComm->AC_RcdStatus; //0:no error, 1:error
+    ac_para->AC_EVSEStatus.NotificationMaxDelay = 0;  //unit: 1s
+    ac_para->AC_EVSEStatus.EVSENotification = ShmInternalComm->AC_EVSENotification; //0:none, 1:StopCharging, 2:RenNgotiation
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //[TC_SECC_VTB_ChargeParameterDiscovery_005]
+    if (sys->EvBatteryMaxCurrent < 0)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]EvBatteryMaxCurrent is negative(%.02f) => End_Process",
+                sys->EvBatteryMaxCurrent);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        res->ResponseCode = iso1responseCodeType_FAILED_WrongChargeParameter;   //16
+        res->EVSEProcessing = Finished_ISO15118_2014;
+        dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        ac_para->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        errn = -1;
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_WrongChargeParameter (023775)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 5;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+
+    //STEP 2: ============ Modify Parameters of ShmCcsData ============
+    //DC
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMaximumPowerLimit, (int) (sys->AvailableChargingPower * 10), W_ISO15118_2014);
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMaximumCurrentLimit, (int) (sys->AvailableChargingCurrent * 10), A_ISO15118_2014);
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMaximumVoltageLimit, (int) (sys->MaximumChargingVoltage * 10), V_ISO15118_2014);
+
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMinimumVoltageLimit, 1500, V_ISO15118_2014); //150V
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMinimumCurrentLimit, 10, A_ISO15118_2014); //1A
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSECurrentRegulationTolerance, 10, A_ISO15118_2014); //1A
+    SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEPeakCurrentRipple, 2, A_ISO15118_2014);   //0.2A
+    //SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEEnergyToBeDelivered, 0, Wh_ISO15118_2014); //optional
+
+    //AC
+    SAVE_PhysicalValueType_ISO15118_2014(&ac_para->EVSENominalVoltage, (int) (sys->AC_EVSENominalVoltage * 10), V_ISO15118_2014);
+    SAVE_PhysicalValueType_ISO15118_2014(&ac_para->EVSEMaxCurrent, (int) (sys->AvailableChargingCurrent * 10), A_ISO15118_2014);
+
+
+    #if PATCH_FOR_BMW_I3_BUG_EVSEMAXIMUMVOLTAGELIMIT_599V == ENABLE
+    if (sys->EvBatteryMaxVoltage <= 500)
+    {
+        SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMaximumVoltageLimit, (int) (500 * 10), V_ISO15118_2014);  //500V
+    }
+    #endif
+
+    //for test with Tesla Model 3, 10A
+    //SAVE_PhysicalValueType_ISO15118_2014(&dc_para->EVSEMaximumCurrentLimit, (int) (10 * 10), A_ISO15118_2014);   //10A, for testing with Tesla Model 3
+
+    //Check for EnergyTransferMode
+    if (req->RequestedEnergyTransferMode != ShmCcsData->EnergyTransferMode) //[CAUTION] Their table should be kept as the same.
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]Unmatched RequestedEnergyTransferMode(%d,%d)",
+                req->RequestedEnergyTransferMode,
+                ShmCcsData->EnergyTransferMode);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        res->ResponseCode = FAILED_WrongEnergyTransferMode_ISO15118_2014;
+        res->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        ac_para->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        errn = -1;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_WrongEnergyTransferMode (023774)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+    }
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ChargeParameterDiscoveryRes]EVSE_Shutdown");
+        res->ResponseCode = FAILED_ISO15118_2014;
+        res->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        ac_para->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ChargeParameterDiscoveryRes]EVSE_EmergencyShutdown");
+        res->ResponseCode = FAILED_ISO15118_2014;
+        res->EVSEProcessing =  iso1EVSEProcessingType_Finished;
+        dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        ac_para->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        errn = -1;
+    }
+
+    //Detect for CP State should be 9V (State B)
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if (sys->CpState != 3)  //State B1, B2
+    {
+        res->ResponseCode = FAILED_ISO15118_2014;
+        dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        ac_para->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        res->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_iso1_ChargeParameterDiscoveryRes]Emergency Stop by CP Error (%d, %.02f V)\n",
+                sys->CpState,
+                sys->CpVoltage);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //Check for Permission from CSU
+    if(ShmInternalComm->ChargingPermission == TRUE)
+    {
+        res->EVSEProcessing = iso1EVSEProcessingType_Finished;
+    }
+
+    //Check for Permission Off
+    if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][ISO1][ChargeParameterDiscoveryRes]Permission OFF");
+        res->ResponseCode = FAILED_ISO15118_2014;
+        res->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        dc_para->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        ac_para->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        errn = -1;
+    }
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_ChargeParameterDiscoveryRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_ChargeParameterDiscoveryRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ChargeParameterDiscoveryRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STPE 5: ============ Update Flags ============
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_ChargeParameterDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_ChargeParameterDiscoveryReq(int AcceptFd)
+{
+    int errn = 0;
+
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_ChargeParameterDiscoveryReq] Got ChargeParameterDiscoveryReq");
+
+        //ftime(&SeqStartTime);
+        //Print the decoded XML Document
+        PRINT_XML_DOC_DIN_ChargeParameterDiscoveryReq(&ccs_exi_doc_DIN);
+
+        //Save into Share Memory
+        SHM_Save_din_ChargeParameterDiscoveryReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+        //Check for EV Error Code
+        Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.ChargeParameterDiscoveryRequest.DC_EVChargeParameter.DC_EVStatus.EVErrorCode);
+
+        errn = Proc_din_ChargeParameterDiscoveryRes(AcceptFd);
+        //ftime(&SeqEndTime);
+        //DEBUG_PRINTF_EVCOMM_DETAIL("\ndelta = %.02lf ms\n", DiffTimeb(SeqStartTime, SeqEndTime));
+        if ( errn == 0)
+        {
+            //send response successfully.
+            //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]ChargeParameterDiscoveryRes");
+
+        }
+        else
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[Error][DIN][ChargeParameterDiscoveryRes]%d (DEC)",
+                    errn);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ChargeParameterDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ChargeParameterDiscoveryReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ChargeParameterDiscoveryReq] Got ChargeParameterDiscoveryReq");
+
+    //ftime(&SeqStartTime);
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_ChargeParameterDiscoveryReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_ChargeParameterDiscoveryReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryRequest.DC_EVChargeParameter.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_iso1_ChargeParameterDiscoveryRes(AcceptFd);
+    //ftime(&SeqEndTime);
+    //DEBUG_PRINTF_EVCOMM_DETAIL("\ndelta = %.02lf ms\n", DiffTimeb(SeqStartTime, SeqEndTime));
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]ChargeParameterDiscoveryRes");
+
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][ISO1][ChargeParameterDiscoveryRes]%d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+    1. shm_ccs
+
+OUTPUT:
+    1. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_CableCheckRes(struct CcsData *shm_ccs)
+{
+	struct CableCheckResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.CableCheckResponse;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/3)] EVSEProcessing -----
+	//in->EVSEProcessing = dinEVSEProcessingType_Finished; //for test
+    in->EVSEProcessing = dinEVSEProcessingType_Ongoing; //default
+    // 	dinEVSEProcessingType_Finished = 0,
+    //	dinEVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+	SHM_Init_dinDC_EVSEStatusType(&in->DC_EVSEStatus);
+    in->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;    //0 (default)
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1, (default)
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_CableCheckRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinCableCheckResType(&ccs_exi_doc_DIN.V2G_Message.Body.CableCheckRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.CableCheckRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct dinCableCheckResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.CableCheckRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/3)] EVSEProcessing -----
+    res->EVSEProcessing = dinEVSEProcessingType_Finished; //0
+    // 	dinEVSEProcessingType_Finished = 0,
+    //	dinEVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1,
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+    // dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+    // dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+    // dinDC_EVSEStatusCodeType_Reserved_A = 9,
+    // dinDC_EVSEStatusCodeType_Reserved_B = 10,
+    // dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = dinEVSENotificationType_None;
+    // dinEVSENotificationType_None = 0,
+    // dinEVSENotificationType_StopCharging = 1,
+    // dinEVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_CableCheckRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1CableCheckResType(&ccs_exi_doc_ISO1.V2G_Message.Body.CableCheckRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.CableCheckRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct iso1CableCheckResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.CableCheckRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+
+    //----- [BODY (2/3)] EVSEProcessing -----
+    res->EVSEProcessing = iso1EVSEProcessingType_Finished; //0
+    //iso1EVSEProcessingType_Finished = 0,
+	//iso1EVSEProcessingType_Ongoing = 1,
+	//iso1EVSEProcessingType_Ongoing_WaitingForCustomerInteraction = 2
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;
+    //iso1isolationLevelType_Invalid = 0,
+	//iso1isolationLevelType_Valid = 1,
+	//iso1isolationLevelType_Warning = 2,
+	//iso1isolationLevelType_Fault = 3,
+	//iso1isolationLevelType_No_IMD = 4
+
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+    //iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	//iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	//iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	//iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	//iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	//iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	//iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	//iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	//iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	//iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	//iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	//iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //iso1EVSENotificationType_None = 0,
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_CableCheckRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct CableCheckResponse_DIN70121 *cab;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    cab = &ShmCcsData->V2GMessage_DIN70121.CableCheckResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    cab->ResponseCode = OK_DIN70121;
+    cab->cnt++;
+
+    DEBUG_PRINTF_EVCOMM_DETAIL("CP_State = %d (%.02f V), V_now = %.02f, Isolation Status = %d, EVSEProcessing = %d\n",
+            sys->CpState,
+            sys->CpVoltage,
+            sys->PresentChargingVoltage,
+            sys->IsolationStatus,
+            cab->EVSEProcessing);
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        cab->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        cab->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    if (sys->IsolationStatus == GFD_Invalid)  //0: on going
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = CABLECHECK_TARGET_VOLTAGE;	//500V	//[To-Do] this should be modified to auto decision.
+        sys->EvBatterytargetCurrent = CABLECHECK_TARGET_CURRENT;	//2A(default), unit: 1A
+
+        cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;
+        cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive;    //4
+        cab->EVSEProcessing = dinEVSEProcessingType_Ongoing;
+    }
+    else if ((sys->IsolationStatus == GFD_Valid) || (sys->IsolationStatus == GFD_Warning)) //1: valid, 2: warning
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = 0;	//0V, asking PSU to discharge to 0V
+        sys->EvBatterytargetCurrent = 0;	//0A, unit: 1A
+
+        if (sys->PresentChargingVoltage < 60)  // < 60V
+        {
+            //memset(buf_log_evcomm, 0, sizeof(buf_log_evcomm));
+            sprintf((char*)buf_log_evcomm, "[V2G][CableCheck]Pass (V_now = %.02f, Isolated = %d)",
+                    sys->PresentChargingVoltage,
+                    sys->IsolationStatus);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            //IsolationStatus
+            if (sys->IsolationStatus == GFD_Valid)
+            {
+                cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;
+            }
+            else if (sys->IsolationStatus == GFD_Warning)
+            {
+                cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Warning;
+            }
+            else
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[WARNING]unexpected IsolationStatus(%d)",
+                        sys->IsolationStatus);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            }
+            cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+            cab->EVSEProcessing = dinEVSEProcessingType_Finished;
+        }
+        else
+        {
+            cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;
+            cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive;
+            cab->EVSEProcessing = dinEVSEProcessingType_Ongoing;
+        }
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = 0;	//0V, asking PSU to discharge to 0V
+        sys->EvBatterytargetCurrent = 0;	//0A, unit: 1A
+
+        cab->ResponseCode = FAILED_DIN70121;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_NotReady;
+        cab->EVSEProcessing = dinEVSEProcessingType_Finished;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_CableCheckRes]IsolationStatus = 3 (fault)");
+        errn = -1;
+    }
+    else
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = 0;	//0V, asking PSU to discharge to 0V
+        sys->EvBatterytargetCurrent = 0;	//0A, unit: 1A
+
+        cab->ResponseCode = FAILED_DIN70121;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;
+        cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_NotReady;
+        cab->EVSEProcessing = dinEVSEProcessingType_Finished;
+        sprintf((char*)buf_log_evcomm,
+                "[Proc_din_CableCheckRes]Undefined Isolation Status(%d)",
+                sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        cab->ResponseCode = FAILED_DIN70121;
+        cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        cab->EVSEProcessing = dinEVSEProcessingType_Finished;
+	    errn = -1;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_CableCheckRes]EVSE_Shutdown");
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        cab->ResponseCode = FAILED_DIN70121;
+        cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        cab->EVSEProcessing = dinEVSEProcessingType_Finished;
+	    errn = -1;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_CableCheckRes]EVSE_EmergencyShutdown");
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        cab->ResponseCode = FAILED_DIN70121;
+        cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        cab->EVSEProcessing = dinEVSEProcessingType_Finished;
+	    errn = -1;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_CableCheckRes]ChargingPermission = FALSE");
+    }
+    else
+    {
+        //null
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    //#if 1
+    if (sys->CableCheckPreCountDownDone == TRUE)   //[To-Do] Here should be modified to 2 seconds
+    {
+        if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+        {
+            cab->ResponseCode = FAILED_DIN70121;
+            cab->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+            CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+            Update_V2G_Flow_Status(Other_Fault);
+            errn = -1;
+
+            //Update_ShmStatusCode(); //[To-Do] to be implemented
+            //CCS_SECC_CP_State_Error (023889)
+            ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+            ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+            ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+            ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+            ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+            ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+            CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+            sprintf((char*)buf_log_evcomm,
+                    "[CableCheck]Emergency Stop by CP Error (%d, %.02f V, %d)\n",
+                    sys->CpState,
+                    sys->CpVoltage,
+                    cab->cnt
+                    );
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            //cab->cnt = 0;
+        }
+    }
+    #endif
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_CableCheckRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_CableCheckRes();
+    #endif
+
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+      errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+    sys->ConnectorLocked = TRUE;    //Inicating EVSE that the CCS Connector is Locked.
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_CableCheckRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct CableCheckResponse_ISO15118_2014 *cab;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    cab = &ShmCcsData->V2GMessage_ISO15118_2014.CableCheckResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    cab->ResponseCode = OK_ISO15118_2014;
+    cab->cnt++;
+
+    DEBUG_PRINTF_EVCOMM_DETAIL("CP_State = %d (%.02f V), V_now = %.02f, Isolation Status = %d, EVSEProcessing = %d\n",
+            sys->CpState,
+            sys->CpVoltage,
+            sys->PresentChargingVoltage,
+            sys->IsolationStatus,
+            cab->EVSEProcessing);
+
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        cab->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        cab->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    if (sys->IsolationStatus == GFD_Invalid)  //0: invalid (on going)
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = CABLECHECK_TARGET_VOLTAGE;	//500V	//[To-Do] this should be modified to auto decision.
+        sys->EvBatterytargetCurrent = CABLECHECK_TARGET_CURRENT;	//2A(default), unit: 1A
+
+        cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid;
+        cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive;
+        cab->EVSEProcessing = iso1EVSEProcessingType_Ongoing;
+    }
+    else if ((sys->IsolationStatus == GFD_Valid) || (sys->IsolationStatus == GFD_Warning)) //1: valid, 2:waring
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = 0;	//0V, asking PSU to discharge to 0V
+        sys->EvBatterytargetCurrent = 0;	//0A, unit: 1A
+
+        if (sys->PresentChargingVoltage < 60)  // < 60V
+        {
+            //memset(buf_log_evcomm, 0, sizeof(buf_log_evcomm));
+            sprintf((char*)buf_log_evcomm, "[V2G][CableCheck]Pass (V_now = %.02f, Isolated = %d)",
+                    sys->PresentChargingVoltage,
+                    sys->IsolationStatus);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            //IsolationStatus
+            if (sys->IsolationStatus == GFD_Valid)
+            {
+                cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;
+            }
+            else if (sys->IsolationStatus == GFD_Warning)
+            {
+                cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Warning;
+            }
+            else
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "[WARNING]unexpected IsolationStatus(%d)",
+                        sys->IsolationStatus);
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            }
+
+            cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+            cab->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        }
+        else
+        {
+            cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid;
+            cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive;
+            cab->EVSEProcessing = iso1EVSEProcessingType_Ongoing;
+        }
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = 0;	//0V, asking PSU to discharge to 0V
+        sys->EvBatterytargetCurrent = 0;	//0A, unit: 1A
+
+        cab->ResponseCode = FAILED_ISO15118_2014;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_NotReady;
+        cab->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_CableCheckRes]IsolationStatus = 3 (fault)");
+        errn = -1;
+    }
+    //else if (sys->IsolationStatus == GFD_No_IMD){}    //only for ISO15118
+    else
+    {
+        //For PSU
+        sys->EvBatterytargetVoltage = 0;	//0V, asking PSU to discharge to 0V
+        sys->EvBatterytargetCurrent = 0;	//0A, unit: 1A
+
+        cab->ResponseCode = FAILED_ISO15118_2014;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_NotReady;
+        cab->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_CableCheckRes]Undefined Isolation Status.");
+    }
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        cab->ResponseCode = FAILED_ISO15118_2014;
+        cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        cab->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        errn = -1;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_CableCheckRes]EVSE_Shutdown");
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        cab->ResponseCode = FAILED_ISO15118_2014;
+        cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        cab->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        errn = -1;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_CableCheckRes]EVSE_EmergencyShutdown");
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        cab->ResponseCode = FAILED_ISO15118_2014;
+        cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        cab->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        cab->EVSEProcessing = iso1EVSEProcessingType_Finished;
+        errn = -1;
+	    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_CableCheckRes]ChargingPermission = FALSE");
+    }
+    else
+    {
+        //null
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if (sys->CableCheckPreCountDownDone == TRUE)   //[To-Do] Here should be modified to 2 seconds
+    {
+        if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+        {
+            cab->ResponseCode = FAILED_ISO15118_2014;
+            cab->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+            CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+            Update_V2G_Flow_Status(Other_Fault);
+            errn = -1;
+
+            //Update_ShmStatusCode(); //[To-Do] to be implemented
+            //CCS_SECC_CP_State_Error (023889)
+            ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+            ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+            ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+            ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+            ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+            ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+            CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+            sprintf((char*)buf_log_evcomm,
+                    "[CableCheck]Emergency Stop by CP Error (%d, %.02f V, %d)\n",
+                    sys->CpState,
+                    sys->CpVoltage,
+                    cab->cnt
+                    );
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            //cab->cnt = 0;
+        }
+    }
+    #endif
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_CableCheckRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_CableCheckRes();
+    #endif
+
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+    sys->ConnectorLocked = TRUE;    //Inicating EVSE that the CCS Connector is Locked.
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_CableCheckReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_CableCheckReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_CableCheckReq] Got CableCheckReq\n");
+
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_CableCheckReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_CableCheckReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.CableCheckRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_din_CableCheckRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]CableCheckRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_din_CableCheckReq]Proc_iso1_CableCheckRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_CableCheckReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_CableCheckReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_CableCheckReq] Got CableCheckReq");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_CableCheckReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_CableCheckReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.CableCheckRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_iso1_CableCheckRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]CableCheckRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_CableCheckReq]Proc_iso1_CableCheckRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+    1. shm_ccs
+
+OUTPUT:
+    1. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_PreChargeRes(struct CcsData *shm_ccs)
+{
+	struct PreChargeResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.PreChargeResponse;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+    short value = 0; int multiplier = 0; unsigned char unit = 0;
+    //value = 3820; multiplier = -1; unit = V_DIN70121;    //382V, for Test
+    value = 0; multiplier = 0; unit = V_DIN70121; //waiting for CsuComm to update V to fit EV Target
+	SHM_Save_dinPhysicalValueType(&in->EVSEPresentVoltage, value, multiplier, unit);
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+	SHM_Init_dinDC_EVSEStatusType(&in->DC_EVSEStatus);
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_PreChargeRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinPreChargeResType(&ccs_exi_doc_DIN.V2G_Message.Body.PreChargeRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.PreChargeRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct dinPreChargeResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.PreChargeRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+    res->EVSEPresentVoltage.Value = 3820;
+    res->EVSEPresentVoltage.Multiplier = -1;
+    res->EVSEPresentVoltage.Unit_isUsed = 1u;
+    res->EVSEPresentVoltage.Unit = dinunitSymbolType_V;
+    //	dinunitSymbolType_h = 0,
+    //	dinunitSymbolType_m = 1,
+    //	dinunitSymbolType_s = 2,
+    //	dinunitSymbolType_A = 3,
+    //	dinunitSymbolType_Ah = 4,
+    //	dinunitSymbolType_V = 5,
+    //	dinunitSymbolType_VA = 6,
+    //	dinunitSymbolType_W = 7,
+    //	dinunitSymbolType_W_s = 8,
+    //	dinunitSymbolType_Wh = 9
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1,
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+    // dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+    // dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+    // dinDC_EVSEStatusCodeType_Reserved_A = 9,
+    // dinDC_EVSEStatusCodeType_Reserved_B = 10,
+    // dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = dinEVSENotificationType_None;
+    // dinEVSENotificationType_None = 0,
+    // dinEVSENotificationType_StopCharging = 1,
+    // dinEVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_PreChargeRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1PreChargeResType(&ccs_exi_doc_ISO1.V2G_Message.Body.PreChargeRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.PreChargeRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct iso1PreChargeResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.PreChargeRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+    res->EVSEPresentVoltage.Value = 3820;
+    res->EVSEPresentVoltage.Multiplier = -1;
+    //res->EVSEPresentVoltage.Unit_isUsed = 1u;
+    res->EVSEPresentVoltage.Unit = iso1unitSymbolType_V;
+    //iso1unitSymbolType_h = 0,
+	//iso1unitSymbolType_m = 1,
+	//iso1unitSymbolType_s = 2,
+	//iso1unitSymbolType_A = 3,
+	//iso1unitSymbolType_V = 4,
+	//iso1unitSymbolType_W = 5,
+	//iso1unitSymbolType_Wh = 6
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;
+    //iso1isolationLevelType_Invalid = 0,
+	//iso1isolationLevelType_Valid = 1,
+	//iso1isolationLevelType_Warning = 2,
+	//iso1isolationLevelType_Fault = 3,
+	//iso1isolationLevelType_No_IMD = 4
+
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+    //iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	//iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	//iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	//iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	//iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	//iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	//iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	//iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	//iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	//iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	//iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	//iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //iso1EVSENotificationType_None = 0,
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_PreChargeRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct PreChargeResponse_DIN70121 *pre;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    pre = &ShmCcsData->V2GMessage_DIN70121.PreChargeResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    pre->ResponseCode = OK_DIN70121;
+
+    //EVSE Status Code
+    pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        pre->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        pre->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_DIN70121(&pre->EVSEPresentVoltage, (int) (sys->PresentChargingVoltage * 10), V_DIN70121);
+
+    //Isolation Status
+    if (sys->IsolationStatus == GFD_Invalid)  //0: invalid
+    {
+        pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid; //0
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_din_PreChargeRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    else if (sys->IsolationStatus == GFD_Valid) //1: valid
+    {
+        pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Warning) //2: warning
+    {
+        pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Warning;  //2
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_PreChargeRes]GFD_Fault => Emergency Shutdown");
+        pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;  //3
+        pre->ResponseCode = FAILED_DIN70121;
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        errn = -1;
+    }
+    else    //GFD_No_IMD or other unexpected status
+    {
+        pre->ResponseCode = FAILED_DIN70121;
+        pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;  //3
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_din_PreChargeRes]IsolationStatus = %d (undefined)",
+                sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_PreChargeRes]CCS GFD trip => EVSE_Shutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_PreChargeRes]EVSE_Shutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        pre->ResponseCode = FAILED_DIN70121;
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_PreChargeRes]CCS GFD trip => EVSE_EmergencyShutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_PreChargeRes]EVSE_EmergencyShutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        pre->ResponseCode = FAILED_DIN70121;
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        errn = -1;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_PreChargeRes]ChargingPermission = FALSE");
+        pre->ResponseCode = FAILED_DIN70121;
+        pre->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+    }
+    else
+    {
+        //null
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+    {
+        pre->ResponseCode = FAILED_DIN70121;
+        pre->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_CP_State_Error (023889)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_din_PreChargeRes]Emergency Stop by CP Error (%d, %.02f V)\n",
+                sys->CpState,
+                sys->CpVoltage
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_PreChargeRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_PreChargeRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][send_encoded_din_V2GTP_Stream]:Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_PreChargeRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct PreChargeResponse_ISO15118_2014 *pre;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    pre = &ShmCcsData->V2GMessage_ISO15118_2014.PreChargeResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    pre->ResponseCode = OK_ISO15118_2014;
+
+    //EVSE Status Code
+    pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        pre->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        pre->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_ISO15118_2014(&pre->EVSEPresentVoltage, (int) (sys->PresentChargingVoltage * 10), V_ISO15118_2014);
+
+
+    //Isolation Status
+    if (sys->IsolationStatus == GFD_Invalid)    //0: invalid(on going)
+    {
+        pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid; //0
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_iso1_PreChargeRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    else if (sys->IsolationStatus == GFD_Valid) //1: valid
+    {
+        pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Warning) //2: waring
+    {
+        pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Warning;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_PreChargeRes]GFD_Fault => Emergency Shutdown");
+        pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;  //3
+        pre->ResponseCode = FAILED_ISO15118_2014;
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        errn = -1;
+    }
+    else
+    {
+        pre->ResponseCode = FAILED_ISO15118_2014;
+        pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;  //3
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_iso1_PreChargeRes]IsolationStatus = %d (undefined)",
+                sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_PreChargeRes]CCS GFD trip => EVSE_Shutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_PreChargeRes]EVSE_Shutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        pre->ResponseCode = FAILED_ISO15118_2014;
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_PreChargeRes]CCS GFD trip => EVSE_EmergencyShutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_PreChargeRes]EVSE_EmergencyShutdown");
+            pre->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        pre->ResponseCode = FAILED_ISO15118_2014;
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        errn = -1;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_PreChargeRes]ChargingPermission = FALSE");
+        pre->ResponseCode = FAILED_ISO15118_2014;
+        pre->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+    }
+    else
+    {
+        //null
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+    {
+        pre->ResponseCode = FAILED_ISO15118_2014;
+        pre->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_CP_State_Error (023889)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_iso1_PreChargeRes]Emergency Stop by CP Error (%d, %.02f V)\n",
+                sys->CpState,
+                sys->CpVoltage
+                );
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_PreChargeRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_PreChargeRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][send_encoded_iso1_V2GTP_Stream]:Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_PreChargeReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_PreChargeReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_PreChargeReq] Got PreChargeReq");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_PreChargeReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_PreChargeReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.PreChargeRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_din_PreChargeRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]PreChargeRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_din_PreChargeReq]Proc_iso1_PreChargeRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_PreChargeReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_PreChargeReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_PreChargeReq] Got PreChargeReq");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_PreChargeReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_PreChargeReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.PreChargeRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_iso1_PreChargeRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]PreChargeRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_PreChargeReq]Proc_iso1_PreChargeRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_PowerDeliveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+    1. shm_ccs
+
+OUTPUT:
+    1. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_PowerDeliveryRes(struct CcsData *shm_ccs)
+{
+	struct PowerDeliveryResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.PowerDeliveryResponse;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+
+
+    //----- [BODY (2/3)] AC_EVSEStatus -----
+    //ignore, since DIN 70121 doesn't support AC, yet.
+
+
+    //----- [BODY (2/3)] DC_EVSEStatus -----
+	SHM_Init_dinDC_EVSEStatusType(&in->DC_EVSEStatus);
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_PowerDeliveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_PowerDeliveryRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinPowerDeliveryResType(&ccs_exi_doc_DIN.V2G_Message.Body.PowerDeliveryRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.PowerDeliveryRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct dinPowerDeliveryResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.PowerDeliveryRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+
+
+    //----- [BODY (2/3)] AC_EVSEStatus -----
+    //ignore, since DIN 70121 doesn't support AC, yet.
+
+
+    //----- [BODY (2/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1,
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+    // dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+    // dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+    // dinDC_EVSEStatusCodeType_Reserved_A = 9,
+    // dinDC_EVSEStatusCodeType_Reserved_B = 10,
+    // dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = dinEVSENotificationType_None;
+    // dinEVSENotificationType_None = 0,
+    // dinEVSENotificationType_StopCharging = 1,
+    // dinEVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_PowerDeliveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_PowerDeliveryRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1PowerDeliveryResType(&ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct iso1PowerDeliveryResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+
+
+    //----- [BODY (2/3)] AC_EVSEStatus -----
+    //ignore, since our ISO1 70121 doesn't support AC, yet.
+
+
+    //----- [BODY (2/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;
+    //iso1isolationLevelType_Invalid = 0,
+	//iso1isolationLevelType_Valid = 1,
+	//iso1isolationLevelType_Warning = 2,
+	//iso1isolationLevelType_Fault = 3,
+	//iso1isolationLevelType_No_IMD = 4
+
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+    //iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	//iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	//iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	//iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	//iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	//iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	//iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	//iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	//iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	//iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	//iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	//iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //iso1EVSENotificationType_None = 0,
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_PowerDeliveryStartRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_PowerDeliveryStartRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct dinPowerDeliveryResType *res;
+    struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.PowerDeliveryRes;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    res->ResponseCode = OK_DIN70121;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        res->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        res->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_PowerDeliveryRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_PowerDeliveryRes();
+    #endif
+
+    //EVSE Status Code
+    res->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;  //1
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //res->ResponseCode = FAILED_DIN70121;
+        res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //res->ResponseCode = FAILED_DIN70121;
+        res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //res->ResponseCode = FAILED_DIN70121;
+        res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_PowerDeliveryStartRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_PowerDeliveryStartRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_PowerDeliveryStartRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct iso1PowerDeliveryResType *res;
+    struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryRes;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    res->ResponseCode = OK_ISO15118_2014;
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_PowerDeliveryRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_PowerDeliveryRes();
+    #endif
+
+    //EVSE Status Code
+    res->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;  //1
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_PowerDeliveryStartRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_PowerDeliveryStartReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_PowerDeliveryStartReq(int AcceptFd)
+{
+    int errn = 0;
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PowerDeliveryStartReq");
+
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_PowerDeliveryReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_PowerDeliveryReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.PowerDeliveryRequest.DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_din_PowerDeliveryStartRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]PowerDeliveryStartRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_din_PowerDeliveryStartReq]Proc_iso1_PowerDeliveryStartRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_PowerDeliveryStartReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_PowerDeliveryStartReq(int AcceptFd)
+{
+    int errn = 0;
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PowerDeliveryStartReq");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_PowerDeliveryReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_PowerDeliveryReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.PowerDeliveryRequest.DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_iso1_PowerDeliveryStartRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]PowerDeliveryStartRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][Proc_iso1_PowerDeliveryStartReq]Proc_iso1_PowerDeliveryStartRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+    1. shm_ccs
+
+OUTPUT:
+    1. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_CurrentDemandRes(struct CcsData *shm_ccs)
+{
+	struct CurrentDemandResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.CurrentDemandResponse;
+
+
+	//----- [BODY (1/10)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/10)] DC_EVSEStatus -----
+    SHM_Init_dinDC_EVSEStatusType(&in->DC_EVSEStatus);
+
+
+    //----- [BODY (3/10)] EVSEPresentVoltage -----
+    short value = 0; int multiplier = 0; unsigned char unit = 0;
+
+    //value = 3820; multiplier = -1; unit = V_DIN70121;    //382V, for test only.
+    value = 0; multiplier = 0; unit = V_DIN70121;
+	SHM_Save_dinPhysicalValueType(&in->EVSEPresentVoltage, value, multiplier, unit);
+
+
+    //----- [BODY (4/10)] EVSEPresentCurrent -----
+    //value = 600; multiplier = -1; unit = A_DIN70121;    //60A, for test only.
+    value = 0; multiplier = 0; unit = A_DIN70121;
+    SHM_Save_dinPhysicalValueType(&in->EVSEPresentCurrent, value, multiplier, unit);
+
+
+    //----- [BODY (5/10)] EVSECurrentLimitAchieved -----
+    in->EVSECurrentLimitAchieved = FALSE;
+
+    //----- [BODY (6/10)] EVSEVoltageLimitAchieved -----
+    in->EVSEVoltageLimitAchieved = FALSE;
+
+    //----- [BODY (7/10)] EVSEPowerLimitAchieved -----
+    in->EVSEPowerLimitAchieved = FALSE;
+
+    //----- [BODY (8/10)] EVSEMaximumVoltageLimit -----
+    //value = 7500; multiplier = -1; unit = V_DIN70121;    //750V
+    value = 5000; multiplier = -1; unit = V_DIN70121;    //500V
+    SHM_Save_dinPhysicalValueType(&in->EVSEMaximumVoltageLimit, value, multiplier, unit);
+
+    //----- [BODY (9/10)] EVSEMaximumCurrentLimit -----
+    value = 600; multiplier = -1; unit = A_DIN70121;    //60A
+    SHM_Save_dinPhysicalValueType(&in->EVSEMaximumCurrentLimit, value, multiplier, unit);
+
+    //----- [BODY (10/10)] EVSEMaximumPowerLimit -----
+    value = 3000; multiplier = 1; unit = W_DIN70121;    //30KW
+    SHM_Save_dinPhysicalValueType(&in->EVSEMaximumPowerLimit, value, multiplier, unit);
+}
+
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_CurrentDemandRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinCurrentDemandResType(&ccs_exi_doc_DIN.V2G_Message.Body.CurrentDemandRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.CurrentDemandRes_isUsed = 1u;
+
+    //----- [BODY (1/10)] ResponseCode -----
+    struct dinCurrentDemandResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.CurrentDemandRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/10)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid;
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1,
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+    // dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+    // dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+    // dinDC_EVSEStatusCodeType_Reserved_A = 9,
+    // dinDC_EVSEStatusCodeType_Reserved_B = 10,
+    // dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+    res->DC_EVSEStatus.EVSENotification = dinEVSENotificationType_None;
+    // dinEVSENotificationType_None = 0,
+    // dinEVSENotificationType_StopCharging = 1,
+    // dinEVSENotificationType_ReNegotiation = 2
+
+
+
+    //----- [BODY (3/10)] EVSEPresentVoltage -----
+    res->EVSEPresentVoltage.Value = 3820;
+    res->EVSEPresentVoltage.Multiplier = -1;
+    res->EVSEPresentVoltage.Unit_isUsed = 1u;
+    res->EVSEPresentVoltage.Unit = dinunitSymbolType_V;
+
+
+    //----- [BODY (4/10)] EVSEPresentCurrent -----
+    res->EVSEPresentCurrent.Value = 1200;
+    res->EVSEPresentCurrent.Multiplier = -1;
+    res->EVSEPresentCurrent.Unit_isUsed = 1u;
+    res->EVSEPresentCurrent.Unit = dinunitSymbolType_A;
+
+
+    //----- [BODY (5/10)] EVSECurrentLimitAchieved -----
+    res->EVSECurrentLimitAchieved = 0;
+
+    //----- [BODY (6/10)] EVSEVoltageLimitAchieved -----
+    res->EVSEVoltageLimitAchieved = 0;
+
+    //----- [BODY (7/10)] EVSEPowerLimitAchieved -----
+    res->EVSEPowerLimitAchieved = 0;
+
+    //----- [BODY (8/10)] EVSEMaximumVoltageLimit -----
+    res->EVSEMaximumVoltageLimit_isUsed = 1u;
+    res->EVSEMaximumVoltageLimit.Value = 7500;
+    res->EVSEMaximumVoltageLimit.Multiplier = -1;
+    res->EVSEMaximumVoltageLimit.Unit_isUsed = 1u;
+    res->EVSEMaximumVoltageLimit.Unit = dinunitSymbolType_V;
+
+    //----- [BODY (9/10)] EVSEMaximumCurrentLimit -----
+    res->EVSEMaximumCurrentLimit_isUsed = 1u;
+    res->EVSEMaximumCurrentLimit.Value = 1200;
+    res->EVSEMaximumCurrentLimit.Multiplier = -1;
+    res->EVSEMaximumCurrentLimit.Unit_isUsed = 1u;
+    res->EVSEMaximumCurrentLimit.Unit = dinunitSymbolType_A;
+
+    //----- [BODY (10/10)] EVSEMaximumPowerLimit -----
+    res->EVSEMaximumPowerLimit_isUsed = 1u;
+    res->EVSEMaximumPowerLimit.Value = 6000;
+    res->EVSEMaximumPowerLimit.Multiplier = 1;
+    res->EVSEMaximumPowerLimit.Unit_isUsed = 1u;
+    res->EVSEMaximumPowerLimit.Unit = dinunitSymbolType_W;
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_CurrentDemandRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1CurrentDemandResType(&ccs_exi_doc_ISO1.V2G_Message.Body.CurrentDemandRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.CurrentDemandRes_isUsed = 1u;
+
+    //----- [BODY (1/10)] ResponseCode -----
+    struct iso1CurrentDemandResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.CurrentDemandRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+
+    //----- [BODY (2/10)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid;
+    //iso1isolationLevelType_Invalid = 0,
+	//iso1isolationLevelType_Valid = 1,
+	//iso1isolationLevelType_Warning = 2,
+	//iso1isolationLevelType_Fault = 3,
+	//iso1isolationLevelType_No_IMD = 4
+
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+    //iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	//iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	//iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	//iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	//iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	//iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	//iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	//iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	//iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	//iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	//iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	//iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+    res->DC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //iso1EVSENotificationType_None = 0,
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+
+
+
+    //----- [BODY (3/10)] EVSEPresentVoltage -----
+    res->EVSEPresentVoltage.Value = 3820;
+    res->EVSEPresentVoltage.Multiplier = -1;
+    //res->EVSEPresentVoltage.Unit_isUsed = 1u;
+    res->EVSEPresentVoltage.Unit = iso1unitSymbolType_V;
+
+
+    //----- [BODY (4/10)] EVSEPresentCurrent -----
+    res->EVSEPresentCurrent.Value = 1200;
+    res->EVSEPresentCurrent.Multiplier = -1;
+    //res->EVSEPresentCurrent.Unit_isUsed = 1u;
+    res->EVSEPresentCurrent.Unit = iso1unitSymbolType_A;
+
+
+    //----- [BODY (5/10)] EVSECurrentLimitAchieved -----
+    res->EVSECurrentLimitAchieved = 0;
+
+    //----- [BODY (6/10)] EVSEVoltageLimitAchieved -----
+    res->EVSEVoltageLimitAchieved = 0;
+
+    //----- [BODY (7/10)] EVSEPowerLimitAchieved -----
+    res->EVSEPowerLimitAchieved = 0;
+
+    //----- [BODY (8/10)] EVSEMaximumVoltageLimit -----
+    res->EVSEMaximumVoltageLimit_isUsed = 1u;
+    res->EVSEMaximumVoltageLimit.Value = 7500;
+    res->EVSEMaximumVoltageLimit.Multiplier = -1;
+    //res->EVSEMaximumVoltageLimit.Unit_isUsed = 1u;
+    res->EVSEMaximumVoltageLimit.Unit = iso1unitSymbolType_V;
+
+    //----- [BODY (9/10)] EVSEMaximumCurrentLimit -----
+    res->EVSEMaximumCurrentLimit_isUsed = 1u;
+    res->EVSEMaximumCurrentLimit.Value = 1200;
+    res->EVSEMaximumCurrentLimit.Multiplier = -1;
+    //res->EVSEMaximumCurrentLimit.Unit_isUsed = 1u;
+    res->EVSEMaximumCurrentLimit.Unit = iso1unitSymbolType_A;
+
+    //----- [BODY (10/10)] EVSEMaximumPowerLimit -----
+    res->EVSEMaximumPowerLimit_isUsed = 1u;
+    res->EVSEMaximumPowerLimit.Value = 6000;
+    res->EVSEMaximumPowerLimit.Multiplier = 1;
+    //res->EVSEMaximumPowerLimit.Unit_isUsed = 1u;
+    res->EVSEMaximumPowerLimit.Unit = iso1unitSymbolType_W;
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_ChargingStatusRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_ChargingStatusRes()
+{
+    //int i = 0;
+	struct iso1ChargingStatusResType *res;
+	init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+	init_iso1ChargingStatusResType(&ccs_exi_doc_ISO1.V2G_Message.Body.ChargingStatusRes);
+
+	res = &ccs_exi_doc_ISO1.V2G_Message.Body.ChargingStatusRes;
+	ccs_exi_doc_ISO1.V2G_Message.Body.ChargingStatusRes_isUsed = 1u;
+
+
+	//----- [BODY (1/10)] ResponseCode -----
+    res->ResponseCode = OK_ISO15118_2014;
+
+    //----- [BODY (2/10)] AC_EVSEStatus -----
+    res->AC_EVSEStatus.RCD = FALSE;     //FALSE(no error), TRUE(error is detected)
+    res->AC_EVSEStatus.NotificationMaxDelay = 0;
+    res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //	iso1EVSENotificationType_None = 0,
+    //	iso1EVSENotificationType_StopCharging = 1,
+    //	iso1EVSENotificationType_ReNegotiation = 2
+
+    //----- [BODY (3/10)] EVSEMaxCurrent -----
+	res->EVSEMaxCurrent_isUsed = 1u;
+	res->EVSEMaxCurrent.Value = 32;
+	res->EVSEMaxCurrent.Multiplier = 0;
+	res->EVSEMaxCurrent.Unit = iso1unitSymbolType_A;
+
+    //----- [BODY (4/10)] SAScheduleTupleID -----
+	res->SAScheduleTupleID = 0;
+
+    //----- [BODY (5/10)] EVSEID -----
+    res->EVSEID.charactersLen = 37;
+    memset(res->EVSEID.characters, 0, sizeof(res->EVSEID.characters));
+    //sprintf((char*)res->EVSEID.characters, CCS_AC_EVSEID);
+
+    //----- [BODY (6/10)] MeterInfo -----
+    res->MeterInfo_isUsed = 1u;
+    memset(res->MeterInfo.MeterID.characters, 0, sizeof(res->MeterInfo.MeterID.characters));
+    memset(res->MeterInfo.SigMeterReading.bytes, 0, sizeof(res->MeterInfo.SigMeterReading.bytes));
+
+    //[MeterInfo][1/5] MeterID
+    //sprintf((char*)res->MeterInfo.MeterID , CCS_AC_METER_ID);
+
+    //[MeterInfo][2/5] SigMeterReading (optional)
+    //sprintf((char*)res->MeterInfo.SigMeterReading , CCS_AC_SIG_METER_READING);
+
+    //[MeterInfo][3/5] MeterStatus (optional)
+    res->MeterInfo.MeterStatus = 0;
+
+    //[MeterInfo][4/5] MeterReading (optional)
+    res->MeterInfo.MeterReading = 12345;
+
+    //[MeterInfo][5/5] TMeter (optional)
+    res->MeterInfo.TMeter = 1586243587; //Unix Time Stamp format
+
+
+    //----- [BODY (7/10)] ReceiptRequired -----
+    res->ReceiptRequired_isUsed = 1u;
+    res->ReceiptRequired = FALSE;       //optional
+}
+
+/*===========================================================================
+FUNCTION: Check_EVErrorCode
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Check_EVErrorCode(int code)
+{
+    if (code != NO_ERROR)	//NO_ERROR = 0
+    {
+        //Asking CSU to Stop
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        //Update_V2G_Flow_Status(Other_Fault);
+
+        //memset(buf_log_evcomm, 0, sizeof(buf_log_evcomm));
+        sprintf((char*)buf_log_evcomm,
+                "Stop by EV (EVErrorCode = %d (DEC))",
+                code);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_CurrentDemandRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct CurrentDemandResponse_DIN70121 *cur;
+    static struct ChargingInfoData *sys;
+
+//    int i = 0;
+//    static int EVSE_max_current;
+//    int tmp = 0;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    cur = &ShmCcsData->V2GMessage_DIN70121.CurrentDemandResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    cur->ResponseCode = OK_DIN70121;
+
+    //EVSE Status Code
+    cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        cur->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        cur->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //Check for negative EvBatteryMaxCurrent
+    if (sys->EvBatteryMaxCurrent < 0)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]EvBatteryMaxCurrent is negative(%.02f) => End_Process",
+                sys->EvBatteryMaxCurrent);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        cur->DC_EVSEStatus.EVSEStatusCode = dinresponseCodeType_FAILED_WrongChargeParameter;    //16
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_WrongChargeParameter (023775)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 5;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_DIN70121(&cur->EVSEPresentCurrent, (int) (sys->PresentChargingCurrent * 10), A_DIN70121);
+    SAVE_PhysicalValueType_DIN70121(&cur->EVSEPresentVoltage, (int) (sys->PresentChargingVoltage * 10), V_DIN70121);
+    #if TESLA_SLOW_INCREASE_CURRENT_FUNCTION == DISABLE
+    SAVE_PhysicalValueType_DIN70121(&cur->EVSEMaximumCurrentLimit, (int) (sys->AvailableChargingCurrent * 10), A_DIN70121);
+    #endif
+    SAVE_PhysicalValueType_DIN70121(&cur->EVSEMaximumPowerLimit, (int) (sys->AvailableChargingPower * 10), W_DIN70121);
+    SAVE_PhysicalValueType_DIN70121(&cur->EVSEMaximumVoltageLimit, (int) (sys->MaximumChargingVoltage * 10), V_DIN70121);
+
+
+    #if PATCH_FOR_BMW_I3_BUG_EVSEMAXIMUMVOLTAGELIMIT_599V == ENABLE
+    if (sys->EvBatteryMaxVoltage <= 500)
+    {
+        SAVE_PhysicalValueType_DIN70121(&cur->EVSEMaximumVoltageLimit, (int) (500 * 10), V_DIN70121);   //500V
+    }
+    #endif
+
+    //Limit the EVTargetCurrent should be under EVSEMaximumCurrentLimit
+    if (sys->EvBatterytargetCurrent > sys->AvailableChargingCurrent)
+    {
+        sys->EvBatterytargetCurrent = sys->AvailableChargingCurrent;
+
+        //[To-Do] Limit is achieved flag
+    }
+
+    //Isolation Status
+    if (sys->IsolationStatus == GFD_Invalid)  //0:invalid (on going)
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid; //0
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_din_CurrentDemandRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+    }
+    else if (sys->IsolationStatus == GFD_Valid) //1: valid
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Warning) //2: warning
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Warning; //2
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;  //3
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_CurrentDemandRes]GFD_Fault => Emergency Shutdown");
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else //GFD_No_IMD or other unexpected status
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;  //3
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_din_CurrentDemandRes]IsolationStatus = %d(undefined)", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+
+    //For testing with Tesla Model 3
+    #if TESLA_SLOW_INCREASE_CURRENT_FUNCTION == ENABLE
+    //[CAUTION][To-Do] Decresement of Current is not implemented.
+    //SAVE_PhysicalValueType_DIN70121(&cur->EVSEMaximumCurrentLimit, 10, A_DIN70121);
+    if (sys->EvBatterytargetCurrent <= 0)
+    {
+        EVSE_max_current =  50;   //10A
+        cur->EVSEMaximumCurrentLimit.Value = 50;   //10A
+        /*
+          DEBUG_PRINTF_EVCOMM_DETAIL("1PresentChargingCurrent = %.02f, EvBatterytargetCurrent = %.02f, EVSE_max_current = %d, EVSEMaximumCurrentLimit = %d\n",
+                    sys->PresentChargingCurrent,
+                    sys->EvBatterytargetCurrent,
+                    EVSE_max_current,
+                    cur->EVSEMaximumCurrentLimit.Value
+                );
+        */
+    }
+    else //1A
+    {
+        /*
+    	  DEBUG_PRINTF_EVCOMM_DETAIL("2PresentChargingCurrent = %.02f, EvBatterytargetCurrent = %.02f, EVSE_max_current = %d, EVSEMaximumCurrentLimit = %d\n",
+                    sys->PresentChargingCurrent,
+                    sys->EvBatterytargetCurrent,
+                    EVSE_max_current,
+                    cur->EVSEMaximumCurrentLimit.Value
+                );
+        */
+        if ((abs((int)sys->PresentChargingCurrent - (int)sys->EvBatterytargetCurrent) < 3)&&(abs((int)(EVSE_max_current/10) - (int)sys->EvBatterytargetCurrent) < 3))
+        {
+            tmp = EVSE_max_current + 50; //10A
+
+            if (tmp <= (int)(sys->AvailableChargingCurrent * 10))
+            {
+             cur->EVSEMaximumCurrentLimit.Value = (int)tmp;
+                EVSE_max_current = tmp;
+            }
+            else
+            {
+                cur->EVSEMaximumCurrentLimit.Value = (int) (sys->AvailableChargingCurrent * 10);   //max is set to 40A
+                 EVSE_max_current =  (int) (sys->AvailableChargingCurrent * 10);
+            }
+        }
+    }
+    #endif
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][Error][CurrentDemandRes]CCS GFD trip => EVSE_Shutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][Error][CurrentDemandRes]EVSE_Shutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        //cur->ResponseCode = FAILED_DIN70121;
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        //errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][Error][CurrentDemandRes]CCS GFD trip => EVSE_EmergencyShutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][Error][CurrentDemandRes]EVSE_EmergencyShutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        //cur->ResponseCode = FAILED_DIN70121;
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        //errn = -1;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][Error][CurrentDemandRes]Permission OFF");
+        //cur->ResponseCode = FAILED_DIN70121;
+        cur->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+        //errn = -1;
+    }
+    else
+    {
+        //null
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+    {
+        cur->ResponseCode = FAILED_DIN70121;
+        cur->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_CP_State_Error (023889)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+        sprintf((char*)buf_log_evcomm,
+                "[CurrentDemand]Emergency Stop by CP Error (%d, %.02f V)",
+                sys->CpState,
+                sys->CpVoltage);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_CurrentDemandRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_CurrentDemandRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_CurrentDemandRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct CurrentDemandResponse_ISO15118_2014 *cur;
+    static struct ChargingInfoData *sys;
+//    int i = 0;
+//    static int EVSE_max_current;
+//    int tmp = 0;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    cur = &ShmCcsData->V2GMessage_ISO15118_2014.CurrentDemandResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    cur->ResponseCode = OK_ISO15118_2014;
+
+    //EVSE Status Code
+    cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        cur->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        cur->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //Check for negative EvBatteryMaxCurrent
+    if (sys->EvBatteryMaxCurrent < 0)
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ERROR]EvBatteryMaxCurrent is negative(%.02f) => End_Process",
+                sys->EvBatteryMaxCurrent);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        cur->ResponseCode = iso1responseCodeType_FAILED_WrongChargeParameter;   //16
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        errn = -1;
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_WrongChargeParameter (023775)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 5;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    }
+
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEPresentCurrent, (int) (sys->PresentChargingCurrent * 10), A_ISO15118_2014);
+    SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEPresentVoltage, (int) (sys->PresentChargingVoltage * 10), V_ISO15118_2014);
+    #if TESLA_SLOW_INCREASE_CURRENT_FUNCTION == DISABLE
+    SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEMaximumCurrentLimit, (int) (sys->AvailableChargingCurrent * 10), A_ISO15118_2014);
+    #endif
+    SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEMaximumPowerLimit, (int) (sys->AvailableChargingPower * 10), W_ISO15118_2014);
+    SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEMaximumVoltageLimit, (int) (sys->MaximumChargingVoltage * 10), V_ISO15118_2014);
+
+
+    #if PATCH_FOR_BMW_I3_BUG_EVSEMAXIMUMVOLTAGELIMIT_599V == ENABLE
+    if (sys->EvBatteryMaxVoltage <= 500)
+    {
+        SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEMaximumVoltageLimit, (int) (500 * 10), V_ISO15118_2014);   //500V
+    }
+    #endif
+
+    //Limit the EVTargetCurrent should be under EVSEMaximumCurrentLimit
+    if (sys->EvBatterytargetCurrent > sys->AvailableChargingCurrent)
+    {
+        sys->EvBatterytargetCurrent = sys->AvailableChargingCurrent;
+
+        //[To-Do] Limit is achieved flag
+    }
+
+    //Isolation Status
+    if (sys->IsolationStatus == GFD_Invalid) //0: invalid (on going)
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid; //0
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_iso1_CurrentDemandRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else if (sys->IsolationStatus == GFD_Valid) //1: valid
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Warning) //2: warning
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Warning; //2
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;  //3
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_CurrentDemandRes]GFD_Fault => EmergencyShutdown");
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else
+    {
+        cur->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;  //3
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_iso1_CurrentDemandRes]IsolationStatus = %d(undefined)", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+
+    //For testing with Tesla Model 3
+    #if TESLA_SLOW_INCREASE_CURRENT_FUNCTION == ENABLE
+    //[CAUTION][To-Do] Decresement of Current is not implemented.
+    //SAVE_PhysicalValueType_ISO15118_2014(&cur->EVSEMaximumCurrentLimit, 10, A_ISO15118_2014);
+    if (sys->EvBatterytargetCurrent <= 0)
+    {
+        EVSE_max_current =  50;   //10A
+        cur->EVSEMaximumCurrentLimit.Value = 50;   //10A
+        /*
+          DEBUG_PRINTF_EVCOMM_DETAIL("1PresentChargingCurrent = %.02f, EvBatterytargetCurrent = %.02f, EVSE_max_current = %d, EVSEMaximumCurrentLimit = %d\n",
+                    sys->PresentChargingCurrent,
+                    sys->EvBatterytargetCurrent,
+                    EVSE_max_current,
+                    cur->EVSEMaximumCurrentLimit.Value
+                );
+        */
+    }
+    else //1A
+    {
+        /*
+    	  DEBUG_PRINTF_EVCOMM_DETAIL("2PresentChargingCurrent = %.02f, EvBatterytargetCurrent = %.02f, EVSE_max_current = %d, EVSEMaximumCurrentLimit = %d\n",
+                    sys->PresentChargingCurrent,
+                    sys->EvBatterytargetCurrent,
+                    EVSE_max_current,
+                    cur->EVSEMaximumCurrentLimit.Value
+                );
+        */
+        if ((abs((int)sys->PresentChargingCurrent - (int)sys->EvBatterytargetCurrent) < 3)&&(abs((int)(EVSE_max_current/10) - (int)sys->EvBatterytargetCurrent) < 3))
+        {
+            tmp = EVSE_max_current + 50; //10A
+
+            if (tmp <= (int)(sys->AvailableChargingCurrent * 10))
+            {
+             cur->EVSEMaximumCurrentLimit.Value = (int)tmp;
+                EVSE_max_current = tmp;
+            }
+            else
+            {
+                cur->EVSEMaximumCurrentLimit.Value = (int) (sys->AvailableChargingCurrent * 10);   //max is set to 40A
+                 EVSE_max_current =  (int) (sys->AvailableChargingCurrent * 10);
+            }
+        }
+    }
+    #endif
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][Error][CurrentDemandRes]CCS GFD trip => EVSE_Shutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][Error][CurrentDemandRes]EVSE_Shutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        //cur->ResponseCode = FAILED_ISO15118_2014;
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        //errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //Check for Alarm Code: CCS GFD trip (012235)
+        if (ShmInternalComm->EVSEStopChargingReq.alarmcode[0] == 0 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[1] == 1 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[2] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[3] == 2 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[4] == 3 &&
+            ShmInternalComm->EVSEStopChargingReq.alarmcode[5] == 5)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][Error][CurrentDemandRes]CCS GFD trip => EVSE_EmergencyShutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;
+        }
+        else
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][Error][CurrentDemandRes]EVSE_EmergencyShutdown");
+            cur->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        }
+
+        //cur->ResponseCode = FAILED_ISO15118_2014;
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        //errn = -1;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][Error][CurrentDemandRes]Permission OFF");
+        //cur->ResponseCode = FAILED_ISO15118_2014;
+        cur->DC_EVSEStatus.EVSEIsolationStatus = (unsigned char)sys->IsolationStatus;
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+        //errn = -1;
+    }
+    else
+    {
+        //null
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+    {
+        cur->ResponseCode = FAILED_ISO15118_2014;
+        cur->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_CP_State_Error (023889)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+        sprintf((char*)buf_log_evcomm,
+                "[CurrentDemand]Emergency Stop by CP Error (%d, %.02f V)",
+                sys->CpState,
+                sys->CpVoltage);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_CurrentDemandRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_CurrentDemandRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ChargingStatusRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ChargingStatusRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct ChargingStatusResponse_ISO15118_2014 *res;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ShmCcsData->V2GMessage_ISO15118_2014.ChargingStatusResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    //Init
+    res->ResponseCode = OK_ISO15118_2014;
+    res->ReceiptRequired = FALSE;       //optional
+    res->SAScheduleTupleID = 0;
+    res->AC_EVSEStatus.RCD = FALSE;     //FALSE(no error), TRUE(error is detected)
+    res->AC_EVSEStatus.NotificationMaxDelay = 0;
+    res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //	iso1EVSENotificationType_None = 0,
+    //	iso1EVSENotificationType_StopCharging = 1,
+    //	iso1EVSENotificationType_ReNegotiation = 2
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //EVSE ID
+    memset(res->EVSEID, 0, sizeof(res->EVSEID));
+    //sprintf((char*)res->EVSEID, CCS_AC_EVSEID);
+
+    //[MeterInfo][0/5] init
+    //memset(res->MeterInfo.MeterID.characters, 0, sizeof(res->MeterInfo.MeterID.characters));
+    //memset(res->MeterInfo.SigMeterReading.bytes, 0, sizeof(res->MeterInfo.SigMeterReading.bytes));
+
+    //[MeterInfo][1/5] MeterID
+    //sprintf((char*)res->MeterInfo.MeterID , CCS_AC_METER_ID);
+
+    //[MeterInfo][2/5] SigMeterReading (optional)
+    //sprintf((char*)res->MeterInfo.SigMeterReading , CCS_AC_SIG_METER_READING);
+
+    //[MeterInfo][3/5] MeterStatus (optional)
+    res->MeterInfo.MeterStatus = 0;
+
+    //[MeterInfo][4/5] MeterReading (optional)
+    res->MeterInfo.MeterReading = 12345;
+
+    //[MeterInfo][5/5] TMeter (optional)
+    res->MeterInfo.TMeter = 1586243587; //Unix Time Stamp format
+
+
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_ISO15118_2014(&res->EVSEMaxCurrent, (int)(sys->AvailableChargingCurrent * 10), A_ISO15118_2014);
+
+    //Isolation Status (RCD)
+    if (sys->IsolationStatus == 0)  //Isolation is invalid
+    {
+        res->AC_EVSEStatus.RCD = TRUE;     //FALSE(no error), TRUE(error is detected)
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[ISO1][Error][ChargingStatusRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else if (sys->IsolationStatus == 1) //Isolation is valid
+    {
+        res->AC_EVSEStatus.RCD = FALSE;     //FALSE(no error), TRUE(error is detected)
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    }
+    else
+    {
+        res->AC_EVSEStatus.RCD = TRUE;     //FALSE(no error), TRUE(error is detected)
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[ISO1][Error][ChargingStatusRes]IsolationStatus = %d(undefined)", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        //errn = -1;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        //errn = -1;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        //errn = -1;
+    }
+
+    //Response to CP Error
+    #if CP_PROTECTION_MECHANISM == ENABLE
+    if ((sys->CpState != 4) && (sys->CpState != 5))  //State C (6V), D (3V)
+    {
+        res->ResponseCode = FAILED_ISO15118_2014;
+        res->AC_EVSEStatus.EVSENotification = iso1EVSENotificationType_StopCharging;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        Update_V2G_Flow_Status(Other_Fault);
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_CP_State_Error (023889)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 8;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 9;
+        CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+
+        sprintf((char*)buf_log_evcomm,
+                "[ChargingStatus]Emergency Stop by CP Error (%d, %.02f V)",
+                sys->CpState,
+                sys->CpVoltage);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    #endif
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_ChargingStatusRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_ChargingStatusRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_CurrentDemandReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_CurrentDemandReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_CurrentDemandReq] Got CurrentDemandReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_CurrentDemandReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_CurrentDemandReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.CurrentDemandRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_din_CurrentDemandRes(AcceptFd);
+    if (errn == 0)
+    {
+        //Response is sent successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]CurrentDemandRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[DIN][Error][CurrentDemandReq]CurrentDemandRes: fail(%d,DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_CurrentDemandReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_CurrentDemandReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_CurrentDemandReq] Got CurrentDemandReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_CurrentDemandReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_CurrentDemandReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.CurrentDemandRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_iso1_CurrentDemandRes(AcceptFd);
+    if (errn == 0)
+    {
+        //Response is sent successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]CurrentDemandRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ISO1][Error][CurrentDemandReq]CurrentDemandRes: fail(%d,DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_ChargingStatusReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_ChargingStatusReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_ChargingStatusReq] Got ChargingStatusReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_ChargingStatusReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_ChargingStatusReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    //no content in ISO1
+
+    errn = Proc_iso1_ChargingStatusRes(AcceptFd);
+    if (errn == 0)
+    {
+        //Response is sent successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]ChargingStatusRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[ISO1][Error][ChargingStatusReq]ChargingStatusRes: fail(%d,DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_PowerDeliveryStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_PowerDeliveryStopRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct dinPowerDeliveryResType *res;
+    struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.PowerDeliveryRes;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    res->ResponseCode = OK_DIN70121;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        res->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        res->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ShmCcsData->V2GMessage_DIN70121.PowerDeliveryResponse.DC_EVSEStatus.EVSEStatusCode = EVSE_NotReady;
+    SHM_Read_din_PowerDeliveryRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_PreChargeRes();
+    #endif
+
+    //EVSE Status Code
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //res->ResponseCode = FAILED_DIN70121;
+        res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //res->ResponseCode = FAILED_DIN70121;
+        res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //res->ResponseCode = FAILED_DIN70121;
+        res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_PowerDeliveryStopRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_PowerDeliveryStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_PowerDeliveryStopRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct iso1PowerDeliveryResType *res;
+    struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryRes;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    res->ResponseCode = OK_ISO15118_2014;
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        res->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    ShmCcsData->V2GMessage_ISO15118_2014.PowerDeliveryResponse.DC_EVSEStatus.DC_EVSEStatusCode = EVSE_NotReady;
+    SHM_Read_iso1_PowerDeliveryRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_PreChargeRes();
+    #endif
+
+    //EVSE Status Code
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //res->ResponseCode = FAILED_ISO15118_2014;
+        res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_PowerDeliveryStopRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_din_PowerDeliveryStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_PowerDeliveryStopReq(int AcceptFd)
+{
+    int errn = 0;
+    //Request CSU to STOP
+    //This should be reponsed as soon as possible once this message is received.
+    CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    EVCOMM_SYS_INFO.EvBatterytargetVoltage = 0;
+    EVCOMM_SYS_INFO.EvBatterytargetCurrent = 0;
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PowerDeliveryReq (2nd)\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_PowerDeliveryReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_PowerDeliveryReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.PowerDeliveryRequest.DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode);
+
+    //[To-Do] Sending response after the EVSE output voltage decreases to under 60V
+    usleep(1500000);    //1.5 seconds
+    //sleep(1);   //1 second
+
+    errn = Proc_din_PowerDeliveryStopRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]PowerDeliveryRes (2nd)\n");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_din_PowerDeliveryStopReq]Proc_iso1_PowerDeliveryStopRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_PowerDeliveryStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_PowerDeliveryStopReq(int AcceptFd)
+{
+    int errn = 0;
+    //Request CSU to STOP
+    //This should be reponsed as soon as possible once this message is received.
+    CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    EVCOMM_SYS_INFO.EvBatterytargetVoltage = 0;
+    EVCOMM_SYS_INFO.EvBatterytargetCurrent = 0;
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PowerDeliveryReq (2nd)\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_PowerDeliveryReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_PowerDeliveryReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.PowerDeliveryRequest.DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode);
+
+    //[To-Do] Sending response after the EVSE output voltage decreases to under 60V
+    usleep(1500000);    //1.5 seconds
+    //sleep(1);   //1 second
+    errn = Proc_iso1_PowerDeliveryStopRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]PowerDeliveryRes (2nd)");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_PowerDeliveryStopReq]Proc_iso1_PowerDeliveryStopRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+    1. shm_ccs
+
+OUTPUT:
+    1. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_WeldingDetectionRes(struct CcsData *shm_ccs)
+{
+	struct WeldingDetectionResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.WeldingDetectionResponse;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+    short value = 0; int multiplier = 0; unsigned char unit = 0;
+
+    //value = 3820; multiplier = -1; unit = V_DIN70121;    //382V, for test only.
+    value = 0; multiplier = 0; unit = V_DIN70121;
+	SHM_Save_dinPhysicalValueType(&in->EVSEPresentVoltage, value, multiplier, unit);
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    SHM_Init_dinDC_EVSEStatusType(&in->DC_EVSEStatus);
+}
+
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_WeldingDetectionRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinWeldingDetectionResType(&ccs_exi_doc_DIN.V2G_Message.Body.WeldingDetectionRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.WeldingDetectionRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct dinWeldingDetectionResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.WeldingDetectionRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+    res->EVSEPresentVoltage.Value = 3820;
+    res->EVSEPresentVoltage.Multiplier = -1;
+    res->EVSEPresentVoltage.Unit_isUsed = 1u;
+    res->EVSEPresentVoltage.Unit = dinunitSymbolType_V;
+    //	dinunitSymbolType_h = 0,
+    //	dinunitSymbolType_m = 1,
+    //	dinunitSymbolType_s = 2,
+    //	dinunitSymbolType_A = 3,
+    //	dinunitSymbolType_Ah = 4,
+    //	dinunitSymbolType_V = 5,
+    //	dinunitSymbolType_VA = 6,
+    //	dinunitSymbolType_W = 7,
+    //	dinunitSymbolType_W_s = 8,
+    //	dinunitSymbolType_Wh = 9
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;
+    //	dinisolationLevelType_Invalid = 0,
+    //	dinisolationLevelType_Valid = 1,
+    //	dinisolationLevelType_Warning = 2,
+    //	dinisolationLevelType_Fault = 3
+
+    res->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+    // dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+    // dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+    // dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+    // dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+    // dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+    // dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+    // dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+    // dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+    // dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+    // dinDC_EVSEStatusCodeType_Reserved_A = 9,
+    // dinDC_EVSEStatusCodeType_Reserved_B = 10,
+    // dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = dinEVSENotificationType_None;
+    // dinEVSENotificationType_None = 0,
+    // dinEVSENotificationType_StopCharging = 1,
+    // dinEVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_WeldingDetectionRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1WeldingDetectionResType(&ccs_exi_doc_ISO1.V2G_Message.Body.WeldingDetectionRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.WeldingDetectionRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct iso1WeldingDetectionResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.WeldingDetectionRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+    res->EVSEPresentVoltage.Value = 3820;
+    res->EVSEPresentVoltage.Multiplier = -1;
+    //res->EVSEPresentVoltage.Unit_isUsed = 1u;
+    res->EVSEPresentVoltage.Unit = iso1unitSymbolType_V;
+    //iso1unitSymbolType_h = 0,
+	//iso1unitSymbolType_m = 1,
+	//iso1unitSymbolType_s = 2,
+	//iso1unitSymbolType_A = 3,
+	//iso1unitSymbolType_V = 4,
+	//iso1unitSymbolType_W = 5,
+	//iso1unitSymbolType_Wh = 6
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    res->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+    res->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;
+    //iso1isolationLevelType_Invalid = 0,
+	//iso1isolationLevelType_Valid = 1,
+	//iso1isolationLevelType_Warning = 2,
+	//iso1isolationLevelType_Fault = 3,
+	//iso1isolationLevelType_No_IMD = 4
+
+    res->DC_EVSEStatus.EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+    //iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	//iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	//iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	//iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	//iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	//iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	//iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	//iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	//iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	//iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	//iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	//iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+    res->DC_EVSEStatus.NotificationMaxDelay = 0u;
+
+    res->DC_EVSEStatus.EVSENotification = iso1EVSENotificationType_None;
+    //iso1EVSENotificationType_None = 0,
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_WeldingDetectionRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct WeldingDetectionResponse_DIN70121 *wel;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    wel = &ShmCcsData->V2GMessage_DIN70121.WeldingDetectionResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    wel->ResponseCode = OK_DIN70121;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        wel->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        wel->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_DIN70121(&wel->EVSEPresentVoltage, (int) (sys->PresentChargingVoltage * 10), V_DIN70121);
+
+    //EVSE Status Code
+    wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Ready;
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //wel->ResponseCode = FAILED_DIN70121;
+        wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //wel->ResponseCode = FAILED_DIN70121;
+        wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //wel->ResponseCode = FAILED_DIN70121;
+        wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+
+    //Isolation Status
+    if (sys->IsolationStatus == GFD_Invalid)  //0:invalid (on going)
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Invalid; //0
+        wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_din_WeldingDetectionRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+
+    }
+    else if (sys->IsolationStatus == GFD_Valid) //1: valid
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Valid;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Warning) //2: warning
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Warning; //2
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;  //3
+        wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_din_WeldingDetectionRes]GFD_Fault => Emergency Shutdown");
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else //GFD_No_IMD or other unexpected status
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Fault;  //3
+        wel->DC_EVSEStatus.EVSEStatusCode = dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_din_WeldingDetectionRes]IsolationStatus = %d(undefined)", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_WeldingDetectionRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_WeldingDetectionRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_WeldingDetectionRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_WeldingDetectionRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    static struct WeldingDetectionResponse_ISO15118_2014 *wel;
+    static struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    wel = &ShmCcsData->V2GMessage_ISO15118_2014.WeldingDetectionResponse;
+    sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    wel->ResponseCode = OK_ISO15118_2014;
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        wel->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        wel->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+    SAVE_PhysicalValueType_ISO15118_2014(&wel->EVSEPresentVoltage, (int) (sys->PresentChargingVoltage * 10), V_ISO15118_2014);
+
+    //EVSE Status Code
+    wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Ready;
+
+    //Check for CSU command of "Stop by EVSE"
+    if (sys->DC_EVSEStatus == EVSE_Shutdown)
+    {
+        //wel->ResponseCode = FAILED_ISO15118_2014;
+        wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+    else if (sys->DC_EVSEStatus == EVSE_EmergencyShutdown)
+    {
+        //wel->ResponseCode = FAILED_ISO15118_2014;
+        wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+    }
+    else if (ShmInternalComm->ChargingPermission == FALSE)
+    {
+        //wel->ResponseCode = FAILED_ISO15118_2014;
+        wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_Shutdown;
+    }
+
+    //Isolation Status
+    if (sys->IsolationStatus == GFD_Invalid) //0: invalid (on going)
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Invalid; //0
+        wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_iso1_WeldingDetectionRes]IsolationStatus = %d", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else if (sys->IsolationStatus == GFD_Valid) //1: valid
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Valid;  //1
+    }
+    else if (sys->IsolationStatus == GFD_Warning) //2: warning
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = dinisolationLevelType_Warning; //2
+    }
+    else if (sys->IsolationStatus == GFD_Fault) //3: fault
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;  //3
+        wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error][Proc_iso1_WeldingDetectionRes]GFD_Fault => EmergencyShutdown");
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+    else
+    {
+        wel->DC_EVSEStatus.EVSEIsolationStatus = iso1isolationLevelType_Fault;  //3
+        wel->DC_EVSEStatus.DC_EVSEStatusCode = iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown;
+        CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+        sprintf((char*)buf_log_evcomm, "[Error][Proc_iso1_WeldingDetectionRes]IsolationStatus = %d(undefined)", sys->IsolationStatus);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_WeldingDetectionRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_WeldingDetectionRes();
+    #endif
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_WeldingDetectionRes][Error]Tx encoded msg error");
+        errn = -1;
+    }
+
+    //STEP 5: ============ Update Flags ===========
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_WeldingDetectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_WeldingDetectionReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_din_WeldingDetectionReq] Got WeldingDetectionReq\n");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_WeldingDetectionReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_WeldingDetectionReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_DIN70121.WeldingDetectionRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_din_WeldingDetectionRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[DIN][V2G][Tx]WeldingDetectionRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_din_WeldingDetectionReq]Proc_din_WeldingDetectionRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_WeldingDetectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_WeldingDetectionReq(int AcceptFd)
+{
+    int errn = 0;
+    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Proc_iso1_WeldingDetectionReq] Got WeldingDetectionReq\n");
+
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_WeldingDetectionReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_WeldingDetectionReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    //Check for EV Error Code
+    Check_EVErrorCode(ShmCcsData->V2GMessage_ISO15118_2014.WeldingDetectionRequest.DC_EVStatus.EVErrorCode);
+
+    errn = Proc_iso1_WeldingDetectionRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+        //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ISO1][V2G][Tx]WeldingDetectionRes");
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_WeldingDetectionReq]Proc_iso1_WeldingDetectionRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Init_din_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+    1. shm_ccs
+
+OUTPUT:
+    1. shm_ccs
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Init_din_SessionStopRes(struct CcsData *shm_ccs)
+{
+	struct SessionStopResponse_DIN70121 *in;
+
+	in = &shm_ccs->V2GMessage_DIN70121.SessionStopResponse;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    in->ResponseCode = dinresponseCodeType_OK;
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_din_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_din_SessionStopRes()
+{
+    init_dinBodyType(&ccs_exi_doc_DIN.V2G_Message.Body);
+    init_dinSessionStopResType(&ccs_exi_doc_DIN.V2G_Message.Body.SessionStopRes);
+
+    ccs_exi_doc_DIN.V2G_Message.Body.SessionStopRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct dinSessionStopResType *res;
+    res = &ccs_exi_doc_DIN.V2G_Message.Body.SessionStopRes;
+    res->ResponseCode = dinresponseCodeType_OK;
+}
+
+/*===========================================================================
+FUNCTION: Sudo_Parameter_iso1_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void Sudo_Parameter_iso1_SessionStopRes()
+{
+    init_iso1BodyType(&ccs_exi_doc_ISO1.V2G_Message.Body);
+    init_iso1SessionStopResType(&ccs_exi_doc_ISO1.V2G_Message.Body.SessionStopRes);
+
+    ccs_exi_doc_ISO1.V2G_Message.Body.SessionStopRes_isUsed = 1u;
+
+    //----- [BODY (1/3)] ResponseCode -----
+    struct iso1SessionStopResType *res;
+    res = &ccs_exi_doc_ISO1.V2G_Message.Body.SessionStopRes;
+    res->ResponseCode = iso1responseCodeType_OK;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_SessionStopRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct SessionStopResponse_DIN70121 *stp;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    stp = &ShmCcsData->V2GMessage_DIN70121.SessionStopResponse;
+
+    stp->ResponseCode = OK_DIN70121;
+
+    //[HEADER] Check Req SessionID
+    if (Check_din_V2G_Rx_MSG_SessionID(&ccs_exi_doc_DIN) < 0)
+    {
+        stp->ResponseCode = dinresponseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        stp->ResponseCode = dinresponseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_din_SessionStopRes(&ccs_exi_doc_DIN, ShmCcsData);
+    #else
+    Sudo_Parameter_din_SessionStopRes();
+    #endif
+
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_din_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_DIN) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Tx]SessionStopRes: fail");
+        errn = -1;
+    }
+    else
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Tx]SessionStopRes");
+    }
+
+
+    //STEP 5: ============ Update Flags ===========
+    EVCOMM_SYS_INFO.ConnectorLocked = FALSE;   //Indicating CSU that the Connector is unlocked.
+                                               //Once this is set, the CSU should
+
+    // =========== Annouce to CSU [To-Be Implemented]=============
+    CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;    //This should be also added to EV Error events.
+
+
+    // =========== Re-initialized [To-Be Implemented]=============
+    //Keep 5% PWM for 2 seconds
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 5\% countdown: 2");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 5\% countdown: 1");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 5\% countdown: 0");
+    OutputCpPwmDuty(100);
+
+    //[To-Do] Reset All Share memory
+
+    //[To-Do] CCS Module enter "idle" mode and CSU should check for this state.
+
+    //system("reboot -f");
+    //sleep(5);
+    //system("reboot -f");
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_iso1_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_SessionStopRes(int AcceptFd)
+{
+    //[Joseph, To-Do] Check SessionID of ServiceDiscoveryReq,
+    //if it is not the same, the packet should be ignored.
+
+    //STEP 1: ============ Initialize ============
+    //int i = 0;
+    int errn = 0;
+    bitstream_t v2g_tx_stream;
+    struct SessionStopResponse_ISO15118_2014 *stp;
+    //struct ChargingInfoData *sys;
+
+    size_t pos = 0;
+    v2g_tx_stream.pos = &pos;
+    v2g_tx_stream.size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+    v2g_tx_stream.data = V2GTP_Tx_buf;
+    stp = &ShmCcsData->V2GMessage_ISO15118_2014.SessionStopResponse;
+    //sys = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    stp->ResponseCode = OK_ISO15118_2014;
+
+    //[HEADER] Check Req SessionID
+    if (Check_iso1_V2G_Rx_MSG_SessionID(&ccs_exi_doc_ISO1) < 0)
+    {
+        stp->ResponseCode = iso1responseCodeType_FAILED_UnknownSession; //6
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]unmatched SessionID => End_Process");
+        errn = -1;
+    }
+
+    //Check for SequenceError
+    if (EVCOMM_SYS_INFO.SequenceError == TRUE)
+    {
+        stp->ResponseCode = iso1responseCodeType_FAILED_SequenceError; //5
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[ERROR]SequenceError => End_Process");
+        errn = -1;
+
+        //Update_ShmStatusCode(); //[To-Do] to be implemented
+        //CCS_SECC_ResponseCode_FAILED_SequenceError (023758)
+        ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+        ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+        ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+        ShmStatusCodeData->PresentStatusCode[0][3] = 7;
+        ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+        ShmStatusCodeData->PresentStatusCode[0][5] = 8;
+    }
+
+    //STEP 2: ============ Modifiy Parameter of ShmCcsData ============
+
+
+    //STEP 3: ============ Save Parameters from ShmCcsData to EXI Engine Buffer ============
+    #if PARAMETER_NORMAL_MODE == ENABLE
+    SHM_Read_iso1_SessionStopRes(&ccs_exi_doc_ISO1, ShmCcsData);
+    #else
+    Sudo_Parameter_iso1_SessionStopRes();
+    #endif
+
+
+    //STEP 4: ============ Encode and Send Response Message ===========
+    if (send_encoded_iso1_V2GTP_Stream(AcceptFd, &v2g_tx_stream, &ccs_exi_doc_ISO1) != 0)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Tx]SessionStopRes: fail");
+        errn = -1;
+    }
+    else
+    {
+        //send response successfully.
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Tx]SessionStopRes");
+    }
+
+    //STEP 5: ============ Update Flags ===========
+    EVCOMM_SYS_INFO.ConnectorLocked = FALSE;   //Indicating CSU that the Connector is unlocked.
+                                               //Once this is set, the CSU should
+
+    // =========== Annouce to CSU [To-Be Implemented]=============
+    CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;    //This should be also added to EV Error events.
+
+
+    // =========== Re-initialized [To-Be Implemented]=============
+    //Keep 5% PWM for 2 seconds
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 5\% countdown: 2");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 5\% countdown: 1");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 5\% countdown: 0");
+    OutputCpPwmDuty(100);
+
+    //[To-Do] Reset All Share memory
+
+    //[To-Do] CCS Module enter "idle" mode and CSU should check for this state.
+
+    //system("reboot -f");
+    //sleep(5);
+    //system("reboot -f");
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: Proc_din_SessionStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_din_SessionStopReq(int AcceptFd)
+{
+    int errn = 0;
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]SessionStopReq");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_DIN_SessionStopReq(&ccs_exi_doc_DIN);
+
+    //Save into Share Memory
+    SHM_Save_din_SessionStopReq(ShmCcsData, &ccs_exi_doc_DIN, ShmSysConfigAndInfo);
+
+    errn = Proc_din_SessionStopRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_din_SessionStopReq]Proc_iso1_SessionStopRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: Proc_iso1_SessionStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Proc_iso1_SessionStopReq(int AcceptFd)
+{
+    int errn = 0;
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]SessionStopReq");
+
+    //Print the decoded XML Document
+    PRINT_XML_DOC_ISO1_SessionStopReq(&ccs_exi_doc_ISO1);
+
+    //Save into Share Memory
+    SHM_Save_iso1_SessionStopReq(ShmCcsData, &ccs_exi_doc_ISO1, ShmSysConfigAndInfo);
+
+    errn = Proc_iso1_SessionStopRes(AcceptFd);
+    if (errn == 0)
+    {
+        //send response successfully.
+    }
+    else
+    {
+        sprintf((char*)buf_log_evcomm,
+                "[Error][SeccComm][Proc_iso1_SessionStopReq]Proc_iso1_SessionStopRes(): %d (DEC)",
+                errn);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_din
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_din(int AcceptFd)
+{
+    unsigned char req_is_responsed = FALSE;
+    while (req_is_responsed == FALSE)
+    {
+        //Check if it is in End_Process
+        if (EVCOMM_SYS_INFO.End_Process_inused == TRUE)
+        {
+            break;
+        }
+
+        switch(V2gFlowStatus)
+        {
+            //-------------------------------------------
+            case SupportedAppProtocolRequest:
+            {
+                if (ccs_handshake.supportedAppProtocolReq_isUsed == 1u)
+                {
+                    ccs_handshake.supportedAppProtocolReq_isUsed = 0;
+                    if (Proc_supportedAppProtocolReq(AcceptFd) == 0)   //0: no error
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                        Update_V2G_Flow_Status(SupportedAppProtocolResponse);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]supportedAppProtocolResReq: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SupportedAppProtocolResponse:
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionSetupRequest)
+                {
+                    Update_V2G_Flow_Status(SessionSetupRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionSetupRequest:               //19
+            {
+                if (Proc_din_SessionSetupReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionSetupResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionSetupReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionSetupResponse:              //20
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceDiscoveryRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ServiceDiscoveryRequest:           //21
+            {
+                if (Proc_din_ServiceDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceDiscoveryResponse:          //22
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceAndPaymentSelectionRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm, "[ERROR]SequenceError(%d) => Tx Res MSG", EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ServiceAndPaymentSelectionRequest:     //25
+            {
+                if (Proc_din_ServiceAndPaymentSelectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceAndPaymentSelectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceAndPaymentSelectionResponse:    //26
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    Update_V2G_Flow_Status(AuthorizationRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            //case ContractAuthenticationReq:
+            case AuthorizationRequest:              //29
+            {
+                if (Proc_din_ContractAuthenticationReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(AuthorizationResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case AuthorizationResponse:             //30
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_din_ContractAuthenticationReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //Check for ChargeParameterDiscoveryReq
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]ChargeParameterDiscoveryReq: CSU Permission?");
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ChargeParameterDiscoveryRequest:   //35
+            {
+                if (Proc_din_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ChargeParameterDiscoveryResponse:
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_ChargingParameter_Performance_Time)  //60 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "ChargingParameter Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_ChargingParameter_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_din_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+                //STEP 2: Check for CableCheckReq message
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CableCheckRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]CableCheckReqReq: isolated?");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_Start);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+
+                    Update_V2G_Flow_Status(CableCheckRequest);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_din_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case CableCheckRequest:                 //37
+            {
+                //STEP 3: Execute Cable Check Process
+                if (Proc_din_CableCheckReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(CableCheckResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CableCheckReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case CableCheckResponse:                //38
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_CableCheck_Performance_Time)  //38 seconds
+                {
+                    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CableCheck] end counting...");
+                    sprintf((char*)buf_log_evcomm,
+                            "CableCheck Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_CableCheck_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time (023847)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 4;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 7;
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for CableCheckReq message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CableCheckRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //STEP 3: Execute Cable Check Process
+                    if (Proc_din_CableCheckReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CableCheckReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 3: Check for PreChargeReq message
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == PreChargeRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(PreChargeRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PreChargeReqReq: waiting for precharge voltage...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Precharge_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_din_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PreChargeRequest:                  //39
+            {
+                if (Proc_din_PreChargeReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PreChargeResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PreChargeReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PreChargeResponse:                 //40
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_PreCharge_Performance_Time)  //5 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Precharge Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_PreCharge_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_V2G_PreCharge_Performace_Time (023850)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 0;
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for PreChargeReq message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == PreChargeRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_din_PreChargeReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PreChargeReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 3: Check for PowerDeliveryReq message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStart);
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Precharge_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStart:         //41
+            {
+                if (Proc_din_PowerDeliveryStartReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponsetStart);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStartReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponsetStart:        //42
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                if (ccs_exi_doc_DIN.V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+                {
+                    ftime(&SeqEndTime);
+                    if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //5 seconds
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "Wait for CurrentDemandReq Timeout - (%.02lf of %d ms)\n",
+                                DiffTimeb(SeqStartTime, SeqEndTime),
+                                2000);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        Update_V2G_Flow_Status(Sequence_Timeout);
+                    }
+                    break;
+                }
+                #endif
+
+                //STEP 2: Wait for CurrentDemandReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CurrentDemandRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(CurrentDemandRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]CurrentDemandReqReq: energy transfering...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CurrentDemand_Timer_Start);
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case CurrentDemandRequest:              //45,
+            {
+                if (Proc_din_CurrentDemandReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(CurrentDemandResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CurrentDemandReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case CurrentDemandResponse:             //46,
+            {
+                //STEP 1: Wait for CurrentDemandReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CurrentDemandRequest)
+                {
+                   EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_din_CurrentDemandReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CurrentDemandReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+
+                //STEP 2: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CurrentDemand_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStop:          //49,
+            {
+                if (Proc_din_PowerDeliveryStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponseStop:        //50,
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //2 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for WeldingDetectionReq or SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            2000);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for WeldingDetectionReq Message
+                if(EVCOMM_SYS_INFO.V2G_Rx_Msg == WeldingDetectionRequest)
+                {
+                   EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(WeldingDetectionRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]WeldingDetectionReq: ongoing...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_WeldingDetection_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_din_SessionStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(SessionStopResponse);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    break;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case WeldingDetectionRequest:           //51,
+            {
+                if (Proc_din_WeldingDetectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(WeldingDetectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]WeldingDetectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case WeldingDetectionResponse:          //52,
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_WeldingDetection_Performance_Time)  //20 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_WeldingDetection_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for WeldingDetectionReq Message
+                if(EVCOMM_SYS_INFO.V2G_Rx_Msg == WeldingDetectionRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_din_WeldingDetectionReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]WeldingDetectionReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 3: Check for SessionStopReq Message
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_WeldingDetection_Timer_End);
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionStopRequest:                //53,
+            {
+                if (Proc_din_SessionStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionStopResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionStopResponse:               //54,
+            {
+                break;
+            }
+            //-------------------------------------------
+            default:
+            {
+                break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_iso1_DC
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_iso1_DC(int AcceptFd)
+{
+    unsigned char req_is_responsed = FALSE;
+    while (req_is_responsed == FALSE)
+    {
+        //Check if it is in End_Process
+        if (EVCOMM_SYS_INFO.End_Process_inused == TRUE)
+        {
+            break;
+        }
+
+        switch(V2gFlowStatus)
+        {
+            //-------------------------------------------
+            case SupportedAppProtocolRequest:
+            {
+                if (ccs_handshake.supportedAppProtocolReq_isUsed == 1u)
+                {
+                    ccs_handshake.supportedAppProtocolReq_isUsed = 0;
+                    if (Proc_supportedAppProtocolReq(AcceptFd) == 0)   //0: no error
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                        Update_V2G_Flow_Status(SupportedAppProtocolResponse);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]supportedAppProtocolResReq: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SupportedAppProtocolResponse:
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionSetupRequest)
+                {
+                    Update_V2G_Flow_Status(SessionSetupRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionSetupRequest:               //19
+            {
+                if (Proc_iso1_SessionSetupReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionSetupResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionSetupReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionSetupResponse:              //20
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceDiscoveryRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ServiceDiscoveryRequest:           //21
+            {
+                if (Proc_iso1_ServiceDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceDiscoveryResponse:          //22
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceAndPaymentSelectionRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ServiceAndPaymentSelectionRequest:     //25
+            {
+                if (Proc_iso1_ServiceAndPaymentSelectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceAndPaymentSelectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceAndPaymentSelectionResponse:    //26
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    Update_V2G_Flow_Status(AuthorizationRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            //case ContractAuthenticationReq:
+            case AuthorizationRequest:              //29
+            {
+                if (Proc_iso1_AuthenticationReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(AuthorizationResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case AuthorizationResponse:             //30
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso1_AuthenticationReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //Check for ChargeParameterDiscoveryReq
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]ChargeParameterDiscoveryReq: CSU Permission?");
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ChargeParameterDiscoveryRequest:   //35
+            {
+                if (Proc_iso1_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ChargeParameterDiscoveryResponse:
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_ChargingParameter_Performance_Time)  //60 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "ChargingParameter Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_ChargingParameter_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso1_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 2: Check for CableCheckReq message
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CableCheckRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]CableCheckReqReq: isolated?");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_Start);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+
+                    Update_V2G_Flow_Status(CableCheckRequest);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_iso1_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    break;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+                break;
+            }
+            //-------------------------------------------
+            case CableCheckRequest:                 //37
+            {
+                //STEP 3: Execute Cable Check Process
+                if (Proc_iso1_CableCheckReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(CableCheckResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CableCheckReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case CableCheckResponse:                //38
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_CableCheck_Performance_Time)  //38 seconds
+                {
+                    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CableCheck] end counting...");
+                    sprintf((char*)buf_log_evcomm,
+                            "CableCheck Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_CableCheck_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time (023847)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 4;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 7;
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for CableCheckReq message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CableCheckRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //STEP 3: Execute Cable Check Process
+                    if (Proc_iso1_CableCheckReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CableCheckReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 3: Check for PreChargeReq message
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == PreChargeRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(PreChargeRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PreChargeReqReq: waiting for precharge voltage...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Precharge_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_iso1_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PreChargeRequest:                  //39
+            {
+                if (Proc_iso1_PreChargeReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PreChargeResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PreChargeReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PreChargeResponse:                 //40
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_PreCharge_Performance_Time)  //5 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Precharge Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_PreCharge_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_V2G_PreCharge_Performace_Time (023850)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 0;
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for PreChargeReq message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == PreChargeRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso1_PreChargeReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PreChargeReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 3: Check for PowerDeliveryReq message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStart);
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Precharge_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStart:         //41
+            {
+                if (Proc_iso1_PowerDeliveryStartReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponsetStart);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStartReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponsetStart:        //42
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                if (ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+                {
+                    ftime(&SeqEndTime);
+                    if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //5 seconds
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "Wait for CurrentDemandReq Timeout - (%.02lf of %d ms)\n",
+                                DiffTimeb(SeqStartTime, SeqEndTime),
+                                2000);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        Update_V2G_Flow_Status(Sequence_Timeout);
+                    }
+                    break;
+                }
+                #endif
+
+                //STEP 2: Wait for CurrentDemandReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CurrentDemandRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(CurrentDemandRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]CurrentDemandReqReq: energy transfering...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CurrentDemand_Timer_Start);
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+                break;
+            }
+            //-------------------------------------------
+            case CurrentDemandRequest:              //45,
+            {
+                if (Proc_iso1_CurrentDemandReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(CurrentDemandResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CurrentDemandReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case CurrentDemandResponse:             //46,
+            {
+                //STEP 1: Wait for CurrentDemandReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CurrentDemandRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_iso1_CurrentDemandReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CurrentDemandReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 2: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CurrentDemand_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStop:          //49,
+            {
+                if (Proc_iso1_PowerDeliveryStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponseStop:        //50,
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //2 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for WeldingDetectionReq or SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            2000);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for WeldingDetectionReq Message
+                if(EVCOMM_SYS_INFO.V2G_Rx_Msg == WeldingDetectionRequest)
+                {
+                   EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(WeldingDetectionRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]WeldingDetectionReq: ongoing...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_WeldingDetection_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso1_SessionStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(SessionStopResponse);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case WeldingDetectionRequest:           //51,
+            {
+                if (Proc_iso1_WeldingDetectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(WeldingDetectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]WeldingDetectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case WeldingDetectionResponse:          //52,
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_WeldingDetection_Performance_Time)  //20 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_WeldingDetection_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for WeldingDetectionReq Message
+                if(EVCOMM_SYS_INFO.V2G_Rx_Msg == WeldingDetectionRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_iso1_WeldingDetectionReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]WeldingDetectionReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 3: Check for SessionStopReq Message
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_WeldingDetection_Timer_End);
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionStopRequest:                //53,
+            {
+                if (Proc_iso1_SessionStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionStopResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionStopResponse:               //54,
+            {
+                break;
+            }
+            //-------------------------------------------
+            default:
+            {
+                break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_iso1_AC
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_iso1_AC(int AcceptFd)
+{
+    unsigned char req_is_responsed = FALSE;
+    while (req_is_responsed == FALSE)
+    {
+        //Check if it is in End_Process
+        if (EVCOMM_SYS_INFO.End_Process_inused == TRUE)
+        {
+            break;
+        }
+
+        switch(V2gFlowStatus)
+        {
+            //-------------------------------------------
+            case SupportedAppProtocolRequest:       //17
+            {
+                if (ccs_handshake.supportedAppProtocolReq_isUsed == 1u)
+                {
+                    ccs_handshake.supportedAppProtocolReq_isUsed = 0;
+                    if (Proc_supportedAppProtocolReq(AcceptFd) == 0)   //0: no error
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                        Update_V2G_Flow_Status(SupportedAppProtocolResponse);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]supportedAppProtocolResReq: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SupportedAppProtocolResponse:      //18
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionSetupRequest)
+                {
+                    Update_V2G_Flow_Status(SessionSetupRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionSetupRequest:               //19
+            {
+                if (Proc_iso1_SessionSetupReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionSetupResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionSetupReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionSetupResponse:              //20
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceDiscoveryRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ServiceDiscoveryRequest:           //21
+            {
+                if (Proc_iso1_ServiceDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceDiscoveryResponse:          //22
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceAndPaymentSelectionRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ServiceAndPaymentSelectionRequest: //25
+            {
+                if (Proc_iso1_ServiceAndPaymentSelectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceAndPaymentSelectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceAndPaymentSelectionResponse://26
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    Update_V2G_Flow_Status(AuthorizationRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            //case ContractAuthenticationReq:
+            case AuthorizationRequest:              //29
+            {
+                if (Proc_iso1_AuthenticationReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(AuthorizationResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                break;
+            }
+            case AuthorizationResponse:             //30
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso1_AuthenticationReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //Check for ChargeParameterDiscoveryReq
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]ChargeParameterDiscoveryReq: CSU Permission?");
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ChargeParameterDiscoveryRequest:   //35
+            {
+                if (Proc_iso1_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ChargeParameterDiscoveryResponse:  //36
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+    	        ftime(&SeqEndTime);
+    	        if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_ChargingParameter_Performance_Time)  //60 seconds
+    	        {
+    	            sprintf((char*)buf_log_evcomm,
+                            "ChargingParameter Timeout - (%.02lf of %d ms)\n",
+    	                    DiffTimeb(SeqStartTime, SeqEndTime),
+    	                    V2G_SECC_ChargingParameter_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    	            Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+    	        }
+                #endif
+
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso1_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStart);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_iso1_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+    		#if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+            #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+                break;
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStart:         //41
+            {
+                if (Proc_iso1_PowerDeliveryStartReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponsetStart);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStartReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponsetStart:       //42
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                if (ccs_exi_doc_ISO1.V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+                {
+                    ftime(&SeqEndTime);
+                    if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //5 seconds
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "Wait for ChargingStatusReq Timeout - (%.02lf of %d ms)\n",
+                                DiffTimeb(SeqStartTime, SeqEndTime),
+                                2000);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        Update_V2G_Flow_Status(Sequence_Timeout);
+                    }
+                    break;
+                }
+                #endif
+
+                //STEP 2: Wait for ChargingStatusReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargingStatusRequest)
+                {
+    	            EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(ChargingStatusRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]ChargingStatusReq: energy transfering...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargingStatus_Timer_Start);
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case ChargingStatusRequest:             //43
+            {
+                if (Proc_iso1_ChargingStatusReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ChargingStatusResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargingStatusRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ChargingStatusResponse:            //44
+            {
+                //STEP 1: Wait for ChargingStatusReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargingStatusRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_iso1_ChargingStatusReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargingStatusRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                }
+                //STEP 2: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargingStatus_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStop:          //49
+            {
+                if (Proc_iso1_PowerDeliveryStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponseStop:         //50
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //2 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            2000);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 3: Check for SessionStopReq Message
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionStopRequest:                //53
+            {
+                if (Proc_iso1_SessionStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionStopResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionStopResponse:               //54
+            {
+                break;
+            }
+            //-------------------------------------------
+            default:
+            {
+                break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_iso1
+DESCRIPTION:
+    1. EnergyTransferMode:
+        AC_single_phase_core =  0,
+        AC_three_phase_core =   1,
+        DC_core =               2,
+        DC_extended =           3,
+        DC_combo_core =         4,
+        DC_unique =             5
+
+        iso1EnergyTransferModeType_AC_single_phase_core = 0,
+    	iso1EnergyTransferModeType_AC_three_phase_core = 1,
+    	iso1EnergyTransferModeType_DC_core = 2,
+    	iso1EnergyTransferModeType_DC_extended = 3,
+    	iso1EnergyTransferModeType_DC_combo_core = 4,
+    	iso1EnergyTransferModeType_DC_unique = 5
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_iso1(int AcceptFd, unsigned char EnergyTransferMode)
+{
+    switch (EnergyTransferMode)
+    {
+        case DC_extended:
+        {
+            V2gMsg_Process_iso1_DC(AcceptFd);
+            break;
+        }
+
+        case AC_single_phase_core:
+        case AC_three_phase_core:
+        {
+            V2gMsg_Process_iso1_AC(AcceptFd);
+            break;
+        }
+
+        default:
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[ISO1][Warning]Unexpected EnergyTransferMode(%d)",
+                    EnergyTransferMode);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            break;
+        }
+    }
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_iso2_DC
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_iso2_DC(int AcceptFd)
+{
+    unsigned char req_is_responsed = FALSE;
+    while (req_is_responsed == FALSE)
+    {
+        //Check if it is in End_Process
+        if (EVCOMM_SYS_INFO.End_Process_inused == TRUE)
+        {
+            break;
+        }
+
+        switch(V2gFlowStatus)
+        {
+            //-------------------------------------------
+            case SupportedAppProtocolRequest:
+            {
+                if (ccs_handshake.supportedAppProtocolReq_isUsed == 1u)
+                {
+                    ccs_handshake.supportedAppProtocolReq_isUsed = 0;
+                    if (Proc_supportedAppProtocolReq(AcceptFd) == 0)   //0: no error
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                        Update_V2G_Flow_Status(SupportedAppProtocolResponse);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]supportedAppProtocolResReq: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SupportedAppProtocolResponse:
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionSetupRequest)
+                {
+                    Update_V2G_Flow_Status(SessionSetupRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+            //-------------------------------------------
+            case SessionSetupRequest:               //19
+            {
+                if (Proc_iso2_SessionSetupReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionSetupResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionSetupReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case SessionSetupResponse:              //20
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceDiscoveryRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+
+                }
+
+                break;
+            }
+    #if 0
+            //-------------------------------------------
+            case ServiceDiscoveryRequest:           //21
+            {
+                if (Proc_iso2_ServiceDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceDiscoveryResponse:          //22
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ServiceAndPaymentSelectionRequest)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case ServiceAndPaymentSelectionRequest:     //25
+            {
+                if (Proc_iso2_ServiceAndPaymentSelectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ServiceAndPaymentSelectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ServiceAndPaymentSelectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ServiceAndPaymentSelectionResponse:    //26
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    Update_V2G_Flow_Status(AuthorizationRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            //case ContractAuthenticationReq:
+            case AuthorizationRequest:              //29
+            {
+                if (Proc_iso2_AuthenticationReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(AuthorizationResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case AuthorizationResponse:             //30
+            {
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == AuthorizationRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso2_AuthenticationReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]AuthorizationReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+
+                //Check for ChargeParameterDiscoveryReq
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]ChargeParameterDiscoveryReq: CSU Permission?");
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case ChargeParameterDiscoveryRequest:   //35
+            {
+                if (Proc_iso2_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(ChargeParameterDiscoveryResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case ChargeParameterDiscoveryResponse:
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_ChargingParameter_Performance_Time)  //60 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "ChargingParameter Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_ChargingParameter_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == ChargeParameterDiscoveryRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso2_ChargeParameterDiscoveryReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]ChargeParameterDiscoveryReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+                //STEP 2: Check for CableCheckReq message
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CableCheckRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(CableCheckRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]CableCheckReqReq: isolated?");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_Start);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_iso2_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    break;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case CableCheckRequest:                 //37
+            {
+                //STEP 3: Execute Cable Check Process
+                if (Proc_iso2_CableCheckReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(CableCheckResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CableCheckReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case CableCheckResponse:                //38
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_CableCheck_Performance_Time)  //38 seconds
+                {
+                    //SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[CableCheck] end counting...");
+                    sprintf((char*)buf_log_evcomm,
+                            "CableCheck Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_CableCheck_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_V2G_CableCheck_Performance_Time (023847)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 4;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 7;
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for CableCheckReq message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CableCheckRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //STEP 3: Execute Cable Check Process
+                    if (Proc_iso2_CableCheckReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CableCheckReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+                //STEP 3: Check for PreChargeReq message
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg == PreChargeRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(PreChargeRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]PreChargeReqReq: waiting for precharge voltage...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CableCheck_Timer_End);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Precharge_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                //STEP 3: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    //ftime(&EVCOMM_SYS_INFO.V2G_SECC_ChargeParameterDiscovery_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+
+                    if (Proc_iso2_PowerDeliveryStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    break;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case PreChargeRequest:                  //39
+            {
+                if (Proc_iso2_PreChargeReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PreChargeResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PreChargeReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PreChargeResponse:                 //40
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_PreCharge_Performance_Time)  //5 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Precharge Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_PreCharge_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_V2G_PreCharge_Performace_Time (023850)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 5;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 0;
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for PreChargeReq message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == PreChargeRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso2_PreChargeReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PreChargeReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+                //STEP 3: Check for PowerDeliveryReq message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStart);
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Precharge_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStart:         //41
+            {
+                if (Proc_iso2_PowerDeliveryStartReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponsetStart);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStartReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponsetStart:        //42
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                if (ccs_exi_doc_ISO2.V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+                {
+                    ftime(&SeqEndTime);
+                    if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //5 seconds
+                    {
+                        sprintf((char*)buf_log_evcomm,
+                                "Wait for CurrentDemandReq Timeout - (%.02lf of %d ms)\n",
+                                DiffTimeb(SeqStartTime, SeqEndTime),
+                                2000);
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                        Update_V2G_Flow_Status(Sequence_Timeout);
+                    }
+                    break;
+                }
+                #endif
+
+                //STEP 2: Wait for CurrentDemandReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CurrentDemandRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(CurrentDemandRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]CurrentDemandReqReq: energy transfering...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CurrentDemand_Timer_Start);
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case CurrentDemandRequest:              //45,
+            {
+                if (Proc_iso2_CurrentDemandReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(CurrentDemandResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CurrentDemandReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case CurrentDemandResponse:             //46,
+            {
+                //STEP 1: Wait for CurrentDemandReq Message
+                if (EVCOMM_SYS_INFO.V2G_Rx_Msg == CurrentDemandRequest)
+                {
+                     EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_iso2_CurrentDemandReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]CurrentDemandReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+                //STEP 2: Wait for PowerDeliveryReq Message
+                else if((EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStop) ||
+                        (EVCOMM_SYS_INFO.V2G_Rx_Msg == PowerDeliveryRequestStart))
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryRequestStop);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_CurrentDemand_Timer_End);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case PowerDeliveryRequestStop:          //49,
+            {
+                if (Proc_iso2_PowerDeliveryStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(PowerDeliveryResponseStop);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]PowerDeliveryStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case PowerDeliveryResponseStop:        //50,
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > 2000)  //2 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for WeldingDetectionReq or SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            2000);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for WeldingDetectionReq Message
+                if(EVCOMM_SYS_INFO.V2G_Rx_Msg == WeldingDetectionRequest)
+                {
+                   EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    Update_V2G_Flow_Status(WeldingDetectionRequest);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[V2G][Rx]WeldingDetectionReq: ongoing...");
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_WeldingDetection_Timer_Start);
+
+                    #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                    ftime(&SeqStartTime);
+                    #endif
+                }
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    if (Proc_iso2_SessionStopReq(AcceptFd) == 0)
+                    {
+                        Update_V2G_Flow_Status(SessionStopResponse);
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    break;
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case WeldingDetectionRequest:           //51,
+            {
+                if (Proc_iso2_WeldingDetectionReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(WeldingDetectionResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]WeldingDetectionReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                break;
+            }
+            case WeldingDetectionResponse:          //52,
+            {
+                //STEP 1: Check for Process Timeout
+                #if V2G_SECC_TIMEOUT_PROTECTION == ENABLE
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > V2G_SECC_WeldingDetection_Performance_Time)  //20 seconds
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait for SessionStopReq Timeout - (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            V2G_SECC_WeldingDetection_Performance_Time);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    break;
+                }
+                #endif
+
+                //STEP 2: Check for WeldingDetectionReq Message
+                if(EVCOMM_SYS_INFO.V2G_Rx_Msg == WeldingDetectionRequest)
+                {
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                    if (Proc_iso1_WeldingDetectionReq(AcceptFd) == 0)
+                    {
+                        ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    }
+                    else
+                    {
+                        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]WeldingDetectionReqRes: fail");
+                        Update_V2G_Flow_Status(Other_Fault);
+                    }
+                    req_is_responsed = TRUE;
+                    break;
+                }
+                //STEP 3: Check for SessionStopReq Message
+                else if(EVCOMM_SYS_INFO.V2G_Rx_Msg == SessionStopRequest)
+                {
+                    Update_V2G_Flow_Status(SessionStopRequest);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_WeldingDetection_Timer_End);
+                }
+                else if (EVCOMM_SYS_INFO.V2G_Rx_Msg >= SupportedAppProtocolRequest &&
+                         EVCOMM_SYS_INFO.V2G_Rx_Msg <= SessionStopRequest)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "[ERROR]SequenceError(%d) => Tx Res MSG",
+                            EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.SequenceError = TRUE;
+
+                    Update_V2G_Flow_Status(EVCOMM_SYS_INFO.V2G_Rx_Msg);
+                    EVCOMM_SYS_INFO.V2G_Rx_Msg = 0;
+                }
+                else
+                {
+                    break;
+                }
+            }
+            //-------------------------------------------
+            case SessionStopRequest:                //53,
+            {
+                if (Proc_iso2_SessionStopReq(AcceptFd) == 0)
+                {
+                    Update_V2G_Flow_Status(SessionStopResponse);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                }
+                else
+                {
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Error]SessionStopReqRes: fail");
+                    Update_V2G_Flow_Status(Other_Fault);
+                }
+                req_is_responsed = TRUE;
+                //break;
+            }
+            case SessionStopResponse:               //54,
+            {
+                break;
+            }
+    #endif
+            //-------------------------------------------
+            default:
+            {
+                break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_iso2_AC
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_iso2_AC(int AcceptFd)
+{
+
+	return 0;
+}
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process_iso2
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+        1. V2gFlowStatus
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gFlowStatus
+=============================================================================*/
+int V2gMsg_Process_iso2(int AcceptFd, unsigned char EnergyTransferMode)
+{
+    switch (EnergyTransferMode)
+    {
+        case DC_extended:
+        {
+            V2gMsg_Process_iso2_DC(AcceptFd);
+            break;
+        }
+
+        case AC_single_phase_core:
+        case AC_three_phase_core:
+        {
+            V2gMsg_Process_iso2_AC(AcceptFd);
+            break;
+        }
+
+        default:
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[ISO2][Warning]Unexpected EnergyTransferMode(%d)",
+                    EnergyTransferMode);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            break;
+        }
+    }
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: V2gMsg_Process
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int V2gMsg_Process(int AcceptFd)
+{
+    int errn = 0;
+
+    switch (ShmCcsData->CommProtocol)
+    {
+        case V2GT_MSG_PROTOCOL_DIN70121:        //0
+        {
+            V2gMsg_Process_din(AcceptFd);
+            break;
+        }
+
+        case V2GT_MSG_PROTOCOL_ISO15118_2014:   //1
+        {
+            V2gMsg_Process_iso1(AcceptFd, ShmCcsData->EnergyTransferMode);
+            break;
+        }
+
+        case V2GT_MSG_PROTOCOL_ISO15118_2018:   //2
+        {
+            V2gMsg_Process_iso2(AcceptFd, ShmCcsData->EnergyTransferMode);
+            break;
+        }
+
+        default:
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "[Warning]Unexpected CommProtocol(%d)",
+                    ShmCcsData->CommProtocol);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            break;
+        }
+    }
+
+    return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: V2gMsg_Rx
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int V2gMsg_Rx(int AcceptFd)
+{
+    int errn = 0;
+    unsigned int packet_size = 0;
+
+    memset(V2gtpMsgRxBuf, 0, V2GTP_MSG_RX_BUFFER_SIZE);
+    packet_size = recv(AcceptFd, V2gtpMsgRxBuf, V2GTP_MSG_RX_BUFFER_SIZE, 0);
+    //[CAUTION] Everytime recv() is called, it will take a default time to wait for TCP packets.
+    //The more time you call recv(), the more time you will waste here.
+    //Here it is suggested that response immediatedly once you receive any packets.
+    //For configuring the Rx waiting time, please use setsockopt().
+
+    if(packet_size > 0) //[Joseph] If there is no data, ignore. (TBD)
+    {
+        //DEBUG_PRINTF_EVCOMM_DETAIL("\n\n Got TCP V2GTP Message: size = %d Bytes\n", packet_size);
+        errn = V2gMsgDecoder(V2gtpMsgRxBuf, packet_size, V2gFlowStatus);
+        if (errn < 0)
+        {
+            sprintf((char*)buf_log_evcomm, "[ERROR]V2gMsgDecoder (%d)", errn);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        }
+    }
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: V2gComm
+DESCRIPTION:
+PRE-CONDITION:
+        1. TCP socket is connected.
+INPUT:
+        1. AcceptFd         //TCP Connection ID
+        2. V2gtpMsgRxBuf[]     //V2GTP Messages (Header + Payload)
+        3. V2GTP_MSG_RX_BUFFER_SIZE   //64*1024 = 65,536 = 65.5K (Bytes)
+
+OUTPUT:
+GLOBAL VARIABLES:
+        1. V2gtpMsgRxBuf[]
+=============================================================================*/
+int V2gComm(int AcceptFd)
+{
+    int errn = 0;
+
+    if (V2gMsg_Rx(AcceptFd) < 0)
+    {
+        Update_V2G_Flow_Status(Other_Fault);
+        errn = -1;
+    }
+
+    //following are the response message handling according to status flag
+    if (V2gMsg_Process(AcceptFd) < 0)
+    {
+        errn = -1;
+    }
+
+    //Error Check
+    //V2G_Error_Monitor();
+
+    return errn;
+}
+
+/*===========================================================================
+FUNCTION: SdpUdpConnected
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int SdpUdpConnected()
+{
+    int packet_size,Rtn;
+    struct sockaddr_in6 ServerAddr,ClientAddr;
+    struct V2gtpHeader *header;
+    unsigned char *payload;
+
+    if(UdpSock <= 0)
+    {
+        if ((UdpSock = socket(AF_INET6, SOCK_DGRAM, 0)) < 0)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "SdpUdpConnected: Fail to open UdpSock");
+            return 0;
+        }
+        memset(&ServerAddr,0, sizeof(struct sockaddr_in));
+        ServerAddr.sin6_family = AF_INET6;
+        ServerAddr.sin6_addr = in6addr_any;
+        ServerAddr.sin6_port = htons(SdpUdpServerPort);
+        if(bind(UdpSock, (struct sockaddr *)&ServerAddr, sizeof(struct sockaddr_in6)) <0)
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "SdpUdpConnected: Fail to bind UdpSock(%d)",
+                    UdpSock);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            close(UdpSock);
+            UdpSock = -1;
+            return 0;
+        }
+        sprintf((char*)buf_log_evcomm, "[UdpSock]opend:%d", UdpSock);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+        sprintf((char*)buf_log_evcomm, "[SDP]Req from EVCC: waiting...(%d)", UdpSock);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+    }
+
+    memset(V2gtpMsgRxBuf, 0, V2GTP_MSG_RX_BUFFER_SIZE);
+    memset(&ClientAddr, 0, sizeof(struct sockaddr_in));
+    Rtn = sizeof(struct sockaddr_in6);
+    packet_size = recvfrom(UdpSock, V2gtpMsgRxBuf, V2GTP_MSG_RX_BUFFER_SIZE, MSG_DONTWAIT, (struct sockaddr *)&ClientAddr, (socklen_t *)&Rtn);
+
+    if(packet_size > 0)
+    {
+        header = (struct V2gtpHeader *) V2gtpMsgRxBuf;
+        payload = V2gtpMsgRxBuf+sizeof(struct V2gtpHeader);
+
+        #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+        {
+            DEBUG_PRINTF_EVCOMM_DETAIL("\n\n Got UDP packet_size = %d (Bytes)\n", packet_size);
+
+            DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***********************************\n");
+            DEBUG_PRINTF_EVCOMM_DETAIL("***** Received SDP Packet *****\n");
+            DEBUG_PRINTF_EVCOMM_DETAIL("***********************************\n");
+            DEBUG_PRINTF_EVCOMM_DETAIL("ClientAddress=");
+
+            for(Rtn = 0; Rtn < 16; Rtn += 2)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("%02x%02x:",ClientAddr.sin6_addr.s6_addr[Rtn],ClientAddr.sin6_addr.s6_addr[Rtn+1]);
+            }
+            DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+            DEBUG_PRINTF_EVCOMM_DETAIL("ClientPort=%d\n",ClientAddr.sin6_port);
+            DEBUG_PRINTF_EVCOMM_DETAIL("ProtocolVersion=%d\n",header->ProtocolVersion);
+            DEBUG_PRINTF_EVCOMM_DETAIL("InverseProtocolVersion=0x%x\n",header->InverseProtocolVersion);
+            DEBUG_PRINTF_EVCOMM_DETAIL("PayloadType=0x%x\n",htons(header->PayloadType));
+            DEBUG_PRINTF_EVCOMM_DETAIL("PayloadLength=0x%x\n",htonl(header->PayloadLength));
+            DEBUG_PRINTF_EVCOMM_DETAIL("htons(header->PayloadType)=0x%x\n",htons(header->PayloadType));
+        }
+        #endif
+
+        if( (header->ProtocolVersion == 0x01) &&
+            (header->InverseProtocolVersion == 0xFE) &&
+            (htons(header->PayloadType) == V2GTP_PAYLOAD_TYPE_SDP_REQUEST))
+        {
+            sprintf((char*)buf_log_evcomm, "[SDP][Rx]Req from EVCC: GOT(%d)", UdpSock);
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            DEBUG_PRINTF_EVCOMM_DETAIL("Security=0x%x\n", *(payload + 0));
+            DEBUG_PRINTF_EVCOMM_DETAIL("TransportProtocol=0x%x\n", *(payload + 1));
+
+            header->PayloadType = htons(V2GTP_PAYLOAD_TYPE_SDP_RESPONSE);
+            header->PayloadLength = htonl(20);    //Fixed Length=20
+            memset(payload, 0, 20);
+            // MAC address[0:2] + FFFE + MAC address[3:5]
+            payload[0] = (IPV6_LINK_LOCAL_PREFIX>>8) & 0xFF;
+            payload[1] = IPV6_LINK_LOCAL_PREFIX & 0xFF;
+            payload[8 ]= CsuMac[0];
+            payload[8] ^= 0x02;// bit 1 should complemented.
+            payload[9] = CsuMac[1];
+            payload[10] = CsuMac[2];
+            payload[11] = 0xFF;
+            payload[12] = 0xFE;
+            payload[13] = CsuMac[3];
+            payload[14] = CsuMac[4];
+            payload[15] = CsuMac[5];
+            //TCP port
+            payload[16] = (EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active>>8) & 0xFF;
+            payload[17] = EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active & 0xFF;
+            payload[18] = SDP_PAYLOAD_SECURITY_NONE;      //Security
+            payload[19] = SDP_PAYLOAD_TRANS_PROTOCOL_TCP; //Transport protocol
+
+            //[To-Do] Setup the TCP in advance to receive the coming TCP handshke messages after SDP response.
+
+            Rtn = sendto(UdpSock, V2gtpMsgRxBuf, sizeof(struct V2gtpHeader) + htonl(header->PayloadLength), 0, (struct sockaddr *)&ClientAddr, sizeof(struct sockaddr_in6));
+
+            sprintf((char*)buf_log_evcomm, "[SDP][Tx]Res from SECC");
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+            {
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n\n***** Response SDP Packet *****\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("Send size=%d\n",Rtn);
+                DEBUG_PRINTF_EVCOMM_DETAIL("Destination Address=");
+                for(Rtn = 0; Rtn < 16; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x, ", ClientAddr.sin6_addr.s6_addr[Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("Destination Port=%d\n", ClientAddr.sin6_port);
+                DEBUG_PRINTF_EVCOMM_DETAIL("ProtocolVersion=%d\n", header->ProtocolVersion);
+                DEBUG_PRINTF_EVCOMM_DETAIL("InverseProtocolVersion=0x%x\n", header->InverseProtocolVersion);
+                DEBUG_PRINTF_EVCOMM_DETAIL("PayloadType=0x%x\n", htons(header->PayloadType));
+                DEBUG_PRINTF_EVCOMM_DETAIL("PayloadLength=0x%x\n", htonl(header->PayloadLength));
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECC Ipv6 Address=");
+                for(Rtn = 0; Rtn < 16; Rtn++)
+                {
+                    DEBUG_PRINTF_EVCOMM_DETAIL("%02x:",payload[Rtn]);
+                }
+                DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+                DEBUG_PRINTF_EVCOMM_DETAIL("SECC Port=%d\n", (payload[16]<<8 | payload[17]));
+                DEBUG_PRINTF_EVCOMM_DETAIL("Security=0x%x\n", payload[19]);
+                DEBUG_PRINTF_EVCOMM_DETAIL("TransportProtocol=0x%x\n", payload[20]);
+            }
+            #endif
+
+            if(Rtn > 0)
+            {
+                return 1;
+            }
+        }
+    }
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: V2gTcpConnected
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int V2gTcpConnected()
+{
+    int Rtn,AcceptFd;
+    struct sockaddr_in6 ServerAddr,ClientAddr;
+
+    if(TcpSock <= 0)
+    {
+        if ((TcpSock = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "V2gTcpConnected: Fail to open TcpSock (%s)",
+                    strerror(errno));
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            usleep(100000); //100ms
+
+            return 0;
+        }
+        fcntl(TcpSock, F_SETFL, O_NONBLOCK);    //set to O_NONBLOCK
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]socket set: DONE");
+
+        memset(&ServerAddr,0, sizeof(struct sockaddr_in));
+        ServerAddr.sin6_family = PF_INET6;
+        ServerAddr.sin6_addr = in6addr_any;
+        ServerAddr.sin6_port = htons(EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active);
+        //ServerAddr.sin6_port = htons(SdpTcpServerPort + (rand() % 10) + 1);
+        //printf("SdpTcpServerPort = %d(DEC)\n", htons(ServerAddr.sin6_port));
+        if(bind(TcpSock, (struct sockaddr *)&ServerAddr, sizeof(struct sockaddr_in6)) < 0)
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "V2gTcpConnected: Fail to bind TcpSock (%s), SdpTcpServerPort = %d",
+                    strerror(errno),
+                    EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active
+                    );
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+            //Change to another TCP port
+            /*
+            memset(&ServerAddr, 0, sizeof(struct sockaddr_in));
+            ServerAddr.sin6_family = PF_INET6;
+            ServerAddr.sin6_addr = in6addr_any;
+            //ServerAddr.sin6_port = htons(SdpTcpServerPort + (rand() % 1000) + 1);
+            ServerAddr.sin6_port = htons(EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active);
+            */
+            if(bind(TcpSock, (struct sockaddr *)&ServerAddr, sizeof(struct sockaddr_in6)) < 0)
+            {
+                sprintf((char*)buf_log_evcomm,
+                        "V2gTcpConnected: Fail to bind TcpSock (%s), SdpTcpServerPort = %d",
+                        strerror(errno),
+                        EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active
+                        );
+                SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+                usleep(100000); //100ms
+                close(TcpSock);
+                TcpSock = -1;
+                return 0;
+            }
+        }
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]blid: DONE");
+
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]listen: START");
+
+        if(listen(TcpSock, 1) == -1)     //only accept one connection
+        {
+            sprintf((char*)buf_log_evcomm,
+                    "V2gTcpConnected: Fail to listen TcpSock (%s)",
+                    strerror(errno));
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+            usleep(100000); //100ms
+
+            close(TcpSock);
+            TcpSock = -1;
+            return 0;
+        }
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]listen: DONE");
+
+        sprintf((char*)buf_log_evcomm, "[TCP]TcpSock: opened(%d), port=%d", TcpSock, htons(ServerAddr.sin6_port));
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]accept: START");
+    }
+    Rtn = sizeof(struct sockaddr_in6);
+    if((AcceptFd = accept(TcpSock, (struct sockaddr *)&ClientAddr, (socklen_t *)&Rtn)) == -1)
+    {
+        static BOOL tmp = 0;
+        if (tmp == 0)
+        {
+            SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]Wait TCP connection...");
+            tmp = 1;
+        }
+        else
+        {
+            //DEBUG_PRINTF_EVCOMM_DETAIL(".");
+        }
+        return 0;
+    }
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[TCP]accept: DONE\n");
+
+    #if (DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE)
+    {
+        DEBUG_PRINTF_EVCOMM_DETAIL("\n\nAccept one TCP connection:\n");
+        DEBUG_PRINTF_EVCOMM_DETAIL("AcceptFd=%d\n",AcceptFd);
+        DEBUG_PRINTF_EVCOMM_DETAIL("ClientAddress=");
+
+        for(Rtn = 0; Rtn < 16; Rtn += 2)
+        {
+            DEBUG_PRINTF_EVCOMM_DETAIL("%02x%02x:", ClientAddr.sin6_addr.s6_addr[Rtn], ClientAddr.sin6_addr.s6_addr[Rtn+1]);
+        }
+        DEBUG_PRINTF_EVCOMM_DETAIL("\n");
+        DEBUG_PRINTF_EVCOMM_DETAIL("ClientPort=%d\n", ClientAddr.sin6_port);
+    }
+    #endif
+
+    return AcceptFd;
+}
+
+/*===========================================================================
+FUNCTION: End_Process
+DESCRIPTION:
+PRE-CONDITION:
+        1. <CAUTION> This function could only be used in SeccComm fork2.
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int End_Process()
+{
+    if(EVCOMM_SYS_INFO.End_Process_inused == TRUE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "End_Process has been triggered by another event.");
+        return -1;
+    }
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "Entering...");
+
+    //STEP 1: Ask CSU to Stop
+    EVCOMM_SYS_INFO.End_Process_inused = TRUE;
+    CSUCOMMDC_TASK_FLAG.Send_EVStopReq = TRUE;
+    EVCOMM_SYS_INFO.ConnectorLocked = FALSE;
+    ShmInternalComm->ChargingPermission = FALSE;
+
+    //Step 2: Close sockets
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "Close sockets...");
+    if(RawSock > 0)
+    {
+        close(RawSock);
+    }
+    if(UdpSock > 0)
+    {
+        close(UdpSock);
+    }
+    if(TcpSock > 0)
+    {
+        close(TcpSock);
+        close(TcpAcceptFd);
+    }
+    RawSock = UdpSock = TcpSock = TcpAcceptFd = -1;
+
+    //STEP 3: Switch to State E
+    //SwitchCpStateE(ENABLE);
+
+    //STEP 4: Close tcpdump
+    Sniffer_Tcpdump(DISABLE);
+
+    //STEP 5: Keep 100% PWM for 5 seconds
+    OutputCpPwmDuty(100);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 100\% countdown: 5");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 100\% countdown: 4");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 100\% countdown: 3");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 100\% countdown: 2");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 100\% countdown: 1");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "PWM 100\% countdown: 0");
+
+    AttenProfileCnt = 0;
+    init_appHandEXIDocument(&ccs_handshake);
+    //Qca7kPowerReset();  //reset QCA7000
+
+    #if (FIRMWARE_VERSION_COMPILE_SETTING_RELEASE_MODE == DISABLE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[End_Process]1st sync...");
+        system("sync");
+    }
+    #endif
+
+    //STEP 4: Switch to State E
+    //Keep State E for 5 seconds
+    #if 0
+    SwitchCpStateE(ENABLE); //Set PWM Duty as 0 and set State as E (0V)
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "State E countdown: 5");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "State E countdown: 4");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "State E countdown: 3");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "State E countdown: 2");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "State E countdown: 1");
+    sleep(1);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "State E countdown: 0");
+    #endif
+
+    //Reset Memory
+    unsigned char SlaveAddress_backup;
+    unsigned int matched_backup;
+    //unsigned char state_backup;
+
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "Soft reset (closing SeccComm)...");
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "---------------------------------------------");
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "--               EVCOMM: END               --");
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "---------------------------------------------\n");
+
+    #if (FIRMWARE_VERSION_COMPILE_SETTING_RELEASE_MODE == DISABLE)
+    {
+        SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "2nd sync...");
+        system("sync");
+    }
+    #endif
+
+    system("sleep 1");
+
+    //Backup CsuComm flags
+    SlaveAddress_backup = ShmInternalComm->SlaveAddress;
+    matched_backup = CSUCOMMDC_TASK_FLAG.matched;
+    //state_backup = Check_V2G_Flow_Status();
+
+    memset(V2gtpMsgRxBuf, 0, V2GTP_MSG_RX_BUFFER_SIZE);
+    memset(V2gtpMsgTxBuf, 0, V2GTP_MSG_TX_BUFFER_SIZE);
+    memset(&ccs_handshake, 0, sizeof(struct appHandEXIDocument));
+    memset(&ccs_exi_doc_DIN, 0, sizeof(struct dinEXIDocument));
+    memset(V2GTP_Tx_buf, 0, V2GTP_MSG_TX_BUFFER_SIZE);
+    memset(buf_log_evcomm, 0, sizeof(buf_log_evcomm));
+    memset(ShmStatusCodeData, 0, sizeof(struct StatusCodeData));
+    memset(ShmInternalComm, 0, sizeof(struct InternalComm));
+    memset(ShmCcsData, 0, sizeof(struct CcsData));
+
+    //Resume CsuComm flags
+    ShmInternalComm->SlaveAddress = SlaveAddress_backup;
+    CSUCOMMDC_TASK_FLAG.matched = matched_backup;
+    Sniffer_Candump(DISABLE);
+    Sniffer_Candump(ENABLE);
+    //memset(ShmSysConfigAndInfo, 0, sizeof(struct SysConfigAndInfo)); //EVCOMM_SYS_INFO.End_Process_inused = FALSE;
+    //EVCOMM_SYS_INFO.End_Process_inused = TRUE;
+    //Update_V2G_Flow_Status(state_backup);
+    //CP_Detection_Pid = 0;
+    //PP_Detection_Pid = 0;
+    //Error_Monitor_Pid = 0;
+    //system("cd /root;./reset_soft.sh");
+    system("pkill Module_CCS");
+    while(1)
+    {
+        //wait for CSU configrm
+    }
+}
+
+
+/*===========================================================================
+FUNCTION: Parameters_Init
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Parameters_Init()
+{
+    //Step 0: Generate random number
+    unsigned int value_random;
+    struct timeb time_seed;
+    ftime(&time_seed);
+    srand(time_seed.millitm);
+
+    //Step 1: Init SDP TCP Port
+    value_random = rand();
+    EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active = (unsigned short)(SdpTcpServerPort + (value_random % 10000) + 1);
+
+    sprintf((char*)buf_log_evcomm,
+            "[Init]TCP Port:OK(%d)",
+            EVCOMM_SYS_INFO.SDP_TCP_Server_Port_active);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+    //Step 2: Init SessionID
+    value_random = rand();
+    memcpy(&EVCOMM_SYS_INFO.SessionID[0], &value_random, 4);
+
+    value_random = rand();
+    memcpy(&EVCOMM_SYS_INFO.SessionID[4], &value_random, 4);
+
+    sprintf((char*)buf_log_evcomm,
+            "[Init]SessionID:OK(%02X%02X%02X%02X%02X%02X%02X%02X)",
+            EVCOMM_SYS_INFO.SessionID[0],
+            EVCOMM_SYS_INFO.SessionID[1],
+            EVCOMM_SYS_INFO.SessionID[2],
+            EVCOMM_SYS_INFO.SessionID[3],
+            EVCOMM_SYS_INFO.SessionID[4],
+            EVCOMM_SYS_INFO.SessionID[5],
+            EVCOMM_SYS_INFO.SessionID[6],
+            EVCOMM_SYS_INFO.SessionID[7]);
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: main
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int main(int argc, char *argv[])
+{
+    //unsigned char Rtn;
+
+    //Initialization
+    ShareMemory_Init();
+    memset(ShmSysConfigAndInfo, 0, sizeof(struct SysConfigAndInfo));
+
+    if(RawSock > 0)
+    {
+        close(RawSock);
+    }
+    if(UdpSock > 0)
+    {
+        close(UdpSock);
+    }
+    if(TcpSock > 0)
+    {
+        close(TcpSock);
+    }
+
+    RawSock = UdpSock = TcpSock = -1;
+    Update_V2G_Flow_Status(IDLE);
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "---------------------------------------------");
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "--               EVCOMM: START             --");
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "---------------------------------------------");
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "init...");
+
+    //Init V2G TCP/IPv6 packets buffer
+    V2gtpMsgRxBuf = (unsigned char *)malloc(V2GTP_MSG_RX_BUFFER_SIZE);
+    memset(V2gtpMsgRxBuf, 0, V2GTP_MSG_RX_BUFFER_SIZE);
+
+    V2gtpMsgTxBuf = (unsigned char *)malloc(V2GTP_MSG_TX_BUFFER_SIZE);
+    memset(V2gtpMsgTxBuf, 0, V2GTP_MSG_TX_BUFFER_SIZE);
+
+    //Release State E Control
+    SwitchCpStateE(DISABLE);
+    OutputCpPwmDuty(100);
+
+    //start to detect CP pilot state
+    CP_Detection_Pid = 0;
+    CP_Detection();     //fork1
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork1]CP Detection: ON");
+
+    //start to detect errors
+    Error_Monitor();    //fork2
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork2]Error Monitor: ON");
+
+    //start to detect PP
+    PP_Detection_Pid = 0;
+    #if (PP_PROTECTION_MECHANISM == ENABLE)
+    PP_Detection();
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork3]PP Detection: ON");
+    #else
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[fork3]PP Detection: OFF");
+    #endif
+
+    //Init communication parameters
+    GetEthMac((uint8_t*)QcaInterface, CsuMac);
+
+    AttenProfileCnt = 0;
+    init_appHandEXIDocument(&ccs_handshake);
+
+    //Init Energy transfer mode
+    //[To-Do] Parsing Model Name
+    ShmCcsData->EnergyTransferMode = CCS_ENERGY_TRANSFER_MODE;
+
+    //struct ChargingInfoData *ccs;
+    //ccs = &ShmSysConfigAndInfo->SysInfo.CcsChargingData[0];
+
+    Parameters_Init();
+    Sniffer_Tcpdump(ENABLE);
+    #if (TCPDUMP_PACKETS_SNIFFER_SWITCH == ENABLE)
+    sleep(1); //wait for tcpdump getting ready
+    #endif
+
+    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", "[Init]DONE");
+
+    while(1)
+    {
+        //DEBUG_PRINTF_EVCOMM_DETAIL("\nV2gFlowStatus = %d\n", V2gFlowStatus);
+        //if((ShmInternalComm->ChargingPermission == 0x01) && (CheckConnectorPlugIn() == 1))
+        //if((CheckConnectorPlugIn() == TRUE) && (ShmInternalComm->ChargingPermission == TRUE))
+        //if(ShmInternalComm->ChargingPermission == 0x01)
+        //if(CheckConnectorPlugIn() == TRUE)
+        if (EVCOMM_SYS_INFO.End_Process_inused == FALSE)
+        {
+            if(V2gFlowStatus < SLACC_SDP_UDP_Connection)
+            {
+                SlacComm();
+            }
+            else if(V2gFlowStatus == SLACC_SDP_UDP_Connection)
+            {
+                if(SdpUdpConnected() == 1)
+                {
+                    Update_V2G_Flow_Status(SLACC_SDP_TCP_Connection);
+                    continue;
+                }
+                SlacComm(); //TC_SECC_VTB_CmSlacMatch_004
+                ftime(&SeqEndTime);
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_match_join)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait SLACC_SDP_UDP_Connection Timeout - TT_match_join (%.02lf of %d ms)\n",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            TT_match_join);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_SLACC_SDP_UDP_TT_match_join (023823)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 3;
+                    //CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                    Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+                }
+            }
+            else if(V2gFlowStatus == SLACC_SDP_TCP_Connection)
+            {
+                if((TcpAcceptFd = V2gTcpConnected()) > 0)
+                {
+                    Update_V2G_Flow_Status(SupportedAppProtocolRequest);
+                    ftime(&EVCOMM_SYS_INFO.V2G_SECC_Sequence_Timer_Start);
+                    continue;
+                }
+                SlacComm();
+                ftime(&SeqEndTime);
+
+                if(DiffTimeb(SeqStartTime, SeqEndTime) > TT_match_join)
+                {
+                    sprintf((char*)buf_log_evcomm,
+                            "Wait SLACC_SDP_TCP_Connection Timeout - TT_match_join (%.02lf / %d ms)",
+                            DiffTimeb(SeqStartTime, SeqEndTime),
+                            TT_match_join);
+                    SAVE_SYS_LOG_MSG_EVCOMM("%s\n", buf_log_evcomm);
+                    Update_V2G_Flow_Status(Sequence_Timeout);
+                    //Update_ShmStatusCode(); //[To-Do] to be implemented
+                    //CCS_SECC_TIMEOUT_SLACC_SDP_TCP_TT_match_join (023824)
+                    ShmStatusCodeData->PresentStatusCode[0][0] = 0;
+                    ShmStatusCodeData->PresentStatusCode[0][1] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][2] = 3;
+                    ShmStatusCodeData->PresentStatusCode[0][3] = 8;
+                    ShmStatusCodeData->PresentStatusCode[0][4] = 2;
+                    ShmStatusCodeData->PresentStatusCode[0][5] = 4;
+                    //CSUCOMMDC_TASK_FLAG.EV_Stop_Type_Emergency = TRUE;
+                    Proc_EVStopRes(ShmInternalComm->FD_CAN_Socket);
+                }
+            }
+            else if(V2gFlowStatus <= SessionStopResponse)
+            {
+                if (V2gComm(TcpAcceptFd) < 0)
+                {
+                    //error occours
+                }
+            }
+            else if (V2gFlowStatus >= Performance_Timeout)
+            {
+                //End_Process
+            }
+            else
+            {
+                //null
+            }
+        }
+    } //while
+}//main while

+ 243 - 0
EVSE/Projects/AW-CCS/Apps/CCS/Module_CCS.h

@@ -0,0 +1,243 @@
+/*
+ * Module_CCS.h
+ *
+ *  Created on: 2020¦~3¤ë16¤é
+ *      Author: foluswen
+ */
+
+#ifndef MODULE_CCS_H_
+#define MODULE_CCS_H_
+
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<sys/socket.h>
+#include 	<netinet/in.h>
+#include 	<net/if.h>
+#include 	<net/ethernet.h>
+#include 	<linux/if_packet.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>
+#include    <stdlib.h>
+#include    <unistd.h>
+#include    <fcntl.h>
+#include    <errno.h>
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+
+#include 	"SystemLogMessage.h"
+#include 	"NidNmk.h"
+#include	"v2g/api/api.h"
+#include	"v2g/transport/v2gtp.h"
+
+
+#define SAVE_SYS_LOG_MSG_EVCOMM_SWITCH		ENABLE
+#define DEBUG_PRINTF_EVCOMM_SHOW			ENABLE
+#define DEBUG_PRINTF_EVCOMM_BRIEF_SHOW		ENABLE
+#define DEBUG_PRINTF_EVCOMM_DETAIL_SHOW		ENABLE
+#define	DEBUG_PRINTF_EVCOMM_SYSTEM_LOG_SHOW	ENABLE
+
+
+#define V2GT_MSG_PROTOCOL_DIN70121                  0
+#define V2GT_MSG_PROTOCOL_ISO15118_2014             1    //i.e. ISO15118-2 (ISO 1)
+#define V2GT_MSG_PROTOCOL_ISO15118_2018             2    //i.e. ISO15118-20 (ISO 2)
+
+#define	QcaInterface						"eth1"
+#define SupportBcbToggle
+#define	SdpUdpServerPort					15118
+#define	SdpTcpServerPort					59438		//49152-65535
+#define	IPV6_LINK_LOCAL_PREFIX				0xFE80
+#define V2GTP_MSG_RX_BUFFER_SIZE            (64*1024)   //65,536 = 65.5KB
+#define V2GTP_MSG_TX_BUFFER_SIZE            (64*1024)   //65,536 = 65.5KB
+#define V2GTP_MSG_HEADER_LENGTH             8           //8 Bytes
+
+/***********************************************/
+/*********** Ethernet Type ********************/
+/**********************************************/
+#define EtherType_HomePlug					0x88E1
+
+/***********************************************/
+/*** MMTYPE (Management Message Type) **/
+/**********************************************/
+#define MMTYPE_CM_SET_KEY_REQ				0x6008
+#define MMTYPE_CM_SET_KEY_CNF				0x6009
+#define MMTYPE_CM_SLAC_PARM_REQ				0x6064
+#define MMTYPE_CM_SLAC_PARM_CNF				0x6065
+#define MMTYPE_CM_START_ATTEN_CHAR_IND		0x606A
+#define MMTYPE_CM_MNBC_SOUND_IND			0x6076
+#define MMTYPE_CM_ATTEN_CHAR_IND			0x606E
+#define MMTYPE_CM_ATTEN_CHAR_RSP			0x606F
+#define MMTYPE_CM_VALIDATE_REQ				0x6078
+#define MMTYPE_CM_VALIDATE_CNF				0x6079
+#define MMTYPE_CM_SLAC_MATCH_REQ			0x607C
+#define MMTYPE_CM_SLAC_MATCH_CNF			0x607D
+#define MMTYPE_CM_ATTEN_PROFILE_IND			0x6086
+//following are the vendor specific type
+#define MMTYPE_VENDOR_VS_HOST_ACTION	 	0xA062		//Embedded Host Action Requested Indication MME
+#define MMTYPE_VENDOR_ATTEN_CHAR			0xA14E		//Attenuation Characteristics MME (VS_ATTEN_CHAR)
+#define MMTYPE_VENDOR_VS_NW_INFO			0xA038		//Network Info MME
+#define MMTYPE_VENDOR_VS_NW_INFO_CNF		0xA039		//Network Info MME
+
+/***********************************************/
+/************** V2GTP Payload Type ************/
+/**********************************************/
+#define V2GTP_PAYLOAD_TYPE_SDP_REQUEST		0x9000		//SDP request message
+#define V2GTP_PAYLOAD_TYPE_SDP_RESPONSE		0x9001		//SDP response message
+#define V2GTP_PAYLOAD_TYPE_EXI_MSG			0x8001		//EXI encoded V2G Message
+//Payload
+#define SDP_PAYLOAD_SECURITY_TLS			0x00		//0x00 = secured with TLS
+#define SDP_PAYLOAD_SECURITY_NONE			0x10		//0x10 = No transport layer security
+#define SDP_PAYLOAD_TRANS_PROTOCOL_TCP		0x00		//0x00= TCP
+#define SDP_PAYLOAD_TRANS_PROTOCOL_UDP		0x10		//0x10 = reserved for UDP
+
+/***********************************************/
+/****** Timing and constant values **********/
+/*********** [2015] ISO 15118_3 ***************/
+/**********************************************/
+//#define TT_EVSE_match_MNBC                  600         //unit: 1ms (default: 600ms)
+#define TT_EVSE_match_MNBC                  (600+400)   //unit: 1ms (default: 600ms)
+#define C_EV_match_MNBC                     0x0A
+#define TT_EVSE_SLAC_init                   50          //unit: sec.
+#define TT_match_sequence                   400         //unit: ms
+#define TP_match_response                   100         //unit: ms, General performance time for a response to a request
+#define TT_match_response                   (200*3)     //unit: ms, Time that the EV/EVSE shall wait for a response from the EVSE/EV
+#define TP_EV_batch_msg_interval            (50*3)      //unit: ms
+#define TT_EVSE_match_session               10000       //unit: ms
+#define TT_match_join                       (12000*2)   //unit: ms
+
+#define V2G_SECC_ReadyToCharge_Performance_Time             148000  //unit: ms (148 sec)
+#define V2G_SECC_CommunicationSetup_Performance_Time        18000   //unit: ms (18 sec)
+#define V2G_SECC_ChargingParameter_Performance_Time         60000   //unit: ms (60 sec)
+//#define V2G_SECC_ChargingParameter_Performance_Time       120000   //unit: ms (120 sec)
+#define V2G_SECC_CableCheck_Performance_Time                38000   //unit: ms (38 sec)
+//#define V2G_SECC_CableCheck_Performance_Time              60000   //unit: ms (extend to 60 sec)
+//#define V2G_SECC_PreCharge_Performance_Time                 5000    //unit: ms (5 sec)
+#define V2G_SECC_PreCharge_Performance_Time                 10000   //unit: ms (extend to 10 sec)
+#define V2G_SECC_WeldingDetection_Performance_Time          20000   //unit: ms (20 sec)
+#define V2G_SECC_CPState_Detection_Timeout                  1500    //unit: ms (1.5 sec)
+#define V2G_SECC_CPOscillator_Retain_Timeout                1500    //unit: ms (1.5 sec)
+
+#define V2G_EVCC_Msg_Timeout_SupportedAppProtocolReq        2000    //unit: ms (1.5 sec)
+#define V2G_EVCC_Msg_Timeout_SessionSetupReq                2000    //unit: ms (1.5 sec)
+#define V2G_EVCC_Msg_Timeout_ServiceDiscoveryReq            2000
+#define V2G_EVCC_Msg_Timeout_ServicePaymentSelectionReq     2000
+#define V2G_EVCC_Msg_Timeout_ContractAuthenticationReq      2000
+#define V2G_EVCC_Msg_Timeout_ChargeParameterDiscoveryReq    2000
+#define V2G_EVCC_Msg_Timeout_PowerDeliveryReq               2000
+#define V2G_EVCC_Msg_Timeout_CableCheckReq                  2000
+#define V2G_EVCC_Msg_Timeout_PreChargeReq                   2000
+#define V2G_EVCC_Msg_Timeout_CurrentDemandReq               25
+#define V2G_EVCC_Msg_Timeout_WeldingDetectionReq            2000
+#define V2G_EVCC_Msg_Timeout_SessionStopReq                 2000
+#define V2G_SECC_Sequence_Timeout                           60000   //unit: ms (default: 60000, i.e. 60 sec)
+#define V2G_SECC_QCA7000_GET_MAC_ADDR_REQ_RETRY_PERIOD      3000    //unit: ms (default: 3000, i.e. 3 sec)
+#define V2G_SECC_QCA7000_SEND_SET_KEY_PERIOD                2000    //unit: ms (default: 2000, i.e. 2 sec)
+#define V2G_SECC_QCA7000_COMM_TIMEOUT                       10000   //unit: ms (default: 10000, i.e. 20 sec)
+//[To-Do] to be continued. (DIN 70121, Table 75)
+
+#define V2G_SECC_CP_Timeout_CableCheck                      2000    //unit: ms (default: 2 sec)
+
+#define DIN_SPEC_70121_2012_VersionNumberMajor              2
+#define DIN_SPEC_70121_2012_VersionNumberMinor              0
+#define ISO1_15118_2013_VersionNumberMajor                  2
+#define ISO1_15118_2013_VersionNumberMinor                  0
+#define ISO2_15118_2018_VersionNumberMajor                  2
+#define ISO2_15118_2018_VersionNumberMinor                  0
+
+
+//Protocol format : Message ID
+#define CAN_CMD_ADDRESS_REQUEST                     0x00000100
+#define CAN_CMD_ADDRESS_ASSIGN                      0x00000200
+#define CAN_CMD_EV_BOARD_STATUS                     0x00000300
+#define CAN_CMD_GET_FW_VERSION                      0x00000400
+#define CAN_CMD_GET_HW_VERSION                      0x00000500
+#define CAN_CMD_CHARGING_PERMISSION                 0x00000600
+#define CAN_CMD_EVSE_OUTPUT_STATUS_ANNOUNCEMENT     0x00000700
+#define CAN_CMD_EVSE_CAPACITY_ANNOUNCEMENT          0x00000800
+#define CAN_CMD_GET_EV_TARGET_INFO                  0x00000900
+#define CAN_CMD_GET_EV_BATTERY_INFO                 0x00000A00
+#define CAN_CMD_EV_STOP_EVENT                       0x00000B00
+#define CAN_CMD_EVSE_STOP_EVENT                     0x00000C00
+#define CAN_CMD_GET_MISC_INFO                       0x00000D00
+#define CAN_CMD_DOWNLOAD_REQUEST                    0x00000E00
+#define CAN_CMD_START_BLOCK_TRANSFER                0x00000F00
+#define CAN_CMD_DATA_TRANSFER                       0x00001000
+#define CAN_CMD_DOWNLOAD_FINISH                     0x00001100
+#define CAN_CMD_ISOLATION_STATUS                    0x00001200
+#define CAN_CMD_CCS_CONNECTOR_INFO                  0x00001300
+#define CAN_CMD_RTC_INFO                            0x00001400
+#define CAN_CMD_EVSE_PRECHARGE_INFO                 0x00001500
+#define CAN_CMD_EVCCID_REQUEST                      0x00001600
+#define CAN_CMD_PCBA_TEST                           0x0000AA00
+
+/***********************************************/
+/*************** Structure *********************/
+/**********************************************/
+struct MmeHeader
+{
+    unsigned char ODA[6];           //Original Destination Address
+    unsigned char OSA[6];           //Original source Address
+    //unsigned int VLAN Tag;        //IEEE802.1Q VLAN Tag (optional)
+    unsigned short MTYPE;           //Ethernet Type for HomePlug, should be 0x88E1
+    unsigned char MMV;              //Management Message Version
+    unsigned short MMTYPE;          //Management Message Type
+    unsigned char FMI[2];           //Fragmentation Management Information, Fragmentation Message Sequence Number
+    unsigned char MMENTRY[256];     //Management Message Entry Data
+} __attribute__((packed));
+
+//Qualcomm Atheros Vendor Specific MME Format
+struct QcaVendorMmeHeader
+{
+    unsigned char ODA[6];           //Original Destination Address
+    unsigned char OSA[6];           //Original source Address
+    //unsigned int VLAN Tag;        //IEEE802.1Q VLAN Tag (optional)
+    unsigned short MTYPE;           //Ethernet Type for HomePlug, should be 0x88E1
+    unsigned char MMV;              //Management Message Version
+    unsigned short MMTYPE;          //Management Message Type
+    unsigned char OUI[3];           //Fragmentation Management Information, Fragmentation Message Sequence Number
+    unsigned char MBODY[1024];      //Management Message Entry Data
+} __attribute__((packed));
+
+struct V2gtpHeader                          //8 Bytes (see Figure 25 in DIN 70121)
+{
+    unsigned char ProtocolVersion;          //0x01: V2GTP version 1, 0x00, 0x02-0xFF reserved
+    unsigned char InverseProtocolVersion;   //Equals the <Protocol_Version> XOR 0xFF, 0xFE: V2GTP Version 1
+    unsigned short PayloadType;             //0x8001:	EXI encoded V2G Message,
+                                            //0x9000:	SDP request message,
+                                            //0x9001:	SDP response message,
+                                            //0xA000 - 0xFFFF:	Manufacturer specific use
+    unsigned int PayloadLength;             //excluding the generic V2GTP header byte
+} __attribute__((packed));
+
+typedef struct MODULE_INFO
+{
+	struct timeb	startTime[10];
+	uint8_t 	    QCA7K_SetKey_status;
+}Module_Info;
+
+int Proc_din_supportedAppProtocolRes(int AcceptFd);
+void SHM_Init_din_ChargeParameterDiscoveryRes(struct CcsData *shm_ccs);
+void SHM_Init_din_CableCheckRes(struct CcsData *shm_ccs);
+void SHM_Init_din_PreChargeRes(struct CcsData *shm_ccs);
+void SHM_Init_din_PowerDeliveryRes(struct CcsData *shm_ccs);
+void SHM_Init_din_CurrentDemandRes(struct CcsData *shm_ccs);
+void SHM_Init_din_WeldingDetectionRes(struct CcsData *shm_ccs);
+void SHM_Init_din_SessionStopRes(struct CcsData *shm_ccs);
+int OutputCpPwmDuty(unsigned char Duty);
+void Check_EVErrorCode(int code);
+unsigned char Check_V2G_Flow_Status_pre();
+int End_Process();
+int SdpUdpConnected();
+int V2gTcpConnected();
+
+
+
+#endif /* MODULE_CCS_H_ */

+ 303 - 0
EVSE/Projects/AW-CCS/Apps/CCS/NidNmk.c

@@ -0,0 +1,303 @@
+/*===========================================================================
+                    Combined Charging System (CCS): SECC
+                                NidNmk.c
+
+                        initiated by Vern, Joseph
+                           (since 2019/07/19)
+=============================================================================*/
+#include <time.h>
+#include <sys/time.h>
+#include "NidNmk.h"
+
+/*===========================================================================
+FUNCTION: StoreLogMsg
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+
+
+void HPAVKeyNMK(uint8_t NMK [], const char *string)
+
+{
+    struct sha256 sha256;
+    uint8_t digest [SHA256_DIGEST_LENGTH];
+    const uint8_t secret [] =
+    {
+        0x08,
+        0x85,
+        0x6D,
+        0xAF,
+        0x7C,
+        0xF5,
+        0x81,
+        0x86
+    };
+    unsigned rehash = 999;
+
+    SHA256Reset(&sha256);
+    SHA256Write(&sha256, string, strlen(string));
+    SHA256Write(&sha256, secret, sizeof(secret));
+    SHA256Fetch(&sha256, digest);
+
+    while(rehash--)
+    {
+        SHA256Reset(&sha256);
+        SHA256Write(&sha256, digest, sizeof(digest));
+        SHA256Fetch(&sha256, digest);
+    }
+
+    memcpy(NMK, digest, HPAVKEY_NMK_LEN);
+    return;
+}
+
+
+void HPAVKeyNID(uint8_t NID[], const uint8_t NMK[], uint8_t level)
+{
+    struct sha256 sha256;
+    uint8_t digest [SHA256_DIGEST_LENGTH];
+    unsigned int rehash = 4;
+
+    SHA256Reset(&sha256);
+    SHA256Write(&sha256, NMK, HPAVKEY_NMK_LEN);
+    SHA256Fetch(&sha256, digest);
+
+    while(rehash--)
+    {
+        SHA256Reset(&sha256);
+        SHA256Write(&sha256, digest, sizeof(digest));
+        SHA256Fetch(&sha256, digest);
+    }
+
+    #if 1
+
+        level <<= 4;
+        digest [HPAVKEY_NID_LEN - 1] >>= 4;
+        digest [HPAVKEY_NID_LEN - 1] |= level;
+
+    #else
+
+        digest [HPAVKEY_NID_LEN - 1] &= ~0xC0;
+        digest [HPAVKEY_NID_LEN - 1] |= level << 6;
+
+    #endif
+
+    memcpy(NID, digest, HPAVKEY_NID_LEN);
+
+    return;
+}
+
+void SHA256Reset(struct sha256 *sha256)
+
+{
+    memset(sha256, 0, sizeof(struct sha256));
+    sha256->state [0] = 0x6A09E667;
+    sha256->state [1] = 0xBB67AE85;
+    sha256->state [2] = 0x3C6EF372;
+    sha256->state [3] = 0xA54FF53A;
+    sha256->state [4] = 0x510E527F;
+    sha256->state [5] = 0x9B05688C;
+    sha256->state [6] = 0x1F83D9AB;
+    sha256->state [7] = 0x5BE0CD19;
+    sha256->extra [0] = 0x80;
+    return;
+}
+
+void SHA256Block(struct sha256 *sha256, void const *memory)
+{
+    static const uint32_t K [sizeof(sha256->block)] =
+    {
+        0x428A2F98,
+        0x71374491,
+        0xB5C0FBCF,
+        0xE9B5DBA5,
+        0x3956C25B,
+        0x59F111F1,
+        0x923F82A4,
+        0xAB1C5ED5,
+        0xD807AA98,
+        0x12835B01,
+        0x243185BE,
+        0x550C7DC3,
+        0x72BE5D74,
+        0x80DEB1FE,
+        0x9BDC06A7,
+        0xC19BF174,
+        0xE49B69C1,
+        0xEFBE4786,
+        0x0FC19DC6,
+        0x240CA1CC,
+        0x2DE92C6F,
+        0x4A7484AA,
+        0x5CB0A9DC,
+        0x76F988DA,
+        0x983E5152,
+        0xA831C66D,
+        0xB00327C8,
+        0xBF597FC7,
+        0xC6E00BF3,
+        0xD5A79147,
+        0x06CA6351,
+        0x14292967,
+        0x27B70A85,
+        0x2E1B2138,
+        0x4D2C6DFC,
+        0x53380D13,
+        0x650A7354,
+        0x766A0ABB,
+        0x81C2C92E,
+        0x92722C85,
+        0xA2BFE8A1,
+        0xA81A664B,
+        0xC24B8B70,
+        0xC76C51A3,
+        0xD192E819,
+        0xD6990624,
+        0xF40E3585,
+        0x106AA070,
+        0x19A4C116,
+        0x1E376C08,
+        0x2748774C,
+        0x34B0BCB5,
+        0x391C0CB3,
+        0x4ED8AA4A,
+        0x5B9CCA4F,
+        0x682E6FF3,
+        0x748F82EE,
+        0x78A5636F,
+        0x84C87814,
+        0x8CC70208,
+        0x90BEFFFA,
+        0xA4506CEB,
+        0xBEF9A3F7,
+        0xC67178F2
+    };
+    unsigned int pass;
+    unsigned int word;
+    uint32_t H [sizeof(sha256->state) / sizeof(uint32_t)];
+    uint32_t W [sizeof(sha256->block)];
+    uint8_t *buffer = (uint8_t *)(memory);
+
+    for(word = 0; word < 16; word++)
+    {
+        W [word] = 0;
+        W [word] |= (uint32_t)(*buffer++) << 24;
+        W [word] |= (uint32_t)(*buffer++) << 16;
+        W [word] |= (uint32_t)(*buffer++) << 8;
+        W [word] |= (uint32_t)(*buffer++) << 0;;
+    }
+
+    for(; word < sizeof(sha256->block); word++)
+    {
+        uint32_t s0 = ROTR(W [word - 15], 7) ^ ROTR(W [word - 15], 18) ^ SHR(W [word - 15], 3);
+        uint32_t s1 = ROTR(W [word - 2], 17) ^ ROTR(W [word - 2], 19) ^ SHR(W [word - 2], 10);
+        W [word] = W [word - 16] + s0 + W [word - 7] + s1;
+    }
+
+    for(word = 0; word < (sizeof(sha256->state) / sizeof(uint32_t)); word++)
+    {
+        H [word] = sha256->state [word];
+    }
+
+    for(pass = 0; pass < sizeof(sha256->block); pass++)
+    {
+        uint32_t s2 = ROTR(H [0], 2) ^ ROTR(H [0], 13) ^ ROTR(H [0], 22);
+        uint32_t maj = (H [0] & H [1]) ^ (H [0] & H [2]) ^ (H [1] & H [2]);
+        uint32_t t2 = s2 + maj;
+        uint32_t s3 = ROTR(H [4], 6) ^ ROTR(H [4], 11) ^ ROTR(H [4], 25);
+        uint32_t ch = (H [4] & H [5]) ^ ((~H [4]) & H [6]);
+        uint32_t t1 = H [7] + s3 + ch + K [pass] + W [pass];
+
+        for(word = (sizeof(sha256->state) / sizeof(uint32_t)) - 1; word > 0; word--)
+        {
+            H [word] = H [word - 1];
+        }
+
+        H [0] = t1 + t2;
+        H [4] += t1;
+    }
+
+    for(word = 0; word < (sizeof(sha256->state) / sizeof(uint32_t)); word++)
+    {
+        sha256->state [word] += H [word];
+    }
+
+    return;
+}
+
+void SHA256Write(struct sha256 *sha256, void const *memory, uint16_t extent)
+
+{
+    if(extent)
+    {
+        uint8_t *buffer = (uint8_t *)(memory);
+        unsigned int left = sha256->count [0] & 0x3F;
+        unsigned int fill = sizeof(sha256->block) - left;
+        sha256->count [0] += (uint32_t)(extent);
+        sha256->count [0] &= 0xFFFFFFFF;
+
+        if(sha256->count [0] < extent)
+        {
+            sha256->count [1]++;
+        }
+
+        if((left) && (extent >= fill))
+        {
+            memcpy(sha256->block + left, buffer, fill);
+            SHA256Block(sha256, sha256->block);
+            extent -= fill;
+            buffer += fill;
+            left = 0;
+        }
+
+        while(extent >= sizeof(sha256->block))
+        {
+            SHA256Block(sha256, buffer);
+            extent -= sizeof(sha256->block);
+            buffer += sizeof(sha256->block);
+        }
+
+        if(extent)
+        {
+            memcpy(sha256->block + left, buffer, extent);
+        }
+    }
+
+    return;
+}
+void SHAEncode(uint8_t memory[], uint32_t number)
+
+{
+    *memory++ = (uint8_t)(number >> 24);
+    *memory++ = (uint8_t)(number >> 16);
+    *memory++ = (uint8_t)(number >> 8);
+    *memory++ = (uint8_t)(number >> 0);
+    return;
+}
+
+void SHA256Fetch(struct sha256 *sha256, uint8_t digest[])
+
+{
+    unsigned int word;
+    uint8_t bits [8];
+    uint32_t upper = (sha256->count [0] >> 29) | (sha256->count [1] << 3);
+    uint32_t lower = (sha256->count [0] << 3);
+    uint32_t final = (sha256->count [0] & 0x3F);
+    uint32_t extra = (final < 56) ? (56 - final) : (120 - final);
+
+    SHAEncode(&bits[0], upper);
+    SHAEncode(&bits[4], lower);
+    SHA256Write(sha256, sha256->extra, extra);
+    SHA256Write(sha256, bits, sizeof(bits));
+
+    for(word = 0; word < sizeof(sha256->state) / sizeof(uint32_t); word++)
+    {
+        SHAEncode(digest, sha256->state [word]);
+        digest += sizeof(uint32_t);
+    }
+
+    memset(sha256, 0, sizeof(struct sha256));
+    return;
+}

+ 94 - 0
EVSE/Projects/AW-CCS/Apps/CCS/NidNmk.h

@@ -0,0 +1,94 @@
+/*===========================================================================
+                    Combined Charging System (CCS): SECC
+                                 NidNmk.h
+
+                        initiated by Vern, Joseph
+                           (since 2019/07/19)
+=============================================================================*/
+
+#include <stdint.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if FIRMWARE_VERSION_COMPILE_SETTING_RELEASE_MODE == ENABLE
+//Saving System Log
+#define SAVE_SYS_LOG_MSG_NIDNMK_SWITCH         DISABLE      //ENABLE, DISABLE
+
+//Configuration for Debug Print Messages
+#define DEBUG_PRINTF_NIDNMK_SHOW               DISABLE      //ENABLE, DISABLE
+#define DEBUG_PRINTF_NIDNMK_BRIEF_SHOW         DISABLE      //ENABLE, DISABLE
+#define DEBUG_PRINTF_NIDNMK_DETAIL_SHOW        DISABLE      //ENABLE, DISABLE
+#define DEBUG_PRINTF_NIDNMK_SYSTEM_LOG_SHOW    DISABLE      //ENABLE, DISABLE
+#else //debug mode
+//Saving System Log
+#define SAVE_SYS_LOG_MSG_NIDNMK_SWITCH         ENABLE      //ENABLE, DISABLE
+
+//Configuration for Debug Print Messages
+#define DEBUG_PRINTF_NIDNMK_SHOW               ENABLE      //ENABLE, DISABLE
+#define DEBUG_PRINTF_NIDNMK_BRIEF_SHOW         ENABLE      //ENABLE, DISABLE
+#define DEBUG_PRINTF_NIDNMK_DETAIL_SHOW        ENABLE      //ENABLE, DISABLE
+#define DEBUG_PRINTF_NIDNMK_SYSTEM_LOG_SHOW    ENABLE      //ENABLE, DISABLE
+#endif
+
+typedef struct sha256
+{
+
+    uint32_t count [2];
+    uint32_t state [8];
+    uint8_t block [64];
+    uint8_t extra [64];
+
+} SHA256;
+
+#define SHA256_DIGEST_LENGTH 256 / 8
+#define HPAVKEY_NMK_LEN 16
+#define HPAVKEY_NID_LEN 7
+#define SHR(word, bits) ((word & 0xFFFFFFFF) >> bits)
+#define ROTR(word, bits) (SHR(word, bits) | (word << (32 - bits)))
+#define DEFAULT_LEVEL 0
+//--------------------------------------------------------------------------
+/* Functions -----------------------------------------------------------*/
+//--------------------------------------------------------------------------
+void HPAVKeyNMK(uint8_t NMK [], const char *string);
+void HPAVKeyNID(uint8_t NID [], const uint8_t NMK [], uint8_t level);
+void SHA256Reset(struct sha256 *sha256);
+void SHA256Block(struct sha256 *sha256, void const *memory);
+void SHA256Write(struct sha256 *sha256, void const *memory, uint16_t extent);
+void SHAEncode(uint8_t memory [], uint32_t number);
+void SHA256Fetch(struct sha256 *sha256, uint8_t digest []);
+
+//System Log
+#if SAVE_SYS_LOG_MSG_NIDNMK_SWITCH == ENABLE
+    #define SAVE_SYS_LOG_MSG_NIDNMK     StoreLogMsg
+#else
+    #define SAVE_SYS_LOG_MSG_NIDNMK(...)
+#endif
+
+//Debug Message
+#if DEBUG_PRINTF_NIDNMK_SHOW == ENABLE
+    //Brief Messages
+    #if DEBUG_PRINTF_NIDNMK_BRIEF_SHOW == ENABLE
+        #define DEBUG_PRINTF_NIDNMK_BRIEF      printf
+    #else
+        #define DEBUG_PRINTF_NIDNMK_BRIEF(...)
+    #endif
+
+    //Detail Messages
+    #if DEBUG_PRINTF_NIDNMK_DETAIL_SHOW == ENABLE
+        #define DEBUG_PRINTF_NIDNMK_DETAIL     printf
+    #else
+        #define DEBUG_PRINTF_NIDNMK_DETAIL(...)
+    #endif
+
+    //System Log Messages
+    #if DEBUG_PRINTF_NIDNMK_SYSTEM_LOG_SHOW == ENABLE
+        #define DEBUG_PRINTF_NIDNMK_SYSTEM_LOG    printf
+    #else
+        #define DEBUG_PRINTF_NIDNMK_SYSTEM_LOG(...)
+    #endif
+#else
+    #define DEBUG_PRINTF_NIDNMK_BRIEF(...)
+    #define DEBUG_PRINTF_NIDNMK_DETAIL(...)
+    #define DEBUG_PRINTF_NIDNMK_SYSTEM_LOG(...)
+#endif

+ 63 - 0
EVSE/Projects/AW-CCS/Apps/CCS/SystemLogMessage.c

@@ -0,0 +1,63 @@
+#include 	<sys/time.h>
+#include 	<sys/timeb.h>
+#include    <sys/types.h>
+#include    <sys/stat.h>
+#include 	<sys/types.h>
+#include 	<sys/ioctl.h>
+#include 	<sys/socket.h>
+#include 	<sys/ipc.h>
+#include 	<sys/shm.h>
+#include 	<sys/shm.h>
+#include 	<sys/mman.h>
+#include 	<linux/wireless.h>
+#include 	<arpa/inet.h>
+#include 	<netinet/in.h>
+
+#include 	<unistd.h>
+#include 	<stdarg.h>
+#include    <stdio.h>
+#include    <stdlib.h>
+#include    <unistd.h>
+#include    <fcntl.h>
+#include    <termios.h>
+#include    <errno.h>
+#include 	<errno.h>
+#include 	<string.h>
+#include	<time.h>
+#include	<ctype.h>
+#include 	<ifaddrs.h>
+#include	"SystemLogMessage.h"
+
+int StoreLogMsg(const char *fmt, ...)
+{
+	char Buf[4096+256];
+	char buffer[4096];
+	time_t CurrentTime;
+	struct tm *tm;
+	struct timeval tv;
+	va_list args;
+
+	va_start(args, fmt);
+	int rc = vsnprintf(buffer, sizeof(buffer), fmt, args);
+	va_end(args);
+
+	memset(Buf,0,sizeof(Buf));
+	CurrentTime = time(NULL);
+	tm=localtime(&CurrentTime);
+	gettimeofday(&tv, NULL); // get microseconds, 10^-6
+
+	sprintf(Buf,"echo -n \"[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s\" >>  /Storage/SystemLog/[%04d.%02d]CCS_SystemLog",
+			tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tv.tv_usec,
+			buffer,
+			tm->tm_year+1900,tm->tm_mon+1);
+
+#ifdef SystemLogMessage
+	system((const char*)Buf);
+#endif
+
+#ifdef ConsloePrintLog
+	printf("[%04d.%02d.%02d %02d:%02d:%02d.%06ld]%s", tm->tm_year+1900,tm->tm_mon+1,tm->tm_mday,tm->tm_hour,tm->tm_min,tm->tm_sec,tv.tv_usec, buffer);
+#endif
+
+	return rc;
+}

+ 49 - 0
EVSE/Projects/AW-CCS/Apps/CCS/SystemLogMessage.h

@@ -0,0 +1,49 @@
+#ifndef SystemLogMessage_H
+#define SystemLogMessage_H
+
+/*SystemLog message*/
+#define SystemLogMessage            //for engineer to do analysis
+#define ConsloePrintLog
+
+//System Log
+#if SAVE_SYS_LOG_MSG_EVCOMM_SWITCH == ENABLE
+    #define SAVE_SYS_LOG_MSG_EVCOMM(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#else
+    #define SAVE_SYS_LOG_MSG_EVCOMM(...)
+#endif
+
+//Debug Message
+#if DEBUG_PRINTF_EVCOMM_SHOW == ENABLE
+    //Brief Messages
+    #if DEBUG_PRINTF_EVCOMM_BRIEF_SHOW == ENABLE
+        #define DEBUG_PRINTF_EVCOMM_BRIEF(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+    #else
+        #define DEBUG_PRINTF_EVCOMM_BRIEF(...)
+    #endif
+
+    //Detail Messages
+    #if DEBUG_PRINTF_EVCOMM_DETAIL_SHOW == ENABLE
+        #define DEBUG_PRINTF_EVCOMM_DETAIL(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+    #else
+        #define DEBUG_PRINTF_EVCOMM_DETAIL(...)
+    #endif
+
+    //System Log Messages
+    #if DEBUG_PRINTF_EVCOMM_SYSTEM_LOG_SHOW == ENABLE
+        #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(format, args...) StoreLogMsg("[%s:%d][%s] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+    #else
+        #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(...)
+    #endif
+#else
+    #define DEBUG_PRINTF_EVCOMM_BRIEF(...)
+    #define DEBUG_PRINTF_EVCOMM_DETAIL(...)
+    #define DEBUG_PRINTF_EVCOMM_SYSTEM_LOG(...)
+#endif
+
+#define DEBUG_INFO(format, args...) StoreLogMsg("[%s:%d][%s][Info] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_WARN(format, args...) StoreLogMsg("[%s:%d][%s][Warn] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+#define DEBUG_ERROR(format, args...) StoreLogMsg("[%s:%d][%s][Error] "format, __FILE__, __LINE__, __FUNCTION__, ##args)
+
+int StoreLogMsg(const char *fmt, ...);
+
+#endif

+ 2488 - 0
EVSE/Projects/AW-CCS/Apps/CCS/define_ccs.h

@@ -0,0 +1,2488 @@
+/*===========================================================================
+                    Combined Charging System (CCS): SECC
+                                 define.h
+
+                        initiated by Vern, Joseph
+                           (since 2019/07/19)
+   =============================================================================*/
+
+#ifndef DEFINE_H_
+#define DEFINE_H_
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <sys/timeb.h>
+
+/**************************************************************************************/
+/*********************************NAND Flash mapping *****************************/
+/**************************************************************************************/
+/*
+   sector size	   512 KiB
+   Page size       4096 b
+   OOB size        224 b
+   Erase size      524288 b
+   -------------------------------------------------------------------------------------------------------------------------------
+   Segment                  Physical address            Size
+   -------------------------------------------------------------------------------------------------------------------------------
+   MLO						        0x00000000-0x0007FFFF		512 KB
+   Primary u-boot                   0x00080000-0x0017FFFF		1 MB
+   Environment                      0x00180000-0x001FFFFF		512 KB
+   Secondary u-boot	                0x00200000-0x002FFFFF		1 MB
+   Primary dtb				        0x00300000-0x0037FFFF		512 KB
+   Secondary dtb				    0x00380000-0x003FFFFF		512 KB
+   Primary kernel				    0x00400000-0x00DFFFFF		10 MB
+   Secondary Kernel                 0x00E00000-0x017FFFFF		10 MB
+   Primary root file system		    0x01800000-0x029FFFFF		24 MB
+   Secondary root file system	    0x03000000-0x047FFFFF		24 MB
+   Primary user configuration       0x04800000-0x004DFFFF		6 MB
+   Secondary user configuration	    0x04E00000-0x0053FFFF		6 MB
+   Factory default configuration	0x05400000-0x0059FFFF		6 MB
+   Storage					        0x05A00000-0x7FFFFFFF		1958 MB
+ */
+#define ARRAY_SIZE(A)				(sizeof(A) / sizeof(A[0]))
+#define PASS						1
+#define FAIL			   			-1
+#define ENABLE						1
+#define	DISABLE						0
+#define ON							1
+#define	OFF							0
+
+/**************************************************************************************/
+/*********************************System Limitation**********************************/
+/**************************************************************************************/
+
+#define SIZE_OF_LOG_BUFFER              256         //Bytes
+
+#define PARAMETER_NORMAL_MODE           ENABLE      //DISABLE: using sudo parameters
+                                                    //ENABLE: using CAN commands
+//For Test or Burn-in Purpose
+#define MANUAL_SET_EV_TARGET_FUNCTION           DISABLE
+#define SUDO_EV_TARGET_VOLTAGE                  500 //unit: 1V
+#define SUDO_EV_TARGET_CURRENT                  60  //unit: 1A
+
+//Configuration for CCS EVSE Process
+#define CABLECHECK_TARGET_VOLTAGE               500 //unit 1V, default: 500V
+#define CABLECHECK_TARGET_CURRENT               2   //unit: 1A, default: 2A
+#define PRECHARGE_TARGET_CURRENT                2   //unit: 1A, default: 2A
+
+//EVSE ID
+#define CCS_AC_EVSEID                           "PHIHONG_CCS_AC_001"  //max: DIN = 32, ISO1/ISO2 = 37 bytes
+#define CCS_DC_EVSEID                           "PHIHONG_CCS_DC_001"  //max: DIN = 32, ISO1/ISO2 = 37 bytes
+#define CCS_AC_METER_ID                         "ABCDE-0123456789-0123456789" //max = 32 bytes
+#define CCS_AC_SIG_METER_READING                "SIG_METER_READING_ABCDE-0123456789" //max = 64 bytes
+
+/*CCS Protocol ID*/
+#define V2GT_MSG_PROTOCOL_DIN70121                  0
+#define V2GT_MSG_PROTOCOL_ISO15118_2014             1    //i.e. ISO15118-2 (ISO 1)
+#define V2GT_MSG_PROTOCOL_ISO15118_2018             2    //i.e. ISO15118-20 (ISO 2)
+#define V2GT_MSG_PROTOCOL_HIGHEST_PRIORITY          255  //for auto detect highest priority protocol
+
+#define V2GT_MSG_PROTOCOL_PREFERENCE                V2GT_MSG_PROTOCOL_DIN70121
+#define CCS_ENERGY_TRANSFER_MODE                    MODE_AC_THREE_PHASE_CORE
+                                                    //DC: MODE_DC_EXTENDED (default)
+                                                    //AC: MODE_AC_SINGLE_PHASE_CORE, MODE_AC_THREE_PHASE_CORE
+
+#define SET_NO_PWM_IF_NOT_GET_PERMISSION                    0
+#define SET_5_PWM_ONCE_RX_CM_SLAC_PARM_REQ                  1
+#define SET_5_PWM_ONCE_GET_PERMISSION_IN_AUTHORIZATIONRES   2
+
+#define FIRMWARE_VERSION_COMPILE_SETTING_RELEASE_MODE       ENABLE  //default: ENABLE: release; DISABLE: debug
+#define NEW_SLAC_ARCHITECTURE_SWITCH                        ENABLE  //defualt: ENABLE
+#define CAN_RAMDOM_MATCHING_ID_MECHANISM                    ENABLE  //defualt: ENABLE
+#define CAN_RX_TIMEOUT_MECHANISM                            DISABLE  //defualt: ENABLE
+#define SLAC_FIRST_RESPONSE_METHOD                          SET_5_PWM_ONCE_RX_CM_SLAC_PARM_REQ
+
+#define TCPDUMP_PACKETS_SNIFFER_SWITCH                      DISABLE //default: DISABLE
+#define CANDUMP_PACKETS_SNIFFER_SWITCH                      DISABLE //default: DISABLE
+
+#define DYNAMIC_ETH0_IP_MECHANISM                           ENABLE //default: DISABLE
+#define CP_PROTECTION_MECHANISM                             ENABLE  //default: ENABLE
+#define PP_PROTECTION_MECHANISM                             DISABLE //default: DISABLE
+#define SUDO_PSD_PARAMETER_MECHANISM                        ENABLE  //default: ENABLE
+#define TESLA_SLOW_INCREASE_CURRENT_FUNCTION                DISABLE
+#define V2G_SECC_TIMEOUT_PROTECTION                         ENABLE
+#define PATCH_FOR_BMW_I3_BUG_EVSEMAXIMUMVOLTAGELIMIT_599V   ENABLE   //default: ENABLE; CE/UL: DISABLE
+
+//CSU CAN Message EV Stop Type
+#define EV_NORMAL_STOP      1
+#define EV_EMERGENCY_STOP   2
+
+//CSU CAN Message GFD Isolation Status Type
+#define GFD_Invalid       0     //ongoing
+#define GFD_Valid         1
+#define GFD_Warning       2
+#define GFD_Fault         3
+#define GFD_No_IMD        4     //for ISO 15118
+
+//Default Ethernet Port Base for eth0
+#define ETH0_PORT_BASE    20
+
+//Energy Transfer Mode
+#define MODE_AC_SINGLE_PHASE_CORE    0
+#define MODE_AC_THREE_PHASE_CORE     1
+#define MODE_DC_CORE                 2
+#define MODE_DC_EXTENDED             3
+#define MODE_DC_COMBO_CORE           4
+#define MODE_DC_UNIQUE               5
+
+/*
+   0xAaBbCcDd
+   Aa: main version
+   Bb: minor version
+   Cc:
+    0x01: UL
+    0x02: CE
+    0x03: JP
+    0x04: GB
+   Dd:
+    0x01: CCS protocol
+    0x02: CHAdeMO protocol
+    0x03: GB Protocol
+ */
+
+/*Download Image Type*/
+#define IMAGE_TYPE_KERNEL_CONFIGURATION_DTB     1
+#define IMAGE_TYPE_BOOTLOADER_UBOOT             2
+#define IMAGE_TYPE_OS_KERNEL_ZIMAGE             3
+#define IMAGE_TYPE_ROOT_FILESYSTEM_RAMDISK      4
+#define IMAGE_TYPE_ROOT_APP_ZIP                 5
+#define IMAGE_TYPE_BOOTLOADER_MLO_SPL           6
+#define IMAGE_TYPE_USER_CONFIGURATION           7
+//--- [CAUTION] To increase type ID, please modify this condition.
+//(Check_DwnldImgParameter())
+
+/*relevant to Quantity */
+#define CHAdeMO_QUANTITY    1
+#define CCS_QUANTITY        1
+#define GB_QUANTITY         1
+
+#define CSUCOMMDC_TASK_FLAG        (ShmInternalComm->InternalCommUnion.bits)
+#define CSUCOMMAC_SHM              (ShmCharger->gun_info[0].acCcsInfo)
+#define EVCOMM_SYS_INFO            (ShmSysConfigAndInfo->SysInfo.CcsChargingData[0])
+#define SLAC_INFO                  (ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].evcc_slac_data)
+#define CCS_HANDSHAKE_PROTOCOLS    (ccs_handshake.supportedAppProtocolReq.AppProtocol)
+
+#define GPIO_SYS_DIR 		       "/sys/class/gpio"
+#define GPIO_2_23_AM_IO_1          87
+
+// Debug Message
+#define DEBUG_CCS_EVEM_MESSAGE_SHOW     ENABLE
+
+#if DEBUG_CCS_EVEM_MESSAGE_SHOW == ENABLE
+    #define DEBUG_MAIN_PRINTF           printf
+    #define DEBUG_EVCOMM_PRINTF         printf
+#else
+    #define DEBUG_MAIN_PRINTF(...)
+    #define DEBUG_EVCOMM_PRINTF(...)
+#endif
+
+//Precharge Relay Status
+#define EVSE_STATUS_NOT_READY_FOR_PRECHARGE         0   //un-initialized
+#define EVSE_STATUS_READY_FOR_PRECHARGE             2   //DC+ Relay: OFF, Precharge Relay: ON
+#define EVSE_STATUS_READY_FOR_ENERGY_TRANSFER       3   //DC+ Relay: ON, Precharge Relay: OFF
+
+/**************************************************************************************/
+/**************************share memory key information***************************/
+/**************************************************************************************/
+#define ShmSysConfigAndInfoKey      3001    //0xBB9
+#define ShmCcsCommKey               3004    //0xBBC
+#define ShmStatusCodeKey            3005    //0xBBD
+#define ShmInternalCommKey          3009    //0xBC1
+
+#define ShmInternalCommACKey        2001    //0x7D1
+
+/**************************************************************************************/
+/****structure SysConfigData => shall store the data to NAND flash****************/
+/****structure SysInfoData => shall NOT store the data to NAND flash***************/
+/****according to System Configuration and Information Table.xlsx Rev.0.2 *******/
+/**************************************************************************************/
+
+struct EthConfigData
+{
+    unsigned char EthDhcpClient;                //0: enable,1: disable
+    unsigned char EthMacAddress[18];                //default: Null
+    unsigned char EthIpAddress[16];                 //Eth0 default:192.168.0.10	,Eth1 default:192.168.1.10
+    unsigned char EthSubmaskAddress[16];            //Eth0 default:255.255.255.0	,Eth1 default:255.255.255.0
+    unsigned char EthGatewayAddress[16];            //Eth0 default:192.168.0.254	,Eth1 default:192.168.1.254
+};
+
+struct WifiConfigData
+{
+    unsigned char WifiMode;                     //0: disable, 1: Infrastructure client, 2: Infrastructure server, 3: Ad-Hoc
+    unsigned char WifiSsid[256];                    //default: Null
+    unsigned char WifiPassword[256];                //default: Null
+    int WifiRssi;                               //dbm
+    unsigned char WifiDhcpServer;               //0: enable, 1: disable
+    unsigned char WifiDhcpClient;               //0: enable, 1: disable
+    unsigned char WifiMacAddress[18];           //default: Null
+    unsigned char WifiIpAddress[16];                //default:192.168.2.10
+    unsigned char WifiSubmaskAddress[16];           //default:255.255.255.0
+    unsigned char WifiGatewayAddress[16];       //default:192.168.2.254
+};
+
+struct TeleConfigData
+{
+    unsigned char TelcomApn[256];               //default: Null
+    int TelcomRssi;                         //dbm
+    unsigned char TelcomChapPapId[256];             //default: Null
+    unsigned char TelcomChapPapPwd[256];        //default: Null
+    unsigned char TelcomModemImei[16];              //default: Null
+    unsigned char TelcomSimImsi[16];                //default: Null
+    unsigned char TelcomSimStatus;                  //0: no SIM card is found, 1: valid SIM card, 2: invalid SIM card
+    unsigned char TelcomModemMode;              //0: No services, 1: CDMA, 2: GSM/GPRS, 3: WCDMA, 4: GSM/WCDMA, 5: TD_SCDMA mode, 6: Unknow
+    unsigned char TelcomIpAddress[16];              //default: Null
+};
+
+struct SysConfigData
+{
+    /**************System***************/
+    unsigned char ModelName[64];                    //charger model name
+    unsigned char SerialNumber[64];                     //charger system serial number
+    unsigned char SystemId[128];                        //charger system ID
+    unsigned char SystemDateTime[32];               //charger system date and time
+    unsigned char AuthorisationMode;                    //0: Phihong RFID tag,  1: OCPP backend,  2: Phihong backend,  3: free mode
+    unsigned char DefaultLanguage;                      //
+    unsigned char RfidCardNumEndian;                //0: little endian,  1: big endian
+    unsigned short AcPlugInTimes;                       //0~65535
+    unsigned short GbPlugInTimes;                   //0~65535
+    unsigned short Ccs1PlugInTime;                  //0~65535
+    unsigned short Ccs2PlugInTimes;                     //0~65535
+    unsigned short ChademoPlugInTimes;              //0~65535
+    /**************Charging***************/
+    unsigned short MaxChargingEnergy;               //0: no limit,	1 ~ 65535	kWh
+    unsigned short MaxChargingPower;                //0: rating value, 1 ~ RATING_POWER	kW"
+    unsigned short MaxChargingCurrent;              //0: rating value, 1 ~ RATING_CURRENT	amp"
+    unsigned short MaxChargingDuration;                 //0: no limit,	1 ~ 65535	minutes
+    unsigned char PhaseLossPolicy;                      //0: charging,  1: stop charging
+    unsigned char LocalWhiteCard[10][32];               //Max. card quantity is 10
+    unsigned char UserId[32];                       //the user use this ID to trigger charging event, it can be RFID card number, OCPP IdTag, etc.
+    /**************Network***************/
+    unsigned char FtpServer[32];                        //the ftp server for Phihong server to do data transimission
+    struct EthConfigData Eth0Interface;
+    struct EthConfigData Eth1Interface;
+    struct WifiConfigData AthInterface;
+    struct TeleConfigData TelecomInterface;
+    /**************Backend***************/
+    unsigned int BackendConnTimeout;                //default : 300s
+    unsigned char OfflinePolicy;                        //0: local list, 1: Phihong RFID tag, 2: free charging, 3: no charging
+    unsigned short OfflineMaxChargeEnergy;          //0: same as MaxChargingEnergy, 1 ~ 65535 kWh
+    unsigned short OfflineMaxChargeDuration;            //0: same as MaxChargeDuration, 1 ~ 65535 minutes
+    unsigned char OcppServerURL[512];               //http: non-secure OCPP 1.5-S, https: secure OCPP 1.5-S, ws: non-secure OCPP 1.6-J, wss: secure OCPP 1.6-J"
+    unsigned char ChargeBoxId[128];
+    unsigned int Checksum;                      //4 bytes checksum
+};
+
+#define SLAC_EVSE_MAC_LENGTH    6
+#define SLAC_EVMAC_LENGTH       6
+#define SLAC_RUNID_LENGTH       8
+#define SLAC_AAG_LENGTH         64     //ISO 15118 defines it as 0x3A, i.e. 58
+struct EVCC_SLAC_DATA_ARRAY_TYPE {
+    unsigned char EvMac[SLAC_EVMAC_LENGTH];
+    unsigned char RunID[SLAC_RUNID_LENGTH];
+    unsigned short AAG[SLAC_AAG_LENGTH];
+    unsigned char StartAttenCharCnt;
+    unsigned char StartAttenCharErr;
+    unsigned char MnbcSoundNum;
+    unsigned char MnbcSoundCnt;
+    unsigned char AttenProfileCnt;
+    unsigned char AagGroupsNum;
+    unsigned char AttenCharRspCnt;
+    unsigned char ValidateReqCnt;
+    unsigned char MatchReqNum;
+    float AAG_quality_ori;
+    float AAG_quality_refined;
+};
+
+#define EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE    20
+struct EVCC_SLAC_DATA_TYPE {
+    unsigned char arrayLen;
+    struct EVCC_SLAC_DATA_ARRAY_TYPE array[EVCC_SLAC_DATA_ARRAY_TYPE_ARRAY_SIZE];
+};
+
+struct ChargingInfoData {
+    float MaximumChargingVoltage;                   //0~6553.5 volt, unit = 1V
+    float AvailableChargingCurrent;                 //0~6553.5 amp, unit =1A
+    float AvailableChargingPower;                   //0~6553.5 kW, unit = 1KW
+    float PresentChargingVoltage;                   //0~6553.5 volt, unit = 1V
+    float PresentChargingCurrent;                   //0~6553.5 amp, unit = 1A
+    float PresentChargingPower;                     //0~6553.5 kW, unit = 1KW
+    float PresentChargedEnergy;                     //0~6553.5 kWh, unit = 1KWH
+    int PresentChargedDuration;                     // second, unit = 1s
+    int RemainChargingDuration;                     // second, unit = 1s
+    float EvBatteryMaxVoltage;                      // 0~6553.5 volt, unit = 1V
+    float EvBatteryMaxCurrent;                      //1V
+    float EvBatteryMaxPower;                        //1KW
+    float EvBatterytargetVoltage;                   // 0~6553.5 volt, unit = 1V
+    float EvBatterytargetCurrent;                   //1A
+    int EvBatterySoc;                               // 0~100%, unit = 1%
+    float EvBatteryCapacity;                        //1KWH
+    float EvBatteryEngergyRequest;                  //1KWH
+    unsigned char ConnectorPlugIn;                  //0: unplug, 1: Plug-in
+    unsigned char ConnectorLocked;                  //0: unlocked, 1:locked.
+    float CpVoltage;                                //
+    unsigned char CpState;                          //1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
+    unsigned char CpDuty;                           //0~100%
+    float PpVoltage;
+    unsigned char EVSEPrechargeStatus;              //00:not ready, 01:ready for precharge, 02: ready for engergy trnasfer (> 2A)
+    unsigned char IsolationStatus;                  //0:ongoing, 1:valid, 2:warning/fault
+    unsigned char DC_EVSEStatus;
+    unsigned char SwitchCpStateE_status;
+    unsigned char QCA7K_SetKeyDone;
+    unsigned char CpState_err;
+    unsigned char CpState_err_logged;
+    unsigned char CableCheckPreCountDownDone;
+    unsigned char End_Process_inused;
+    struct timeb V2G_SECC_CableCheck_Timer_Start;
+    struct timeb V2G_SECC_CableCheck_Timer_End;
+    struct timeb V2G_SECC_Precharge_Timer_Start;
+    struct timeb V2G_SECC_Precharge_Timer_End;
+    struct timeb V2G_SECC_CurrentDemand_Timer_Start;
+    struct timeb V2G_SECC_CurrentDemand_Timer_End;
+    struct timeb V2G_SECC_ChargingStatus_Timer_Start;
+    struct timeb V2G_SECC_ChargingStatus_Timer_End;
+    struct timeb V2G_SECC_WeldingDetection_Timer_Start;
+    struct timeb V2G_SECC_WeldingDetection_Timer_End;
+    struct timeb V2G_SECC_Sequence_Timer_Start;
+    struct timeb V2G_SECC_Sequence_Timer_End;
+    struct timeb V2G_SECC_Msg_Timer_Start;
+    struct timeb V2G_SECC_Msg_Timer_End;
+    unsigned short SDP_TCP_Server_Port_active;
+    unsigned char SessionID[8];
+    unsigned char V2G_Rx_Msg;
+    unsigned char SequenceError;
+    unsigned char SupportedAppProtocol_result;          //appHandresponseCodeType: 0,1,2
+    char CM_ATTEN_CHAR_IND_retry;
+    struct EVCC_SLAC_DATA_TYPE evcc_slac_data;
+    unsigned char State_Change_Ignored_Notice;
+    unsigned char EVCCID[8];
+    unsigned char EVCCID_length;
+    float AC_EVSENominalVoltage;                        //unit: 1V
+
+    //previous state
+    float MaximumChargingVoltage_pre;                   //0~6553.5 volt, unit = 1V
+    float AvailableChargingCurrent_pre;                 //0~6553.5 amp, unit =1A
+    float AvailableChargingPower_pre;                   //0~6553.5 kW, unit = 1KW
+    float PresentChargingVoltage_pre;                   //0~6553.5 volt, unit = 1V
+    float PresentChargingCurrent_pre;                   //0~6553.5 amp, unit = 1A
+    float PresentChargingPower_pre;                     //0~6553.5 kW, unit = 1KW
+    float PresentChargedEnergy_pre;                     //0~6553.5 kWh, unit = 1KWH
+    int PresentChargedDuration_pre;                     // second, unit = 1s
+    int RemainChargingDuration_pre;                     // second, unit = 1s
+    float EvBatteryMaxVoltage_pre;                      // 0~6553.5 volt, unit = 1V
+    float EvBatteryMaxCurrent_pre;                      //1A
+    float EvBatteryMaxPower_pre;                            //1KW
+    float EvBatterytargetVoltage_pre;                   // 0~6553.5 volt, unit = 1V
+    float EvBatterytargetCurrent_pre;                   //1A
+    int EvBatterySoc_pre;                               // 0~100%, unit = 1%
+    float EvBatteryCapacity_pre;                        //1KWH
+    float EvBatteryEngergyRequest_pre;                      //1KWH
+    unsigned char ConnectorPlugIn_pre;                  //0: unplug, 1: Plug-in
+    unsigned char ConnectorPlugIn_new;                  //0: unplug, 1: Plug-in
+    unsigned char ConnectorLocked_pre;                  //0: unlocked, 1:locked.
+    float CpVoltage_pre;                                //
+    unsigned char CpState_pre;                          //1:state A, 2:State B1, 3:State B2, 4:State C, 5:State D, 6:State E, 7:State F, 8: Pilot error
+    unsigned char CpDuty_pre;                           //0~100%
+    float PpVoltage_pre;
+    unsigned char EVSEPrechargeStatus_pre;              //
+    unsigned char IsolationStatus_pre;                  //0:ongoing, 1:valid, 2:warning/fault
+    unsigned char DC_EVSEStatus_pre;
+    unsigned char SwitchCpStateE_status_pre;
+    unsigned char V2G_Rx_Msg_pre;
+    float AC_EVSENominalVoltage_pre;                    //unit: 1V
+};
+
+struct SysInfoData
+{
+    /**************System***************/
+    unsigned char SystemStatus;                     //0: Booting, 1: idle, 2: authorizing, 3: preparing, 4: charging, 5: terminating, 6: alarm, 7: fault
+    unsigned char FactoryConfiguration;             //0: normal, 1: trigger, charger will return the configuration to factory default if trigger
+    float InputVoltageR;                    //0~655.35 volt
+    float InputVoltageS;                        //0~655.35 volt
+    float InputVoltageT;                        //0~655.35 volt
+    unsigned int SystemFanRotaSpeed;            //0 ~ 65535 RPM
+    unsigned int PsuFanRotaSpeed;                   //0 ~ 65535 RPM
+    unsigned char AuxPower5V;                   //0 ~ 255 volt
+    unsigned char AuxPower12V;                      //0 ~ 255 volt
+    unsigned char AuxPower24V;                      //0 ~ 255 volt
+    unsigned char AuxPower48V;                      //0 ~ 255 volt
+    unsigned char CsuHwRev[32];                 //CSU board hardware version
+    unsigned char CsuBootLoadFwRev[32];             //CSU board bootloader firmware version
+    unsigned char CsuKernelFwRev[32];           //CSU board OS kernel firmware version
+    unsigned char CsuRootFsFwRev[32];           //CSU board root file system firmware version
+    unsigned char CsuPrimFwRev[32];                 //CSU board root file system firmware version
+    unsigned char LcmHwRev[32];                 //LCM module hardware version
+    unsigned char LcmFwRev[32];                 //LCM module firmware version
+    unsigned char PsuHwRev[32];                     //PSU hardware version
+    unsigned char PsuPrimFwRev[32];                 //PSU primary firmware version
+    unsigned char PsuSecFwRev[32];                  //PSU secondary firmware version
+    unsigned char AuxPwrHwRev[32];                  //Aux. power module hardware version
+    unsigned char AuxPwrFwRev[32];                  //Aux. power module firmware version
+    unsigned char FanModuleHwRev[32];           //Fan  module hardware version
+    unsigned char FanModuleFwRev[32];           //Fan  module firmware version
+    unsigned char RelayModuleHwRev[32];             //Relay control  module hardware version
+    unsigned char RelayModuleFwRev[32];             //Relay control  module firmware version
+    unsigned char TelcomModemFwRev[32];         //the 3G/4G modem firmware version
+    int SystemAmbientTemp;                  // -40 ~ 215 degree C
+    int SystemCriticalTemp;                 // -40 ~ 215 degree C
+    int CcsConnectorTemp;                   // -40 ~ 215 degree C
+    int PsuAmbientTemp;                     // -40 ~ 215 degree C
+    /**************Charging***************/
+    struct ChargingInfoData ChademoChargingData[CHAdeMO_QUANTITY];
+    struct ChargingInfoData CcsChargingData[CCS_QUANTITY];
+    struct ChargingInfoData GbChargingData[GB_QUANTITY];
+    /**************Network***************/
+    unsigned char InternetConn;                     //0: disconnected, 1: connected
+    /**************Backend***************/
+    unsigned char OcppConnStatus;               //0: disconnected, 1: connected
+};
+
+struct SysConfigAndInfo
+{
+    struct SysConfigData SysConfig;
+    struct SysInfoData SysInfo;
+};
+
+struct FaultCodeData
+{
+    unsigned char PreviousFaultVal[4];
+    union
+    {
+        unsigned char FaultVal[4];
+        struct
+        {
+            //FaultVal[0]
+            unsigned char ChademoOutputFuseBlew : 1;              //bit 0
+            unsigned char CcsOutputFuseBlew : 1;                  //bit 1
+            unsigned char GbOutputFuseBlew : 1;                       //bit 2
+            unsigned char RcdSelfTestFail : 1;                        //bit 3
+            unsigned char AcInputContactor1Welding : 1;           //bit 4
+            unsigned char AcInputContactor1DrivingFault : 1;          //bit 5
+            unsigned char AcInputContactor2Welding : 1;           //bit 6
+            unsigned char AcInputContactor2DrivingFault : 1;          //bit 7
+            //FaultVal[1]
+            unsigned char AcOutputRelayWelding : 1;               //bit 0
+            unsigned char AcOutputRelayDrivingFault : 1;              //bit 1
+            unsigned char ChademoOutputRelayWelding : 1;          //bit 2
+            unsigned char ChademoOutputRelayDrivingFault    : 1;     //bit 3
+            unsigned char CcsOutputRelayWelding : 1;              //bit 4
+            unsigned char CcsOutputRelayDrivingFault : 1;         //bit 5
+            unsigned char GbOutputRelayWelding : 1;               //bit 6
+            unsigned char GbOutputRelayDrivingFault : 1;              //bit 7
+            //FaultVal[2]
+            unsigned char AcConnectorTempSensorBroken : 1;            //bit 0
+            unsigned char ChademoConnectorTempSensorBroken : 1;   //bit 1
+            unsigned char CcsConnectorTempSensorBroken : 1;       //bit 2
+            unsigned char GbConnectorTempSensorBroken : 1;            //bit 3
+            unsigned char WiFiModuleBroken : 1;                   //bit 4
+            unsigned char Telecom4GModuleBroken : 1;              //bit 5
+            unsigned char AuxPowerModuleBroken : 1;               //bit 6
+            unsigned char RelayControlModuleBroken : 1;          //bit 7
+            //FaultVal[3]
+            unsigned char ChademoConnectorLockFail : 1;           //bit 0
+            unsigned char GbConnectorLockFail : 1;                    //bit 1
+            unsigned char AcConnectorLockFail : 1;                    //bit 2
+            unsigned char ChademoModuleBroken : 1;                //bit 3
+            unsigned char CcsModuleBroken : 1;                    //bit 4
+            unsigned char GbModuleBroken : 1;                     //bit 5
+            unsigned char PsuModuleBroken : 1;                        //bit 6
+            unsigned char : 1;                                   //bit 7		reserved
+        } bits;
+    } FaultEvents;
+};
+
+
+struct AlarmCodeData
+{
+    unsigned char PreviousAlarmVal[8];
+    union
+    {
+        unsigned char AlarmVal[8];
+        struct
+        {
+            //AlarmVal[0]
+            unsigned char SystemL1InputOVP : 1;                   //bit 0
+            unsigned char SystemL2InputOVP : 1;                   //bit 1
+            unsigned char SystemL3InputOVP : 1;                       //bit 2
+            unsigned char SystemL1InputUVP : 1;                   //bit 3
+            unsigned char SystemL2InputUVP : 1;                   //bit 4
+            unsigned char SystemL3InputUVP : 1;                   //bit 5
+            unsigned char PsuL1InputOVP : 1;                      //bit 6
+            unsigned char PsuL2InputOVP : 1;                      //bit 7
+            //AlarmVal[1]
+            unsigned char PsuL3InputOVP : 1;                      //bit 0
+            unsigned char PsuL1InputUVP : 1;                      //bit 1
+            unsigned char PsuL2InputUVP : 1;                      //bit 2
+            unsigned char PsuL3InputUVP : 1;                     //bit 3
+            unsigned char SystemL1InputDrop : 1;                  //bit 4
+            unsigned char SystemL2InputDrop : 1;                  //bit 5
+            unsigned char SystemL3InputDrop : 1;                  //bit 6
+            unsigned char SystemAcOutputOVP : 1;                  //bit 7
+            //AlarmVal[2]
+            unsigned char SystemAcOutputOCP : 1;                  //bit 0
+            unsigned char SystemChademoOutputOVP : 1;         //bit 1
+            unsigned char SystemChademoOutputOCP : 1;         //bit 2
+            unsigned char SystemCcsOutputOVP : 1;                 //bit 3
+            unsigned char SystemCcsOutputOCP : 1;                 //bit 4
+            unsigned char SystemGbOutputOVP : 1;                  //bit 5
+            unsigned char SystemGbOutputOCP : 1;                  //bit 6
+            unsigned char SystemAmbientOTP : 1;                  //bit 7
+            //AlarmVal[3]
+            unsigned char SystemCriticalPointOTP : 1;             //bit 0
+            unsigned char PsuAmbientOTP : 1;                      //bit 1
+            unsigned char PsuCriticalPointOTP : 1;                    //bit 2
+            unsigned char AuxPowerModuleOTP : 1;                  //bit 3
+            unsigned char RelayBoardOTP : 1;                      //bit 4
+            unsigned char ChademoConnectorOTP : 1;                //bit 5
+            unsigned char CcsConnectorOTP : 1;                    //bit 6
+            unsigned char GbConnectorOTP : 1;                 //bit 7
+            //AlarmVal[4]
+            unsigned char AcConnectorOTP : 1;                     //bit 0
+            unsigned char RcdTrip : 1;                                //bit 1
+            unsigned char ChademoGfdTrip : 1;                     //bit 2
+            unsigned char CcsGfdTrip : 1;                         //bit 3
+            unsigned char GbGfdTrip : 1;                          //bit 4
+            unsigned char SpdTrip : 1;                                //bit 5
+            unsigned char MainPowerBreakerTrip : 1;                   //bit 6
+            unsigned char AuxPowerBreakerTrip : 1;                    //bit 7
+            //AlarmVal[5]
+            unsigned char PsuCommunicationFail : 1;               //bit 0
+            unsigned char WiFiModuleCommFail : 1;                 //bit 1
+            unsigned char Telecom4GModuleCommFail : 1;            //bit 2
+            unsigned char RfidModuleCommFail : 1;                 //bit 3
+            unsigned char BluetoothModuleCommFail : 1;                //bit 4
+            unsigned char LcmModuleCommFail : 1;                  //bit 5
+            unsigned char AuxPowerModuleCommFail : 1;         //bit 6
+            unsigned char RelayBoardCommFail : 1;                 //bit 7
+            //AlarmVal[6]
+            unsigned char CcsModuleCommFail : 1;                  //bit 0
+            unsigned char ChademoModuleCommFail : 1;          //bit 1
+            unsigned char GbModuleCommFail : 1;                   //bit 2
+            unsigned char EmergencyStopTrip : 1;                  //bit 3
+            unsigned char DoorOpen : 1;                           //bit 4
+            unsigned char SystemFanDecay : 1;                     //bit 5
+            unsigned char FailToCreateShareMemory : 1;                //bit 6
+            unsigned char CsuInitFailed : 1;                          //bit 7
+            //AlarmVal[7]
+            unsigned char : 8;                                   //reserved
+        } bits;
+    } AlarmEvents;
+};
+
+
+struct InfoCodeData
+{
+    unsigned char PreviousInfoVal[8];
+    union
+    {
+        unsigned char InfoVal[8];
+        struct
+        {
+            //InfoVal[0]
+            unsigned char NormalStopChargingByUser : 1;                 //bit 0
+            unsigned char ChargingTimesUp : 1;                        //bit 1
+            unsigned char ReplaceSystemAirFilter : 1;                     //bit 2
+            unsigned char ReachChademoMaxPluggingTimes : 1;       //bit 3
+            unsigned char ReachCcsMaxPluggingTimes : 1;           //bit 4
+            unsigned char ReachGbMaxPluggingTimes : 1;            //bit 5
+            unsigned char ReachAcMaxPluggingTimes : 1;                //bit 6
+            unsigned char CsuFimrwareUpdateFail : 1;              //bit 7
+            //InfoVal[1]
+            unsigned char ChademoModuleFimrwareUpdateFail : 1;    //bit 0
+            unsigned char CcsModuleFimrwareUpdateFail : 1;            //bit 1
+            unsigned char GbModuleFimrwareUpdateFail : 1;         //bit 2
+            unsigned char AuxPowerModuleFimrwareUpdateFail : 1;       //bit 3
+            unsigned char RelayBoardFimrwareUpdateFail : 1;           //bit 4
+            unsigned char LcmModuleFimrwareUpdateFail : 1;            //bit 5
+            unsigned char BluetoothModuleFimrwareUpdateFail : 1;      //bit 6
+            unsigned char WiFiModuleFimrwareUpdateFail : 1;           //bit 7
+            //InfoVal[2]
+            unsigned char Telocom4GModuleFimrwareUpdateFail : 1;  //bit 0
+            unsigned char PsuFimrwareUpdateFail : 1;              //bit 1
+            unsigned char RfidModuleFimrwareUpdateFail : 1;           //bit 2
+            unsigned char ConfiguredByUsbFlashDrive : 1;              //bit 3
+            unsigned char ConfiguredByBackend : 1;                    //bit 4
+            unsigned char ConfiguredByWebpage : 1;                //bit 5
+            unsigned char InternetDisconnectViaEthernet : 1;          //bit 6
+            unsigned char InternetDisconnectViaWiFi : 1;             //bit 7
+            //InfoVal[3]
+            unsigned char InternetDisconnectVia4Gi : 1;               //bit 0
+            unsigned char ApDisconnectViaWiFi : 1;                    //bit 1
+            unsigned char ApnDisconnectVia4Gi : 1;                    //bit 2
+            unsigned char : 5;                                   //bit 3~7 reserved
+            //InfoVal[4]
+            unsigned char ChademoSeccCommFail : 1;              //bit 0
+            unsigned char CcsSeccCommFail : 1;                      //bit 1
+            unsigned char GbSeccCommFail : 1;                       //bit 2
+            unsigned char PilotFault : 1;                         //bit 3
+            unsigned char ChademoBatteryMalfun : 1;               //bit 4
+            unsigned char ChademoNoPermission : 1;                //bit 5
+            unsigned char ChademoBatteryIncompatibility : 1;          //bit 6
+            unsigned char ChademoBatteryOVP : 1;                  //bit 7
+            //InfoVal[5]
+            unsigned char ChademoBatteryUVP : 1;                  //bit 0
+            unsigned char ChademoBatteryOTP : 1;                  //bit 1
+            unsigned char ChademoBatteryCurrentDiff : 1;          //bit 2
+            unsigned char ChademoBatteryVoltageDiff : 1;          //bit 3
+            unsigned char ChademoShiftPosition : 1;                   //bit 4
+            unsigned char ChademoBatteryOtherFault : 1;           //bit 5
+            unsigned char ChademoChargingSystemError : 1;         //bit 6
+            unsigned char ChademoEvNormalStop : 1;                //bit 7
+            //InfoVal[6]
+            unsigned char : 8;                                   //bit 0~7 reserved
+            //InfoVal[7]
+            unsigned char BackendDisconnectedViaEthernet : 1;     //bit 0
+            unsigned char BackendDisconnectViaWiFi : 1;               //bit 1
+            unsigned char BackendDisconnectVia4G : 1;             //bit 2
+            unsigned char BackendRemoteStart : 1;                 //bit 3
+            unsigned char BackendRemoteStop : 1;                  //bit 4
+            unsigned char BackendRemoteReset : 1;                 //bit 5
+            unsigned char : 2;                                   //bit 6~7 reserved
+        } bits;
+    } InfoEvents;
+};
+
+struct StatusCodeData {
+    unsigned char PresentStatusCode[10][6];
+    struct FaultCodeData FaultCode;
+    struct AlarmCodeData AlarmCode;
+    struct InfoCodeData InfoCode;
+};
+
+/************************************************************************************/
+/**************************CCS protocol Share memory***************************/
+/**************************DIN70121: 201412***************************************/
+/**************************ISO15118_2014: 2014************************************/
+/**************************ISO15118_2018: 2018************************************/
+/************************************************************************************/
+typedef enum boolean { FALSE, TRUE } BOOL;
+
+enum ResponseCodeType_DIN70121 {
+    OK_DIN70121 =                               0,
+    OK_NewSessionEstablished_DIN70121 =         1,
+    OK_OldSessionJoined_DIN70121 =              2,
+    OK_CertificateExpiresSoon_DIN70121 =        3,
+    FAILED_DIN70121 =                           4,
+    FAILED_SequenceError_DIN70121 =             5,
+    FAILED_ServiceIDInvalid_DIN70121 =          6,
+    FAILED_UnknownSession_DIN70121 =            7,
+    FAILED_ServiceSelectionInvalid_DIN70121 =   8,
+    FAILED_PaymentSelectionInvalid_DIN70121 =   9,
+    FAILED_CertificateExpired_DIN70121 =        10,
+    FAILED_SignatureError_DIN70121 =            11,
+    FAILED_NoCertificateAvailable_DIN70121 =    12,
+    FAILED_CertChainError_DIN70121 =            13,
+    FAILED_ChallengeInvalid_DIN70121 =          14,
+    FAILED_ContractCanceled_DIN70121 =          15,
+    FAILED_WrongChargeParameter_DIN70121 =      16,
+    FAILED_PowerDeliveryNotApplied_DIN70121 =   17,
+    FAILED_TariffSelectionInvalid_DIN70121 =    18,
+    FAILED_ChargingProfileInvalid_DIN70121 =    19,
+    FAILED_EVSEPresentVoltageToLow_DIN70121 =   20,
+    FAILED_MeteringSignatureNotValid_DIN70121 = 21,
+    FAILED_WrongEnergyTransferType_DIN70121 =   22
+    };
+
+enum ResponseCodeType_ISO15118_2014 {
+    OK_ISO15118_2014 =                                      0,
+    OK_NewSessionEstablished_ISO15118_2014 =                1,
+    OK_OldSessionJoined_ISO15118_2014 =                     2,
+    OK_CertificateExpiresSoon_ISO15118_2014 =               3,
+    FAILED_ISO15118_2014 =                                  4,
+    FAILED_SequenceError_ISO15118_2014 =                    5,
+    FAILED_ServiceIDInvalid_ISO15118_2014 =                 6,
+    FAILED_UnknownSession_ISO15118_2014 =                   7,
+    FAILED_ServiceSelectionInvalid_ISO15118_2014 =          8,
+    FAILED_PaymentSelectionInvalid_ISO15118_2014 =          9,
+    FAILED_CertificateExpired_ISO15118_2014 =               10,
+    FAILED_SignatureError_ISO15118_2014 =                   11,
+    FAILED_NoCertificateAvailable_ISO15118_2014 =           12,
+    FAILED_CertChainError_ISO15118_2014 =                   13,
+    FAILED_ChallengeInvalid_ISO15118_2014 =                 14,
+    FAILED_ContractCanceled_ISO15118_2014 =                 15,
+    FAILED_WrongChargeParameter_ISO15118_2014 =             16,
+    FAILED_PowerDeliveryNotApplied_ISO15118_2014 =          17,
+    FAILED_TariffSelectionInvalid_ISO15118_2014 =           18,
+    FAILED_ChargingProfileInvalid_ISO15118_2014 =           19,
+    FAILED_MeteringSignatureNotValid_ISO15118_2014 =        20,
+    FAILED_NoChargeServiceSelected_ISO15118_2014 =          21,
+    FAILED_WrongEnergyTransferMode_ISO15118_2014 =          22,
+    FAILED_ContactorError_ISO15118_2014 =                   23,
+    FAILED_CertificateNotAllowedAtThisEVSE_ISO15118_2014 =  24,
+    FAILED_CertificateRevoked_ISO15118_2014 =               25
+    };
+
+enum ResponseCodeType_ISO15118_2018 {
+    OK_ISO15118_2018 =                                      0,
+    OK_NewSessionEstablished_ISO15118_2018 =                1,
+    OK_OldSessionJoined_ISO15118_2018 =                     2,
+    OK_CertificateExpiresSoon_ISO15118_2018 =               3,
+    OK_IsolationValid_ISO15118_2018 =                       4,
+    OK_IsolationWarning_ISO15118_2018 =                     5,
+    WARNING_CertificateExpired_ISO15118_2018 =              6,
+    WARNING_NoCertificateAvailable_ISO15118_2018 =          7,
+    WARNING_CertValidationError_ISO15118_2018 =             8,
+    WARNING_CertVerificationError_ISO15118_2018 =           9,
+    WARNING_ContractCanceled_ISO15118_2018 =                10,
+    FAILED_ISO15118_2018 =                                  11,
+    FAILED_SequenceError_ISO15118_2018 =                    12,
+    FAILED_ServiceIDInvalid_ISO15118_2018 =                 13,
+    FAILED_UnknownSession_ISO15118_2018 =                   14,
+    FAILED_ServiceSelectionInvalid_ISO15118_2018 =          15,
+    FAILED_SignatureError_ISO15118_2018 =                   16,
+    FAILED_IdentificationSelectionInvalid_ISO15118_2018 =   17,
+    FAILED_ChallengeInvalid_ISO15118_2018 =                 18,
+    FAILED_WrongChargeParameter_ISO15118_2018 =             19,
+    FAILED_IsolationFault_ISO15118_2018 =                   20,
+    FAILED_PowerDeliveryNotApplied_ISO15118_2018 =          21,
+    FAILED_TariffSelectionInvalid_ISO15118_2018 =           22,
+    FAILED_ChargingProfileInvalid_ISO15118_2018 =           23,
+    FAILED_MeteringSignatureNotValid_ISO15118_2018 =        24,
+    FAILED_NoChargeServiceSelected_ISO15118_2018 =          25,
+    FAILED_WrongEnergyTransferMode_ISO15118_2018 =          26,
+    FAILED_ContactorError_ISO15118_2018 =                   27,
+    FAILED_CertificateRevoked_ISO15118_2018 =               28,
+    FAILED_CertificateNotYetValid_ISO15118_2018 =           29
+    };
+
+enum EVSENotificationType { None = 0, StopCharging = 1, ReNegotiation = 2};
+enum ServiceCategoryType { EVCharging = 0, Internet = 1, ContractCertificate = 2, OtherCustom = 3};
+enum PaymentOptionType { Contract = 0, ExternalPayment = 1};
+/*enum EVSESupportedEnergyTransferType  { AC_single_phase_core = 0, AC_three_phase_core = 1, DC_core = 2, DC_extended = 3,
+                                      DC_combo_core = 4, DC_dual = 5, AC_core1p_DC_extended = 6, AC_single_DC_core = 7,
+                                      AC_single_phase_three_phase_core_DC_extended = 8, AC_core3p_DC_extended = 9};*/
+enum EnergyTransferModeType {
+    AC_single_phase_core =  0,
+    AC_three_phase_core =   1,
+    DC_core =               2,
+    DC_extended =           3,
+    DC_combo_core =         4,
+    DC_unique =             5
+    };
+
+//enum identificationOptionType             { Contract = 0, ExternalIdentification = 1};
+enum unitSymbolType_DIN70121 {
+    H_DIN70121 = 0,
+    M_DIN70121 = 1,
+    S_DIN70121 = 2,
+    A_DIN70121 = 3,
+    AH_DIN70121 = 4,
+    V_DIN70121 = 5,
+    VA_DIN70121 = 6,
+    W_DIN70121 = 7,
+    WS_DIN70121 = 8,
+    WH_DIN70121 = 9};
+
+enum unitSymbolType_ISO15118_2014 {
+    h_ISO15118_2014 = 0,
+    m_ISO15118_2014 = 1,
+    s_ISO15118_2014 = 2,
+    A_ISO15118_2014 = 3,
+    V_ISO15118_2014 = 4,
+    W_ISO15118_2014 = 5,
+    Wh_ISO15118_2014 = 6
+};
+
+enum ProcessingType { Finished = 0, Ongoing = 1, Ongoing_WaitingForCustomerInteraction = 2};
+enum EVSEProcessingType_DIN70121 { Finished_DIN70121 = 0, Ongoing_DIN70121 = 1};
+enum EVSEProcessingType_ISO15118_2014 { Finished_ISO15118_2014 = 0, Ongoing_ISO15118_2014 = 1, Ongoing_WaitingForCustomerInteraction_ISO15118_2014=2 };
+
+enum DC_EVErrorCodeType {
+        NO_ERROR = 0,
+        FAILED_RESSTemperatureInhibit = 1,
+        FAILED_EVShiftPosition = 2,
+        FAILED_ChargerConnectorLockFault = 3,
+        FAILED_EVRESSMalfunction = 4,
+        FAILED_ChargingCurrentdifferential = 5,
+        FAILED_ChargingVoltageOutOfRange = 6,
+        Reserved_A = 7,
+        Reserved_B = 8,
+        Reserved_C = 9,
+        FAILED_ChargingSystemIncompatibility = 10,
+        NoData = 11
+    };
+
+enum IsolationLevelType_DIN70121 {
+        Invalid_DIN70121 = 0,
+        Valid_DIN70121 = 1,
+        Warning_DIN70121 = 2,
+        Fault_DIN70121 = 3
+};
+
+enum IsolationLevelType_ISO15118_2014 {
+        Invalid_ISO15118_2014 = 0,
+        Valid_ISO15118_2014 = 1,
+        Warning_ISO15118_2014 = 2,
+        Fault_ISO15118_2014 = 3,
+        No_IMD_ISO15118_2014   = 4
+};
+
+enum DC_EVSEStatusCodeType {
+        EVSE_NotReady = 0,
+        EVSE_Ready = 1,
+        EVSE_Shutdown = 2,
+        EVSE_UtilityInterruptEvent = 3,
+        EVSE_IsolationMonitoringActive = 4,
+        EVSE_EmergencyShutdown = 5,
+        EVSE_Malfunction = 6,
+        Reserved_8 = 7,
+        Reserved_9 = 8
+};
+
+enum ScheduleOriginType { EV = 0, SA = 1};
+enum ChargeProgressType_ISO15118_2014 {start_ISO15118_2014 = 0, Stop_ISO15118_2014 = 1, Renegotiate_ISO15118_2014 = 2};
+enum ChargeProgressType_ISO15118_2018 {start_ISO15118_2018 = 0, Renegotiate_ISO15118_2018 = 1, Standby_ISO15118_2018 = 2, Stop_ISO15118_2018 = 3};
+enum evOperationType {Charge = 0, Discharge = 1, Standby = 2};
+enum mechanicalChargingDeviceStatusType {Home = 0, Moving = 1, EndPosition = 2};
+enum EV_CP_StatusType {A = 0, B = 1, C = 2, D = 3, E = 4, F = 5};
+enum EV_Error_Status_CodeType { No_EV_Error = 0, EV_FAILED_EmergencyEvent = 1, EV_FAILED_Breaker = 2, EV_FAILED_RESSTemperatureInhibit = 3,
+                                EV_FAILED_RESS = 4, EV_FAILED_ChargingCurrentDifferential = 5, EV_FAILED_ChargingVoltageOutOfRange = 6,
+                                Reserved_by_ISO_1 = 7,  Reserved_by_ISO_2 = 8, Reserved_by_ISO_3 = 9, OEM1 = 10,
+                                OEM2 = 11,  OEM3 = 12, OEM4 = 13};
+enum IsolationStatusType { Invalid = 0, Safe = 1, Warning = 2, Fault = 3};
+enum ChargingSessionType { Terminate = 0, Pause = 1};
+enum CostKindType { relativePricePercentage = 0, RenewableGenerationPercentage = 1, CarbonDioxideEmission = 2};
+
+enum MsgFlowStatus {
+    IDLE = 0,
+    CM_SLAC_PARM_REQ =                      1,
+    CM_SLAC_PARM_CONF =                     2,
+    CM_START_ATTEN_CHAR_IND =               3,
+    CM_MNBC_SOUND_IND =                     4,
+    CM_ATTEN_CHAR_IND =                     5,
+    CM_ATTEN_CHAR_RSP =                     6,
+    CM_VALIDATE_REQ =                       7,
+    CM_VALIDATE_CNF =                       8,
+    CM_SLAC_MATCH_REQ =                     9,
+    CM_SLAC_MATCH_CNF =                     10,
+    CM_AMP_MAP_REQ =                        11,
+    CM_AMP_MAP_CNF =                        12,
+    CM_SET_KEY_REQ =                        13,
+    CM_SET_KEY_CNF =                        14,
+    SLACC_SDP_UDP_Connection =              15,
+    SLACC_SDP_TCP_Connection =              16,
+    SupportedAppProtocolRequest =           17,
+    SupportedAppProtocolResponse =          18,
+    SessionSetupRequest =                   19,
+    SessionSetupResponse =                  20,
+    ServiceDiscoveryRequest =               21,
+    ServiceDiscoveryResponse =              22,
+    ServiceDetailRequest =                  23,
+    ServiceDetailResponse =                 24,
+    ServiceAndPaymentSelectionRequest =     25,
+    ServiceAndPaymentSelectionResponse =    26,
+    PaymentDetailsRequest =                 27,
+    PaymentDetailsResponse =                28,
+    AuthorizationRequest =                  29,
+    AuthorizationResponse =                 30,
+    CertificateUpdateRequest =              31,
+    CertificateUpdateResponse =             32,
+    CertificateInstallationRequest =        33,
+    CertificateInstallationResponse =       34,
+    ChargeParameterDiscoveryRequest =       35,
+    ChargeParameterDiscoveryResponse =      36,
+    CableCheckRequest =                     37,
+    CableCheckResponse =                    38,
+    PreChargeRequest =                      39,
+    PreChargeResponse =                     40,
+    PowerDeliveryRequestStart =             41,
+    PowerDeliveryResponsetStart =           42,
+    ChargingStatusRequest =                 43,
+    ChargingStatusResponse =                44,
+    CurrentDemandRequest =                  45,
+    CurrentDemandResponse =                 46,
+    MeteringReceiptRequest =                47,
+    MeteringReceiptResponse =               48,
+    PowerDeliveryRequestStop =              49,
+    PowerDeliveryResponseStop =             50,
+    WeldingDetectionRequest =               51,
+    WeldingDetectionResponse =              52,
+    SessionStopRequest =                    53,
+    SessionStopResponse =                   54,
+    Performance_Timeout =                   253,
+    Sequence_Timeout =                      254,
+    Other_Fault =                           255
+};
+
+
+struct PhysicalValueType_DIN70121 {              //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
+    int Multiplier;                              //range: -3..+3
+    enum unitSymbolType_DIN70121 Unit;
+    short Value;
+};
+struct PhysicalValueType_ISO15118_2014 {        //The final physical value is determined by: Value * 10 ^ Multiplier [Unit]
+    int Multiplier;                             //range: -3..+3
+    enum unitSymbolType_ISO15118_2014 Unit;
+    short Value;
+};
+struct PhysicalValueType_ISO15118_2018          //The final physical value is determined by: Value * 10 ^ Exponent [Unit]
+{
+    int Exponent;                                       //range: -3..+3
+    short Value;
+};
+struct AppProtocolType {
+    unsigned char ProtocolNamespace[100];
+    unsigned int ProtocolNamespaceLen;
+    unsigned int VersionNumberMajor;
+    unsigned int VersionNumberMinor;
+    unsigned char SchemaID;
+    unsigned char Priority;                     //range 1..20
+};
+struct ACD_SSEnergyTransferModeType
+{
+    unsigned char EVID[20];
+};
+struct EVSEStatusType
+{
+    unsigned short NotificationMaxDelay;                //in seconds
+    enum EVSENotificationType EVSENotification;
+};
+struct ServiceIDListType
+{
+    unsigned short ServiceID[10];   //refer to chapter 8.6.2.1 Table 192
+};
+struct PaymentOptionListType
+{
+    enum PaymentOptionType PaymentOption[2];
+};
+struct ServiceTagType
+{
+    unsigned short ServiceID;
+    unsigned char ServiceName[32];              //Optional Element
+    enum ServiceCategoryType ServiceCategory;
+    unsigned char ServiceScope[32];              //Optional Element
+};
+struct ServiceType_DIN70121
+{
+    struct ServiceTagType ServiceTag;
+    BOOL FreeService;
+};
+struct ServiceType_ISO15118_2014
+{
+    unsigned short ServiceID;
+    unsigned char ServiceName[32];                  //Optional
+    enum ServiceCategoryType ServiceCategory;
+    unsigned char ServiceScope[64];                 //Optional
+    BOOL FreeService;
+};
+/*struct ServiceType_ISO15118_2018
+   {
+    unsigned short				ServiceID;
+    BOOL					FreeService;
+   }; */
+struct SupportedEnergyTransferModeType
+{
+    enum EnergyTransferModeType EnergyTransferMode[6];
+};
+struct ServiceChargeType
+{
+    struct ServiceType_DIN70121 Services;
+    //enum EVSESupportedEnergyTransferType		EnergyTransferType;
+    enum EnergyTransferModeType EnergyTransferType;
+};
+
+struct ChargeServiceType
+{
+    struct ServiceType_ISO15118_2014 Services;
+    struct SupportedEnergyTransferModeType SupportedEnergyTransferMode;
+};
+struct ServiceListType
+{
+    struct ServiceType_ISO15118_2014 Service[8];
+};
+struct IdentificationOptionListType
+{
+    enum PaymentOptionType IdentificationOption[2];
+};
+struct ParameterType
+{
+    unsigned char Name[32];
+    struct PhysicalValueType_ISO15118_2014 PhysicalValue_ISO15118_2014;
+    struct PhysicalValueType_ISO15118_2018 PhysicalValue_ISO15118_2018;
+};
+struct ParameterSetType
+{
+    short ParameterSetID;
+    struct ParameterType Parameter[16];
+};
+struct ServiceParameterListType
+{
+    struct ParameterSetType ParameterSet[255];
+};
+struct WPT_SDlEnergyTransferModeType
+{
+    struct ServiceParameterListType ServiceParameterList;
+};
+struct SelectedServiceType
+{
+    unsigned short ServiceID;
+    short ParameterSetID;
+};
+struct SelectedServiceListType
+{
+    struct SelectedServiceType SelectedService[16];
+    unsigned int SelectedServiceLen;
+};
+
+struct CertificateChainType
+{
+    unsigned char Id[32];                           //Optional
+    unsigned char Certificate[800];                     //check size again
+    unsigned char SubCertificates[4][800];                  //Optional,     check size again
+};
+struct PNC_AReqIdentificationModeType
+{
+    unsigned char GenChallenge[16];                             //DIN70121=> None,	ISO15118_2014=>None,	ISO15118_2018=>Optional
+    unsigned char Id[32];                                   //DIN70121=> None,	ISO15118_2014=>None,	ISO15118_2018=>Optional
+};
+struct AC_EVChargeParameterType
+{
+    unsigned int DepartureTime;                                     //Optional
+    struct PhysicalValueType_ISO15118_2014 EAmount;
+    struct PhysicalValueType_ISO15118_2014 EVMaxVoltage;
+    struct PhysicalValueType_ISO15118_2014 EVMaxCurrent;
+    struct PhysicalValueType_ISO15118_2014 EVMinCurrent;
+};
+struct DC_EVStatusType_DIN70121
+{
+    BOOL EVReady;
+    BOOL EVCabinConditioning;
+    BOOL EVRESSConiditioning;
+    enum DC_EVErrorCodeType EVErrorCode;
+    unsigned char EVRESSSOC;                        /*0-100 percentage*/
+};
+struct DC_EVChargeParameterType_DIN70121
+{
+    struct DC_EVStatusType_DIN70121 DC_EVStatus;
+    struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;
+    struct PhysicalValueType_DIN70121 EVMaximumPowerLimit;                      //Optional
+    struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;
+    struct PhysicalValueType_DIN70121 EVEnergyCapacity;                         //Optional
+    struct PhysicalValueType_DIN70121 EVEnergyRequest;                          //Optional
+    unsigned char FullSOC; /*0-100 percentage*/                                 //Optional
+    unsigned char BulkSOC; /*0-100 percentage*/                             //Optional
+};
+struct DC_EVStatusType_ISO15118_2014
+{
+    BOOL EVReady;
+    enum DC_EVErrorCodeType EVErrorCode;
+    unsigned char EVRESSSOC;                        /*0-100 percentage*/
+};
+struct DC_EVChargeParameterType_ISO15118_2014
+{
+    unsigned int DepartureTime;                                             //Optional
+    struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
+    struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;
+    struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit;                     //Optional
+    struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;
+    struct PhysicalValueType_ISO15118_2014 EVEnergyCapacity;                        //Optional
+    struct PhysicalValueType_ISO15118_2014 EVEnergyRequest;                         //Optional
+    unsigned char FullSOC; /*0-100 percentage*/                                     //Optional
+    unsigned char BulkSOC; /*0-100 percentage*/                                 //Optional
+};
+struct Dynamic_CPDReqControlModeType
+{
+    unsigned int DepartureTime;
+};
+struct RelativeTimeIntervalType
+{
+    unsigned int duration;              //Optional
+    unsigned int start;
+};
+struct PMaxScheduleEntryType
+{
+    struct RelativeTimeIntervalType RelativeTimeInterval;
+    unsigned short PMax;
+};
+struct PMaxScheduleType
+{
+    unsigned short PMaxScheduleID;                          //no this itme in ISO15118_2014
+    struct PMaxScheduleEntryType PMaxScheduleEntry[1024];
+};
+struct CostType
+{
+    unsigned int amount;
+    enum CostKindType costKind;
+    int amountMultiplier;                                   //Optional , range: -3..+3
+};
+struct ConsumptionCostType
+{
+    struct CostType Cost[3];
+    struct PhysicalValueType_ISO15118_2014 startValue;
+};
+struct SalesTariffEntryType
+{
+    struct RelativeTimeIntervalType RelativeTimeInterval;
+    unsigned char EPriceLevel;                              //Optional
+    struct ConsumptionCostType ConsumptionCost[3];      //Optional
+};
+struct SalesTariffType
+{
+    unsigned char Id[32];                                   //Optional
+    short SalesTariffID;
+    unsigned char SalesTariffDescription[32];                   //Optional
+    unsigned char NumEPriceLevels;                              //Optional
+    struct SalesTariffEntryType SalesTariffEntry[1024];
+};
+struct SAScheduleTupleType
+{
+    short SAScheduleTupleID;
+    struct PMaxScheduleType PMaxSchedule;
+    struct SalesTariffType SalesTariff;                             //Optional
+};
+struct ScheduleListType
+{
+    enum ScheduleOriginType ScheduleOrigin;
+    struct SAScheduleTupleType ScheduleTuple[3];
+};
+struct Scheduled_CPDReqControlModeType
+{
+    enum ProcessingType EVProcessing;
+    unsigned int DepartureTime;                                     //Optional
+    unsigned short MaxSupportingPoints;
+    struct ScheduleListType ScheduleList;                               //Optional
+};
+struct AC_CPDReqEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;                   //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;              //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;              //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
+};
+struct DC_CPDReqEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;                    //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;                    //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;                       //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;                  //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;                  //Optional
+    unsigned char TargetSOC;                                                    //Optional
+    unsigned char BulkSOC;                                                          //Optional
+};
+struct BPT_AC_CPDReqEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;                       //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;                  //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;                  //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
+};
+struct BPT_DC_CPDReqEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumDischargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumDischargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumDischargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumDischargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
+    unsigned char TargetSOC;                                                //Optional
+    unsigned char BulkSOC;                                                      //Optional
+};
+struct WPT_CPDReqEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVMaximumPower;                      //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumPower;                      //Optional
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;                   //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;              //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;              //Optional
+};
+struct ACD_CPDReqEnergyTransferModeType
+{
+    //cannot be found in standard
+};
+struct SAScheduleListType
+{
+    struct SAScheduleTupleType SAScheduleTuple[3];
+};
+struct DC_EVSEStatusType_DIN70121
+{
+    enum IsolationLevelType_DIN70121 EVSEIsolationStatus;                       //Optional
+    enum DC_EVSEStatusCodeType EVSEStatusCode;
+    unsigned int NotificationMaxDelay;
+    enum EVSENotificationType EVSENotification;
+};
+struct DC_EVSEChargeParameterType_DIN70121
+{
+    struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
+    struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;
+    struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit;                    //Optional
+    struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;
+    struct PhysicalValueType_DIN70121 EVSEMinimumCurrentLimit;
+    struct PhysicalValueType_DIN70121 EVSEMinimumVoltageLimit;
+    struct PhysicalValueType_DIN70121 EVSECurrentRegulationTolerance;               //Optional
+    struct PhysicalValueType_DIN70121 EVSEPeakCurrentRipple;
+    struct PhysicalValueType_DIN70121 EVSEEnergyToBeDelivered;                      //Optional
+};
+struct AC_EVSEStatusType_ISO15118_2014
+{
+    BOOL RCD;
+    unsigned short NotificationMaxDelay;
+    enum EVSENotificationType EVSENotification;                         //need to be confirmed
+};
+struct AC_EVSEChargeParameterType_ISO15118_2014
+{
+    struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
+    struct PhysicalValueType_ISO15118_2014 EVSENominalVoltage;
+    struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;
+};
+struct DC_EVSEStatusType_ISO15118_2014
+{
+    unsigned short NotificationMaxDelay;
+    enum EVSENotificationType EVSENotification;
+    enum IsolationLevelType_ISO15118_2014 EVSEIsolationStatus;                              //Optional
+    enum DC_EVSEStatusCodeType DC_EVSEStatusCode;
+};
+struct DC_EVSEChargeParameterType_ISO15118_2014
+{
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+    struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;
+    struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;
+    struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;
+    struct PhysicalValueType_ISO15118_2014 EVSEMinimumCurrentLimit;
+    struct PhysicalValueType_ISO15118_2014 EVSEMinimumVoltageLimit;
+    struct PhysicalValueType_ISO15118_2014 EVSECurrentRegulationTolerance;              //Optional
+    struct PhysicalValueType_ISO15118_2014 EVSEPeakCurrentRipple;
+    struct PhysicalValueType_ISO15118_2014 EVSEEnergyToBeDelivered;                     //Optional
+};
+struct Scheduled_CPDResControlModeType
+{
+    struct ScheduleListType ScheduleList;
+};
+struct AC_CPDResEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
+    struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
+};
+struct DC_CPDResEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
+};
+struct BPT_AC_CPDResEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent[3];
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent[3];
+    struct PhysicalValueType_ISO15118_2018 EVSENominalVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVSENominalFrequency;
+};
+struct BPT_DC_CPDResEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargePower;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumDischargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVSEMinimumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVSEMinimumDischargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVSEMinimumVoltage;
+};
+struct WPT_CPDResEnergyTransferModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumPower;
+    struct PhysicalValueType_ISO15118_2018 EVSEMinimumPower;
+};
+struct ACD_CPDResEnergyTransferModeType
+{
+    //not found in ISO15118_2018
+};
+struct ProfileEntryType_DIN70121
+{
+    unsigned int ChargingProfileEntryStart;
+    short ChargingProfileEntryMaxPower;
+};
+struct ChargingProfileType_DIN70121
+{
+    short SAScheduleTupleID;
+    struct ProfileEntryType_DIN70121 ProfileEntry[24];
+};
+struct DC_EVPowerDeliveryParameterType_DIN70121
+{
+    struct DC_EVStatusType_DIN70121 DC_EVStatus;
+    BOOL BulkChargingComplete;                                      //Optional
+    BOOL ChargingComplete;
+};
+struct ProfileEntryType_ISO15118_2014
+{
+    unsigned int ChargingProfileEntryStart;
+    struct PhysicalValueType_ISO15118_2018 ChargingProfileEntryMaxPower;
+    unsigned char ChargingProfileEntryMaxNumberOfPhasesInUse;                               //Optional
+};
+struct ChargingProfileType_ISO15118_2014
+{
+    struct ProfileEntryType_ISO15118_2014 ProfileEntry[24];
+};
+struct DC_EVPowerDeliveryParameterType_ISO15118_2014
+{
+    struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
+    BOOL BulkChargingComplete;                                          //Optional
+    BOOL ChargingComplete;
+};
+struct TimeInterval
+{
+    unsigned int start;
+    unsigned int duration;                                              //Optional
+};
+struct PowerScheduleEntryType
+{
+    struct TimeInterval TimeInterval;
+    struct PhysicalValueType_ISO15118_2018 Power[3];
+};
+struct EVPowerProfileType
+{
+    struct PowerScheduleEntryType EVPowerProfileEntry[2048];
+};
+struct Scheduled_PDReqControlModeType
+{
+    unsigned char ScheduleTupleID;
+    struct EVPowerProfileType EVPowerProfile;
+};
+struct BPT_Scheduled_PDReqControlModeType
+{
+    unsigned char ScheduleTupleID;
+    struct EVPowerProfileType EVPowerProfile;                           //Optional
+    enum evOperationType EVOperation;
+};
+struct ListOfRootCertificateIDsType
+{
+    unsigned char RootCertificateID[20][40];
+};
+struct ContractSignatureEncryptedPrivateKeyType
+{
+    unsigned char Id[32];
+};
+struct DiffieHellmanPublickeyType
+{
+    unsigned char Id[32];
+};
+struct ContractCertificateEncryptedPrivateKeyType
+{
+    unsigned char Id[32];
+};
+struct EVTechnicalStatusType
+{
+    BOOL EV_Status_ReadyToCharge;
+    BOOL EV_Status_ImmobilizationRequest;                                           //Optional
+    BOOL EV_Status_Immobilized;
+    struct PhysicalValueType_ISO15118_2018 EV_Status_WLAN_Strength;
+    enum EV_CP_StatusType EV_CP_Status;
+    unsigned char EV_Status_RESSSOC;                                                //0~100%
+    enum EV_Error_Status_CodeType EV_Error_Status_Code;
+    BOOL EVSE_Timeout;
+};
+struct MeterInfoType_ISO15118_2014
+{
+    unsigned char MeterID[32];
+    unsigned long MeterReading;                                                     //Optional
+    unsigned char SigMeterReading[64];                                              //Optional
+    short MeterStatus;                                                          //Optional
+    long TMeter;                                                           //Optional
+};
+struct Scheduled_MRReqControlModeType
+{
+    unsigned char ScheduleTupleID;
+};
+struct MeterInfoType_ISO15118_2018
+{
+    unsigned char MeterID[32];
+    unsigned long MeterReadingWhCharged;                                        //Optional
+    unsigned long MeterReadingWhDischarged;                                         //Optional
+    unsigned long MeterReadingVARhLeading;                                          //Optional
+    unsigned long MeterReadingVARhLagging;                                          //Optional
+    unsigned char SignatureMeterReading[64];                                        //Optional
+    short MeterStatus;                                                          //Optional
+    short TimeStampMeter;                                                   //Optional
+    BOOL ReceiptRequired;                                                       //Optional
+};
+struct PnC_CLReqIdentificationModeType
+{
+    BOOL MeteringReceiptRequested;
+};
+struct Dynamic_CSReqControlModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;
+};
+struct Scheduled_CSReqControlModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVTargetEnergyRequest;                       //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumEnergyRequest;                  //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumEnergyRequest;                  //Optional
+    BOOL Standby;
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargePower;                    //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMaximumChargeCurrent;                  //Optional
+    struct PhysicalValueType_ISO15118_2018 EVMinimumChargeCurrent;                  //Optional
+};
+struct DisplayParametersType
+{
+    unsigned short CurrentRange;
+    unsigned char CurrentSOC;                                                   //0~100%
+    unsigned char MinimumSOC;                                                   //0~100%
+    struct PhysicalValueType_ISO15118_2018 RemainingTimeToMaximumSOC;
+    struct PhysicalValueType_ISO15118_2018 RemainingTimeToTargetSOC;
+    struct PhysicalValueType_ISO15118_2018 RemainingTimeToBulkSOC;
+    struct PhysicalValueType_ISO15118_2018 RemainingTimeToMinimumSOC;
+    BOOL ChargingComplete;
+    BOOL BulkChargingComplete;
+    BOOL InletHot;
+};
+struct PnC_CLResIdentificationModeType
+{
+    struct MeterInfoType_ISO15118_2018 MeterInfo;
+};
+struct Dynamic_CSResControlModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSETargetActivePower;
+};
+struct Scheduled_CDResControlModeType
+{
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;              //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;            //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumVoltage;                  //Optional
+};
+struct LFA_EVFinePositioningSetupParametersType
+{
+    unsigned char NumberOfSensors;
+    //NOT complete yet,  to be continue.....
+};
+
+/****SupportedAppProtocolRequest****/
+struct SupportedAppProtocolRequest_DIN70121 {
+    struct AppProtocolType AppProtocol[20];
+};
+struct SupportedAppProtocolRequest_ISO15118_2014
+{
+    struct AppProtocolType AppProtocol[20];
+};
+struct SupportedAppProtocolRequest_ISO15118_2018
+{
+    struct AppProtocolType AppProtocol[20];
+};
+/****SupportedAppProtocolResponse****/
+struct SupportedAppProtocolResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    unsigned char SchemaID;                                         //Optional
+};
+struct SupportedAppProtocolResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    unsigned char SchemaID;                                         //Optional
+};
+struct SupportedAppProtocolResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    unsigned char SchemaID;                                             //Optional
+};
+/****SessionSetupRequest****/
+struct SessionSetupRequest_DIN70121
+{
+    unsigned char EVCCID[8];                                            //the MAC address of the EVCC in Hex
+};
+struct SessionSetupRequest_ISO15118_2014
+{
+    unsigned char EVCCID[8];                                            //the MAC address of the EVCC in Hex
+};
+struct SessionSetupRequest_ISO15118_2018
+{
+    unsigned char EVCCID[8];                                            //the MAC address of the EVCC in Hex
+    struct ACD_SSEnergyTransferModeType ACD_SSEnergyTransferMode;           //For ACD mandatory, optional for rest
+};
+/****SessionSetupResponse****/
+struct SessionSetupResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    unsigned char EVSEID[40];                                           //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    long EVSETimeStamp;                                         //EPOCH format, Optional
+};
+struct SessionSetupResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    unsigned char EVSEID[40];                                           //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    long EVSETimeStamp;                                         //EPOCH format, Optional
+};
+struct SessionSetupResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    unsigned char EVSEID[40];                                           //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    struct EVSEStatusType EVSEStatus;                                   //Optional
+};
+/****ServiceDiscoveryRequest****/
+struct ServiceDiscoveryRequest_DIN70121
+{
+    unsigned char ServiceScope[32];                     //Optional
+    unsigned int ServiceScopeLen;
+    enum ServiceCategoryType ServiceCategory;           //Optional
+};
+struct ServiceDiscoveryRequest_ISO15118_2014
+{
+    unsigned char ServiceScope[32];                     //Optional
+    unsigned int ServiceScopeLen;
+    enum ServiceCategoryType ServiceCategory;           //Optional
+};
+struct ServiceDiscoveryRequest_ISO15118_2018
+{
+    struct ServiceIDListType SupportedServiceIDs;           //Optional
+};
+/****ServiceDiscoveryResponse****/
+struct ServiceDiscoveryResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    struct PaymentOptionListType PaymentOptions;
+    struct ServiceChargeType ChargeService_DIN70121;
+};
+struct ServiceDiscoveryResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct PaymentOptionListType PaymentOptions;
+    struct ChargeServiceType ChargeService;
+    struct ServiceListType ServiceList;                                     //Optional
+};
+struct ServiceDiscoveryResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                   //Optional
+    struct IdentificationOptionListType IdentificationOptionList;
+    struct ServiceListType EnergyTransferServiceList;
+    struct ServiceListType VASList;                                         //Optional
+};
+/****ServiceDetailRequest****/
+//Only in ISO15118_2014 and ISO15118_2018
+struct ServiceDetailRequest_ISO15118_2014
+{
+    unsigned short ServiceID;
+};
+struct ServiceDetailRequest_ISO15118_2018
+{
+    unsigned short ServiceID;
+    struct WPT_SDlEnergyTransferModeType WPT_SDlEnergyTransferMode;
+};
+/****ServiceDetailResponse****/
+struct ServiceDetailResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    unsigned short ServiceID;
+    struct ServiceParameterListType ServiceParameterList;
+};
+struct ServiceDetailResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    unsigned short ServiceID;
+    struct ServiceParameterListType ServiceParameterList;
+    struct EVSEStatusType EVSEStatus;                                   //Optional
+};
+/****ServiceAndPaymentSelectionRequest / ServiceSelectionRequest****/
+struct ServiceAndPaymentSelectionRequest_DIN70121
+{
+    enum PaymentOptionType SelectedPaymentOption;
+    struct SelectedServiceListType SelectedServiceList;
+};
+struct ServiceAndPaymentSelectionRequest_ISO15118_2014
+{
+    enum PaymentOptionType SelectedPaymentOption;
+    struct SelectedServiceListType SelectedServiceList;
+};
+struct ServiceSelectionRequest_ISO15118_2018
+{
+    enum PaymentOptionType SelectedPaymentOption;
+    struct SelectedServiceType SelectedEnergyTransferService;
+    struct SelectedServiceListType SelectedVASList;
+    enum ProcessingType EVProcessing;
+};
+/****ServiceAndPaymentSelectionResponse / ServiceSelectionResponse****/
+struct ServiceAndPaymentSelectionResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+};
+struct ServiceAndPaymentSelectionResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+};
+struct ServiceSelectionResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                   //Optional
+};
+/****PaymentDetailsRequest / IdentificationDetailsRequest****/
+struct PaymentDetailsRequest_ISO15118_2014
+{
+    unsigned char eMAID[16];
+    struct CertificateChainType ContractSignatureCertChain;
+};
+struct IdentificationDetailsRequest_ISO15118_2018
+{
+    struct CertificateChainType ContractSignatureCertChain;
+};
+/****PaymentDetailsResponse  / IdentificationDetailsResponse ****/
+struct PaymentDetailsResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    unsigned char GenChallenge[16];
+    long EVSETimeStamp;
+};
+struct IdentificationDetailsResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                       //Optional
+    unsigned char GenChallenge[16];
+    enum ProcessingType EVSEProcessing;
+};
+/****ContractAuthenticationRequest / AuthorizationRequest****/
+struct ContractAuthenticationRequest_DIN70121
+{
+    //None
+};
+struct AuthorizationRequest_ISO15118_2014
+{
+    unsigned char GenChallenge[16];                             //Optional
+    unsigned char Id[32];                                   //Optional
+};
+struct AuthorizationRequest_ISO15118_2018
+{
+    struct PNC_AReqIdentificationModeType PNC_AReqIdentificationMode;       //Optional
+};
+/****ContractAuthenticationResponse  / AuthorizationResponse****/
+struct ContractAuthenticationResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    enum EVSEProcessingType_DIN70121 EVSEProcessing;
+};
+struct AuthorizationResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
+};
+struct AuthorizationResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    enum ProcessingType EVSEProcessing;
+    struct EVSEStatusType EVSEStatus;                                       //Optional
+};
+/****ChargeParameterDiscoveryRequest****/
+struct ChargeParameterDiscoveryRequest_DIN70121
+{
+    enum EnergyTransferModeType EVRequestedEnergyTransferType;
+    struct DC_EVChargeParameterType_DIN70121 DC_EVChargeParameter;
+};
+struct ChargeParameterDiscoveryRequest_ISO15118_2014
+{
+    unsigned short MaxEntriesSAScheduleTuple;                                               //Optional
+    enum EnergyTransferModeType RequestedEnergyTransferMode;
+    struct AC_EVChargeParameterType AC_EVChargeParameter;
+    struct DC_EVChargeParameterType_ISO15118_2014 DC_EVChargeParameter;
+};
+struct ChargeParameterDiscoveryRequest_ISO15118_2018
+{
+    struct Dynamic_CPDReqControlModeType Dynamic_CPDReqControlMode;
+    struct Scheduled_CPDReqControlModeType Scheduled_CPDReqControlMode;
+    struct AC_CPDReqEnergyTransferModeType AC_CPDReqEnergyTransferMode;
+    struct DC_CPDReqEnergyTransferModeType DC_CPDReqEnergyTransferMode;
+    struct BPT_AC_CPDReqEnergyTransferModeType BPT_AC_CPDReqEnergyTransferMode;
+    struct BPT_DC_CPDReqEnergyTransferModeType BPT_DC_CPDReqEnergyTransferMode;
+    struct WPT_CPDReqEnergyTransferModeType WPT_CPDReqEnergyTransferMode;
+    struct ACD_CPDReqEnergyTransferModeType ACD_CPDReqEnergyTransferMode;
+};
+/****ChargeParameterDiscoveryResponse****/
+struct ChargeParameterDiscoveryResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    enum EVSEProcessingType_DIN70121 EVSEProcessing;
+    struct SAScheduleListType SAScheduleList;
+    struct DC_EVSEChargeParameterType_DIN70121 DC_EVSEChargeParameter;
+};
+struct ChargeParameterDiscoveryResponse_ISO15118_2014
+{
+    enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct SAScheduleListType SAScheduleList;
+    struct AC_EVSEChargeParameterType_ISO15118_2014 AC_EVSEChargeParameter;
+    struct DC_EVSEChargeParameterType_ISO15118_2014 DC_EVSEChargeParameter;
+};
+struct ChargeParameterDiscoveryResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+    enum ProcessingType EVSEProcessing;
+    struct Scheduled_CPDResControlModeType Scheduled_CPDResControlMode;                 //Optional
+    struct AC_CPDResEnergyTransferModeType AC_CPDResEnergyTransferMode;
+    struct DC_CPDResEnergyTransferModeType DC_CPDResEnergyTransferMode;
+    struct BPT_AC_CPDResEnergyTransferModeType BPT_AC_CPDResEnergyTransferMode;
+    struct BPT_DC_CPDResEnergyTransferModeType BPT_DC_CPDResEnergyTransferMode;
+    struct WPT_CPDResEnergyTransferModeType WPT_CPDResEnergyTransferMode;
+    struct ACD_CPDResEnergyTransferModeType ACD_CPDResEnergyTransferMode;
+};
+/****PowerDeliveryRequest****/
+struct PowerDeliveryRequest_DIN70121
+{
+    BOOL ReadyToChargeState;
+    struct ChargingProfileType_DIN70121 ChargingProfile;
+    struct DC_EVPowerDeliveryParameterType_DIN70121 DC_EVPowerDeliveryParameter;
+};
+struct PowerDeliveryRequest_ISO15118_2014
+{
+    enum ChargeProgressType_ISO15118_2014 ChargeProgress;
+    short SAScheduleTupleID;
+    struct ChargingProfileType_ISO15118_2014 ChargingProfile;
+    struct DC_EVPowerDeliveryParameterType_ISO15118_2014 DC_EVPowerDeliveryParameter;
+};
+struct PowerDeliveryRequest_ISO15118_2018
+{
+    enum ChargeProgressType_ISO15118_2018 ChargeProgress;
+    struct Scheduled_PDReqControlModeType Scheduled_PDReqControlMode;
+    struct BPT_Scheduled_PDReqControlModeType BPT_Scheduled_PDReqControlMode;
+};
+/****PowerDeliveryResponse****/
+struct PowerDeliveryResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
+};
+struct PowerDeliveryResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+};
+struct PowerDeliveryResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                       //Optional
+};
+/****CertificateUpdateRequest****/
+struct CertificateUpdateRequest_ISO15118_2014
+{
+    unsigned char Id[32];
+    struct CertificateChainType ContractSignatureCertChain;
+    unsigned char eMAID[16];
+    struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
+};
+/****CertificateUpdateResponse****/
+struct CertificateUpdateResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct CertificateChainType SAProvisioningCertificateChain;
+    struct CertificateChainType ContractSignatureCertChain;
+    struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
+    struct DiffieHellmanPublickeyType DHpublickey;
+    unsigned char eMAID[16];
+    short RetryCounter;                                                                     //Optional
+};
+/****CertificateInstallationRequest****/
+struct CertificateInstallationRequest_ISO15118_2014
+{
+    unsigned char Id[32];
+    unsigned char OEMProvisioningCert[800];
+    struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
+};
+struct CertificateInstallationRequest_ISO15118_2018
+{
+    unsigned char Id[32];
+    struct CertificateChainType OEMProvisioningCertChain;
+    struct ListOfRootCertificateIDsType ListOfRootCertificateIDs;
+    unsigned short MaxSupportedCerts;
+};
+/****CertificateInstallationResponse****/
+struct CertificateInstallationResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct CertificateChainType SAProvisioningCertificateChain;
+    struct CertificateChainType ContractSignatureCertChain;
+    struct ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey;
+    struct DiffieHellmanPublickeyType DHpublickey;
+    unsigned char eMAID[16];
+};
+struct CertificateInstallationResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+    struct CertificateChainType SAProvisioningCertificateChain;
+    struct CertificateChainType ContractCertificateChain;
+    struct ContractCertificateEncryptedPrivateKeyType ContractEncryptedPrivateKey;
+    struct DiffieHellmanPublickeyType DHpublickey;
+    enum ProcessingType EVSEProcessing;
+    unsigned short RemainingContractCertificateChains;
+};
+/****SystemStatusRequest****/
+struct SystemStatusRequest_ISO15118_2018
+{
+    enum mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus;
+    struct EVTechnicalStatusType EVTechnicalStatus;
+    unsigned char EV_OEMStatus[800];                                                        //Optional
+};
+/****SystemStatusResponse****/
+struct SystemStatusResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    enum mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus;
+    BOOL EVSE_ReadyToCharge;
+    enum IsolationStatusType EVSE_IsolationStatus;
+    BOOL EVSE_Disabled;
+    BOOL EVSE_UtilityInterruptEvent;
+    BOOL EVSE_EmergencyShutdown;
+    BOOL EVSE_Malfunction;
+    BOOL EV_InChargePosition;
+    BOOL EV_AssociationStatus;
+};
+/****SessionStopRequest****/
+struct SessionStopRequest_DIN70121
+{
+    //No member in standard
+};
+struct SessionStopRequest_ISO15118_2014
+{
+    enum ChargingSessionType ChargingSession;
+};
+struct SessionStopRequest_ISO15118_2018
+{
+    enum ChargingSessionType ChargingSession;
+};
+/****SessionStopResponse****/
+struct SessionStopResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+};
+struct SessionStopResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+};
+struct SessionStopResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+};
+/****MeteringReceiptRequest****/
+struct MeteringReceiptRequest_ISO15118_2014
+{
+    unsigned char Id[32];                                                           //Optional
+    unsigned char SessionID[8];
+    short SAScheduleTupleID;                                                            //Optional
+    struct MeterInfoType_ISO15118_2014 MeterInfo;
+};
+struct MeteringReceiptRequest_ISO15118_2018
+{
+    unsigned char Id[32];                                                           //Optional
+    unsigned char SessionID[8];
+    struct Scheduled_MRReqControlModeType Schedule_MRReqControlMode;
+    struct MeterInfoType_ISO15118_2018 MeterInfo;
+};
+/****MeteringReceiptResponse****/
+struct MeteringReceiptResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+};
+struct MeteringReceiptResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+};
+/****ChargingStatusRequest (AC Only)****/
+struct ChargingStatusRequest_ISO15118_2014
+{
+    //No member in standard
+};
+struct ChargingStatusRequest_ISO15118_2018
+{
+    struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
+    struct Dynamic_CSReqControlModeType Dynamic_CSReqControlMode;
+    struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
+    struct DisplayParametersType DisplayParameters;
+};
+/****ChargingStatusResponse (AC Only)****/
+struct ChargingStatusResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    unsigned char EVSEID[40];                                               //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    short SAScheduleTupleID;
+    struct PhysicalValueType_ISO15118_2014 EVSEMaxCurrent;                  //Optional
+    struct MeterInfoType_ISO15118_2014 MeterInfo;                           //Optional
+    BOOL ReceiptRequired;                                                   //Optional
+    struct AC_EVSEStatusType_ISO15118_2014 AC_EVSEStatus;
+};
+struct ChargingStatusResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+    unsigned char EVSEID[40];                                                       //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    struct PhysicalValueType_ISO15118_2018 EVSETargetFrequency;                         //Optional
+    struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
+    struct Dynamic_CSResControlModeType Dynamic_CSResControlMode;
+    struct Scheduled_CSReqControlModeType Scheduled_CSReqControlMode;
+};
+/****CableCheckRequest (DC Only)****/
+struct CableCheckRequest_DIN70121
+{
+    struct DC_EVStatusType_DIN70121 DC_EVStatus;
+};
+struct CableCheckRequest_ISO15118_2014
+{
+    struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
+};
+struct CableCheckRequest_ISO15118_2018
+{
+    //No member in standard
+};
+/****CableCheckResponse (DC Only)****/
+struct CableCheckResponse_DIN70121
+{
+    unsigned int cnt;   //self added
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
+    enum EVSEProcessingType_DIN70121 EVSEProcessing;
+};
+
+struct CableCheckResponse_ISO15118_2014
+{
+    unsigned int cnt;  //self added
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+    enum EVSEProcessingType_ISO15118_2014 EVSEProcessing;
+};
+
+struct CableCheckResponse_ISO15118_2018
+{
+    unsigned int cnt;  //self added
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+    enum ProcessingType EVSEProcessing;
+};
+
+/****PreChargeRequest (DC Only)****/
+struct PreChargeRequest_DIN70121
+{
+    unsigned int cnt;  //self added
+    struct DC_EVStatusType_DIN70121 DC_EVStatus;
+    struct PhysicalValueType_DIN70121 EVTargetVoltage;
+    struct PhysicalValueType_DIN70121 EVTargetCurrent;
+};
+
+struct PreChargeRequest_ISO15118_2014
+{
+    unsigned int cnt;  //self added
+    struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
+    struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
+    struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
+};
+
+struct PreChargeRequest_ISO15118_2018
+{
+    unsigned int cnt;  //self added
+    struct PhysicalValueType_ISO15118_2018 EVTargetVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVTargetCurrent;
+};
+
+/****PreChargeResponse (DC Only)****/
+struct PreChargeResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
+    struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
+};
+
+struct PreChargeResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+    struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
+};
+
+struct PreChargeResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                                   //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
+};
+
+/****CurrentDemandRequest (DC Only)****/
+struct CurrentDemandRequest_DIN70121
+{
+    struct DC_EVStatusType_DIN70121 DC_EVStatus;
+    struct PhysicalValueType_DIN70121 EVTargetCurrent;
+    struct PhysicalValueType_DIN70121 EVMaximumVoltageLimit;                            //Optional
+    struct PhysicalValueType_DIN70121 EVMaximumCurrentLimit;                            //Optional
+    struct PhysicalValueType_DIN70121 EVMaximumPowerLimit;                                  //Optional
+    BOOL BulkChargingComplete;                                                              //Optional
+    BOOL ChargingComplete;
+    struct PhysicalValueType_DIN70121 RemainingTimeToFullSoC;                           //Optional
+    struct PhysicalValueType_DIN70121 RemainingTimeToBulkSoC;                           //Optional
+    struct PhysicalValueType_DIN70121 EVTargetVoltage;
+};
+
+struct CurrentDemandRequest_ISO15118_2014
+{
+    struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
+    struct PhysicalValueType_ISO15118_2014 EVTargetCurrent;
+    struct PhysicalValueType_ISO15118_2014 EVMaximumVoltageLimit;                       //Optional
+    struct PhysicalValueType_ISO15118_2014 EVMaximumCurrentLimit;                       //Optional
+    struct PhysicalValueType_ISO15118_2014 EVMaximumPowerLimit;                             //Optional
+    BOOL BulkChargingComplete;                                                              //Optional
+    BOOL ChargingComplete;
+    struct PhysicalValueType_ISO15118_2014 RemainingTimeToFullSoC;                      //Optional
+    struct PhysicalValueType_ISO15118_2014 RemainingTimeToBulkSoC;                      //Optional
+    struct PhysicalValueType_ISO15118_2014 EVTargetVoltage;
+};
+
+struct CurrentDemandRequest_ISO15118_2018
+{
+    struct DisplayParametersType DisplayParameters;                                     //Optional
+    struct PnC_CLReqIdentificationModeType PnC_CLReqIdentificationMode;
+    struct Dynamic_CSReqControlModeType Dynamic_CDReqControlMode;
+    struct Scheduled_CSReqControlModeType Scheduled_CDReqControlMode;
+};
+
+/****CurrentDemandResponse (DC Only)****/
+struct CurrentDemandResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
+    struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
+    struct PhysicalValueType_DIN70121 EVSEPresentCurrent;
+    BOOL EVSECurrentLimitAchieved;
+    BOOL EVSEVoltageLimitAchieved;
+    BOOL EVSEPowerLimitAchieved;
+    struct PhysicalValueType_DIN70121 EVSEMaximumVoltageLimit;                          //Optional
+    struct PhysicalValueType_DIN70121 EVSEMaximumCurrentLimit;                          //Optional
+    struct PhysicalValueType_DIN70121 EVSEMaximumPowerLimit;                        //Optional
+};
+
+struct CurrentDemandResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+    struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
+    struct PhysicalValueType_ISO15118_2014 EVSEPresentCurrent;
+    BOOL EVSECurrentLimitAchieved;
+    BOOL EVSEVoltageLimitAchieved;
+    BOOL EVSEPowerLimitAchieved;
+    struct PhysicalValueType_ISO15118_2014 EVSEMaximumVoltageLimit;                     //Optional
+    struct PhysicalValueType_ISO15118_2014 EVSEMaximumCurrentLimit;                     //Optional
+    struct PhysicalValueType_ISO15118_2014 EVSEMaximumPowerLimit;                   //Optional
+    unsigned char EVSEID[40];                                               //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    short SAScheduleTupleID;
+    struct MeterInfoType_ISO15118_2014 MeterInfo;                           //Optional
+    BOOL ReceiptRequired;                                                       //Optional
+};
+
+struct CurrentDemandResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                                   //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
+    struct PhysicalValueType_ISO15118_2018 EVSEPresentCurrent;
+    BOOL EVSECurrentLimitAchieved;
+    BOOL EVSEVoltageLimitAchieved;
+    BOOL EVSEPowerLimitAchieved;
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeVoltage;                    //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargeCurrent;                    //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEMaximumChargePower;                      //Optional
+    unsigned char EVSEID[40];                                                           //DIN70121=>Max length:32,	ISO15118=>min length:7, max length:37
+    struct PnC_CLResIdentificationModeType PnC_CLResIdentificationMode;
+    struct Scheduled_CDResControlModeType Scheduled_CDResControlMode;
+};
+
+/****WeldingDetectionRequest (DC Only)*****/
+struct WeldingDetectionRequest_DIN70121
+{
+    struct DC_EVStatusType_DIN70121 DC_EVStatus;
+};
+
+struct WeldingDetectionRequest_ISO15118_2014
+{
+    struct DC_EVStatusType_ISO15118_2014 DC_EVStatus;
+};
+
+struct WeldingDetectionRequest_ISO15118_2018
+{
+    //No member in Standard
+};
+
+/****WeldingDetectionResponse (DC Only)****/
+struct WeldingDetectionResponse_DIN70121
+{
+    enum ResponseCodeType_DIN70121 ResponseCode;
+    struct DC_EVSEStatusType_DIN70121 DC_EVSEStatus;
+    struct PhysicalValueType_DIN70121 EVSEPresentVoltage;
+};
+
+struct WeldingDetectionResponse_ISO15118_2014
+{
+    enum ResponseCodeType_ISO15118_2014 ResponseCode;
+    struct DC_EVSEStatusType_ISO15118_2014 DC_EVSEStatus;
+    struct PhysicalValueType_ISO15118_2014 EVSEPresentVoltage;
+};
+
+struct WeldingDetectionResponse_ISO15118_2018
+{
+    enum ResponseCodeType_ISO15118_2018 ResponseCode;
+    struct EVSEStatusType EVSEStatus;                                               //Optional
+    struct PhysicalValueType_ISO15118_2018 EVSEPresentVoltage;
+};
+
+/****FinePositioningSetupRequest (WPT Only)****/
+struct FinePositioningSetupRequest_ISO15118_2018
+{
+    struct LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters;   //Optional
+};
+
+/****FinePositioningSetupResponse (WPT Only)****/
+struct FinePositioningSetupResponse_ISO15118_2018
+{
+    //NOT complete yet,  to be continue.....
+};
+
+
+struct V2GMessageType_DIN70121 {
+    enum MsgFlowStatus PresentMsgFlowStatus;
+    enum MsgFlowStatus PresentMsgFlowStatus_pre;
+    /* 0: IDLE(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
+        4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
+        8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
+        12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
+        16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
+        19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
+        22: ServiceDetailRequest, 23: ServiceDetailResponse
+        24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
+        26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
+        28: AuthorizationRequest, 29: AuthorizationResponse,
+        30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
+        34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
+        36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
+        40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
+        44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
+        48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
+        52: SessionStopRequest, 53: SessionStopResponse
+       253: Performance Timeout, 254: Sequence Timeout, 255: Fault
+     */
+    struct SupportedAppProtocolRequest_DIN70121 SupportedAppProtocolRequest;
+    struct SupportedAppProtocolResponse_DIN70121 SupportedAppProtocolResponse;
+    struct SessionSetupRequest_DIN70121 SessionSetupRequest;
+    struct SessionSetupResponse_DIN70121 SessionSetupResponse;
+    struct ServiceDiscoveryRequest_DIN70121 ServiceDiscoveryRequest;
+    struct ServiceDiscoveryResponse_DIN70121 ServiceDiscoveryResponse;
+    struct ServiceAndPaymentSelectionRequest_DIN70121 ServiceAndPaymentSelectionRequest;
+    struct ServiceAndPaymentSelectionResponse_DIN70121 ServiceAndPaymentSelectionResponse;
+    struct ContractAuthenticationRequest_DIN70121 ContractAuthenticationRequest;
+    struct ContractAuthenticationResponse_DIN70121 ContractAuthenticationResponse;
+    struct ChargeParameterDiscoveryRequest_DIN70121 ChargeParameterDiscoveryRequest;
+    struct ChargeParameterDiscoveryResponse_DIN70121 ChargeParameterDiscoveryResponse;
+    struct CableCheckRequest_DIN70121 CableCheckRequest;
+    struct CableCheckResponse_DIN70121 CableCheckResponse;
+    struct PreChargeRequest_DIN70121 PreChargeRequest;
+    struct PreChargeResponse_DIN70121 PreChargeResponse;
+    struct PowerDeliveryRequest_DIN70121 PowerDeliveryRequest;
+    struct PowerDeliveryResponse_DIN70121 PowerDeliveryResponse;
+    struct CurrentDemandRequest_DIN70121 CurrentDemandRequest;
+    struct CurrentDemandResponse_DIN70121 CurrentDemandResponse;
+    struct WeldingDetectionRequest_DIN70121 WeldingDetectionRequest;
+    struct WeldingDetectionResponse_DIN70121 WeldingDetectionResponse;
+    struct SessionStopRequest_DIN70121 SessionStopRequest;
+    struct SessionStopResponse_DIN70121 SessionStopResponse;
+};
+
+struct V2GMessageType_ISO15118_2014 {
+    enum MsgFlowStatus PresentMsgFlowStatus;
+    enum MsgFlowStatus PresentMsgFlowStatus_pre;
+    /* 0: IDLE(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
+        4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
+        8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
+        12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
+        16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
+        19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
+        22: ServiceDetailRequest, 23: ServiceDetailResponse
+        24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
+        26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
+         28: AuthorizationRequest, 29: AuthorizationResponse,
+        30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
+        34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
+        36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
+        40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
+        44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
+        48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
+        52: SessionStopRequest, 53: SessionStopResponse
+       253: Performance Timeout, 254: Sequence Timeout, 255: Fault
+     */
+    struct SupportedAppProtocolRequest_ISO15118_2014 SupportedAppProtocolRequest;
+    struct SupportedAppProtocolResponse_ISO15118_2014 SupportedAppProtocolResponse;
+    struct SessionSetupRequest_ISO15118_2014 SessionSetupRequest;
+    struct SessionSetupResponse_ISO15118_2014 SessionSetupResponse;
+    struct ServiceDiscoveryRequest_ISO15118_2014 ServiceDiscoveryRequest;
+    struct ServiceDiscoveryResponse_ISO15118_2014 ServiceDiscoveryResponse;
+    struct ServiceDetailRequest_ISO15118_2014 ServiceDetailRequest;
+    struct ServiceDetailResponse_ISO15118_2014 ServiceDetailResponse;
+    struct ServiceAndPaymentSelectionRequest_ISO15118_2014 ServiceAndPaymentSelectionRequest;
+    struct ServiceAndPaymentSelectionResponse_ISO15118_2014 ServiceAndPaymentSelectionResponse;
+    struct PaymentDetailsRequest_ISO15118_2014 PaymentDetailsRequest;
+    struct PaymentDetailsResponse_ISO15118_2014 PaymentDetailsResponse;
+    struct AuthorizationRequest_ISO15118_2014 AuthorizationRequest;
+    struct AuthorizationResponse_ISO15118_2014 AuthorizationResponse;
+    struct CertificateUpdateRequest_ISO15118_2014 CertificateUpdateRequest;
+    struct CertificateUpdateResponse_ISO15118_2014 CertificateUpdateResponse;
+    struct CertificateInstallationRequest_ISO15118_2014 CertificateInstallationRequest;
+    struct CertificateInstallationResponse_ISO15118_2014 CertificateInstallationResponse;
+    struct ChargeParameterDiscoveryRequest_ISO15118_2014 ChargeParameterDiscoveryRequest;
+    struct ChargeParameterDiscoveryResponse_ISO15118_2014 ChargeParameterDiscoveryResponse;
+    struct CableCheckRequest_ISO15118_2014 CableCheckRequest;
+    struct CableCheckResponse_ISO15118_2014 CableCheckResponse;
+    struct PreChargeRequest_ISO15118_2014 PreChargeRequest;
+    struct PreChargeResponse_ISO15118_2014 PreChargeResponse;
+    struct PowerDeliveryRequest_ISO15118_2014 PowerDeliveryRequest;
+    struct PowerDeliveryResponse_ISO15118_2014 PowerDeliveryResponse;
+    struct ChargingStatusRequest_ISO15118_2014 ChargingStatusRequest;
+    struct ChargingStatusResponse_ISO15118_2014 ChargingStatusResponse;
+    struct CurrentDemandRequest_ISO15118_2014 CurrentDemandRequest;
+    struct CurrentDemandResponse_ISO15118_2014 CurrentDemandResponse;
+    struct MeteringReceiptRequest_ISO15118_2014 MeteringReceiptRequest;
+    struct MeteringReceiptResponse_ISO15118_2014 MeteringReceiptResponse;
+    struct WeldingDetectionRequest_ISO15118_2014 WeldingDetectionRequest;
+    struct WeldingDetectionResponse_ISO15118_2014 WeldingDetectionResponse;
+    struct SessionStopRequest_ISO15118_2014 SessionStopRequest;
+    struct SessionStopResponse_ISO15118_2014 SessionStopResponse;
+};
+
+struct V2GMessageType_ISO15118_2018 {
+    enum MsgFlowStatus PresentMsgFlowStatus;
+    enum MsgFlowStatus PresentMsgFlowStatus_pre;
+    /* 0: IDLE(wait B2 state), 1: CM_SLAC_PARM.REQ, 2: CM_SLAC_PARM.CNF, 3: CM_START_ATTEN_CHAR.IND
+        4: CM_MNBC_SOUND.IND, 5: CM_ATTEN_CHAR.IND, 6: CM_ATTEN_CHAR.RSP, 7: CM_VALIDATE.REQ
+        8: CM_VALIDATE.CNF, 9: CM_SLAC_MATCH.REQ, 10: CM_SLAC_MATCH.CNF, 11: CM_AMP_MAP.REQ
+        12: CM_AMP_MAP.CNF, 13: SLACC/SDP/TCP connection,
+        16: SupportedAppProtocolRequest, 17: SupportedAppProtocolResponse, 18: SessionSetupRequest
+        19: SessionSetupResponse, 20: ServiceDiscoveryRequest, 21: ServiceDiscoveryResponse
+        22: ServiceDetailRequest, 23: ServiceDetailResponse
+        24: ServiceAndPaymentSelectionRequest/ServiceSelectionRequest, 25: ServiceAndPaymentSelectionResponse/ServiceSelectionResponse
+        26: PaymentDetailsRequest/IdentificationDetailsRequest;, 27: PaymentDetailsResponse/IdentificationDetailsResponse,
+         28: AuthorizationRequest, 29: AuthorizationResponse,
+        30: CertificateUpdateRequest, 31: CertificateUpdateResponse, 32:CertificateInstallationRequest, 33: CertificateInstallationResponse
+        34: ChargeParameterDiscoveryRequest, 35: ChargeParameterDiscoveryResponse
+        36: CableCheckRequest, 37: CableCheckResponse, 38: PreChargeRequest, 39: PreChargeResponse
+        40: PowerDeliveryRequest start, 41: PowerDeliveryResponse start, 42: ChargingStatusRequest, 43: ChargingStatusResponse
+        44: CurrentDemandRequest, 45: CurrentDemandResponse, 46: MeteringReceiptRequest, 47: MeteringReceiptResponse
+        48: PowerDeliveryRequest end, 49: PowerDeliveryRequest end, 50: WeldingDetectionRequest, 51: WeldingDetectionResponse,
+        52: SessionStopRequest, 53: SessionStopResponse
+       253: Performance Timeout, 254: Sequence Timeout, 255: Fault
+     */
+    struct SupportedAppProtocolRequest_ISO15118_2018 SupportedAppProtocolRequest;
+    struct SupportedAppProtocolResponse_ISO15118_2018 SupportedAppProtocolResponse;
+    struct SessionSetupRequest_ISO15118_2018 SessionSetupRequest;
+    struct SessionSetupResponse_ISO15118_2018 SessionSetupResponse;
+    struct ServiceDiscoveryRequest_ISO15118_2018 ServiceDiscoveryRequest;
+    struct ServiceDiscoveryResponse_ISO15118_2018 ServiceDiscoveryResponse;
+    struct ServiceDetailRequest_ISO15118_2018 ServiceDetailRequest;
+    struct ServiceDetailResponse_ISO15118_2018 ServiceDetailResponse;
+    struct ServiceSelectionRequest_ISO15118_2018 ServiceSelectionRequest;
+    struct ServiceSelectionResponse_ISO15118_2018 ServiceSelectionResponse;
+    struct IdentificationDetailsRequest_ISO15118_2018 IdentificationDetailsRequest;
+    struct IdentificationDetailsResponse_ISO15118_2018 IdentificationDetailsResponse;
+    struct AuthorizationRequest_ISO15118_2018 AuthorizationRequest;
+    struct AuthorizationResponse_ISO15118_2018 AuthorizationResponse;
+    struct CertificateInstallationRequest_ISO15118_2018 CertificateInstallationRequest;
+    struct CertificateInstallationResponse_ISO15118_2018 CertificateInstallationResponse;
+    struct ChargeParameterDiscoveryRequest_ISO15118_2018 ChargeParameterDiscoveryRequest;
+    struct ChargeParameterDiscoveryResponse_ISO15118_2018 ChargeParameterDiscoveryResponse;
+    struct CableCheckRequest_ISO15118_2018 CableCheckRequest;
+    struct CableCheckResponse_ISO15118_2018 CableCheckResponse;
+    struct PreChargeRequest_ISO15118_2018 PreChargeRequest;
+    struct PreChargeResponse_ISO15118_2018 PreChargeResponse;
+    struct PowerDeliveryRequest_ISO15118_2018 PowerDeliveryRequest;
+    struct PowerDeliveryResponse_ISO15118_2018 PowerDeliveryResponse;
+    struct ChargingStatusRequest_ISO15118_2018 ChargingStatusRequest;
+    struct ChargingStatusResponse_ISO15118_2018 ChargingStatusResponse;
+    struct CurrentDemandRequest_ISO15118_2018 CurrentDemandRequest;
+    struct CurrentDemandResponse_ISO15118_2018 CurrentDemandResponse;
+    struct MeteringReceiptRequest_ISO15118_2018 MeteringReceiptRequest;
+    struct MeteringReceiptResponse_ISO15118_2018 MeteringReceiptResponse;
+    struct WeldingDetectionRequest_ISO15118_2018 WeldingDetectionRequest;
+    struct WeldingDetectionResponse_ISO15118_2018 WeldingDetectionResponse;
+    struct SessionStopRequest_ISO15118_2018 SessionStopRequest;
+    struct SessionStopResponse_ISO15118_2018 SessionStopResponse;
+};
+
+struct CcsData {
+    unsigned char CommProtocol;
+    //0: V2GT_MSG_PROTOCOL_DIN70121
+    //1: V2GT_MSG_PROTOCOL_ISO15118_2014
+    //2: V2GT_MSG_PROTOCOL_ISO15118_2018
+
+    unsigned char EnergyTransferMode;
+
+    struct V2GMessageType_DIN70121      V2GMessage_DIN70121;
+    struct V2GMessageType_ISO15118_2014 V2GMessage_ISO15118_2014;
+    struct V2GMessageType_ISO15118_2018 V2GMessage_ISO15118_2018;
+};
+
+struct InternalComm {
+    unsigned char ChargingPermission;
+    unsigned char SlaveAddress;
+    unsigned char IsolationStatus;              //0:ongoing, 1:valid, 2:warning/fault
+    unsigned char CCSConnectorType;             //0:CCS1, 1:CCS2
+    unsigned char MaximumAllowedChargingTime;   //0x00: unlimited
+                                                //(0x01: 1 minutes ~ 0xFF: 255 minutes, resolution: 1 minute)
+    unsigned int RTC;                           //4 bytes
+    unsigned char EVSEPrechargeStatus;
+
+    int MaximumChargingVoltage;                 //0~6553.5 volt, resolution: 0.1V
+    int AvailableChargingCurrent;               //0~6553.5 amp, resolution: 0.1V
+    int AvailableChargingPower;                 //0~6553.5 kW, resolution: 0.1KW
+    int PresentChargingVoltage;                 //0~6553.5 volt, resolution: 0.1V
+    int PresentChargingCurrent;                 //0~6553.5 amp, resolution: 0.1A
+    int PresentChargingPower;                   //0~6553.5 KW, resolution: 0.1KW
+    struct timeb CAN_Rx_Timer_Start;
+    struct timeb CAN_Rx_Timer_End;
+    int FD_CAN_Socket;
+    struct timeb Start_Time;
+    struct timeb End_Time;
+
+    unsigned char ChargingPermission_new;
+
+    BOOL AC_RcdStatus;                          //0:no error, 1:error
+    unsigned char AC_EVSEID[40];
+    unsigned char AC_MeterID[32];
+    unsigned char AC_EVSEModelName[32];
+    unsigned char AC_BatteryChargeType;
+    unsigned char AC_CpPresentPWMDuty;
+    unsigned char AC_CpPresentState;
+    unsigned short AC_ChargingRemainTime;
+    unsigned int AC_CSUAlarmStatusCode;
+    unsigned int AC_CcsHeartBeat;
+    float AC_GridVoltage[3];
+    float AC_MeterReadingValue;
+    float AC_CpPositiveVoltage;
+    float AC_CpNegativeVoltage;
+    float AC_EVSEMaxCurrent;
+	float AC_EVSEMinCurrent;
+    float AC_EVSEPresentCurrent[3];
+    BOOL AC_OutputRelayStatus;
+    float AC_AvailableChargingPower;					//1KW
+    unsigned char AC_EVSENotification;                  //0:none, 1:StopCharging, 2:RenNgotiation
+
+    unsigned char ChargingPermission_pre;
+    unsigned char SlaveAddress_pre;
+    unsigned char IsolationStatus_pre;              //0:ongoing, 1:valid, 2:warning/fault
+    unsigned char CCSConnectorType_pre;             //0:CCS1, 1:CCS2
+    unsigned char MaximumAllowedChargingTime_pre;   //0x00: unlimited
+                                                //(0x01: 1 minutes ~ 0xFF: 255 minutes, resolution: 1 minute)
+    unsigned int RTC_pre;                           //4 bytes
+    unsigned char EVSEPrechargeStatus_pre;
+
+    int MaximumChargingVoltage_pre;                 //0~6553.5 volt, resolution: 0.1V
+    int AvailableChargingCurrent_pre;               //0~6553.5 amp, resolution: 0.1V
+    int AvailableChargingPower_pre;                 //0~6553.5 kW, resolution: 0.1KW
+    int PresentChargingVoltage_pre;                 //0~6553.5 volt, resolution: 0.1V
+    int PresentChargingCurrent_pre;                 //0~6553.5 amp, resolution: 0.1A
+    int PresentChargingPower_pre;                   //0~6553.5 KW, resolution: 0.1KW
+
+    BOOL AC_RcdStatus_pre;                          //0:no error, 1:error
+    unsigned char AC_EVSEID_pre[40];
+    unsigned char AC_MeterID_pre[32];
+    unsigned char AC_EVSEModelName_pre[32];
+    unsigned char AC_BatteryChargeType_pre;
+    unsigned char AC_CpPresentPWMDuty_pre;
+    unsigned char AC_CpPresentState_pre;
+    unsigned short AC_ChargingRemainTime_pre;
+    unsigned int AC_CSUAlarmStatusCode_pre;
+    unsigned int AC_CcsHeartBeat_pre;
+    float AC_GridVoltage_pre[3];
+    float AC_MeterReadingValue_pre;
+    float AC_CpPositiveVoltage_pre;
+    float AC_CpNegativeVoltage_pre;
+    float AC_EVSEMaxCurrent_pre;
+	float AC_EVSEMinCurrent_pre;
+    float AC_EVSEPresentCurrent_pre[3];
+    BOOL AC_OutputRelayStatus_pre;
+    float AC_AvailableChargingPower_pre;					//1KW
+    unsigned char AC_EVSENotification_pre;                  //0:none, 1:StopCharging, 2:RenNgotiation
+
+    struct DownloadImageInfoStructure {
+        FILE *file;
+        unsigned char active;
+        unsigned char type;
+        char filename[128];
+        unsigned long image_rx_cnt;
+        unsigned long image_size;
+        unsigned long total_can_packets;
+        unsigned long image_size_received;       //unit: byte
+        unsigned char block_quantity;
+        unsigned char block_sequence_number;
+        unsigned char block_size_KByte;               //unit: KBytes
+        unsigned char block_checksum;
+        unsigned char final_canmsg_size;  //unit: byte
+        unsigned char downlaod_percentage;
+        unsigned char downlaod_percentage_pre;
+    } DownloadImageInfo;
+
+    struct EVSEStopChargingReqType {
+        unsigned char type;
+        unsigned char alarmcode[6];
+    } EVSEStopChargingReq;
+
+    union
+    {
+        unsigned char InternalCommVal;
+        struct
+        {
+            //FaultVal[0]
+            unsigned int matched:                   1; //CAN_CMD_ADDRESS_REQUEST             0x00000100
+            unsigned int Got_AssignedAddress:       1; //CAN_CMD_ADDRESS_ASSIGN              0x00000200
+            unsigned int Send_EVBoardStatus:        1; //CAN_CMD_EV_BOARD_STATUS             0x00000300
+            unsigned int Got_FWVersionReq:          1; //CAN_CMD_GET_FW_VERSION              0x00000400
+            unsigned int Got_HWVersionReq:          1; //CAN_CMD_GET_HW_VERSION              0x00000500
+
+            unsigned int Got_ChargingPermission:    1; //CAN_CMD_CHARGING_PERMISSION          0x00000600
+            unsigned int Got_EVSEOutputStatus:      1; //CAN_CMD_EVSE_OUTPUT_STATUS_ANNOUNCEMENT  0x00000700
+            unsigned int Got_EnergyCapacity:        1; //CAN_CMD_EVSE_CAPACITY_ANNOUNCEMENT       0x00000800
+            unsigned int Got_EVTargetReq:           1; //CAN_CMD_GET_EV_TARGET_INFO           0x00000900
+            unsigned int Got_EVBatteryInfoReq:      1; //CAN_CMD_GET_EV_BATTERY_INFO          0x00000A00
+
+            unsigned int Send_EVStopReq:            1; //#define CAN_CMD_EV_STOP_EVENT        0x00000B00
+            unsigned int Got_EVSEStopReq:           1; //#define CAN_CMD_EVSE_STOP_EVENT      0x00000C00
+            unsigned int Got_MiscellaneousInfoReq:  1; //#define CAN_CMD_GET_MISC_INFO        0x00000D00
+            unsigned int Got_DownloadImageReq:      1; //#define CAN_CMD_DOWNLOAD_REQUEST     0x00000E00
+            unsigned int Got_BlockTransferStartReq: 1; //#define CAN_CMD_START_BLOCK_TRANSFER 0x00000F00
+
+            unsigned int Got_DataTransferReq:       1; //CAN_CMD_DATA_TRANSFER                0x00001000
+            unsigned int Got_DownloadFinishReq:     1; //CAN_CMD_DOWNLOAD_FINISH              0x00001100
+            unsigned int Got_IsolationStatus:       1; //CAN_CMD_ISOLATION_STATUS             0x00001200
+            unsigned int Got_CCSConnectorReq:       1; //CAN_CMD_CCS_CONNECTOR_INFO           0x00001300
+            unsigned int Got_RTC:                   1; //CAN_CMD_RTC_INFO                     0x00001400
+
+            unsigned int Got_EVSE_Precharge_Info:   1; //CAN_CMD_EVSE_PRECHARGE_INFO          0x00001500
+            unsigned int Got_EVCCID_Req:            1; //CAN_CMD_EVCCID_REQUEST               0x00001600
+            unsigned int EV_Stop_Type_Emergency:    1;
+            unsigned int FW_Update_Done:            1;
+            unsigned int FW_Update_Task_inused:     1;
+            unsigned int FW_Update_result:          1;
+            unsigned int FW_Update_Reboot_inused:   1;
+            unsigned int CAN_Rx_Timeout:            1;
+            unsigned int Reboot_Process_inused:     1;
+            unsigned int reserved:                  3;
+        } bits;
+    } InternalCommUnion;
+};
+#endif // DEFINE_H_

+ 5010 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/api/api.c

@@ -0,0 +1,5010 @@
+/*===========================================================================
+                    Combined Charging System (CCS): SECC
+                                 api.c
+
+                          initiated by Joseph
+                           (since 2019/08/07)
+=============================================================================*/
+#include <netinet/ip.h>
+#include <arpa/inet.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <linux/termios.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <stdlib.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/mman.h>
+#include <linux/sockios.h>
+#include <linux/socket.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/time.h>
+#include <sys/timeb.h>
+#include <math.h>//for pow
+#include <unistd.h>
+#include <linux/if_packet.h>
+#include <netinet/if_ether.h>
+#include <net/if.h>
+#include <netinet/ether.h>
+#include <linux/can.h>
+#include <linux/can/raw.h>
+
+#include "api.h"
+#include "Module_CCS.h"
+//#include "../../CsuComm.h"
+#include "define_ccs.h"
+#include "../codec/EXITypes.h"
+
+/* Activate support for DIN */
+#include "../din/dinEXIDatatypes.h"
+#if DEPLOY_DIN_CODEC == SUPPORT_YES
+#include "../din/dinEXIDatatypesEncoder.h"
+#include "../din/dinEXIDatatypesDecoder.h"
+#endif /* DEPLOY_DIN_CODEC == SUPPORT_YES */
+
+/* Activate support for XMLDSIG */
+#include "../xmldsig/xmldsigEXIDatatypes.h"
+#if DEPLOY_XMLDSIG_CODEC == SUPPORT_YES
+#include "../xmldsig/xmldsigEXIDatatypesEncoder.h"
+#include "../xmldsig/xmldsigEXIDatatypesDecoder.h"
+#endif /* DEPLOY_XMLDSIG_CODEC == SUPPORT_YES */
+
+/* Activate support for ISO1 */
+#include "../iso1/iso1EXIDatatypes.h"
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
+#include "../iso1/iso1EXIDatatypesEncoder.h"
+#include "../iso1/iso1EXIDatatypesDecoder.h"
+#endif /* DEPLOY_ISO1_CODEC == SUPPORT_YES */
+
+/* Activate support for ISO2 */
+#include "../iso2/iso2EXIDatatypes.h"
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
+#include "../iso2/iso2EXIDatatypesEncoder.h"
+#include "../iso2/iso2EXIDatatypesDecoder.h"
+#endif /* DEPLOY_ISO2_CODEC == SUPPORT_YES */
+
+#include "../transport/v2gtp.h"
+
+extern struct SysConfigAndInfo *ShmSysConfigAndInfo;
+extern struct StatusCodeData *ShmStatusCodeData;
+extern struct CcsData *ShmCcsData;
+extern struct InternalComm *ShmInternalComm;
+extern struct InternalCommAC *ShmInternalCommAC;
+
+/*Preserve V2GTP Rx and Tx Buffer*/
+//unsigned char V2GTP_Rx_buf[V2GTP_MSG_RX_BUFFER_SIZE];	//(64*1024)   //65,536 = 65.5KB
+unsigned char V2GTP_Tx_buf[V2GTP_MSG_TX_BUFFER_SIZE];		//(64*1024)   //65,536 = 65.5KB
+
+
+bitstream_t iStream;	//for V2GTP Message
+struct appHandEXIDocument exiDoc;	//for decoded V2GTP messages, i.e. EXI DOC (XML)
+
+unsigned char buf_log_exi_api[256];
+
+
+/*===========================================================================
+FUNCTION: printASCIIString
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+			1. exi_doc_DIN
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+static void printASCIIString(exi_string_character_t* string, uint16_t len)
+{
+	unsigned int i = 0;
+
+	for(i = 0; i < len; i++)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("%c", (char)string[i]);
+	}
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n");
+}
+
+/*===========================================================================
+FUNCTION: writeStringToEXIString
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+			1. exi_doc_DIN
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+/*
+static int writeStringToEXIString(char* string, exi_string_character_t* exiString)
+{
+	int pos = 0;
+	while(string[pos]!='\0')
+	{
+		exiString[pos] = string[pos];
+		pos++;
+	}
+
+	return pos;
+}*/
+
+/*===========================================================================
+FUNCTION: PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+			1. exi_doc_DIN
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_V2G_Rx_Msg_Name_din(struct dinEXIDocument *exi_doc_DIN)
+{
+	int errn = 0;
+
+	//Session Setup (0a ⇄ 0b)
+	if (exi_doc_DIN->V2G_Message.Body.SessionSetupReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] SessionSetupReq_isUsed: YES (0a ⇄ 0b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = SessionSetupRequest;
+	}
+	//Service Discovery (1a ⇄ 1b)
+	else if (exi_doc_DIN->V2G_Message.Body.ServiceDiscoveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] ServiceDiscoveryReq_isUsed: YES (1a ⇄ 1b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceDiscoveryRequest;
+	}
+	//Service Payment Selection (2a ⇄ 2b)
+	else if (exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] ServicePaymentSelectionReq_isUsed: YES (2a ⇄ 2b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceAndPaymentSelectionRequest;
+	}
+	//Contract Contract Authentication (Xa ⇄ Xb)
+	else if (exi_doc_DIN->V2G_Message.Body.ContractAuthenticationReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] ContractAuthenticationReq_isUsed: YES (Xa ⇄ Xb)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = AuthorizationRequest;
+	}
+	//Charge Parameter Discovery (3a ⇄ 3b)
+	else if (exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] ChargeParameterDiscoveryReq_isUsed: YES (3a ⇄ 3b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ChargeParameterDiscoveryRequest;
+	}
+	//Cable Check (4a ⇄ 4b)
+	else if (exi_doc_DIN->V2G_Message.Body.CableCheckReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] CableCheckReq_isUsed: YES (4a ⇄ 4b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CableCheckRequest;
+	}
+	//Precharge (5a ⇄ 5b)
+	else if (exi_doc_DIN->V2G_Message.Body.PreChargeReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] PreChargeReq_isUsed: YES (5a ⇄ 5b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = PreChargeRequest;
+	}
+	//Power Delivery (6a ⇄ 6b)
+	else if (exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] PowerDeliveryReq_isUsed: YES (6a ⇄ 6b)\n");
+
+		if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre == PreChargeRequest)
+		{
+			EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStart;
+		}
+		else
+		{
+			EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStop;
+		}
+	}
+	//Current Demand (7a ⇄ 7b)
+	else if (exi_doc_DIN->V2G_Message.Body.CurrentDemandReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] CurrentDemandReq_isUsed: YES (7a ⇄ 7b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CurrentDemandRequest;
+	}
+	//Welding Detection (9a ⇄ 9b)
+	else if (exi_doc_DIN->V2G_Message.Body.WeldingDetectionReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] WeldingDetectionReq_isUsed: YES (9a ⇄ 9b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = WeldingDetectionRequest;
+	}
+	//Session Stop (10a ⇄ 10b)
+	else if (exi_doc_DIN->V2G_Message.Body.SessionStopReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_DIN] SessionStopReq_isUsed: YES (10a ⇄ 10b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = SessionStopRequest;
+	}
+	else
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]unidentified V2G_Rx_Msg\n");
+		errn = -1;
+	}
+
+	//Compare with the previous Message
+	if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre != EVCOMM_SYS_INFO.V2G_Rx_Msg)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[V2G_RX_MSG]%d >> %d\n",
+										EVCOMM_SYS_INFO.V2G_Rx_Msg_pre,
+										EVCOMM_SYS_INFO.V2G_Rx_Msg);
+		EVCOMM_SYS_INFO.V2G_Rx_Msg_pre = EVCOMM_SYS_INFO.V2G_Rx_Msg;
+	}
+
+	return errn;
+}
+
+/*===========================================================================
+FUNCTION: PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+			1. exi_doc_ISO1
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_V2G_Rx_Msg_Name_iso1(struct iso1EXIDocument *exi_doc_ISO1)
+{
+	int errn = 0;
+
+	//Session Setup (0a ⇄ 0b)
+	if (exi_doc_ISO1->V2G_Message.Body.SessionSetupReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] SessionSetupReq_isUsed: YES (0a ⇄ 0b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = SessionSetupRequest;
+	}
+	//Service Discovery (1a ⇄ 1b)
+	else if (exi_doc_ISO1->V2G_Message.Body.ServiceDiscoveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] ServiceDiscoveryReq_isUsed: YES (1a ⇄ 1b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceDiscoveryRequest;
+	}
+	//Service Detail
+	else if (exi_doc_ISO1->V2G_Message.Body.ServiceDetailReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] ServiceDetailReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceDetailRequest;
+	}
+	//Payment Service Selection (2a ⇄ 2b)
+	else if (exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] PaymentServiceSelectionReq_isUsed: YES (2a ⇄ 2b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceAndPaymentSelectionRequest;
+	}
+	//Payment Details
+	else if (exi_doc_ISO1->V2G_Message.Body.PaymentDetailsReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] PaymentDetailsReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = PaymentDetailsRequest;
+	}
+	//Authorization (Xa ⇄ Xb)
+	else if (exi_doc_ISO1->V2G_Message.Body.AuthorizationReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] AuthorizationReq_isUsed: YES (Xa ⇄ Xb)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = AuthorizationRequest;
+	}
+	//Certificate Update
+	else if (exi_doc_ISO1->V2G_Message.Body.CertificateUpdateReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] CertificateUpdateReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CertificateUpdateRequest;
+	}
+	//Certificate Installation
+	else if (exi_doc_ISO1->V2G_Message.Body.CertificateInstallationReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] CertificateInstallationReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CertificateInstallationRequest;
+	}
+	//Charge Parameter Discovery (3a ⇄ 3b)
+	else if (exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] ChargeParameterDiscoveryReq_isUsed: YES (3a ⇄ 3b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ChargeParameterDiscoveryRequest;
+	}
+	//Cable Check (4a ⇄ 4b)
+	else if (exi_doc_ISO1->V2G_Message.Body.CableCheckReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] CableCheckReq_isUsed: YES (4a ⇄ 4b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CableCheckRequest;
+	}
+	//Precharge (5a ⇄ 5b)
+	else if (exi_doc_ISO1->V2G_Message.Body.PreChargeReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] PreChargeReq_isUsed: YES (5a ⇄ 5b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = PreChargeRequest;
+	}
+	//Power Delivery (6a ⇄ 6b)
+	else if (exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] PowerDeliveryReq_isUsed: YES (6a ⇄ 6b)\n");
+
+		//For DC
+		if (CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED)
+		{
+			if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre == PreChargeRequest)
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStart;
+			}
+			else
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStop;
+			}
+		}
+		//For AC
+		else if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+		{
+			if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre == ChargeParameterDiscoveryRequest)
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStart;
+			}
+			else
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStop;
+			}
+		}
+		else
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]unexpected CCS_ENERGY_TRANSFER_MODE(%d)\n", CCS_ENERGY_TRANSFER_MODE);
+			errn = -2;
+		}
+	}
+	//Current Demand (7a ⇄ 7b)
+	else if (exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] CurrentDemandReq_isUsed: YES (7a ⇄ 7b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CurrentDemandRequest;
+	}
+	//Charging Status
+	else if (exi_doc_ISO1->V2G_Message.Body.ChargingStatusReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] ChargingStatusReq_isUsed: YES (7a ⇄ 7b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ChargingStatusRequest;
+	}
+	//Metering Receipt
+	else if (exi_doc_ISO1->V2G_Message.Body.MeteringReceiptReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] MeteringReceiptReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = MeteringReceiptRequest;
+	}
+	//Welding Detection (9a ⇄ 9b)
+	else if (exi_doc_ISO1->V2G_Message.Body.WeldingDetectionReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] WeldingDetectionReq_isUsed: YES (9a ⇄ 9b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = WeldingDetectionRequest;
+	}
+	//Session Stop (10a ⇄ 10b)
+	else if (exi_doc_ISO1->V2G_Message.Body.SessionStopReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO1] SessionStopReq_isUsed: YES (10a ⇄ 10b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = SessionStopRequest;
+	}
+	else
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]unidentified V2G_Rx_Msg\n");
+		errn = -1;
+	}
+
+	//Compare with the previous Message
+	if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre != EVCOMM_SYS_INFO.V2G_Rx_Msg)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[V2G_RX_MSG]%d >> %d\n",
+										EVCOMM_SYS_INFO.V2G_Rx_Msg_pre,
+										EVCOMM_SYS_INFO.V2G_Rx_Msg);
+		EVCOMM_SYS_INFO.V2G_Rx_Msg_pre = EVCOMM_SYS_INFO.V2G_Rx_Msg;
+	}
+
+	return errn;
+}
+
+/*===========================================================================
+FUNCTION: PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+			1. exi_doc_ISO2
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int Check_V2G_Rx_Msg_Name_iso2(struct iso2EXIDocument *exi_doc_ISO2)
+{
+	int errn = 0;
+
+	//V2GRequest_isUsed
+	if (exi_doc_ISO2->V2G_Message.Body.V2GRequest_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] V2GRequest_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//DisconnectChargingDeviceReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.DisconnectChargingDeviceReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] DisconnectChargingDeviceReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//ConnectChargingDeviceReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.ConnectChargingDeviceReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] ConnectChargingDeviceReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//SystemStatusReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.SystemStatusReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] SystemStatusReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//DC_BidirectionalControlReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.DC_BidirectionalControlReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] DC_BidirectionalControlReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//AC_BidirectionalControlReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.AC_BidirectionalControlReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] AC_BidirectionalControlReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//VehicleCheckOutReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.VehicleCheckOutReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] VehicleCheckOutReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//VehicleCheckInReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.VehicleCheckInReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] VehicleCheckInReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//PowerDemandReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.PowerDemandReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] PowerDemandReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//PairingReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.PairingReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] PairingReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//AlignmentCheckReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.AlignmentCheckReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] AlignmentCheckReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//FinePositioningReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.FinePositioningReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] FinePositioningReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//FinePositioningSetupReq_isUsed
+	else if (exi_doc_ISO2->V2G_Message.Body.FinePositioningSetupReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] FinePositioningSetupReq_isUsed: YES\n");
+		//EVCOMM_SYS_INFO.V2G_Rx_Msg = ;
+	}
+	//Session Setup (0a ⇄ 0b)
+	else if (exi_doc_ISO2->V2G_Message.Body.SessionSetupReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] SessionSetupReq_isUsed: YES (0a ⇄ 0b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = SessionSetupRequest;
+	}
+	//Service Discovery (1a ⇄ 1b)
+	else if (exi_doc_ISO2->V2G_Message.Body.ServiceDiscoveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] ServiceDiscoveryReq_isUsed: YES (1a ⇄ 1b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceDiscoveryRequest;
+	}
+	//Service Detail
+	else if (exi_doc_ISO2->V2G_Message.Body.ServiceDetailReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] ServiceDetailReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceDetailRequest;
+	}
+	//Payment Service Selection (2a ⇄ 2b)
+	else if (exi_doc_ISO2->V2G_Message.Body.PaymentServiceSelectionReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] PaymentServiceSelectionReq_isUsed: YES (2a ⇄ 2b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ServiceAndPaymentSelectionRequest;
+	}
+	//Payment Details
+	else if (exi_doc_ISO2->V2G_Message.Body.PaymentDetailsReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] PaymentDetailsReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = PaymentDetailsRequest;
+	}
+	//Authorization (Xa ⇄ Xb)
+	else if (exi_doc_ISO2->V2G_Message.Body.AuthorizationReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] AuthorizationReq_isUsed: YES (Xa ⇄ Xb)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = AuthorizationRequest;
+	}
+	//Certificate Update
+	else if (exi_doc_ISO2->V2G_Message.Body.CertificateUpdateReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] CertificateUpdateReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CertificateUpdateRequest;
+	}
+	//Certificate Installation
+	else if (exi_doc_ISO2->V2G_Message.Body.CertificateInstallationReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] CertificateInstallationReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CertificateInstallationRequest;
+	}
+	//Charge Parameter Discovery (3a ⇄ 3b)
+	else if (exi_doc_ISO2->V2G_Message.Body.ChargeParameterDiscoveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] ChargeParameterDiscoveryReq_isUsed: YES (3a ⇄ 3b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ChargeParameterDiscoveryRequest;
+	}
+	//Cable Check (4a ⇄ 4b)
+	else if (exi_doc_ISO2->V2G_Message.Body.CableCheckReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] CableCheckReq_isUsed: YES (4a ⇄ 4b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CableCheckRequest;
+	}
+	//Precharge (5a ⇄ 5b)
+	else if (exi_doc_ISO2->V2G_Message.Body.PreChargeReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] PreChargeReq_isUsed: YES (5a ⇄ 5b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = PreChargeRequest;
+	}
+	//Power Delivery (6a ⇄ 6b)
+	else if (exi_doc_ISO2->V2G_Message.Body.PowerDeliveryReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] PowerDeliveryReq_isUsed: YES (6a ⇄ 6b)\n");
+
+		//For DC
+		if (CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED)
+		{
+			if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre == PreChargeRequest)
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStart;
+			}
+			else
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStop;
+			}
+		}
+		//For AC
+		else if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) || (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+		{
+			if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre == ChargeParameterDiscoveryRequest)
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStart;
+			}
+			else
+			{
+				EVCOMM_SYS_INFO.V2G_Rx_Msg = PowerDeliveryRequestStop;
+			}
+		}
+		else
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]unexpected CCS_ENERGY_TRANSFER_MODE(%d)\n", CCS_ENERGY_TRANSFER_MODE);
+			errn = -2;
+		}
+	}
+	//Current Demand (7a ⇄ 7b)
+	else if (exi_doc_ISO2->V2G_Message.Body.CurrentDemandReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] CurrentDemandReq_isUsed: YES (7a ⇄ 7b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = CurrentDemandRequest;
+	}
+	//Charging Status
+	else if (exi_doc_ISO2->V2G_Message.Body.ChargingStatusReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] ChargingStatusReq_isUsed: YES (7a ⇄ 7b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = ChargingStatusRequest;
+	}
+	//Metering Receipt
+	else if (exi_doc_ISO2->V2G_Message.Body.MeteringReceiptReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] MeteringReceiptReq_isUsed: YES\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = MeteringReceiptRequest;
+	}
+	//Welding Detection (9a ⇄ 9b)
+	else if (exi_doc_ISO2->V2G_Message.Body.WeldingDetectionReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] WeldingDetectionReq_isUsed: YES (9a ⇄ 9b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = WeldingDetectionRequest;
+	}
+	//Session Stop (10a ⇄ 10b)
+	else if (exi_doc_ISO2->V2G_Message.Body.SessionStopReq_isUsed == 1u)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][PRINT_V2GTP_MSG_RX_REQUEST_NAME_ISO2] SessionStopReq_isUsed: YES (10a ⇄ 10b)\n");
+		EVCOMM_SYS_INFO.V2G_Rx_Msg = SessionStopRequest;
+	}
+	else
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]unidentified V2G_Rx_Msg\n");
+		errn = -1;
+	}
+
+	//Compare with the previous Message
+	if (EVCOMM_SYS_INFO.V2G_Rx_Msg_pre != EVCOMM_SYS_INFO.V2G_Rx_Msg)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[V2G_RX_MSG]%d >> %d\n",
+										EVCOMM_SYS_INFO.V2G_Rx_Msg_pre,
+										EVCOMM_SYS_INFO.V2G_Rx_Msg);
+		EVCOMM_SYS_INFO.V2G_Rx_Msg_pre = EVCOMM_SYS_INFO.V2G_Rx_Msg;
+	}
+
+	return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: SAVE_PhysicalValueType_DIN70121
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SAVE_PhysicalValueType_DIN70121(struct PhysicalValueType_DIN70121 *out, int in_value, unsigned char unit)
+{
+    out->Value = in_value;
+    out->Unit = unit;
+
+    switch (unit)
+    {
+        case H_DIN70121:
+        case M_DIN70121:
+        case S_DIN70121:
+        case A_DIN70121:
+        case V_DIN70121:
+        case AH_DIN70121:
+        case VA_DIN70121:
+            out->Multiplier = -1;
+            break;    //KW
+
+        case W_DIN70121:
+        case WH_DIN70121:
+			out->Value = in_value * 10;
+            out->Multiplier = 1;
+            break;    //KWh
+    }
+    //H_DIN70121 = 0,
+    //M_DIN70121 = 1,
+    //S_DIN70121 = 2,
+    //A_DIN70121 = 3,
+    //AH_DIN70121 = 4,
+    //V_DIN70121 = 5,
+    //VA_DIN70121 = 6,
+    //W_DIN70121 = 7,
+    //WS_DIN70121 = 8,
+    //WH_DIN70121 = 9};
+}
+
+/*===========================================================================
+FUNCTION: SAVE_PhysicalValueType_ISO15118_2014
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SAVE_PhysicalValueType_ISO15118_2014(struct PhysicalValueType_ISO15118_2014 *out, int in_value, unsigned char unit)
+{
+    out->Value = in_value;
+    out->Unit = unit;
+
+    switch (unit)
+    {
+        case h_ISO15118_2014:
+        case m_ISO15118_2014:
+        case s_ISO15118_2014:
+        case A_ISO15118_2014:
+        case V_ISO15118_2014:
+            out->Multiplier = -1;
+            break;    //KW
+
+        case W_ISO15118_2014:
+        case Wh_ISO15118_2014:
+			out->Value = in_value * 10;
+            out->Multiplier = 1;
+            break;    //KWh
+    }
+    //H_DIN70121 = 0,
+    //M_DIN70121 = 1,
+    //S_DIN70121 = 2,
+    //A_DIN70121 = 3,
+    //AH_DIN70121 = 4,
+    //V_DIN70121 = 5,
+    //VA_DIN70121 = 6,
+    //W_DIN70121 = 7,
+    //WS_DIN70121 = 8,
+    //WH_DIN70121 = 9};
+}
+
+
+/*===========================================================================
+FUNCTION: DIN70121PhyValDecode
+DESCRIPTION:
+        Output Unit: 1V, 1A, 1S, etc.
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+float DIN70121PhyValDecode(struct PhysicalValueType_DIN70121 PhysicalData)
+{
+    short DataValue;
+    int DataMultiplier;
+    float Rtn;
+
+    DataValue = PhysicalData.Value;
+    DataMultiplier = PhysicalData.Multiplier;
+
+    switch(PhysicalData.Unit)
+    {
+        case H_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier) * 60 * 60);
+            return Rtn;
+
+        case M_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier) * 60);
+            return Rtn;
+
+        case S_DIN70121:
+        case A_DIN70121:
+        case V_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier));
+            return Rtn;     //S, A, V
+
+        case AH_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier));
+            return Rtn;
+
+        case VA_DIN70121:
+        case W_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier)) / 1000;
+            return Rtn;    //kW
+
+        case WS_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier)) / 1000;    //[Joseph] TBD
+            return Rtn;
+
+        case WH_DIN70121:
+            Rtn = (DataValue * pow(10, DataMultiplier)) / 1000;
+            return Rtn;    //kWh
+    }
+
+    return 0;
+}
+
+/*===========================================================================
+FUNCTION: ISO151182014PhyValDecode
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+float ISO151182014PhyValDecode(struct PhysicalValueType_ISO15118_2014 PhysicalData)
+{
+    short DataValue;
+    int DataMultiplier;
+    float Rtn;
+
+    DataValue = PhysicalData.Value;
+    DataMultiplier = PhysicalData.Multiplier;
+
+    switch(PhysicalData.Unit)
+    {
+        case h_ISO15118_2014:
+            Rtn = (DataValue * pow(10, DataMultiplier) * 60 * 60);
+            return Rtn;
+
+        case m_ISO15118_2014:
+            Rtn = (DataValue * pow(10, DataMultiplier) * 60);
+            return Rtn;
+
+        case s_ISO15118_2014:
+        case A_ISO15118_2014:
+        case V_ISO15118_2014:
+            Rtn = (DataValue * pow(10, DataMultiplier));
+            return Rtn;
+
+        case W_ISO15118_2014:
+            Rtn = (DataValue * pow(10, DataMultiplier)) / 1000;
+            return Rtn;    //kW
+
+        case Wh_ISO15118_2014:
+            Rtn = (DataValue * pow(10, DataMultiplier)) / 1000;
+            return Rtn;    //kWh
+    }
+
+    return 0;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_dinPhysicalValueType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_dinPhysicalValueType(struct dinPhysicalValueType *out, struct PhysicalValueType_DIN70121 *in)
+{
+	out->Value = (short) in->Value;
+	out->Multiplier = (char) in->Multiplier;
+	out->Unit_isUsed = 1u;	//[CAUTION] Remember to put Uinit, since here we set it as 1 as default.
+	out->Unit = (unsigned char) in->Unit;
+	//	dinunitSymbolType_h = 0,
+	//	dinunitSymbolType_m = 1,
+	//	dinunitSymbolType_s = 2,
+	//	dinunitSymbolType_A = 3,
+	//	dinunitSymbolType_Ah = 4,
+	//	dinunitSymbolType_V = 5,
+	//	dinunitSymbolType_VA = 6,
+	//	dinunitSymbolType_W = 7,
+	//	dinunitSymbolType_W_s = 8,
+	//	dinunitSymbolType_Wh = 9
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1PhysicalValueType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1PhysicalValueType(struct iso1PhysicalValueType *out, struct PhysicalValueType_ISO15118_2014 *in)
+{
+	out->Value = (short) in->Value;
+	out->Multiplier = (char) in->Multiplier;
+	//out->Unit_isUsed = 1u;	//[CAUTION] Remember to put Uinit, since here we set it as 1 as default.
+	out->Unit = (unsigned char) in->Unit;
+	//iso1unitSymbolType_h = 0,
+	//iso1unitSymbolType_m = 1,
+	//iso1unitSymbolType_s = 2,
+	//iso1unitSymbolType_A = 3,
+	//iso1unitSymbolType_V = 4,
+	//iso1unitSymbolType_W = 5,
+	//iso1unitSymbolType_Wh = 6
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_dinDC_EVSEStatusType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType *out, struct DC_EVSEStatusType_DIN70121 *in)
+{
+	out->EVSEIsolationStatus_isUsed = 1u;
+	out->EVSEIsolationStatus = (unsigned char) in->EVSEIsolationStatus;
+	//	dinisolationLevelType_Invalid = 0, (default)
+	//	dinisolationLevelType_Valid = 1,
+	//	dinisolationLevelType_Warning = 2,
+	//	dinisolationLevelType_Fault = 3
+
+	out->EVSEStatusCode = (unsigned char) in->EVSEStatusCode;
+	// dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	// dinDC_EVSEStatusCodeType_EVSE_Ready = 1, (default)
+	// dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	// dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	// dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	// dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	// dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	// dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+	// dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+	// dinDC_EVSEStatusCodeType_Reserved_A = 9,
+	// dinDC_EVSEStatusCodeType_Reserved_B = 10,
+	// dinDC_EVSEStatusCodeType_Reserved_C = 11
+
+	out->NotificationMaxDelay = 0u;
+
+	out->EVSENotification = (unsigned char) in->EVSENotification;
+	// dinEVSENotificationType_None = 0, (default)
+	// dinEVSENotificationType_StopCharging = 1,
+	// dinEVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1DC_EVSEStatusType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1DC_EVSEStatusType(struct iso1DC_EVSEStatusType *out, struct DC_EVSEStatusType_ISO15118_2014 *in)
+{
+	out->EVSEIsolationStatus_isUsed = 1u;
+	out->EVSEIsolationStatus = (unsigned char) in->EVSEIsolationStatus;
+	//iso1isolationLevelType_Invalid = 0,
+	//iso1isolationLevelType_Valid = 1,
+	//iso1isolationLevelType_Warning = 2,
+	//iso1isolationLevelType_Fault = 3,
+	//iso1isolationLevelType_No_IMD = 4
+
+	out->EVSEStatusCode = (unsigned char) in->DC_EVSEStatusCode;
+	//iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	//iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	//iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	//iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	//iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	//iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	//iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	//iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	//iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	//iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	//iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	//iso1DC_EVSEStatusCodeType_Reserved_C = 11
+
+	out->NotificationMaxDelay = 0u;
+
+	out->EVSENotification = (unsigned char) in->EVSENotification;
+	//iso1EVSENotificationType_None = 0, (default)
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1AC_EVSEStatusType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1AC_EVSEStatusType(struct iso1AC_EVSEStatusType *out, struct AC_EVSEStatusType_ISO15118_2014 *in)
+{
+	out->RCD = (int)in->RCD;	
+	//0: no error is detected
+	//1: an error is detected
+
+	out->NotificationMaxDelay = (unsigned short)in->NotificationMaxDelay;	
+	//unit: 1s
+	//The time SECC expects EVCC to perform EVSENotification
+
+	out->EVSENotification = (unsigned char)in->EVSENotification;
+	//iso1EVSENotificationType_None = 0,
+	//iso1EVSENotificationType_StopCharging = 1,
+	//iso1EVSENotificationType_ReNegotiation = 2
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1MeterInfo
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. in
+OUTPUT:
+		2. out
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1MeterInfo(struct iso1MeterInfoType *out, struct MeterInfoType_ISO15118_2014 *in)
+{
+	int i = 0;
+
+	//[1/5] MeterID
+	out->MeterID.charactersLen = 32;
+	for (i = 0; i < out->MeterID.charactersLen; i++)
+	{
+		out->MeterID.characters[i] = (unsigned char)in->MeterID[i];
+	}
+
+	//[2/5] MeterReading
+	out->MeterReading_isUsed = 1u;
+	out->MeterReading = (unsigned long)in->MeterReading;
+
+	//[3/5] SigMeterReading
+	out->SigMeterReading_isUsed = 1u;
+	out->SigMeterReading.bytesLen = 64;
+	for (i = 0; i < out->SigMeterReading.bytesLen; i++)
+	{
+		out->SigMeterReading.bytes[i] = (unsigned char)in->SigMeterReading[i];
+	}
+
+	//[4/5] MeterStatus
+	out->MeterStatus_isUsed = 1u;
+	out->MeterStatus = (short)in->MeterStatus;
+
+	//[5/5] TMeter
+	out->TMeter_isUsed = 1u;
+	out->TMeter = (long)in->TMeter;		//[CAUTION] data type
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_supportedAppProtocolReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_supportedAppProtocolReq(struct CcsData *shm_ccs, struct appHandEXIDocument *buf, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    int j = 0;
+    struct SupportedAppProtocolRequest_DIN70121 *shm_msg;
+    struct appHandAnonType_supportedAppProtocolReq *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.SupportedAppProtocolRequest;
+    exi = &buf->supportedAppProtocolReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    for (i = 0; i < exi->AppProtocol.arrayLen ; i++)
+    {
+        //ProtocolNamespace
+        shm_msg->AppProtocol[i].ProtocolNamespaceLen = (unsigned int) exi->AppProtocol.array[i].ProtocolNamespace.charactersLen;
+
+        for (j = 0; j< shm_msg->AppProtocol[i].ProtocolNamespaceLen; j++)
+        {
+            shm_msg->AppProtocol[i].ProtocolNamespace[j] = (unsigned char) exi->AppProtocol.array[i].ProtocolNamespace.characters[j];
+        }
+
+        //Version (Major, Minor)
+        shm_msg->AppProtocol[i].VersionNumberMajor = (unsigned int) exi->AppProtocol.array[i].VersionNumberMajor;
+        shm_msg->AppProtocol[i].VersionNumberMinor = (unsigned int) exi->AppProtocol.array[i].VersionNumberMinor;
+
+        //SchemaID
+        shm_msg->AppProtocol[i].SchemaID = (unsigned char) exi->AppProtocol.array[i].SchemaID;
+
+        //Priority
+        shm_msg->AppProtocol[i].Priority = (unsigned char) exi->AppProtocol.array[i].Priority;
+    }
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_SessionSetupReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct SessionSetupRequest_DIN70121 *shm_msg;
+    struct dinSessionSetupReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.SessionSetupRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.SessionSetupReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//EVCCID Length
+	EVCOMM_SYS_INFO.EVCCID_length = (unsigned char)exi->EVCCID.bytesLen;
+
+	//EVCCID
+	for (i = 0; i < exi->EVCCID.bytesLen; i++)
+	{
+		shm_msg->EVCCID[i] = (unsigned char) exi->EVCCID.bytes[i];
+		EVCOMM_SYS_INFO.EVCCID[i] = (unsigned char) exi->EVCCID.bytes[i];
+	}
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_SessionSetupReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct SessionSetupRequest_ISO15118_2014 *shm_msg;
+    struct iso1SessionSetupReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.SessionSetupRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.SessionSetupReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//EVCCID Length
+	EVCOMM_SYS_INFO.EVCCID_length = (unsigned char)exi->EVCCID.bytesLen;
+
+	//EVCCID
+	for (i = 0; i < exi->EVCCID.bytesLen; i++)
+	{
+		shm_msg->EVCCID[i] = (unsigned char) exi->EVCCID.bytes[i];
+		EVCOMM_SYS_INFO.EVCCID[i] = (unsigned char) exi->EVCCID.bytes[i];
+	}
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso2_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso2_SessionSetupReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct SessionSetupRequest_ISO15118_2018 *shm_msg;
+    struct iso2SessionSetupReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2018.SessionSetupRequest;
+    exi = &exi_doc_ISO2->V2G_Message.Body.SessionSetupReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//EVCCID Length
+	EVCOMM_SYS_INFO.EVCCID_length = (unsigned char)exi->EVCCID.bytesLen;
+
+
+	//EVCCID
+	for (i = 0; i < exi->EVCCID.bytesLen; i++)
+	{
+		shm_msg->EVCCID[i] = (unsigned char) exi->EVCCID.bytes[i];
+		EVCOMM_SYS_INFO.EVCCID[i] = (unsigned char) exi->EVCCID.bytes[i];
+	}
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_ServiceDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_ServiceDiscoveryReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct ServiceDiscoveryRequest_DIN70121 *shm_msg;
+    struct dinServiceDiscoveryReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.ServiceDiscoveryRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.ServiceDiscoveryReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//ServiceScope
+	shm_msg->ServiceScopeLen = (unsigned int) exi->ServiceScope.charactersLen;
+    for (i = 0; i <shm_msg->ServiceScopeLen ; i++)
+    {
+        shm_msg->ServiceScope[i] = (unsigned char) exi->ServiceScope.characters[i];
+    }
+
+    //ServiceCategory
+    shm_msg->ServiceCategory = (unsigned int) exi->ServiceCategory;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_ServiceDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_ServiceDiscoveryReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct ServiceDiscoveryRequest_ISO15118_2014 *shm_msg;
+    struct iso1ServiceDiscoveryReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.ServiceDiscoveryRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.ServiceDiscoveryReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+	//ServiceScope
+	shm_msg->ServiceScopeLen = (unsigned int) exi->ServiceScope.charactersLen;
+    for (i = 0; i <shm_msg->ServiceScopeLen ; i++)
+    {
+        shm_msg->ServiceScope[i] = (unsigned char) exi->ServiceScope.characters[i];
+    }
+
+    //ServiceCategory
+    shm_msg->ServiceCategory = (unsigned int) exi->ServiceCategory;
+}
+
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_ServiceAndPaymentSelectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_ServiceAndPaymentSelectionReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct ServiceAndPaymentSelectionRequest_DIN70121 *shm_msg;
+    struct dinServicePaymentSelectionReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.ServiceAndPaymentSelectionRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//[1/2] SelectedPaymentOption
+	shm_msg->SelectedPaymentOption = (unsigned char) exi->SelectedPaymentOption;
+
+	//[2/2] SelectedServiceList
+    shm_msg->SelectedServiceList.SelectedServiceLen = (unsigned int) exi->SelectedServiceList.SelectedService.arrayLen;
+    for (i = 0; i< shm_msg->SelectedServiceList.SelectedServiceLen; i++)
+    {
+        shm_msg->SelectedServiceList.SelectedService[i].ServiceID =
+				(unsigned short) exi->SelectedServiceList.SelectedService.array[i].ServiceID;
+
+        shm_msg->SelectedServiceList.SelectedService[i].ParameterSetID =
+				(short) exi->SelectedServiceList.SelectedService.array[i].ParameterSetID;
+    }
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_ServiceAndPaymentSelectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_ServiceAndPaymentSelectionReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    int i = 0;
+    struct ServiceAndPaymentSelectionRequest_ISO15118_2014 *shm_msg;
+    struct iso1PaymentServiceSelectionReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.ServiceAndPaymentSelectionRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+	//[1/2] SelectedPaymentOption
+	shm_msg->SelectedPaymentOption = (unsigned char) exi->SelectedPaymentOption;
+
+	//[2/2] SelectedServiceList
+    shm_msg->SelectedServiceList.SelectedServiceLen = (unsigned int) exi->SelectedServiceList.SelectedService.arrayLen;
+    for (i = 0; i< shm_msg->SelectedServiceList.SelectedServiceLen; i++)
+    {
+        shm_msg->SelectedServiceList.SelectedService[i].ServiceID =
+				(unsigned short) exi->SelectedServiceList.SelectedService.array[i].ServiceID;
+
+        shm_msg->SelectedServiceList.SelectedService[i].ParameterSetID =
+				(short) exi->SelectedServiceList.SelectedService.array[i].ParameterSetID;
+    }
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_ContractAuthenticationReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_ContractAuthenticationReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    //struct ContractAuthenticationRequest_DIN70121 *shm_msg;
+    //struct dinContractAuthenticationReqType *exi;
+
+    //shm_msg = &shm_ccs->V2GMessage_DIN70121.ContractAuthenticationRequest;
+    //exi = &exi_doc_DIN->V2G_Message.Body.ContractAuthenticationReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//none
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_AuthorizationReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_AuthorizationReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    //struct AuthorizationRequest_ISO15118_2014 *shm_msg;
+    //struct iso1AuthorizationReqType *exi;
+
+    //shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.AuthorizationRequest;
+   // exi = &exi_doc_ISO1->V2G_Message.Body.AuthorizationReq;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+	//none
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_ChargeParameterDiscoveryReq
+DESCRIPTION: Save into share memories
+			(1) ShmCcsData (shm_ccs)
+			(2) ShmSysConfigAndInfo (shm_sys)
+
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_ChargeParameterDiscoveryReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct ChargeParameterDiscoveryRequest_DIN70121 *shm_msg;
+    struct dinChargeParameterDiscoveryReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.ChargeParameterDiscoveryRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//===== [BODY (1/9)] EVRequestedEnergyTransferType =====
+	shm_msg->EVRequestedEnergyTransferType = (unsigned char) exi->EVRequestedEnergyTransferType;
+
+	//===== [BODY (2/9)] DC_EVChargeParameter of EVChargeParameter =====
+    //DC_EVStatus
+    shm_msg->DC_EVChargeParameter.DC_EVStatus.EVReady = (BOOL) exi->DC_EVChargeParameter.DC_EVStatus.EVReady;
+	shm_msg->DC_EVChargeParameter.DC_EVStatus.EVCabinConditioning = (BOOL) exi->DC_EVChargeParameter.DC_EVStatus.EVCabinConditioning;
+	shm_msg->DC_EVChargeParameter.DC_EVStatus.EVRESSConiditioning = (BOOL) exi->DC_EVChargeParameter.DC_EVStatus.EVRESSConditioning;
+	shm_msg->DC_EVChargeParameter.DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVChargeParameter.DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVChargeParameter.DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVChargeParameter.DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVChargeParameter.DC_EVStatus.EVRESSSOC;
+
+    //[BODY (3/9)] EVMaximumCurrentLimit
+    shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVMaximumCurrentLimit.Multiplier;
+	//shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Unit = (unsigned char) exi->DC_EVChargeParameter.EVMaximumCurrentLimit.Unit;
+	shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Unit = A_DIN70121;
+	shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Value =
+			(short) exi->DC_EVChargeParameter.EVMaximumCurrentLimit.Value;
+	sys->EvBatteryMaxCurrent = DIN70121PhyValDecode(shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit);
+
+    //[BODY (4/9)] EVMaximumPowerLimit
+	shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVMaximumPowerLimit.Multiplier;
+	//shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Unit = (unsigned char) exi->DC_EVChargeParameter.EVMaximumPowerLimit.Unit;
+	shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Unit = W_DIN70121;
+	shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Value =
+			(short) exi->DC_EVChargeParameter.EVMaximumPowerLimit.Value;
+	sys->EvBatteryMaxPower = DIN70121PhyValDecode(shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit);
+
+    //[BODY (5/9)] EVMaximumVoltageLimit
+	shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVMaximumVoltageLimit.Multiplier;
+	//shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Unit = (unsigned char) exi->DC_EVChargeParameter.EVMaximumVoltageLimit.Unit;
+	shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Unit = V_DIN70121;
+	shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Value =
+			(short) exi->DC_EVChargeParameter.EVMaximumVoltageLimit.Value;
+	sys->EvBatteryMaxVoltage = DIN70121PhyValDecode(shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit);
+
+    //[BODY (6/9)] EVEnergyCapacity
+	shm_msg->DC_EVChargeParameter.EVEnergyCapacity.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVEnergyCapacity.Multiplier;
+	shm_msg->DC_EVChargeParameter.EVEnergyCapacity.Unit = WH_DIN70121;
+	shm_msg->DC_EVChargeParameter.EVEnergyCapacity.Value =
+			(short) exi->DC_EVChargeParameter.EVEnergyCapacity.Value;
+	sys->EvBatteryCapacity = DIN70121PhyValDecode(shm_msg->DC_EVChargeParameter.EVEnergyCapacity);
+
+    //[BODY (7/9)] EVEnergyRequest
+	shm_msg->DC_EVChargeParameter.EVEnergyRequest.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVEnergyRequest.Multiplier;
+	shm_msg->DC_EVChargeParameter.EVEnergyRequest.Unit = WH_DIN70121;
+	shm_msg->DC_EVChargeParameter.EVEnergyRequest.Value =
+			(short) exi->DC_EVChargeParameter.EVEnergyRequest.Value;
+	sys->EvBatteryEngergyRequest = DIN70121PhyValDecode(shm_msg->DC_EVChargeParameter.EVEnergyRequest);
+
+    //[BODY (8/9)] FullSOC
+	if (exi->DC_EVChargeParameter.FullSOC_isUsed != 0 && exi->DC_EVChargeParameter.FullSOC != 0)
+	{
+		shm_msg->DC_EVChargeParameter.FullSOC = (unsigned char) exi->DC_EVChargeParameter.FullSOC;
+	}
+	else
+	{
+		shm_msg->DC_EVChargeParameter.FullSOC = (unsigned char) exi->DC_EVChargeParameter.BulkSOC;
+	}
+
+    //[BODY (9/9)] BulkSOC
+    shm_msg->DC_EVChargeParameter.BulkSOC = (unsigned char) exi->DC_EVChargeParameter.BulkSOC;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_ChargeParameterDiscoveryReq
+DESCRIPTION: Save into share memories
+			(1) ShmCcsData (shm_ccs)
+			(2) ShmSysConfigAndInfo (shm_sys)
+
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_ChargeParameterDiscoveryReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct ChargeParameterDiscoveryRequest_ISO15118_2014 *shm_msg;
+    struct iso1ChargeParameterDiscoveryReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+	//===== [BODY (1/9)] EVRequestedEnergyTransferType =====
+	shm_msg->RequestedEnergyTransferMode = (unsigned char) exi->RequestedEnergyTransferMode;
+
+	//===== [BODY (2/9)] DC_EVChargeParameter of EVChargeParameter =====
+    //DC_EVStatus
+    shm_msg->DC_EVChargeParameter.DC_EVStatus.EVReady = (BOOL) exi->DC_EVChargeParameter.DC_EVStatus.EVReady;
+	shm_msg->DC_EVChargeParameter.DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVChargeParameter.DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVChargeParameter.DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVChargeParameter.DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVChargeParameter.DC_EVStatus.EVRESSSOC;
+
+    //[BODY (3/9)] EVMaximumCurrentLimit
+    shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVMaximumCurrentLimit.Multiplier;
+	//shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Unit = (unsigned char) exi->DC_EVChargeParameter.EVMaximumCurrentLimit.Unit;
+	shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Unit = A_ISO15118_2014;
+	shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit.Value =
+			(short) exi->DC_EVChargeParameter.EVMaximumCurrentLimit.Value;
+	sys->EvBatteryMaxCurrent = ISO151182014PhyValDecode(shm_msg->DC_EVChargeParameter.EVMaximumCurrentLimit);
+
+    //[BODY (4/9)] EVMaximumPowerLimit
+	shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVMaximumPowerLimit.Multiplier;
+	//shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Unit = (unsigned char) exi->DC_EVChargeParameter.EVMaximumPowerLimit.Unit;
+	shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Unit = W_ISO15118_2014;
+	shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit.Value =
+			(short) exi->DC_EVChargeParameter.EVMaximumPowerLimit.Value;
+	sys->EvBatteryMaxPower = ISO151182014PhyValDecode(shm_msg->DC_EVChargeParameter.EVMaximumPowerLimit);
+
+    //[BODY (5/9)] EVMaximumVoltageLimit
+	shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVMaximumVoltageLimit.Multiplier;
+	//shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Unit = (unsigned char) exi->DC_EVChargeParameter.EVMaximumVoltageLimit.Unit;
+	shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Unit = V_ISO15118_2014;
+	shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit.Value =
+			(short) exi->DC_EVChargeParameter.EVMaximumVoltageLimit.Value;
+	sys->EvBatteryMaxVoltage = ISO151182014PhyValDecode(shm_msg->DC_EVChargeParameter.EVMaximumVoltageLimit);
+
+    //[BODY (6/9)] EVEnergyCapacity
+	shm_msg->DC_EVChargeParameter.EVEnergyCapacity.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVEnergyCapacity.Multiplier;
+	shm_msg->DC_EVChargeParameter.EVEnergyCapacity.Unit = Wh_ISO15118_2014;
+	shm_msg->DC_EVChargeParameter.EVEnergyCapacity.Value =
+			(short) exi->DC_EVChargeParameter.EVEnergyCapacity.Value;
+	sys->EvBatteryCapacity = ISO151182014PhyValDecode(shm_msg->DC_EVChargeParameter.EVEnergyCapacity);
+
+    //[BODY (7/9)] EVEnergyRequest
+	shm_msg->DC_EVChargeParameter.EVEnergyRequest.Multiplier =
+			(int) exi->DC_EVChargeParameter.EVEnergyRequest.Multiplier;
+	shm_msg->DC_EVChargeParameter.EVEnergyRequest.Unit = Wh_ISO15118_2014;
+	shm_msg->DC_EVChargeParameter.EVEnergyRequest.Value =
+			(short) exi->DC_EVChargeParameter.EVEnergyRequest.Value;
+	sys->EvBatteryEngergyRequest = ISO151182014PhyValDecode(shm_msg->DC_EVChargeParameter.EVEnergyRequest);
+
+    //[BODY (8/9)] FullSOC
+	if (exi->DC_EVChargeParameter.FullSOC_isUsed != 0 && exi->DC_EVChargeParameter.FullSOC != 0)
+	{
+		shm_msg->DC_EVChargeParameter.FullSOC = (unsigned char) exi->DC_EVChargeParameter.FullSOC;
+	}
+	else
+	{
+		shm_msg->DC_EVChargeParameter.FullSOC = (unsigned char) exi->DC_EVChargeParameter.BulkSOC;
+	}
+
+    //[BODY (9/9)] BulkSOC
+    shm_msg->DC_EVChargeParameter.BulkSOC = (unsigned char) exi->DC_EVChargeParameter.BulkSOC;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_CableCheckReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_CableCheckReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    struct CableCheckRequest_DIN70121 *shm_msg;
+    struct dinCableCheckReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.CableCheckRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.CableCheckReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+
+	//===== [BODY (1/1)] DC_EVStatus =====
+    //DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVCabinConditioning = (BOOL) exi->DC_EVStatus.EVCabinConditioning;
+	shm_msg->DC_EVStatus.EVRESSConiditioning = (BOOL) exi->DC_EVStatus.EVRESSConditioning;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+
+	//Check for EVReady
+	//if (shm_msg->DC_EVStatus.EVReady == TRUE && shm_msg->DC_EVStatus.EVErrorCode == NO_ERROR)
+	//{
+		//sys->ConnectorLocked = TRUE;    //Inicating EVSE that the CCS Connector is Locked.
+	//}
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_CableCheckReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_CableCheckReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    struct CableCheckRequest_ISO15118_2014 *shm_msg;
+    struct iso1CableCheckReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.CableCheckRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.CableCheckReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+
+	//===== [BODY (1/1)] DC_EVStatus =====
+    //DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+
+	//Check for EVReady
+	//if (shm_msg->DC_EVStatus.EVReady == TRUE && shm_msg->DC_EVStatus.EVErrorCode == NO_ERROR)
+	//{
+		//sys->ConnectorLocked = TRUE;    //Inicating EVSE that the CCS Connector is Locked.
+	//}
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_PreChargeReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_PreChargeReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    struct PreChargeRequest_DIN70121 *shm_msg;
+    struct dinPreChargeReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.PreChargeRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.PreChargeReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+	shm_msg->cnt++;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+
+	//===== [BODY (1/3)] DC_EVStatus =====
+    //DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVCabinConditioning = (BOOL) exi->DC_EVStatus.EVCabinConditioning;
+	shm_msg->DC_EVStatus.EVRESSConiditioning = (BOOL) exi->DC_EVStatus.EVRESSConditioning;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+
+	//[BODY (2/3)] EVTargetVoltage
+    shm_msg->EVTargetVoltage.Multiplier = (int) exi->EVTargetVoltage.Multiplier;
+	//shm_msg->EVTargetVoltage.Unit = (unsigned char) exi->EVTargetVoltage.Unit;
+	shm_msg->EVTargetVoltage.Unit = V_DIN70121;
+	shm_msg->EVTargetVoltage.Value = (short) exi->EVTargetVoltage.Value;
+	if ((sys->EVSEPrechargeStatus == EVSE_STATUS_NOT_READY_FOR_PRECHARGE) || (shm_msg->cnt <= 2)) //0
+	{
+		sys->EvBatterytargetVoltage = 0;	//0V, in order to avoid of turning off relay when D+/D- owns voltage.
+	}
+	else if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_PRECHARGE) //2
+	{
+		sys->EvBatterytargetVoltage = DIN70121PhyValDecode(shm_msg->EVTargetVoltage);
+		//sys->EvBatterytargetVoltage = DIN70121PhyValDecode(shm_msg->EVTargetVoltage) + 5;	//for test, add 10V
+	}
+
+	//[BODY (3/3)] EVTargetCurrent
+    shm_msg->EVTargetCurrent.Multiplier = (int) exi->EVTargetCurrent.Multiplier;
+	//shm_msg->EVTargetCurrent.Unit = (unsigned char) exi->EVTargetCurrent.Unit;
+	shm_msg->EVTargetCurrent.Unit = A_DIN70121;
+	shm_msg->EVTargetCurrent.Value = (short) exi->EVTargetCurrent.Value;
+	if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_PRECHARGE) //2
+	{
+		//sys->EvBatteryMaxCurrent = DIN70121PhyValDecode(shm_msg->EVTargetCurrent);
+		sys->EvBatterytargetCurrent = PRECHARGE_TARGET_CURRENT;	//for EVSE (default: 2A)
+	}
+	else
+	{
+		sys->EvBatterytargetCurrent = 0;	//0A
+	}
+	//printf("\n\n[%d-th]sys-EvBatterytargetVoltage = %.02f (ori = %d)\n\n", cnt, sys->EvBatterytargetVoltage, shm_msg->EVTargetVoltage.Value);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_PreChargeReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_PreChargeReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    struct PreChargeRequest_ISO15118_2014 *shm_msg;
+    struct iso1PreChargeReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.PreChargeRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.PreChargeReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+	shm_msg->cnt++;
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+
+	//===== [BODY (1/3)] DC_EVStatus =====
+    //DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+
+	//[BODY (2/3)] EVTargetVoltage
+    shm_msg->EVTargetVoltage.Multiplier = (int) exi->EVTargetVoltage.Multiplier;
+	//shm_msg->EVTargetVoltage.Unit = (unsigned char) exi->EVTargetVoltage.Unit;
+	shm_msg->EVTargetVoltage.Unit = V_ISO15118_2014;
+	shm_msg->EVTargetVoltage.Value = (short) exi->EVTargetVoltage.Value;
+	if ((sys->EVSEPrechargeStatus == EVSE_STATUS_NOT_READY_FOR_PRECHARGE) || (shm_msg->cnt <= 2)) //0
+	{
+		sys->EvBatterytargetVoltage = 0;	//0V, in order to avoid of turning off relay when D+/D- owns voltage.
+	}
+	else if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_PRECHARGE) //2
+	{
+		sys->EvBatterytargetVoltage = ISO151182014PhyValDecode(shm_msg->EVTargetVoltage);
+	}
+
+	//[BODY (3/3)] EVTargetCurrent
+    shm_msg->EVTargetCurrent.Multiplier = (int) exi->EVTargetCurrent.Multiplier;
+	//shm_msg->EVTargetCurrent.Unit = (unsigned char) exi->EVTargetCurrent.Unit;
+	shm_msg->EVTargetCurrent.Unit = A_ISO15118_2014;
+	shm_msg->EVTargetCurrent.Value = (short) exi->EVTargetCurrent.Value;
+	if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_PRECHARGE) //2
+	{
+		//sys->EvBatteryMaxCurrent = ISO151182014PhyValDecode(shm_msg->EVTargetCurrent);
+		sys->EvBatterytargetCurrent = PRECHARGE_TARGET_CURRENT;	//for EVSE (default: 2A)
+	}
+	else
+	{
+		sys->EvBatterytargetCurrent = 0;	//0A
+	}
+	//printf("\n\n[%d-th]sys-EvBatterytargetVoltage = %.02f (ori = %d)\n\n", cnt, sys->EvBatterytargetVoltage, shm_msg->EVTargetVoltage.Value);
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_PowerDeliveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_PowerDeliveryReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct PowerDeliveryRequest_DIN70121 *shm_msg;
+    struct dinPowerDeliveryReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.PowerDeliveryRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+
+	//[BODY (1/3)] ReadyToChargeState
+	shm_msg->ReadyToChargeState = (BOOL) exi->ReadyToChargeState;
+
+	//[BODY (2/3)] ChargingProfile
+
+	//[BODY (3/3)] DC_EVPowerDeliveryParameters
+	//DC_EVStatus
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVReady = (BOOL) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVReady;
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVCabinConditioning = (BOOL) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVCabinConditioning;
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSConiditioning = (BOOL) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSConditioning;
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSSOC;
+
+	//BulkChargingComplete
+	shm_msg->DC_EVPowerDeliveryParameter.BulkChargingComplete = (BOOL) exi->DC_EVPowerDeliveryParameter.BulkChargingComplete;
+
+	//ChargingComplete
+	shm_msg->DC_EVPowerDeliveryParameter.ChargingComplete = (BOOL) exi->DC_EVPowerDeliveryParameter.ChargingComplete;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_PowerDeliveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_PowerDeliveryReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct PowerDeliveryRequest_ISO15118_2014 *shm_msg;
+    struct iso1PowerDeliveryReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.PowerDeliveryRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+
+	//[BODY (1/3)] ChargeProgress
+	shm_msg->ChargeProgress = (BOOL) exi->ChargeProgress;
+
+	//[BODY (2/3)] ChargingProfile
+
+	//[BODY (3/3)] DC_EVPowerDeliveryParameters
+	//DC_EVStatus
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVReady = (BOOL) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVReady;
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVPowerDeliveryParameter.DC_EVStatus.EVRESSSOC;
+
+	//BulkChargingComplete
+	shm_msg->DC_EVPowerDeliveryParameter.BulkChargingComplete = (BOOL) exi->DC_EVPowerDeliveryParameter.BulkChargingComplete;
+
+	//ChargingComplete
+	shm_msg->DC_EVPowerDeliveryParameter.ChargingComplete = (BOOL) exi->DC_EVPowerDeliveryParameter.ChargingComplete;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_CurrentDemandReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_CurrentDemandReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct CurrentDemandRequest_DIN70121 *shm_msg;
+    struct dinCurrentDemandReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.CurrentDemandRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+    //[BODY (1/10)] DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVCabinConditioning = (BOOL) exi->DC_EVStatus.EVCabinConditioning;
+	shm_msg->DC_EVStatus.EVRESSConiditioning = (BOOL) exi->DC_EVStatus.EVRESSConditioning;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+
+    //[BODY (2/10)] EVTargetCurrent
+    shm_msg->EVTargetCurrent.Multiplier = (int) exi->EVTargetCurrent.Multiplier;
+	//shm_msg->EVTargetCurrent.Unit = (unsigned char) exi->EVTargetCurrent.Unit;
+	shm_msg->EVTargetCurrent.Unit = A_DIN70121;
+	shm_msg->EVTargetCurrent.Value = (short) exi->EVTargetCurrent.Value;
+	if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_ENERGY_TRANSFER) //3 (Precharge Relay OFF, DC+ Relay ON)
+	{
+		sys->EvBatterytargetCurrent = DIN70121PhyValDecode(shm_msg->EVTargetCurrent);
+
+		#if MANUAL_SET_EV_TARGET_FUNCTION == ENABLE
+		sys->EvBatterytargetCurrent = SUDO_EV_TARGET_CURRENT; //60A, for test;
+		#endif
+	}
+	else if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_PRECHARGE) //2 (Precharge Relay ON, DC+ Relay OFF)
+	{
+		//sys->EvBatterytargetCurrent = PRECHARGE_TARGET_CURRENT;	//2A, unit: 1A
+		sys->EvBatterytargetCurrent = DIN70121PhyValDecode(shm_msg->EVTargetCurrent);
+	}
+	else	//0 (Precharge Relay is still under preparing, not ON, yet.)
+	{
+		//sys->EvBatterytargetCurrent = 0;	//0A
+		sys->EvBatterytargetCurrent = DIN70121PhyValDecode(shm_msg->EVTargetCurrent);
+	}
+
+	//[BODY (3/10)] EVMaximumVoltageLimit
+    shm_msg->EVMaximumVoltageLimit.Multiplier = (int) exi->EVMaximumVoltageLimit.Multiplier;
+	//shm_msg->EVMaximumVoltageLimit.Unit = (unsigned char) exi->EVMaximumVoltageLimit.Unit;
+	shm_msg->EVMaximumVoltageLimit.Unit = V_DIN70121;
+	shm_msg->EVMaximumVoltageLimit.Value = (short) exi->EVMaximumVoltageLimit.Value;
+	if (shm_msg->EVMaximumVoltageLimit.Value != 0 && exi->EVMaximumVoltageLimit_isUsed == 1u)	//Gridwiz EVCC Emulator will not send EVMaximumVoltageLimit in CurrentDemandReq
+	{
+		sys->EvBatteryMaxVoltage = DIN70121PhyValDecode(shm_msg->EVMaximumVoltageLimit);
+	}
+
+	//[BODY (4/10)] EVMaximumCurrentLimit
+    shm_msg->EVMaximumCurrentLimit.Multiplier = (int) exi->EVMaximumCurrentLimit.Multiplier;
+	//shm_msg->EVMaximumCurrentLimit.Unit = (unsigned char) exi->EVMaximumCurrentLimit.Unit;
+	shm_msg->EVMaximumCurrentLimit.Unit = A_DIN70121;
+	shm_msg->EVMaximumCurrentLimit.Value = (short) exi->EVMaximumCurrentLimit.Value;
+	sys->EvBatteryMaxCurrent = DIN70121PhyValDecode(shm_msg->EVMaximumCurrentLimit);
+
+	//[BODY (5/10)] EVMaximumPowerLimit
+    shm_msg->EVMaximumPowerLimit.Multiplier = (int) exi->EVMaximumPowerLimit.Multiplier;
+	//shm_msg->EVMaximumPowerLimit.Unit = (unsigned char) exi->EVMaximumPowerLimit.Unit;
+	shm_msg->EVMaximumPowerLimit.Unit = W_DIN70121;
+	shm_msg->EVMaximumPowerLimit.Value = (short) exi->EVMaximumPowerLimit.Value;
+	sys->EvBatteryMaxPower = DIN70121PhyValDecode(shm_msg->EVMaximumPowerLimit);
+
+    //[BODY (6/10)] BulkChargingComplete
+	shm_msg->BulkChargingComplete = (BOOL) exi->BulkChargingComplete;
+
+    //[BODY (7/10)] ChargingComplete
+    shm_msg->ChargingComplete = (BOOL) exi->ChargingComplete;
+
+	//[BODY (8/10)] RemainingTimeToFullSoC
+	shm_msg->RemainingTimeToFullSoC.Multiplier = (int) exi->RemainingTimeToFullSoC.Multiplier;
+	shm_msg->RemainingTimeToFullSoC.Unit = (unsigned char) exi->RemainingTimeToFullSoC.Unit;
+	shm_msg->RemainingTimeToFullSoC.Value = (short) exi->RemainingTimeToFullSoC.Value;
+	sys->RemainChargingDuration = DIN70121PhyValDecode(shm_msg->RemainingTimeToFullSoC);
+
+	//[BODY (9/10)] RemainingTimeToBulkSoC
+	shm_msg->RemainingTimeToBulkSoC.Multiplier = (int) exi->RemainingTimeToBulkSoC.Multiplier;
+	shm_msg->RemainingTimeToBulkSoC.Unit = (unsigned char) exi->RemainingTimeToBulkSoC.Unit;
+	shm_msg->RemainingTimeToBulkSoC.Value = (short) exi->RemainingTimeToBulkSoC.Value;
+
+	//[BODY (10/10)] EVTargetVoltage
+	shm_msg->EVTargetVoltage.Multiplier = (int) exi->EVTargetVoltage.Multiplier;
+	//shm_msg->EVTargetVoltage.Unit = (unsigned char) exi->EVTargetVoltage.Unit;
+	shm_msg->EVTargetVoltage.Unit = V_DIN70121;
+	shm_msg->EVTargetVoltage.Value = (short) exi->EVTargetVoltage.Value;
+	if((shm_msg->EVTargetVoltage.Value != 0) && (sys->EvBatteryMaxVoltage != 0))
+	{
+		sys->EvBatterytargetVoltage = (DIN70121PhyValDecode(shm_msg->EVTargetVoltage) + sys->EvBatteryMaxVoltage)/2;
+	}
+	else
+	{
+		sys->EvBatterytargetVoltage = DIN70121PhyValDecode(shm_msg->EVTargetVoltage);
+	}
+
+	#if MANUAL_SET_EV_TARGET_FUNCTION == ENABLE
+	sys->EvBatterytargetVoltage = SUDO_EV_TARGET_VOLTAGE;	//for test (500V, unit: 1V)
+	#endif
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_CurrentDemandReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_CurrentDemandReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct CurrentDemandRequest_ISO15118_2014 *shm_msg;
+    struct iso1CurrentDemandReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.CurrentDemandRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+    //[BODY (1/10)] DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+
+    //[BODY (2/10)] EVTargetCurrent
+    shm_msg->EVTargetCurrent.Multiplier = (int) exi->EVTargetCurrent.Multiplier;
+	//shm_msg->EVTargetCurrent.Unit = (unsigned char) exi->EVTargetCurrent.Unit;
+	shm_msg->EVTargetCurrent.Unit = A_ISO15118_2014;
+	shm_msg->EVTargetCurrent.Value = (short) exi->EVTargetCurrent.Value;
+	if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_ENERGY_TRANSFER) //3 (Precharge Relay OFF, DC+ Relay ON)
+	{
+		sys->EvBatterytargetCurrent = ISO151182014PhyValDecode(shm_msg->EVTargetCurrent);
+
+		#if MANUAL_SET_EV_TARGET_FUNCTION == ENABLE
+		sys->EvBatterytargetCurrent = SUDO_EV_TARGET_CURRENT; //60A, for test;
+		#endif
+	}
+	else if (sys->EVSEPrechargeStatus == EVSE_STATUS_READY_FOR_PRECHARGE) //2 (Precharge Relay ON, DC+ Relay OFF)
+	{
+		//sys->EvBatterytargetCurrent = PRECHARGE_TARGET_CURRENT;	//2A, unit: 1A
+		sys->EvBatterytargetCurrent = ISO151182014PhyValDecode(shm_msg->EVTargetCurrent);
+	}
+	else	//0 (Precharge Relay is still under preparing, not ON, yet.)
+	{
+		//sys->EvBatterytargetCurrent = 0;	//0A
+		sys->EvBatterytargetCurrent = ISO151182014PhyValDecode(shm_msg->EVTargetCurrent);
+	}
+
+	//[BODY (3/10)] EVMaximumVoltageLimit
+    shm_msg->EVMaximumVoltageLimit.Multiplier = (int) exi->EVMaximumVoltageLimit.Multiplier;
+	//shm_msg->EVMaximumVoltageLimit.Unit = (unsigned char) exi->EVMaximumVoltageLimit.Unit;
+	shm_msg->EVMaximumVoltageLimit.Unit = V_ISO15118_2014;
+	shm_msg->EVMaximumVoltageLimit.Value = (short) exi->EVMaximumVoltageLimit.Value;
+	if (shm_msg->EVMaximumVoltageLimit.Value != 0 && exi->EVMaximumVoltageLimit_isUsed == 1u)	//Gridwiz EVCC Emulator will not send EVMaximumVoltageLimit in CurrentDemandReq
+	{
+		sys->EvBatteryMaxVoltage = ISO151182014PhyValDecode(shm_msg->EVMaximumVoltageLimit);
+	}
+	/*
+	printf("[SeccComm] <V_ev_max> = %d, %d, %.02f\n",
+			exi->EVMaximumVoltageLimit.Value,
+			shm_msg->EVMaximumVoltageLimit.Value,
+			sys->EvBatteryMaxVoltage
+		  );
+	*/
+
+	//[BODY (4/10)] EVMaximumCurrentLimit
+    shm_msg->EVMaximumCurrentLimit.Multiplier = (int) exi->EVMaximumCurrentLimit.Multiplier;
+	//shm_msg->EVMaximumCurrentLimit.Unit = (unsigned char) exi->EVMaximumCurrentLimit.Unit;
+	shm_msg->EVMaximumCurrentLimit.Unit = A_ISO15118_2014;
+	shm_msg->EVMaximumCurrentLimit.Value = (short) exi->EVMaximumCurrentLimit.Value;
+	sys->EvBatteryMaxCurrent = ISO151182014PhyValDecode(shm_msg->EVMaximumCurrentLimit);
+
+	//[BODY (5/10)] EVMaximumPowerLimit
+    shm_msg->EVMaximumPowerLimit.Multiplier = (int) exi->EVMaximumPowerLimit.Multiplier;
+	//shm_msg->EVMaximumPowerLimit.Unit = (unsigned char) exi->EVMaximumPowerLimit.Unit;
+	shm_msg->EVMaximumPowerLimit.Unit = W_ISO15118_2014;
+	shm_msg->EVMaximumPowerLimit.Value = (short) exi->EVMaximumPowerLimit.Value;
+	sys->EvBatteryMaxPower = ISO151182014PhyValDecode(shm_msg->EVMaximumPowerLimit);
+
+    //[BODY (6/10)] BulkChargingComplete
+	shm_msg->BulkChargingComplete = (BOOL) exi->BulkChargingComplete;
+
+    //[BODY (7/10)] ChargingComplete
+    shm_msg->ChargingComplete = (BOOL) exi->ChargingComplete;
+
+	//[BODY (8/10)] RemainingTimeToFullSoC
+	shm_msg->RemainingTimeToFullSoC.Multiplier = (int) exi->RemainingTimeToFullSoC.Multiplier;
+	shm_msg->RemainingTimeToFullSoC.Unit = (unsigned char) exi->RemainingTimeToFullSoC.Unit;
+	shm_msg->RemainingTimeToFullSoC.Value = (short) exi->RemainingTimeToFullSoC.Value;
+	sys->RemainChargingDuration = ISO151182014PhyValDecode(shm_msg->RemainingTimeToFullSoC);
+
+	//[BODY (9/10)] RemainingTimeToBulkSoC
+	shm_msg->RemainingTimeToBulkSoC.Multiplier = (int) exi->RemainingTimeToBulkSoC.Multiplier;
+	shm_msg->RemainingTimeToBulkSoC.Unit = (unsigned char) exi->RemainingTimeToBulkSoC.Unit;
+	shm_msg->RemainingTimeToBulkSoC.Value = (short) exi->RemainingTimeToBulkSoC.Value;
+
+	//[BODY (10/10)] EVTargetVoltage
+	shm_msg->EVTargetVoltage.Multiplier = (int) exi->EVTargetVoltage.Multiplier;
+	//shm_msg->EVTargetVoltage.Unit = (unsigned char) exi->EVTargetVoltage.Unit;
+	shm_msg->EVTargetVoltage.Unit = V_ISO15118_2014;
+	shm_msg->EVTargetVoltage.Value = (short) exi->EVTargetVoltage.Value;
+	if((shm_msg->EVTargetVoltage.Value != 0) && (sys->EvBatteryMaxVoltage != 0))
+	{
+		sys->EvBatterytargetVoltage = (ISO151182014PhyValDecode(shm_msg->EVTargetVoltage) + sys->EvBatteryMaxVoltage)/2;
+	}
+	else
+	{
+		sys->EvBatterytargetVoltage = ISO151182014PhyValDecode(shm_msg->EVTargetVoltage);
+	}
+
+	/*
+	printf("[SeccComm] <V_ev_target> = %d, %d, %.02f\n",
+			exi->EVTargetVoltage.Value,
+			shm_msg->EVTargetVoltage.Value,
+			sys->EvBatterytargetVoltage
+		  );
+	*/
+
+	#if MANUAL_SET_EV_TARGET_FUNCTION == ENABLE
+	sys->EvBatterytargetVoltage = SUDO_EV_TARGET_VOLTAGE;	//for test (500V, unit: 1V)
+	#endif
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_ChargingStatusReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_ChargingStatusReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+	//no content for ISO1
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_WeldingDetectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_WeldingDetectionReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct WeldingDetectionRequest_DIN70121 *shm_msg;
+    struct dinWeldingDetectionReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.WeldingDetectionRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.WeldingDetectionReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+
+	//===== [BODY (1/3)] DC_EVStatus =====
+    //DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVCabinConditioning = (BOOL) exi->DC_EVStatus.EVCabinConditioning;
+	shm_msg->DC_EVStatus.EVRESSConiditioning = (BOOL) exi->DC_EVStatus.EVRESSConditioning;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_WeldingDetectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_WeldingDetectionReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+    //int i = 0;
+    struct WeldingDetectionRequest_ISO15118_2014 *shm_msg;
+    struct iso1WeldingDetectionReqType *exi;
+	struct ChargingInfoData *sys;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.WeldingDetectionRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.WeldingDetectionReq;
+	sys = &shm_sys->SysInfo.CcsChargingData[0];
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+
+	//===== [BODY (1/3)] DC_EVStatus =====
+    //DC_EVStatus
+    shm_msg->DC_EVStatus.EVReady = (BOOL) exi->DC_EVStatus.EVReady;
+	shm_msg->DC_EVStatus.EVErrorCode = (unsigned char) exi->DC_EVStatus.EVErrorCode;
+	shm_msg->DC_EVStatus.EVRESSSOC = (unsigned char) exi->DC_EVStatus.EVRESSSOC;
+	sys->EvBatterySoc = (int) shm_msg->DC_EVStatus.EVRESSSOC;
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Save_din_SessionStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_din_SessionStopReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+	/*
+    int i = 0;
+    struct SessionStopRequest_DIN70121 *shm_msg;
+    struct dinSessionStopReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_DIN70121.SessionStopRequest;
+    exi = &exi_doc_DIN->V2G_Message.Body.SessionStopReq;
+	*/
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_din_V2GMSG_Header(buf);
+
+	//null
+}
+
+/*===========================================================================
+FUNCTION: SHM_Save_iso1_SessionStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Save_iso1_SessionStopReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys)
+{
+    // ======== [STEP 1/3] Initialize ========
+	/*
+    int i = 0;
+    struct SessionStopRequest_ISO15118_2014 *shm_msg;
+    struct iso1SessionStopReqType *exi;
+
+    shm_msg = &shm_ccs->V2GMessage_ISO15118_2014.SessionStopRequest;
+    exi = &exi_doc_ISO1->V2G_Message.Body.SessionStopReq;
+	*/
+
+    // ======== [STEP 2/3] Update Flags ========
+
+    // ======== [STEP 3/3] Transfer Data ========
+    //SHM_Save_iso1_V2GMSG_Header(buf);
+
+	//null
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_SessionSetupRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_SessionSetupRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	int i = 0;
+	struct dinSessionSetupResType *out;
+	struct SessionSetupResponse_DIN70121 *in;
+
+	out = &exi_doc_DIN->V2G_Message.Body.SessionSetupRes;
+	in = &shm_ccs->V2GMessage_DIN70121.SessionSetupResponse;
+
+	exi_doc_DIN->V2G_Message.Body.SessionSetupRes_isUsed = 1u;
+
+	// ====== [BODY (1/3) ResponseCode ======
+	out->ResponseCode = in->ResponseCode;
+
+	// ====== [BODY (2/3) EVSEID ======
+	out->EVSEID.bytesLen = 32;  //max = 32  bytes(DIN), all zero
+	for (i = 0; i< 32; i++)
+	{
+		out->EVSEID.bytes[i] = (unsigned char) in->EVSEID[i];
+	}
+
+	// ====== [BODY (3/3) DateTimeNow ======
+	out->DateTimeNow_isUsed = 1u;
+	out->DateTimeNow = (int64_t) in->EVSETimeStamp;   //Format: Unix Time Stamp
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_ContractAuthenticationRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_ContractAuthenticationRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinContractAuthenticationResType *out;
+	struct ContractAuthenticationResponse_DIN70121 *in;
+
+	out = &exi_doc_DIN->V2G_Message.Body.ContractAuthenticationRes;
+	in = &shm_ccs->V2GMessage_DIN70121.ContractAuthenticationResponse;
+
+	//[BODY (2/2)] EVSEProcessing
+	out->EVSEProcessing = (BOOL)in->EVSEProcessing; //0(Finished) or 1(Ongoing)
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_ChargeParameterDiscoveryRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinChargeParameterDiscoveryResType *out;
+	struct ChargeParameterDiscoveryResponse_DIN70121 *in;
+
+	out = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryRes;
+	in = &shm_ccs->V2GMessage_DIN70121.ChargeParameterDiscoveryResponse;
+
+	//Initialize
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+	init_dinChargeParameterDiscoveryResType(out);
+	exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryRes_isUsed = 1u;
+
+	//----- [BODY (1/5)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+    //----- [BODY (2/5)] EVSEProcessing -----
+    out->EVSEProcessing = (BOOL) in->EVSEProcessing;
+    // 	dinEVSEProcessingType_Finished = 0,
+    //	dinEVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/5)] SAScheduleList of SASchedules -----
+	//[Joseph] Here keep constant values and not copy from share memory, yet.
+    out->SAScheduleList_isUsed = 1u;
+    struct dinSAScheduleListType *list;
+    list = &out->SAScheduleList;
+    //
+    list->SAScheduleTuple.arrayLen = 1;
+    list->SAScheduleTuple.array[0].SAScheduleTupleID = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleID = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.arrayLen = 1;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval_isUsed = 1u;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.start = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration = 86400;	//24Hrs at least, unit:second
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration_isUsed = 1u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval_isUsed = 1u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval = 600;
+    //list->SAScheduleTuple.array[0].SalesTariff.xxx
+    //list->SAScheduleTuple.array[0].SalesTariff_isUsed = 0u;
+
+
+    //-----  [BODY (4/5)] AC_EVSEChargeParameter of EVSEChargeParameter -----
+    //ignore, since DIN doesn't support AC
+
+    //----- [BODY (5/5)] DC_EVSEChargeParameter of EVSEChargeParameter -----
+    out->DC_EVSEChargeParameter_isUsed = 1u;
+    struct dinDC_EVSEChargeParameterType *out_dc_para;
+	struct DC_EVSEChargeParameterType_DIN70121 *in_dc_para;
+    out_dc_para = &out->DC_EVSEChargeParameter;
+	in_dc_para = &in->DC_EVSEChargeParameter;
+
+    //DC_EVSEStatus
+	out_dc_para->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+	SHM_Read_dinDC_EVSEStatusType(&out_dc_para->DC_EVSEStatus, &in_dc_para->DC_EVSEStatus);
+
+    //EVSEMaximumCurrentLimit
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEMaximumCurrentLimit, &in_dc_para->EVSEMaximumCurrentLimit);
+
+    //EVSEMaximumPowerLimit
+	out_dc_para->EVSEMaximumPowerLimit_isUsed = 1u;
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEMaximumPowerLimit, &in_dc_para->EVSEMaximumPowerLimit);
+
+    //EVSEMaximumVoltageLimit
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEMaximumVoltageLimit, &in_dc_para->EVSEMaximumVoltageLimit);
+
+    //EVSEMinimumVoltageLimit
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEMinimumVoltageLimit, &in_dc_para->EVSEMinimumVoltageLimit);
+
+
+    //EVSEMinimumCurrentLimit
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEMinimumCurrentLimit, &in_dc_para->EVSEMinimumCurrentLimit);
+
+    //EVSECurrentRegulationTolerance_isUsed
+    out_dc_para->EVSECurrentRegulationTolerance_isUsed = 1u;
+    //EVSECurrentRegulationTolerance
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSECurrentRegulationTolerance, &in_dc_para->EVSECurrentRegulationTolerance);
+
+    //EVSEEnergyToBeDelivered_isUsed
+    out_dc_para->EVSEEnergyToBeDelivered_isUsed = 0u;
+	//EVSEEnergyToBeDelivered (optional)
+    //SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEEnergyToBeDelivered, &in_dc_para->EVSEEnergyToBeDelivered);
+
+    //EVSEPeakCurrentRipple
+	SHM_Read_dinPhysicalValueType(&out_dc_para->EVSEPeakCurrentRipple, &in_dc_para->EVSEPeakCurrentRipple);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_ChargeParameterDiscoveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_ChargeParameterDiscoveryRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1ChargeParameterDiscoveryResType *out;
+	struct ChargeParameterDiscoveryResponse_ISO15118_2014 *in;
+
+	out = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.ChargeParameterDiscoveryResponse;
+
+	//Initialize
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+	init_iso1ChargeParameterDiscoveryResType(out);
+	exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryRes_isUsed = 1u;
+
+	//----- [BODY (1/5)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+    //----- [BODY (2/5)] EVSEProcessing -----
+    out->EVSEProcessing = (BOOL) in->EVSEProcessing;
+    // 	iso1EVSEProcessingType_Finished = 0,
+    //	iso1EVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/5)] SAScheduleList of SASchedules -----
+	//[Joseph] Here keep constant values and not copy from share memory, yet.
+    out->SAScheduleList_isUsed = 1u;
+    struct iso1SAScheduleListType *list;
+    list = &out->SAScheduleList;
+    //
+    list->SAScheduleTuple.arrayLen = 1;
+    list->SAScheduleTuple.array[0].SAScheduleTupleID = 0;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleID = 0;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.arrayLen = 1;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval_isUsed = 1u;
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.start = 0;
+	list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration = 86400;	//24Hrs at least, unit:second
+    list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].RelativeTimeInterval.duration_isUsed = 1u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval_isUsed = 1u;
+    //list->SAScheduleTuple.array[0].PMaxSchedule.PMaxScheduleEntry.array[0].TimeInterval = 86400;
+    //list->SAScheduleTuple.array[0].SalesTariff.xxx
+    //list->SAScheduleTuple.array[0].SalesTariff_isUsed = 0u;
+
+
+	//-----  [BODY (4/5)] AC/DC EVSEChargeParameter -----
+	#if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) | (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+	{
+		//-----  [BODY (4/5)] AC_EVSEChargeParameter -----
+		out->AC_EVSEChargeParameter_isUsed = 1u;
+		struct iso1AC_EVSEChargeParameterType *out_ac_para;
+		struct AC_EVSEChargeParameterType_ISO15118_2014 *in_ac_para;
+		out_ac_para = &out->AC_EVSEChargeParameter;
+		in_ac_para = &in->AC_EVSEChargeParameter;
+
+		//[1/3] AC_EVSEStatus
+		SHM_Read_iso1AC_EVSEStatusType(&out_ac_para->AC_EVSEStatus, &in_ac_para->AC_EVSEStatus);
+
+		//[2/3] EVSENominalVoltage
+		SHM_Read_iso1PhysicalValueType(&out_ac_para->EVSENominalVoltage, &in_ac_para->EVSENominalVoltage);
+
+		//[3/3] EVSEMaxCurrent
+		SHM_Read_iso1PhysicalValueType(&out_ac_para->EVSEMaxCurrent, &in_ac_para->EVSEMaxCurrent);
+	}
+	#else //CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED
+	{
+		//----- [BODY (5/5)] DC_EVSEChargeParameter -----
+		out->DC_EVSEChargeParameter_isUsed = 1u;
+		struct iso1DC_EVSEChargeParameterType *out_dc_para;
+		struct DC_EVSEChargeParameterType_ISO15118_2014 *in_dc_para;
+		out_dc_para = &out->DC_EVSEChargeParameter;
+		in_dc_para = &in->DC_EVSEChargeParameter;
+
+		//DC_EVSEStatus
+		out_dc_para->DC_EVSEStatus.EVSEIsolationStatus_isUsed = 1u;
+		SHM_Read_iso1DC_EVSEStatusType(&out_dc_para->DC_EVSEStatus, &in_dc_para->DC_EVSEStatus);
+
+		//EVSEMaximumCurrentLimit
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEMaximumCurrentLimit, &in_dc_para->EVSEMaximumCurrentLimit);
+
+		//EVSEMaximumPowerLimit
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEMaximumPowerLimit, &in_dc_para->EVSEMaximumPowerLimit);
+
+		//EVSEMaximumVoltageLimit
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEMaximumVoltageLimit, &in_dc_para->EVSEMaximumVoltageLimit);
+
+		//EVSEMinimumVoltageLimit
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEMinimumVoltageLimit, &in_dc_para->EVSEMinimumVoltageLimit);
+
+
+		//EVSEMinimumCurrentLimit
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEMinimumCurrentLimit, &in_dc_para->EVSEMinimumCurrentLimit);
+
+		//EVSECurrentRegulationTolerance_isUsed
+		out_dc_para->EVSECurrentRegulationTolerance_isUsed = 1u;
+		//EVSECurrentRegulationTolerance
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSECurrentRegulationTolerance, &in_dc_para->EVSECurrentRegulationTolerance);
+
+		//EVSEEnergyToBeDelivered_isUsed
+		out_dc_para->EVSEEnergyToBeDelivered_isUsed = 0u;
+		//EVSEEnergyToBeDelivered (optional)
+		//SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEEnergyToBeDelivered, &in_dc_para->EVSEEnergyToBeDelivered);
+
+		//EVSEPeakCurrentRipple
+		SHM_Read_iso1PhysicalValueType(&out_dc_para->EVSEPeakCurrentRipple, &in_dc_para->EVSEPeakCurrentRipple);
+	}
+	#endif
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_CableCheckRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinCableCheckResType *out;
+	struct CableCheckResponse_DIN70121 *in;
+
+	out = &exi_doc_DIN->V2G_Message.Body.CableCheckRes;
+	in = &shm_ccs->V2GMessage_DIN70121.CableCheckResponse;
+
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+    init_dinCableCheckResType(out);
+	exi_doc_DIN->V2G_Message.Body.CableCheckRes_isUsed = 1u;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+    //----- [BODY (2/3)] EVSEProcessing -----
+	out->EVSEProcessing = (BOOL) in->EVSEProcessing;
+    // 	dinEVSEProcessingType_Finished = 0,
+    //	dinEVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+	SHM_Read_dinDC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_CableCheckRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_CableCheckRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1CableCheckResType *out;
+	struct CableCheckResponse_ISO15118_2014 *in;
+
+	out = &exi_doc_ISO1->V2G_Message.Body.CableCheckRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.CableCheckResponse;
+
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+    init_iso1CableCheckResType(out);
+	exi_doc_ISO1->V2G_Message.Body.CableCheckRes_isUsed = 1u;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+    //----- [BODY (2/3)] EVSEProcessing -----
+	out->EVSEProcessing = (BOOL) in->EVSEProcessing;
+    // 	iso1EVSEProcessingType_Finished = 0,
+    //	iso1EVSEProcessingType_Ongoing = 1
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+	SHM_Read_iso1DC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_PreChargeRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinPreChargeResType *out;
+	struct PreChargeResponse_DIN70121 *in;
+
+	out = &exi_doc_DIN->V2G_Message.Body.PreChargeRes;
+	in = &shm_ccs->V2GMessage_DIN70121.PreChargeResponse;
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+    init_dinPreChargeResType(&exi_doc_DIN->V2G_Message.Body.PreChargeRes);
+	exi_doc_DIN->V2G_Message.Body.PreChargeRes_isUsed = 1u;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+	SHM_Read_dinPhysicalValueType(&out->EVSEPresentVoltage, &in->EVSEPresentVoltage);
+    //	dinunitSymbolType_h = 0,
+    //	dinunitSymbolType_m = 1,
+    //	dinunitSymbolType_s = 2,
+    //	dinunitSymbolType_A = 3,
+    //	dinunitSymbolType_Ah = 4,
+    //	dinunitSymbolType_V = 5,
+    //	dinunitSymbolType_VA = 6,
+    //	dinunitSymbolType_W = 7,
+    //	dinunitSymbolType_W_s = 8,
+    //	dinunitSymbolType_Wh = 9
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+	SHM_Read_dinDC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_PreChargeRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_PreChargeRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1PreChargeResType *out;
+	struct PreChargeResponse_ISO15118_2014 *in;
+
+	out = &exi_doc_ISO1->V2G_Message.Body.PreChargeRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.PreChargeResponse;
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+    init_iso1PreChargeResType(&exi_doc_ISO1->V2G_Message.Body.PreChargeRes);
+	exi_doc_ISO1->V2G_Message.Body.PreChargeRes_isUsed = 1u;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+	SHM_Read_iso1PhysicalValueType(&out->EVSEPresentVoltage, &in->EVSEPresentVoltage);
+	//iso1unitSymbolType_h = 0,
+	//iso1unitSymbolType_m = 1,
+	//iso1unitSymbolType_s = 2,
+	//iso1unitSymbolType_A = 3,
+	//iso1unitSymbolType_V = 4,
+	//iso1unitSymbolType_W = 5,
+	//iso1unitSymbolType_Wh = 6
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+	SHM_Read_iso1DC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_PowerDeliveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_PowerDeliveryRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinPowerDeliveryResType *out;
+	struct PowerDeliveryResponse_DIN70121 *in;
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+	init_dinPowerDeliveryResType(&exi_doc_DIN->V2G_Message.Body.PowerDeliveryRes);
+
+	out = &exi_doc_DIN->V2G_Message.Body.PowerDeliveryRes;
+	in = &shm_ccs->V2GMessage_DIN70121.PowerDeliveryResponse;
+	exi_doc_DIN->V2G_Message.Body.PowerDeliveryRes_isUsed = 1u;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+
+    //----- [BODY (2/3)] AC_EVSEStatus -----
+    //ignore, since DIN 70121 doesn't support AC, yet.
+
+
+    //----- [BODY (2/3)] DC_EVSEStatus -----
+	out->DC_EVSEStatus_isUsed = 1u;
+	SHM_Read_dinDC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_PowerDeliveryRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_PowerDeliveryRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1PowerDeliveryResType *out;
+	struct PowerDeliveryResponse_ISO15118_2014 *in;
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+	init_iso1PowerDeliveryResType(&exi_doc_ISO1->V2G_Message.Body.PowerDeliveryRes);
+
+	out = &exi_doc_ISO1->V2G_Message.Body.PowerDeliveryRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.PowerDeliveryResponse;
+	exi_doc_ISO1->V2G_Message.Body.PowerDeliveryRes_isUsed = 1u;
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+
+    //----- [BODY (2/3)] AC_EVSEStatus -----
+    //ignore, since our ISO1 70121 doesn't support AC, yet.
+
+
+    //----- [BODY (2/3)] DC_EVSEStatus -----
+	#if ((CCS_ENERGY_TRANSFER_MODE == MODE_AC_SINGLE_PHASE_CORE) | (CCS_ENERGY_TRANSFER_MODE == MODE_AC_THREE_PHASE_CORE))
+	{
+		//out->DC_EVSEStatus_isUsed = 0u;
+	}
+	#else //CCS_ENERGY_TRANSFER_MODE == MODE_DC_EXTENDED
+	{
+		out->DC_EVSEStatus_isUsed = 1u;
+		SHM_Read_iso1DC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+	}
+	#endif
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_CurrentDemandRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinCurrentDemandResType *out;
+	struct CurrentDemandResponse_DIN70121 *in;
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+	init_dinCurrentDemandResType(&exi_doc_DIN->V2G_Message.Body.CurrentDemandRes);
+
+	out = &exi_doc_DIN->V2G_Message.Body.CurrentDemandRes;
+	in = &shm_ccs->V2GMessage_DIN70121.CurrentDemandResponse;
+	exi_doc_DIN->V2G_Message.Body.CurrentDemandRes_isUsed = 1u;
+
+
+	//----- [BODY (1/10)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+    //----- [BODY (2/10)] DC_EVSEStatus -----
+    SHM_Read_dinDC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+
+    //----- [BODY (3/10)] EVSEPresentVoltage -----
+	SHM_Read_dinPhysicalValueType(&out->EVSEPresentVoltage, &in->EVSEPresentVoltage);
+
+
+    //----- [BODY (4/10)] EVSEPresentCurrent -----
+	SHM_Read_dinPhysicalValueType(&out->EVSEPresentCurrent, &in->EVSEPresentCurrent);
+
+
+    //----- [BODY (5/10)] EVSECurrentLimitAchieved -----
+    out->EVSECurrentLimitAchieved = in->EVSECurrentLimitAchieved;
+
+    //----- [BODY (6/10)] EVSEVoltageLimitAchieved -----
+    out->EVSEVoltageLimitAchieved = in->EVSEVoltageLimitAchieved;
+
+    //----- [BODY (7/10)] EVSEPowerLimitAchieved -----
+    out->EVSEPowerLimitAchieved = in->EVSEPowerLimitAchieved;
+
+    //----- [BODY (8/10)] EVSEMaximumVoltageLimit -----
+    out->EVSEMaximumVoltageLimit_isUsed = 1u;
+	SHM_Read_dinPhysicalValueType(&out->EVSEMaximumVoltageLimit, &in->EVSEMaximumVoltageLimit);
+
+    //----- [BODY (9/10)] EVSEMaximumCurrentLimit -----
+    out->EVSEMaximumCurrentLimit_isUsed = 1u;
+	SHM_Read_dinPhysicalValueType(&out->EVSEMaximumCurrentLimit, &in->EVSEMaximumCurrentLimit);
+
+    //----- [BODY (10/10)] EVSEMaximumPowerLimit -----
+    out->EVSEMaximumPowerLimit_isUsed = 1u;
+	SHM_Read_dinPhysicalValueType(&out->EVSEMaximumPowerLimit, &in->EVSEMaximumPowerLimit);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_CurrentDemandRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_CurrentDemandRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1CurrentDemandResType *out;
+	struct CurrentDemandResponse_ISO15118_2014 *in;
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+	init_iso1CurrentDemandResType(&exi_doc_ISO1->V2G_Message.Body.CurrentDemandRes);
+
+	out = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.CurrentDemandResponse;
+	exi_doc_ISO1->V2G_Message.Body.CurrentDemandRes_isUsed = 1u;
+
+
+	//----- [BODY (1/10)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+    //----- [BODY (2/10)] DC_EVSEStatus -----
+    SHM_Read_iso1DC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+
+    //----- [BODY (3/10)] EVSEPresentVoltage -----
+	SHM_Read_iso1PhysicalValueType(&out->EVSEPresentVoltage, &in->EVSEPresentVoltage);
+
+
+    //----- [BODY (4/10)] EVSEPresentCurrent -----
+	SHM_Read_iso1PhysicalValueType(&out->EVSEPresentCurrent, &in->EVSEPresentCurrent);
+
+
+    //----- [BODY (5/10)] EVSECurrentLimitAchieved -----
+    out->EVSECurrentLimitAchieved = in->EVSECurrentLimitAchieved;
+
+    //----- [BODY (6/10)] EVSEVoltageLimitAchieved -----
+    out->EVSEVoltageLimitAchieved = in->EVSEVoltageLimitAchieved;
+
+    //----- [BODY (7/10)] EVSEPowerLimitAchieved -----
+    out->EVSEPowerLimitAchieved = in->EVSEPowerLimitAchieved;
+
+    //----- [BODY (8/10)] EVSEMaximumVoltageLimit -----
+    out->EVSEMaximumVoltageLimit_isUsed = 1u;
+	SHM_Read_iso1PhysicalValueType(&out->EVSEMaximumVoltageLimit, &in->EVSEMaximumVoltageLimit);
+
+    //----- [BODY (9/10)] EVSEMaximumCurrentLimit -----
+    out->EVSEMaximumCurrentLimit_isUsed = 1u;
+	SHM_Read_iso1PhysicalValueType(&out->EVSEMaximumCurrentLimit, &in->EVSEMaximumCurrentLimit);
+
+    //----- [BODY (10/10)] EVSEMaximumPowerLimit -----
+    out->EVSEMaximumPowerLimit_isUsed = 1u;
+	SHM_Read_iso1PhysicalValueType(&out->EVSEMaximumPowerLimit, &in->EVSEMaximumPowerLimit);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_ChargingStatusRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_ChargingStatusRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	int i = 0;
+	struct iso1ChargingStatusResType *out;
+	struct ChargingStatusResponse_ISO15118_2014 *in;
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+	init_iso1ChargingStatusResType(&exi_doc_ISO1->V2G_Message.Body.ChargingStatusRes);
+
+	out = &exi_doc_ISO1->V2G_Message.Body.ChargingStatusRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.ChargingStatusResponse;
+	exi_doc_ISO1->V2G_Message.Body.ChargingStatusRes_isUsed = 1u;
+
+
+	//----- [BODY (1/10)] ResponseCode -----
+    out->ResponseCode = (unsigned char)in->ResponseCode;
+
+    //----- [BODY (2/10)] AC_EVSEStatus -----
+    SHM_Read_iso1AC_EVSEStatusType(&out->AC_EVSEStatus, &in->AC_EVSEStatus);
+
+    //----- [BODY (3/10)] EVSEMaxCurrent -----
+	out->EVSEMaxCurrent_isUsed = 1u;
+	SHM_Read_iso1PhysicalValueType(&out->EVSEMaxCurrent, &in->EVSEMaxCurrent);
+
+    //----- [BODY (4/10)] SAScheduleTupleID -----
+	out->SAScheduleTupleID = (unsigned char)in->SAScheduleTupleID;	//[CAUTION] data type
+
+    //----- [BODY (5/10)] EVSEID -----
+	out->EVSEID.charactersLen = 37;  //min length: 7, max length:37  bytes(ISO1, AC)
+	for (i = 0; i< out->EVSEID.charactersLen; i++)
+	{
+		out->EVSEID.characters[i] = (unsigned char)in->EVSEID[i];
+	}
+
+    //----- [BODY (6/10)] MeterInfo -----
+    out->MeterInfo_isUsed = 1u;
+	SHM_Read_iso1MeterInfo(&out->MeterInfo, &in->MeterInfo);
+
+    //----- [BODY (7/10)] ReceiptRequired -----
+    out->ReceiptRequired_isUsed = 1u;
+	out->ReceiptRequired = (int)in->ReceiptRequired;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_WeldingDetectionRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinWeldingDetectionResType *out;
+	struct WeldingDetectionResponse_DIN70121 *in;
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+	init_dinWeldingDetectionResType(&exi_doc_DIN->V2G_Message.Body.WeldingDetectionRes);
+
+
+	out = &exi_doc_DIN->V2G_Message.Body.WeldingDetectionRes;
+	in = &shm_ccs->V2GMessage_DIN70121.WeldingDetectionResponse;
+	exi_doc_DIN->V2G_Message.Body.WeldingDetectionRes_isUsed = 1u;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+	SHM_Read_dinPhysicalValueType(&out->EVSEPresentVoltage, &in->EVSEPresentVoltage);
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    SHM_Read_dinDC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_WeldingDetectionRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_WeldingDetectionRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1WeldingDetectionResType *out;
+	struct WeldingDetectionResponse_ISO15118_2014 *in;
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+	init_iso1WeldingDetectionResType(&exi_doc_ISO1->V2G_Message.Body.WeldingDetectionRes);
+
+
+	out = &exi_doc_ISO1->V2G_Message.Body.WeldingDetectionRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.WeldingDetectionResponse;
+	exi_doc_ISO1->V2G_Message.Body.WeldingDetectionRes_isUsed = 1u;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+
+
+    //----- [BODY (2/3)] EVSEPresentVoltage -----
+	SHM_Read_iso1PhysicalValueType(&out->EVSEPresentVoltage, &in->EVSEPresentVoltage);
+
+
+    //----- [BODY (3/3)] DC_EVSEStatus -----
+    SHM_Read_iso1DC_EVSEStatusType(&out->DC_EVSEStatus, &in->DC_EVSEStatus);
+}
+
+
+/*===========================================================================
+FUNCTION: SHM_Read_din_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_DIN
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_din_SessionStopRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs)
+{
+	struct dinSessionStopResType *out;
+	struct SessionStopResponse_DIN70121 *in;
+	init_dinBodyType(&exi_doc_DIN->V2G_Message.Body);
+	init_dinSessionStopResType(&exi_doc_DIN->V2G_Message.Body.SessionStopRes);
+
+	out = &exi_doc_DIN->V2G_Message.Body.SessionStopRes;
+	in = &shm_ccs->V2GMessage_DIN70121.SessionStopResponse;
+	exi_doc_DIN->V2G_Message.Body.SessionStopRes_isUsed = 1u;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+}
+
+/*===========================================================================
+FUNCTION: SHM_Read_iso1_SessionStopRes
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+		1. shm_ccs
+OUTPUT:
+		2. exi_doc_ISO1
+
+GLOBAL VARIABLES:
+=============================================================================*/
+void SHM_Read_iso1_SessionStopRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs)
+{
+	struct iso1SessionStopResType *out;
+	struct SessionStopResponse_ISO15118_2014 *in;
+	init_iso1BodyType(&exi_doc_ISO1->V2G_Message.Body);
+	init_iso1SessionStopResType(&exi_doc_ISO1->V2G_Message.Body.SessionStopRes);
+
+	out = &exi_doc_ISO1->V2G_Message.Body.SessionStopRes;
+	in = &shm_ccs->V2GMessage_ISO15118_2014.SessionStopResponse;
+	exi_doc_ISO1->V2G_Message.Body.SessionStopRes_isUsed = 1u;
+
+
+	//----- [BODY (1/3)] ResponseCode -----
+    out->ResponseCode = (unsigned char) in->ResponseCode;
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_V2G_MSG_din_Header
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_V2G_MSG_din_Header(struct dinEXIDocument *exi_doc_DIN)
+{
+    int i = 0;
+    int leng = 0;
+    leng = exi_doc_DIN->V2G_Message.Header.SessionID.bytesLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\t SessionID (%d Bytes) = ", leng);
+    for (i = 0; i <leng ; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_DIN->V2G_Message.Header.SessionID.bytes[i]);
+    }
+}
+
+/*===========================================================================
+FUNCTION: PRINT_V2G_MSG_iso1_Header
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_V2G_MSG_iso1_Header(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    int i = 0;
+    int leng = 0;
+    leng = exi_doc_ISO1->V2G_Message.Header.SessionID.bytesLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\t SessionID (%d Bytes) = ", leng);
+    for (i = 0; i <leng ; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_ISO1->V2G_Message.Header.SessionID.bytes[i]);
+    }
+}
+
+/*===========================================================================
+FUNCTION: PRINT_V2G_MSG_iso1_Header
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_V2G_MSG_iso2_Header(struct iso2EXIDocument *exi_doc_ISO2)
+{
+    int i = 0;
+    int leng = 0;
+    leng = exi_doc_ISO2->V2G_Message.Header.SessionID.bytesLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\t SessionID (%d Bytes) = ", leng);
+    for (i = 0; i <leng ; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_ISO2->V2G_Message.Header.SessionID.bytes[i]);
+    }
+}
+
+/*===========================================================================
+FUNCTION: DEBUG_PRINT_EXI_MSG_supportedAppProtocolReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_supportedAppProtocolReq(struct appHandEXIDocument *exi_doc)
+{
+	int i = 0;
+
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n EVSE side: List of application handshake protocols of the EV \n");
+
+	for(i = 0; i < exi_doc->supportedAppProtocolReq.AppProtocol.arrayLen; i++)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("\tProtocol entry #=%d\n",(i+1));
+
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\tProtocolNamespace=");
+		printASCIIString(
+			exi_doc->supportedAppProtocolReq.AppProtocol.array[i].ProtocolNamespace.characters,
+			exi_doc->supportedAppProtocolReq.AppProtocol.array[i].ProtocolNamespace.charactersLen
+			);
+
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\tVersion=%d.%d\n",
+			exi_doc->supportedAppProtocolReq.AppProtocol.array[i].VersionNumberMajor,
+			exi_doc->supportedAppProtocolReq.AppProtocol.array[i].VersionNumberMinor);
+
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\tSchemaID=%d\n", exi_doc->supportedAppProtocolReq.AppProtocol.array[i].SchemaID);
+
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\tPriority=%d\n", exi_doc->supportedAppProtocolReq.AppProtocol.array[i].Priority);
+	}
+
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_SessionSetupReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    int i = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing SessionSetupReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tEVCCID (%d Bytes) = ", exi_doc_DIN->V2G_Message.Body.SessionSetupReq.EVCCID.bytesLen);
+    for (i = 0; i < exi_doc_DIN->V2G_Message.Body.SessionSetupReq.EVCCID.bytesLen; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_DIN->V2G_Message.Body.SessionSetupReq.EVCCID.bytes[i]);
+    }
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing SessionSetupReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_SessionSetupReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    int i = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing SessionSetupReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tEVCCID (%d Bytes) = ", exi_doc_ISO1->V2G_Message.Body.SessionSetupReq.EVCCID.bytesLen);
+    for (i = 0; i < exi_doc_ISO1->V2G_Message.Body.SessionSetupReq.EVCCID.bytesLen; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_ISO1->V2G_Message.Body.SessionSetupReq.EVCCID.bytes[i]);
+    }
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing SessionSetupReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO2_SessionSetupReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO2_SessionSetupReq(struct iso2EXIDocument *exi_doc_ISO2)
+{
+    int i = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing SessionSetupReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso2_Header(exi_doc_ISO2);
+
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tEVCCID (%d Bytes) = ", exi_doc_ISO2->V2G_Message.Body.SessionSetupReq.EVCCID.bytesLen);
+    for (i = 0; i < exi_doc_ISO2->V2G_Message.Body.SessionSetupReq.EVCCID.bytesLen; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_ISO2->V2G_Message.Body.SessionSetupReq.EVCCID.bytes[i]);
+    }
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing SessionSetupReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_ServiceDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_ServiceDiscoveryReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    int i = 0;
+    int leng = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ServiceDiscoveryReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //[BODY(1/2)] Service Scope
+    leng = exi_doc_DIN->V2G_Message.Body.ServiceDiscoveryReq.ServiceScope.charactersLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t ServiceScope (%d Bytes, optional) = ", leng);
+    for (i = 0; i <leng ; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_DIN->V2G_Message.Body.ServiceDiscoveryReq.ServiceScope.characters[i]);
+    }
+
+    //[BODY(2/2)] Service Category
+    int cat = 0;
+    cat = exi_doc_DIN->V2G_Message.Body.ServiceDiscoveryReq.ServiceCategory;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t ServiceCategory = %d ", cat);
+    switch (cat)
+    {
+        case dinserviceCategoryType_EVCharging:             //0
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(EVCharging)");
+            break;
+        }
+        case dinserviceCategoryType_Internet:               //1
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Internet: not supported)");
+            break;
+        }
+        case dinserviceCategoryType_ContractCertificate:    //2
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(ContractCertificate: not supported)");
+            break;
+        }
+        case dinserviceCategoryType_OtherCustom:            //3
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(OtherCustom: not supported)");
+            break;
+        }
+        default:
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("([ERROR] Unexpected Service Category: %d)", cat);
+            break;
+        }
+
+    }
+    //DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t([0]EVCharging, [1]Internet, [2]ContractCertificate, [3]OtherCustom)\n");
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ServiceDiscoveryReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_ServiceDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_ServiceDiscoveryReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    int i = 0;
+    int leng = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ServiceDiscoveryReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //[BODY(1/2)] Service Scope
+    leng = exi_doc_ISO1->V2G_Message.Body.ServiceDiscoveryReq.ServiceScope.charactersLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t ServiceScope (%d Bytes, optional) = ", leng);
+    for (i = 0; i <leng ; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_doc_ISO1->V2G_Message.Body.ServiceDiscoveryReq.ServiceScope.characters[i]);
+    }
+
+    //[BODY(2/2)] Service Category
+    int cat = 0;
+    cat = exi_doc_ISO1->V2G_Message.Body.ServiceDiscoveryReq.ServiceCategory;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t ServiceCategory = %d ", cat);
+    switch (cat)
+    {
+        case iso1serviceCategoryType_EVCharging:             //0
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(EVCharging)");
+            break;
+        }
+        case iso1serviceCategoryType_Internet:               //1
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Internet: not supported)");
+            break;
+        }
+        case iso1serviceCategoryType_ContractCertificate:    //2
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(ContractCertificate: not supported)");
+            break;
+        }
+        case iso1serviceCategoryType_OtherCustom:            //3
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(OtherCustom: not supported)");
+            break;
+        }
+        default:
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("([ERROR] Unexpected Service Category)");
+            break;
+        }
+
+    }
+    //DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t([0]EVCharging, [1]Internet, [2]ContractCertificate, [3]OtherCustom)\n");
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ServiceDiscoveryReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_ServiceAndPaymentSelectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_ServiceAndPaymentSelectionReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    int i = 0;
+    int leng = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ServicePaymentSelectionReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+
+    //[BODY(1/2)] SelectedPaymentOption
+    int opt = 0;
+    opt = exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq.SelectedPaymentOption;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tSelectedPaymentOption = %d ", opt);
+    switch (opt)
+    {
+        case dinpaymentOptionType_Contract:         //0
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Contract)");
+            break;
+        }
+
+        case dinpaymentOptionType_ExternalPayment:  //1
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(ExternalPayment)");
+            break;
+        }
+        default:
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("([ERROR] Unexpected SelectedPaymentOption)\n");
+            break;
+        }
+    }
+
+
+    //[BODY(2/2)] SelectedServiceList
+    leng = exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq.SelectedServiceList.SelectedService.arrayLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tSelectedServiceList (%d items) = \n", leng);
+    for (i = 0; i< leng; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\t\t [%d-th](ServiceID, ParameterSetID, ParameterSetID_isUsed) = {%d, %d, %d}\n",
+            (i+1),
+            exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq.SelectedServiceList.SelectedService.array[i].ServiceID,
+            exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq.SelectedServiceList.SelectedService.array[i].ParameterSetID,
+            exi_doc_DIN->V2G_Message.Body.ServicePaymentSelectionReq.SelectedServiceList.SelectedService.array[i].ParameterSetID_isUsed);
+    }
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ServicePaymentSelectionReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_ServiceAndPaymentSelectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_ServiceAndPaymentSelectionReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    int i = 0;
+    int leng = 0;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing PaymentServiceSelectionReq ⨀⨀⨀⨀⨀⬇\n");
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+
+    //[BODY(1/2)] SelectedPaymentOption
+    int opt = 0;
+    opt = exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq.SelectedPaymentOption;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tSelectedPaymentOption = %d ", opt);
+    switch (opt)
+    {
+        case iso1paymentOptionType_Contract:         //0
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Contract)");
+            break;
+        }
+
+        case iso1paymentOptionType_ExternalPayment:  //1
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(ExternalPayment)");
+            break;
+        }
+        default:
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("([ERROR] Unexpected SelectedPaymentOption)\n");
+            break;
+        }
+    }
+
+
+    //[BODY(2/2)] SelectedServiceList
+    leng = exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq.SelectedServiceList.SelectedService.arrayLen;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\tSelectedServiceList (%d items) = \n", leng);
+    for (i = 0; i< leng; i++)
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t\t\t [%d-th](ServiceID, ParameterSetID, ParameterSetID_isUsed) = {%d, %d, %d}\n",
+            (i+1),
+            exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq.SelectedServiceList.SelectedService.array[i].ServiceID,
+            exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq.SelectedServiceList.SelectedService.array[i].ParameterSetID,
+            exi_doc_ISO1->V2G_Message.Body.PaymentServiceSelectionReq.SelectedServiceList.SelectedService.array[i].ParameterSetID_isUsed);
+    }
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing PaymentServiceSelectionReq ⨂⨂⨂⨂⨂⬆\n\n");
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_ContractAuthenticationReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_ContractAuthenticationReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ContractAuthenticationReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+
+    //[BODY(1/2)] Id
+    //[Joseph, To-Do, not full implemented, yet]
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t Id_isUsed = %d ",
+        exi_doc_DIN->V2G_Message.Body.ContractAuthenticationReq.Id_isUsed);
+
+
+    //[BODY(2/2)] GenChallenge
+    //[Joseph, To-Do, not full implemented, yet]
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t GenChallenge_isUsed = %d ",
+        exi_doc_DIN->V2G_Message.Body.ContractAuthenticationReq.GenChallenge_isUsed);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ContractAuthenticationReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_AuthorizationReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_AuthorizationReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing AuthorizationReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+
+    //[BODY(1/2)] Id
+    //[Joseph, To-Do, not full implemented, yet]
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t Id_isUsed = %d ",
+        exi_doc_ISO1->V2G_Message.Body.AuthorizationReq.Id_isUsed);
+
+
+    //[BODY(2/2)] GenChallenge
+    //[Joseph, To-Do, not full implemented, yet]
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t GenChallenge_isUsed = %d ",
+        exi_doc_ISO1->V2G_Message.Body.AuthorizationReq.GenChallenge_isUsed);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing AuthorizationReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_ChargeParameterDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_ChargeParameterDiscoveryReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ChargeParameterDiscoveryReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //===== [BODY (1/3)] EVRequestedEnergyTransferType =====
+    int type = 0;
+    type = exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.EVRequestedEnergyTransferType;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVRequestedEnergyTransferType = %d ", type);
+    switch (type)
+    {
+        case dinEVRequestedEnergyTransferType_AC_single_phase_core:    //0,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(AC_single_phase_core)\n");
+            break;
+        }
+    	case dinEVRequestedEnergyTransferType_AC_three_phase_core:     //1,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(AC_three_phase_core)\n");
+            break;
+        }
+    	case dinEVRequestedEnergyTransferType_DC_core:                 //2,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_core)\n");
+            break;
+        }
+    	case dinEVRequestedEnergyTransferType_DC_extended:             //3,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_extended)\n");  //expected
+            //[Joseph, To-Do]
+            //If this parameter is different from previous message,
+            //a warning should be noted.
+            break;
+        }
+    	case dinEVRequestedEnergyTransferType_DC_combo_core:           //4,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_combo_core)\n");
+            break;
+        }
+    	case dinEVRequestedEnergyTransferType_DC_unique:               //5
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_unique)\n");
+            break;
+        }
+    }
+
+    //===== [BODY (2/3)] AC_EVChargeParameter of EVChargeParameter =====
+    //ignored, since DIN doesn't support AC.
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t AC_EVChargeParameter_isUsed = %d ", exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.AC_EVChargeParameter_isUsed);
+
+    //===== [BODY (3/3)] DC_EVChargeParameter of EVChargeParameter =====
+    struct dinPhysicalValueType *obj;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter_isUsed);
+
+    //DC_EVStatus
+    struct dinDC_EVStatusType *status;
+    status = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.DC_EVStatus;
+    PRINT_dinDC_EVStatusType(status);
+
+    //EVMaximumCurrentLimit
+    obj = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVMaximumCurrentLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumCurrentLimit = %d (DEC) ",  GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    //EVMaximumPowerLimit
+    obj = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVMaximumPowerLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumPowerLimit = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    //EVMaximumVoltageLimit
+    obj = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVMaximumVoltageLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumVoltageLimit = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    //EVEnergyCapacity
+    obj = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVEnergyCapacity;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVEnergyCapacity = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    //EVEnergyRequest
+    obj = &exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVEnergyRequest;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVEnergyRequest = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    //FullSOC
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t FullSOC = %d \% (DEC)", exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.FullSOC);
+
+    //BulkSOC
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkSOC = %d \% (DEC)", exi_doc_DIN->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.BulkSOC);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ChargeParameterDiscoveryReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_ChargeParameterDiscoveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_ChargeParameterDiscoveryReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ChargeParameterDiscoveryReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (1/3)] RequestedEnergyTransferMode =====
+    int type = 0;
+    type = exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.RequestedEnergyTransferMode;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t RequestedEnergyTransferMode = %d ", type);
+    switch (type)
+    {
+        case iso1EnergyTransferModeType_AC_single_phase_core:    //0,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(AC_single_phase_core)\n");
+            break;
+        }
+    	case iso1EnergyTransferModeType_AC_three_phase_core:     //1,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(AC_three_phase_core)\n");
+            break;
+        }
+    	case iso1EnergyTransferModeType_DC_core:                 //2,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_core)\n");
+            break;
+        }
+    	case iso1EnergyTransferModeType_DC_extended:             //3,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_extended)\n");  //expected
+            //[Joseph, To-Do]
+            //If this parameter is different from previous message,
+            //a warning should be noted.
+            break;
+        }
+    	case iso1EnergyTransferModeType_DC_combo_core:           //4,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_combo_core)\n");
+            break;
+        }
+    	case iso1EnergyTransferModeType_DC_unique:               //5
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(DC_unique)\n");
+            break;
+        }
+    }
+
+    //===== [BODY (2/3)] AC_EVChargeParameter of EVChargeParameter =====
+    //ignored, since our ISO1 doesn't support AC.
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t AC_EVChargeParameter_isUsed = %d ", exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.AC_EVChargeParameter_isUsed);
+
+    //===== [BODY (3/3)] DC_EVChargeParameter of EVChargeParameter =====
+    struct iso1PhysicalValueType *obj;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter_isUsed);
+
+    //DC_EVStatus
+    struct iso1DC_EVStatusType *status;
+    status = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.DC_EVStatus;
+    PRINT_iso1DC_EVStatusType(status);
+
+    //EVMaximumCurrentLimit
+    obj = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVMaximumCurrentLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumCurrentLimit = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    //EVMaximumPowerLimit
+    obj = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVMaximumPowerLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumPowerLimit = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    //EVMaximumVoltageLimit
+    obj = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVMaximumVoltageLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumVoltageLimit = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    //EVEnergyCapacity
+    obj = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVEnergyCapacity;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVEnergyCapacity = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    //EVEnergyRequest
+    obj = &exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.EVEnergyRequest;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVEnergyRequest = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    //FullSOC
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t FullSOC = %d \% (DEC)", exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.FullSOC);
+
+    //BulkSOC
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkSOC = %d \% (DEC)", exi_doc_ISO1->V2G_Message.Body.ChargeParameterDiscoveryReq.DC_EVChargeParameter.BulkSOC);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ChargeParameterDiscoveryReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_CableCheckReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_CableCheckReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing CableCheckReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //===== [BODY (1/1)] DC_EVStatus =====
+    struct dinDC_EVStatusType *status;
+    status = &exi_doc_DIN->V2G_Message.Body.CableCheckReq.DC_EVStatus;
+    PRINT_dinDC_EVStatusType(status);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing CableCheckReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_CableCheckReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_CableCheckReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing CableCheckReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (1/1)] DC_EVStatus =====
+    struct iso1DC_EVStatusType *status;
+    status = &exi_doc_ISO1->V2G_Message.Body.CableCheckReq.DC_EVStatus;
+    PRINT_iso1DC_EVStatusType(status);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing CableCheckReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_PreChargeReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_PreChargeReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing PreChargeReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //===== [BODY (1/3)] DC_EVStatus =====
+    struct dinDC_EVStatusType *status;
+    status = &exi_doc_DIN->V2G_Message.Body.PreChargeReq.DC_EVStatus;
+    PRINT_dinDC_EVStatusType(status);
+
+    //===== [BODY (2/3)] EVTargetVoltage =====
+    struct dinPhysicalValueType *obj;
+    obj = &exi_doc_DIN->V2G_Message.Body.PreChargeReq.EVTargetVoltage;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetVoltage = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    //===== [BODY (3/3)] EVTargetCurrent =====
+    obj = &exi_doc_DIN->V2G_Message.Body.PreChargeReq.EVTargetCurrent;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetCurrent = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing PreChargeReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_PreChargeReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_PreChargeReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing PreChargeReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (1/3)] DC_EVStatus =====
+    struct iso1DC_EVStatusType *status;
+    status = &exi_doc_ISO1->V2G_Message.Body.PreChargeReq.DC_EVStatus;
+    PRINT_iso1DC_EVStatusType(status);
+
+    //===== [BODY (2/3)] EVTargetVoltage =====
+    struct iso1PhysicalValueType *obj;
+    obj = &exi_doc_ISO1->V2G_Message.Body.PreChargeReq.EVTargetVoltage;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetVoltage = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    //===== [BODY (3/3)] EVTargetCurrent =====
+    obj = &exi_doc_ISO1->V2G_Message.Body.PreChargeReq.EVTargetCurrent;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetCurrent = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing PreChargeReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_PowerDeliveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_PowerDeliveryReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing PowerDeliveryReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+
+    //===== [BODY (1/3)] ReadyToChargeState =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ReadyToChargeState = %d (DEC)",
+            exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.ReadyToChargeState);
+
+
+    //===== [BODY (2/3)] ChargingProfile =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargingProfile_isUsed = %d (DEC)",
+            exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.ChargingProfile_isUsed);
+
+
+    //===== [BODY (3/3)] DC_EVPowerDeliveryParameter =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVPowerDeliveryParameter_isUsed = %d (DEC)",
+            exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter_isUsed);
+
+    //DC_EVStatus
+    struct dinDC_EVStatusType *status;
+    status = &exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.DC_EVStatus;
+    PRINT_dinDC_EVStatusType(status);
+
+    //BulkChargingComplete
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete = %d (DEC)",
+            exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.BulkChargingComplete);
+
+    //BulkChargingComplete_isUsed
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete_isUsed = %d (DEC)",
+            exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.BulkChargingComplete_isUsed);
+
+    //ChargingComplete
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargingComplete = %d (DEC)",
+            exi_doc_DIN->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.ChargingComplete);
+
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing PowerDeliveryReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_PowerDeliveryReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_PowerDeliveryReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing PowerDeliveryReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+
+    //===== [BODY (1/3)] ChargeProgress =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargeProgress = %d (DEC, 0:start, 1:stop, 2:renegotiate)",
+            exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.ChargeProgress);
+	//iso1chargeProgressType_Start = 0,
+	//iso1chargeProgressType_Stop = 1,
+	//iso1chargeProgressType_Renegotiate = 2
+
+
+    //===== [BODY (2/3)] ChargingProfile =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargingProfile_isUsed = %d (DEC)",
+            exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.ChargingProfile_isUsed);
+
+
+    //===== [BODY (3/3)] DC_EVPowerDeliveryParameter =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVPowerDeliveryParameter_isUsed = %d (DEC)",
+            exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter_isUsed);
+
+    //DC_EVStatus
+    struct iso1DC_EVStatusType *status;
+    status = &exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.DC_EVStatus;
+    PRINT_iso1DC_EVStatusType(status);
+
+    //BulkChargingComplete
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete = %d (DEC)",
+            exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.BulkChargingComplete);
+
+    //BulkChargingComplete_isUsed
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete_isUsed = %d (DEC)",
+            exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.BulkChargingComplete_isUsed);
+
+    //ChargingComplete
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargingComplete = %d (DEC)",
+            exi_doc_ISO1->V2G_Message.Body.PowerDeliveryReq.DC_EVPowerDeliveryParameter.ChargingComplete);
+
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing PowerDeliveryReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_CurrentDemandReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_CurrentDemandReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing CurrentDemandReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //===== [BODY (1/10)] DC_EVStatus =====
+    struct dinDC_EVStatusType *status;
+    status = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.DC_EVStatus;
+    PRINT_dinDC_EVStatusType(status);
+
+
+    //===== [BODY (2/10)] EVTargetCurrent =====
+    struct dinPhysicalValueType *obj;
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVTargetCurrent;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetCurrent = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (3/10)] EVMaximumVoltageLimit =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVMaximumVoltageLimit_isUsed);
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVMaximumVoltageLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumVoltageLimit = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+
+
+    //===== [BODY (4/10)] EVMaximumCurrentLimit =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVMaximumCurrentLimit_isUsed);
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVMaximumCurrentLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumCurrentLimit = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (5/10)] EVMaximumPowerLimit =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVMaximumPowerLimit_isUsed);
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVMaximumPowerLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumPowerLimit = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (6/10)] BulkChargingComplete =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.BulkChargingComplete_isUsed);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.BulkChargingComplete);
+
+
+    //===== [BODY (7/10)] ChargingComplete =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargingComplete = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.ChargingComplete);
+
+
+    //===== [BODY (8/10)] RemainingTimeToFullSoC =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.RemainingTimeToFullSoC_isUsed);
+
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.RemainingTimeToFullSoC;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t RemainingTimeToFullSoC = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (9/10)] RemainingTimeToBulkSoC =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.RemainingTimeToBulkSoC_isUsed);
+
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.RemainingTimeToBulkSoC;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t RemainingTimeToBulkSoC = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (10/10)] EVTargetVoltage =====
+    obj = &exi_doc_DIN->V2G_Message.Body.CurrentDemandReq.EVTargetVoltage;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetVoltage = %d (DEC) ", GetValue_dinPhysicalValueType(obj));
+    PRINT_dinPhysicalValueType_UNIT(obj);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing CurrentDemandReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_CurrentDemandReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_CurrentDemandReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing CurrentDemandReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (1/10)] DC_EVStatus =====
+    struct iso1DC_EVStatusType *status;
+    status = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.DC_EVStatus;
+    PRINT_iso1DC_EVStatusType(status);
+
+
+    //===== [BODY (2/10)] EVTargetCurrent =====
+    struct iso1PhysicalValueType *obj;
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVTargetCurrent;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetCurrent = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (3/10)] EVMaximumVoltageLimit =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVMaximumVoltageLimit_isUsed);
+
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVMaximumVoltageLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumVoltageLimit = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+
+
+    //===== [BODY (4/10)] EVMaximumCurrentLimit =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n",
+            exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVMaximumCurrentLimit_isUsed);
+
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVMaximumCurrentLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumCurrentLimit = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (5/10)] EVMaximumPowerLimit =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVMaximumPowerLimit_isUsed);
+
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVMaximumPowerLimit;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVMaximumPowerLimit = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (6/10)] BulkChargingComplete =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete_isUsed = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.BulkChargingComplete_isUsed);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t BulkChargingComplete = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.BulkChargingComplete);
+
+
+    //===== [BODY (7/10)] ChargingComplete =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t ChargingComplete = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.ChargingComplete);
+
+
+    //===== [BODY (8/10)] RemainingTimeToFullSoC =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.RemainingTimeToFullSoC_isUsed);
+
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.RemainingTimeToFullSoC;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t RemainingTimeToFullSoC = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (9/10)] RemainingTimeToBulkSoC =====
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVChargeParameter_isUsed = %d \n", exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.RemainingTimeToBulkSoC_isUsed);
+
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.RemainingTimeToBulkSoC;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t RemainingTimeToBulkSoC = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+
+    //===== [BODY (10/10)] EVTargetVoltage =====
+    obj = &exi_doc_ISO1->V2G_Message.Body.CurrentDemandReq.EVTargetVoltage;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t EVTargetVoltage = %d (DEC) ", GetValue_iso1PhysicalValueType(obj));
+    PRINT_iso1PhysicalValueType_UNIT(obj);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing CurrentDemandReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_ChargingStatusReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_ChargingStatusReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing ChargingStatusReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (0/0)] =====
+	//ISO1: no content
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t no content (ISO1)");
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing ChargingStatusReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_WeldingDetectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_WeldingDetectionReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing WeldingDetectionReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //===== [BODY (1/3)] DC_EVStatus =====
+    struct dinDC_EVStatusType *status;
+    status = &exi_doc_DIN->V2G_Message.Body.WeldingDetectionReq.DC_EVStatus;
+    PRINT_dinDC_EVStatusType(status);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing WeldingDetectionReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_WeldingDetectionReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_WeldingDetectionReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing WeldingDetectionReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (1/3)] DC_EVStatus =====
+    struct iso1DC_EVStatusType *status;
+    status = &exi_doc_ISO1->V2G_Message.Body.WeldingDetectionReq.DC_EVStatus;
+    PRINT_iso1DC_EVStatusType(status);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing WeldingDetectionReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_DIN_SessionStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_DIN_SessionStopReq(struct dinEXIDocument *exi_doc_DIN)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing SessionStopReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_din_Header(exi_doc_DIN);
+
+    //===== [BODY (0/0)] noContent =====
+
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing SessionStopReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_XML_DOC_ISO1_SessionStopReq
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_XML_DOC_ISO1_SessionStopReq(struct iso1EXIDocument *exi_doc_ISO1)
+{
+    //int i = 0;
+    static int cnt = 0;
+    cnt++;
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n\t⬇⨀⨀⨀⨀⨀ [START] Parsing SessionStopReq (%d-th) ⨀⨀⨀⨀⨀⬇\n", cnt);
+
+    //===== [Header] SessionID =====
+    PRINT_V2G_MSG_iso1_Header(exi_doc_ISO1);
+
+    //===== [BODY (0/0)] noContent =====
+
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t⬆⨂⨂⨂⨂⨂ [END] Parsing SessionStopReq (%d-th) ⨂⨂⨂⨂⨂⬆\n\n", cnt);
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_V2GTP_STREAM
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_V2GTP_STREAM(bitstream_t *stream)
+{
+	#if (DEBUG_PRINTF_EXI_ENGINE_DETAIL_SHOW == ENABLE)
+	int i = 0;
+
+
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n ----- Got a new V2GTP Message -----\n\n");
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t SIZE: %d (Bytes, DEC)\n", (int)stream->size);
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t HEADER (HEX): ");
+	for (i = 0; i < stream->size; i++)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", stream->data[i]);
+		if (i == (V2GTP_HEADER_LENGTH - 1))
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t EXI (HEX): ");
+		}
+	}
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n");
+	#endif
+}
+
+
+/*===========================================================================
+FUNCTION: API_V2GMSG_EXI_Decoder_AppProtocol
+DESCRIPTION:
+PRE-CONDITION:
+        1. #define EXI_STREAM    BYTE_ARRAY
+
+INPUT:
+        1. V2GTP_msg
+        2. V2GTP_msg_length
+
+OUTPUT:
+        1. ccs_handshake       	//Share Memory
+        2. V2gFlowStatus   //Status Flag
+
+GLOBAL VARIABLES:
+		1. iStream
+		2. exiDoc
+=============================================================================*/
+int API_V2GMSG_EXI_Decoder_AppProtocol(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct appHandEXIDocument *exiDoc_handshake)
+{
+	int errn = 0;
+	size_t pos = 0;
+	uint32_t payloadLengthDec = 0;
+
+	//Initialize iStream
+	iStream.size = V2GTP_msg_length;	//V2GTP_MSG_RX_BUFFER_SIZE;	//64*1024 = 65,536
+	iStream.pos = &pos;
+	iStream.data = V2GTP_msg;
+
+	//Initialize exiDoc
+	init_appHandEXIDocument(exiDoc_handshake);
+
+	//Print the original EXI message
+	PRINT_V2GTP_STREAM(&iStream);
+
+	//STEP 1: Parsing Header
+	errn = read_v2gtpHeader(iStream.data, &payloadLengthDec);
+
+	//TC_SECC_VTB_V2GTPSessionSetup_004
+	if (payloadLengthDec == 0)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_AppProtocol]payloadLengthDec = 0\n");
+		errn = -1;
+	}
+
+	if (errn == 0)
+	{
+		//STEP 2: Parsing Payload EXI Message
+		*iStream.pos = V2GTP_HEADER_LENGTH;
+		errn = decode_appHandExiDocument(&iStream, exiDoc_handshake);
+		if(errn == 0)
+		{
+			//Print the decoded XML Document
+			PRINT_XML_DOC_supportedAppProtocolReq(exiDoc_handshake);
+
+			//errn = SupportedAppProtocolRequest;	//17 (define.h)
+		}
+		else
+		{
+			/* an error occured */
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_AppProtocol]decode_appHandExiDocument()\n");
+			errn = -1;
+		}
+	}
+
+	return errn;
+}
+
+
+int API_V2GMSG_EXI_Encoder_AppProtocol(struct appHandEXIDocument *exi_doc, bitstream_t *exi_packet)
+{
+	int i = 0;
+	int errn = 0;
+	size_t pos = 0;
+	exi_packet->pos = &pos;
+	//*exi_packet->pos = 0;
+	exi_packet->size = V2GTP_MSG_TX_BUFFER_SIZE;	//(64*1024)   //65,536 = 65.5KB
+	exi_packet->data = V2GTP_Tx_buf;
+
+	*exi_packet->pos = V2GTP_HEADER_LENGTH;
+	if( (errn = encode_appHandExiDocument(exi_packet, exi_doc)) == 0)
+	{
+		errn = write_v2gtpHeader(exi_packet->data, (*exi_packet->pos) - V2GTP_HEADER_LENGTH, V2GTP_EXI_TYPE);
+		//*exi_packet.pos = total length of the encoded V2GMSG.
+		//V2GTP_HEADER_LENGTH = 8 Bytes
+	}
+	exi_packet->size = *exi_packet->pos;	//total length of the encoded V2GMSG.
+
+
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n -----  supportedAppProtocolRes [START] -----\n\n");
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t SIZE: %d (Bytes, DEC)\n", (int)exi_packet->size);
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\t HEADER (HEX): ");
+	for (i = 0; i < (int)exi_packet->size; i++)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("%02X", exi_packet->data[i]);
+		if (i == (V2GTP_HEADER_LENGTH - 1)) DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t EXI (HEX): ");
+	}
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\n -----  supportedAppProtocolRes [END] -----\n\n");
+
+
+	return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: API_V2GMSG_EXI_Decoder_DIN
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int API_V2GMSG_EXI_Decoder_DIN(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct dinEXIDocument *exi_doc_DIN)
+{
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("API_V2GMSG_EXI_Decoder_DIN(): Entered!\n");
+
+	int errn = 0;
+	size_t pos = 0;
+	uint32_t payloadLengthDec = 0;
+
+	//Initialize iStream
+	iStream.size = V2GTP_msg_length;	//V2GTP_MSG_RX_BUFFER_SIZE;	//64*1024 = 65,536
+	iStream.pos = &pos;
+	iStream.data = V2GTP_msg;
+
+	iStream.buffer = 0;
+	iStream.capacity = 0;
+
+	//Print the original EXI message
+	PRINT_V2GTP_STREAM(&iStream);
+
+	//STEP 1: Parsing Header
+	errn = read_v2gtpHeader(iStream.data, &payloadLengthDec);
+
+	//TC_SECC_VTB_V2GTPSessionSetup_004
+	if (payloadLengthDec == 0)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][Error][API_V2GMSG_EXI_Decoder_DIN]payloadLengthDec = 0\n");
+		errn = -1;
+	}
+
+	if (errn == 0)
+	{
+		//STEP 2: Parsing Payload EXI Message
+		*iStream.pos = V2GTP_HEADER_LENGTH;
+		errn = decode_dinExiDocument(&iStream, exi_doc_DIN);
+		//The "eventcode" inside this function could present which kind of message it is.
+
+		if (errn == 0)
+		{
+			// successfully received and parsed.
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][API_V2GMSG_EXI_Decoder_DIN] decode_dinExiDocument: %d (DEC) => OK!\n", errn);
+			errn = Check_V2G_Rx_Msg_Name_din(exi_doc_DIN);
+			if (errn < 0)
+			{
+				DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]Check_V2G_Rx_Msg_Name_din: fail\n");
+			}
+		}
+		else
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_DIN] decode_dinExiDocument: %d (DEC)\n", errn);
+			errn = -1;
+		}
+	}
+	else
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_DIN] read_v2gtpHeader: %d (DEC)\n", errn);
+	}
+	return errn;
+}
+
+/*===========================================================================
+FUNCTION: API_V2GMSG_EXI_Decoder_ISO1
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int API_V2GMSG_EXI_Decoder_ISO1(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct iso1EXIDocument *exi_doc_ISO1)
+{
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("[API_V2GMSG_EXI_Decoder_ISO1] Entered!\n");
+
+	int errn = 0;
+	size_t pos = 0;
+	uint32_t payloadLengthDec = 0;
+
+	//Initialize iStream
+	iStream.size = V2GTP_msg_length;	//V2GTP_MSG_RX_BUFFER_SIZE;	//64*1024 = 65,536
+	iStream.pos = &pos;
+	iStream.data = V2GTP_msg;
+
+	iStream.buffer = 0;
+	iStream.capacity = 0;
+
+	//Print the original EXI message
+	PRINT_V2GTP_STREAM(&iStream);
+
+	//STEP 1: Parsing Header
+	errn = read_v2gtpHeader(iStream.data, &payloadLengthDec);
+
+	//TC_SECC_VTB_V2GTPSessionSetup_004
+	if (payloadLengthDec == 0)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][API_V2GMSG_EXI_Decoder_ISO1]payloadLengthDec = 0");
+		errn = -1;
+	}
+
+	if (errn == 0)
+	{
+		//STEP 2: Parsing Payload EXI Message
+		*iStream.pos = V2GTP_HEADER_LENGTH;
+		errn = decode_iso1ExiDocument(&iStream, exi_doc_ISO1);
+		//The "eventcode" inside this function could present which kind of message it is.
+
+		if (errn == 0)
+		{
+			// successfully received and parsed.
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][API_V2GMSG_EXI_Decoder_ISO1] decode_iso1ExiDocument: %d (DEC) => OK!\n", errn);
+			errn = Check_V2G_Rx_Msg_Name_iso1(exi_doc_ISO1);
+			if (errn < 0)
+			{
+				DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]Check_V2G_Rx_Msg_Name_din: fail\n");
+			}
+		}
+		else
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_ISO1] decode_iso1ExiDocument: %d (DEC)\n", errn);
+			errn = -1;
+		}
+	}
+	else
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_ISO1] read_v2gtpHeader: %d (DEC)\n", errn);
+	}
+	return errn;
+}
+
+/*===========================================================================
+FUNCTION: API_V2GMSG_EXI_Decoder_ISO2
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int API_V2GMSG_EXI_Decoder_ISO2(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct iso2EXIDocument *exi_doc_ISO2)
+{
+	DEBUG_PRINTF_EXI_ENGINE_DETAIL("[API_V2GMSG_EXI_Decoder_ISO2] Entered!\n");
+
+	int errn = 0;
+	size_t pos = 0;
+	uint32_t payloadLengthDec = 0;
+
+	//Initialize iStream
+	iStream.size = V2GTP_msg_length;	//V2GTP_MSG_RX_BUFFER_SIZE;	//64*1024 = 65,536
+	iStream.pos = &pos;
+	iStream.data = V2GTP_msg;
+
+	iStream.buffer = 0;
+	iStream.capacity = 0;
+
+	//Print the original EXI message
+	PRINT_V2GTP_STREAM(&iStream);
+
+	//STEP 1: Parsing Header
+	errn = read_v2gtpHeader(iStream.data, &payloadLengthDec);
+
+	//TC_SECC_VTB_V2GTPSessionSetup_004
+	if (payloadLengthDec == 0)
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][API_V2GMSG_EXI_Decoder_ISO2]payloadLengthDec = 0\n");
+		errn = -1;
+	}
+
+	if (errn == 0)
+	{
+		//STEP 2: Parsing Payload EXI Message
+		*iStream.pos = V2GTP_HEADER_LENGTH;
+		errn = decode_iso2ExiDocument(&iStream, exi_doc_ISO2);
+		//The "eventcode" inside this function could present which kind of message it is.
+
+		if (errn == 0)
+		{
+			// successfully received and parsed.
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[SeccComm][API_V2GMSG_EXI_Decoder_ISO2] decode_iso2ExiDocument: %d (DEC) => OK!\n", errn);
+			errn = Check_V2G_Rx_Msg_Name_iso2(exi_doc_ISO2);
+			if (errn < 0)
+			{
+				DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR]Check_V2G_Rx_Msg_Name_din: fail\n");
+			}
+		}
+		else
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_ISO2] decode_iso2ExiDocument: %d (DEC)\n", errn);
+		}
+	}
+	else
+	{
+		DEBUG_PRINTF_EXI_ENGINE_DETAIL("[ERROR][API_V2GMSG_EXI_Decoder_ISO2] read_v2gtpHeader: %d (DEC)\n", errn);
+	}
+	return errn;
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_dinPhysicalValueType_UNIT
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_dinPhysicalValueType_UNIT(struct dinPhysicalValueType *obj)
+{
+    if (obj->Unit_isUsed == TRUE)
+    {
+        switch (obj->Unit)
+        {
+            case dinunitSymbolType_h:      // = 0,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: h)");
+                break;
+            }
+        	case dinunitSymbolType_m:      // = 1,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: m)");
+                break;
+            }
+        	case dinunitSymbolType_s:      // = 2,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: s)");
+                break;
+            }
+        	case dinunitSymbolType_A:      // = 3,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: A)");
+                break;
+            }
+        	case dinunitSymbolType_Ah:     // = 4,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: Ah)");
+                break;
+            }
+        	case dinunitSymbolType_V:      // = 5,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: V)");
+                break;
+            }
+        	case dinunitSymbolType_VA:     // = 6,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: VA)");
+                break;
+            }
+        	case dinunitSymbolType_W:      // = 7,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: W)");
+                break;
+            }
+        	case dinunitSymbolType_W_s:    // = 8,
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: W_s)");
+                break;
+            }
+        	case dinunitSymbolType_Wh:     // = 9
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: Wh)");
+                break;
+            }
+            default:
+            {
+                DEBUG_PRINTF_EXI_ENGINE_DETAIL("([WARNING] unit: unexpected dinPhysicalValueType unit)");
+                break;
+            }
+        }
+    }
+    else
+    {
+        DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: null)");
+    }
+}
+
+/*===========================================================================
+FUNCTION: PRINT_iso1PhysicalValueType_UNIT
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_iso1PhysicalValueType_UNIT(struct iso1PhysicalValueType *obj)
+{
+	switch (obj->Unit)
+	{
+		case iso1unitSymbolType_h:      // = 0,
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: h)");
+			break;
+		}
+		case iso1unitSymbolType_m:      // = 1,
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: m)");
+			break;
+		}
+		case iso1unitSymbolType_s:      // = 2,
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: s)");
+			break;
+		}
+		case iso1unitSymbolType_A:      // = 3,
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: A)");
+			break;
+		}
+		case iso1unitSymbolType_V:      // = 4,
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: V)");
+			break;
+		}
+		case iso1unitSymbolType_W:      // = 5,
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: W)");
+			break;
+		}
+		case iso1unitSymbolType_Wh:     // = 6
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("(unit: Wh)");
+			break;
+		}
+		default:
+		{
+			DEBUG_PRINTF_EXI_ENGINE_DETAIL("([WARNING] unit: unexpected iso1PhysicalValueType unit)");
+			break;
+		}
+	}
+}
+
+/*===========================================================================
+FUNCTION: GetValue_dinPhysicalValueType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int GetValue_dinPhysicalValueType(struct dinPhysicalValueType *obj)
+{
+    int result;
+    result = (obj->Value) * pow(10, obj->Multiplier);
+    return result;
+}
+
+/*===========================================================================
+FUNCTION: GetValue_iso1PhysicalValueType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+int GetValue_iso1PhysicalValueType(struct iso1PhysicalValueType *obj)
+{
+    int result;
+    result = (obj->Value) * pow(10, obj->Multiplier);
+    return result;
+}
+
+/*===========================================================================
+FUNCTION: PRINT_dinDC_EVErrorCodeType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_dinDC_EVErrorCodeType(struct dinDC_EVStatusType *status)
+{
+    switch (status->EVErrorCode)
+    {
+        case dinDC_EVErrorCodeType_NO_ERROR:                           // = 0,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(NO_ERROR)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_RESSTemperatureInhibit:      // = 1,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_RESSTemperatureInhibit)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_EVShiftPosition:             // = 2,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_EVShiftPosition)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_ChargerConnectorLockFault:   // = 3,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(ChargerConnectorLockFault)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_EVRESSMalfunction:           // = 4,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_EVRESSMalfunction)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_ChargingCurrentdifferential: // = 5,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_ChargingCurrentdifferential)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_ChargingVoltageOutOfRange:   // = 6,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_ChargingVoltageOutOfRange)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_Reserved_A:                         // = 7,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Reserved_A)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_Reserved_B:                         // = 8,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Reserved_B)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_Reserved_C:                         // = 9,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Reserved_C)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_FAILED_ChargingSystemIncompatibility:// = 10,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_ChargingSystemIncompatibility)");
+            break;
+        }
+    	case dinDC_EVErrorCodeType_NoData:                             // = 11
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(NoData)");
+            break;
+        }
+        default:
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("([WARNING] Unexpected din EVErrorCode)");
+            break;
+        }
+    }
+}
+
+/*===========================================================================
+FUNCTION: PRINT_iso1DC_EVErrorCodeType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_iso1DC_EVErrorCodeType(struct iso1DC_EVStatusType *status)
+{
+    switch (status->EVErrorCode)
+    {
+        case iso1DC_EVErrorCodeType_NO_ERROR:                           // = 0,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(NO_ERROR)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_RESSTemperatureInhibit:      // = 1,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_RESSTemperatureInhibit)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_EVShiftPosition:             // = 2,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_EVShiftPosition)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_ChargerConnectorLockFault:   // = 3,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(ChargerConnectorLockFault)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_EVRESSMalfunction:           // = 4,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_EVRESSMalfunction)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_ChargingCurrentdifferential: // = 5,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_ChargingCurrentdifferential)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_ChargingVoltageOutOfRange:   // = 6,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_ChargingVoltageOutOfRange)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_Reserved_A:                         // = 7,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Reserved_A)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_Reserved_B:                         // = 8,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Reserved_B)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_Reserved_C:                         // = 9,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(Reserved_C)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_FAILED_ChargingSystemIncompatibility:// = 10,
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(FAILED_ChargingSystemIncompatibility)");
+            break;
+        }
+    	case iso1DC_EVErrorCodeType_NoData:                             // = 11
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("(NoData)");
+            break;
+        }
+        default:
+        {
+            DEBUG_PRINTF_EXI_ENGINE_DETAIL("([WARNING] Unexpected iso1 EVErrorCode)");
+            break;
+        }
+    }
+}
+
+
+/*===========================================================================
+FUNCTION: PRINT_dinDC_EVStatusType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_dinDC_EVStatusType(struct dinDC_EVStatusType *status)
+{
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVStatus:");
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVReady = %d (DEC) ", status->EVReady);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVErrorCode = %d (DEC) ", status->EVErrorCode);
+    PRINT_dinDC_EVErrorCodeType(status);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVRESSSOC = %d \%(DEC) \n", status->EVRESSSOC);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVCabinConditioning = %d (DEC) ", status->EVCabinConditioning);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVCabinConditioning_isUsed = %d (DEC) ", status->EVCabinConditioning_isUsed);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVRESSConditioning = %d (DEC) ", status->EVRESSConditioning);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVRESSConditioning_isUsed = %d (DEC) \n", status->EVRESSConditioning_isUsed);
+}
+
+/*===========================================================================
+FUNCTION: PRINT_iso1DC_EVStatusType
+DESCRIPTION:
+PRE-CONDITION:
+INPUT:
+OUTPUT:
+GLOBAL VARIABLES:
+=============================================================================*/
+void PRINT_iso1DC_EVStatusType(struct iso1DC_EVStatusType *status)
+{
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t DC_EVStatus:");
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVReady = %d (DEC) ", status->EVReady);
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVErrorCode = %d (DEC) ", status->EVErrorCode);
+    PRINT_iso1DC_EVErrorCodeType(status);
+
+    DEBUG_PRINTF_EXI_ENGINE_DETAIL("\n\t\t\t\t- EVRESSSOC = %d \%(DEC) \n", status->EVRESSSOC);
+}

+ 180 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/api/api.h

@@ -0,0 +1,180 @@
+/*===========================================================================
+                    Combined Charging System (CCS): SECC
+                                 api.h
+
+                          initiated by Joseph
+                           (since 2019/08/07)
+=============================================================================*/
+#include "define_ccs.h"
+
+#include "../appHandshake/appHandEXIDatatypes.h"
+#include "../appHandshake/appHandEXIDatatypesEncoder.h"
+#include "../appHandshake/appHandEXIDatatypesDecoder.h"
+
+#include "../din/dinEXIDatatypes.h"
+#include "../din/dinEXIDatatypesEncoder.h"
+#include "../din/dinEXIDatatypesDecoder.h"
+
+#include "../iso1/iso1EXIDatatypes.h"
+#include "../iso1/iso1EXIDatatypesEncoder.h"
+#include "../iso1/iso1EXIDatatypesDecoder.h"
+
+#include "../iso2/iso2EXIDatatypes.h"
+#include "../iso2/iso2EXIDatatypesEncoder.h"
+#include "../iso2/iso2EXIDatatypesDecoder.h"
+
+//Configuration for Debug Print Messages
+#if FIRMWARE_VERSION_COMPILE_SETTING_RELEASE_MODE == ENABLE
+#define DEBUG_PRINTF_EXI_ENGINE_SHOW           DISABLE   //ENABLE, DISABLE
+#define DEBUG_PRINTF_EXI_ENGINE_BRIEF_SHOW     DISABLE   //ENABLE, DISABLE
+#define DEBUG_PRINTF_EXI_ENGINE_DETAIL_SHOW    DISABLE   //ENABLE, DISABLE
+#else   //debug mode
+#define DEBUG_PRINTF_EXI_ENGINE_SHOW           ENABLE   //ENABLE, DISABLE
+#define DEBUG_PRINTF_EXI_ENGINE_BRIEF_SHOW     DISABLE   //ENABLE, DISABLE
+#define DEBUG_PRINTF_EXI_ENGINE_DETAIL_SHOW    DISABLE   //ENABLE, DISABLE
+#endif
+
+void SHM_Save_din_supportedAppProtocolReq(struct CcsData *shm_ccs, struct appHandEXIDocument *buf, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_SessionSetupReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_ServiceDiscoveryReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_ServiceAndPaymentSelectionReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_ContractAuthenticationReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_ChargeParameterDiscoveryReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_CableCheckReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_PreChargeReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_PowerDeliveryReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_CurrentDemandReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_WeldingDetectionReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_din_SessionStopReq(struct CcsData *shm_ccs, struct dinEXIDocument *exi_doc_DIN, struct SysConfigAndInfo *shm_sys);
+
+void SHM_Save_iso1_SessionSetupReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_ServiceDiscoveryReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_ServiceAndPaymentSelectionReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_AuthorizationReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_ChargeParameterDiscoveryReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_CableCheckReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_PreChargeReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_PowerDeliveryReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_CurrentDemandReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_ChargingStatusReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_WeldingDetectionReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+void SHM_Save_iso1_SessionStopReq(struct CcsData *shm_ccs, struct iso1EXIDocument *exi_doc_ISO1, struct SysConfigAndInfo *shm_sys);
+
+void SHM_Save_iso2_SessionSetupReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_ServiceDiscoveryReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_ServiceAndPaymentSelectionReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_ContractAuthenticationReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_ChargeParameterDiscoveryReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_CableCheckReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_PreChargeReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_PowerDeliveryReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_CurrentDemandReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_WeldingDetectionReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+//void SHM_Save_iso2_SessionStopReq(struct CcsData *shm_ccs, struct iso2EXIDocument *exi_doc_ISO2, struct SysConfigAndInfo *shm_sys);
+
+
+void SAVE_PhysicalValueType_DIN70121(struct PhysicalValueType_DIN70121 *out, int in_value, unsigned char unit);
+void SAVE_PhysicalValueType_ISO15118_2014(struct PhysicalValueType_ISO15118_2014 *out, int in_value, unsigned char unit);
+void SHM_Read_dinPhysicalValueType(struct dinPhysicalValueType *out, struct PhysicalValueType_DIN70121 *in);
+void SHM_Read_iso1PhysicalValueType(struct iso1PhysicalValueType *out, struct PhysicalValueType_ISO15118_2014 *in);
+void SHM_Read_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType *out, struct DC_EVSEStatusType_DIN70121 *in);
+void SHM_Read_iso1DC_EVSEStatusType(struct iso1DC_EVSEStatusType *out, struct DC_EVSEStatusType_ISO15118_2014 *in);
+
+
+void SHM_Read_din_SessionSetupRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_ContractAuthenticationRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_ChargeParameterDiscoveryRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_CableCheckRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_PreChargeRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_PowerDeliveryRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_CurrentDemandRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_WeldingDetectionRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+void SHM_Read_din_SessionStopRes(struct dinEXIDocument *exi_doc_DIN, struct CcsData *shm_ccs);
+
+void SHM_Read_iso1_SessionSetupRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_ContractAuthenticationRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_ChargeParameterDiscoveryRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_CableCheckRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_PreChargeRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_PowerDeliveryRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_CurrentDemandRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_ChargingStatusRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_WeldingDetectionRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+void SHM_Read_iso1_SessionStopRes(struct iso1EXIDocument *exi_doc_ISO1, struct CcsData *shm_ccs);
+
+int API_V2GMSG_EXI_Decoder_AppProtocol(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct appHandEXIDocument *ccs_data);
+int API_V2GMSG_EXI_Encoder_AppProtocol(struct appHandEXIDocument *exi_doc, bitstream_t *exi_packet);
+
+int API_V2GMSG_EXI_Decoder_DIN(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct dinEXIDocument *exi_doc_DIN);
+int API_V2GMSG_EXI_Decoder_ISO1(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct iso1EXIDocument *exi_doc_ISO1);
+int API_V2GMSG_EXI_Decoder_ISO2(unsigned char *V2GTP_msg, unsigned int V2GTP_msg_length, struct iso2EXIDocument *exi_doc_ISO2);
+
+void PRINT_XML_DOC_supportedAppProtocolReq(struct appHandEXIDocument *exi_doc);
+void PRINT_XML_DOC_DIN_SessionSetupReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_ServiceDiscoveryReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_ServiceAndPaymentSelectionReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_ContractAuthenticationReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_ChargeParameterDiscoveryReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_CableCheckReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_PreChargeReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_PowerDeliveryReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_CurrentDemandReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_WeldingDetectionReq(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_XML_DOC_DIN_SessionStopReq(struct dinEXIDocument *exi_doc_DIN);
+
+void PRINT_XML_DOC_ISO1_SessionSetupReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_ServiceDiscoveryReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_ServiceAndPaymentSelectionReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_AuthorizationReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_ChargeParameterDiscoveryReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_CableCheckReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_PreChargeReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_PowerDeliveryReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_CurrentDemandReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_ChargingStatusReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_WeldingDetectionReq(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_XML_DOC_ISO1_SessionStopReq(struct iso1EXIDocument *exi_doc_ISO1);
+
+void PRINT_XML_DOC_ISO2_SessionSetupReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_ServiceDiscoveryReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_ServiceAndPaymentSelectionReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_ContractAuthenticationReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_ChargeParameterDiscoveryReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_CableCheckReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_PreChargeReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_PowerDeliveryReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_CurrentDemandReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_WeldingDetectionReq(struct iso2EXIDocument *exi_doc_ISO2);
+//void PRINT_XML_DOC_ISO2_SessionStopReq(struct iso2EXIDocument *exi_doc_ISO2);
+
+void PRINT_V2G_MSG_din_Header(struct dinEXIDocument *exi_doc_DIN);
+void PRINT_V2G_MSG_iso1_Header(struct iso1EXIDocument *exi_doc_ISO1);
+void PRINT_V2G_MSG_iso2_Header(struct iso2EXIDocument *exi_doc_ISO2);
+
+void PRINT_dinPhysicalValueType_UNIT(struct dinPhysicalValueType *obj);
+void PRINT_iso1PhysicalValueType_UNIT(struct iso1PhysicalValueType *obj);
+int GetValue_dinPhysicalValueType(struct dinPhysicalValueType *obj);
+int GetValue_iso1PhysicalValueType(struct iso1PhysicalValueType *obj);
+void PRINT_dinDC_EVStatusType(struct dinDC_EVStatusType *status);
+void PRINT_iso1DC_EVStatusType(struct iso1DC_EVStatusType *status);
+void PRINT_dinDC_EVErrorCodeType(struct dinDC_EVStatusType *status);
+void PRINT_iso1DC_EVErrorCodeType(struct iso1DC_EVStatusType *status);
+float DIN70121PhyValDecode(struct PhysicalValueType_DIN70121 PhysicalData);
+float ISO151182014PhyValDecode(struct PhysicalValueType_ISO15118_2014 PhysicalData);
+
+#if DEBUG_PRINTF_EXI_ENGINE_SHOW == ENABLE
+    #if DEBUG_PRINTF_EXI_ENGINE_BRIEF_SHOW == ENABLE
+        #define DEBUG_PRINTF_EXI_ENGINE_BRIEF      printf
+    #else
+        #define DEBUG_PRINTF_EXI_ENGINE_BRIEF(...)
+    #endif
+
+    #if DEBUG_PRINTF_EXI_ENGINE_DETAIL_SHOW == ENABLE
+        #define DEBUG_PRINTF_EXI_ENGINE_DETAIL     printf
+    #else
+        #define DEBUG_PRINTF_EXI_ENGINE_DETAIL(...)
+    #endif
+#else
+    #define DEBUG_PRINTF_EXI_ENGINE_BRIEF(...)
+    #define DEBUG_PRINTF_EXI_ENGINE_DETAIL(...)
+#endif

+ 64 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypes.c

@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_AppProtocol.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include <stdint.h>
+
+#include "appHandEXIDatatypes.h"
+#include "../codec/EXITypes.h"
+
+
+#ifndef EXI_appHand_DATATYPES_C
+#define EXI_appHand_DATATYPES_C
+
+
+
+void init_appHandEXIDocument(struct appHandEXIDocument* exiDoc) {
+	exiDoc->supportedAppProtocolReq_isUsed = 0u;
+	exiDoc->supportedAppProtocolRes_isUsed = 0u;
+}
+
+void init_appHandAppProtocolType(struct appHandAppProtocolType* appHandAppProtocolType) {
+}
+
+void init_appHandAnonType_supportedAppProtocolReq(struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq) {
+	appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen = 0u;
+}
+
+void init_appHandAnonType_supportedAppProtocolRes(struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes) {
+	appHandAnonType_supportedAppProtocolRes->SchemaID_isUsed = 0u;
+}
+
+
+
+
+
+#endif
+

+ 134 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypes.h

@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_AppProtocol.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypes.h
+ * \brief 	Datatype definitions and structs for given XML Schema definitions and initialization methods
+ *
+ */
+
+#ifndef EXI_appHand_DATATYPES_H
+#define EXI_appHand_DATATYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+/* Datatype definitions and structs for given XML Schema definitions */
+
+#define UNION_YES 1
+#define UNION_NO 2
+#define SAVE_MEMORY_WITH_UNNAMED_UNION UNION_YES
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)',  derivedBy='RESTRICTION'.  */
+#define appHandAppProtocolType_ProtocolNamespace_CHARACTERS_SIZE 100 /* XML schema facet maxLength for urn:iso:15118:2:2010:AppProtocol,protocolNamespaceType is 100 */
+struct appHandAppProtocolType {
+	/* element: ProtocolNamespace, urn:iso:15118:2:2010:AppProtocol,protocolNamespaceType */
+	struct {
+		exi_string_character_t characters[appHandAppProtocolType_ProtocolNamespace_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ProtocolNamespace ;
+	/* element: VersionNumberMajor, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t VersionNumberMajor ;
+	/* element: VersionNumberMinor, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t VersionNumberMinor ;
+	/* element: SchemaID, urn:iso:15118:2:2010:AppProtocol,idType */
+	uint8_t SchemaID ;
+	/* element: Priority, urn:iso:15118:2:2010:AppProtocol,priorityType */
+	uint8_t Priority ;
+};
+
+typedef enum {
+	appHandresponseCodeType_OK_SuccessfulNegotiation = 0,
+	appHandresponseCodeType_OK_SuccessfulNegotiationWithMinorDeviation = 1,
+	appHandresponseCodeType_Failed_NoNegotiation = 2
+} appHandresponseCodeType;
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolRes',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ResponseCode,SchemaID{0-1})',  derivedBy='RESTRICTION'.  */
+struct appHandAnonType_supportedAppProtocolRes {
+	/* element: ResponseCode, urn:iso:15118:2:2010:AppProtocol,responseCodeType */
+	appHandresponseCodeType ResponseCode ;
+	/* element: SchemaID, urn:iso:15118:2:2010:AppProtocol,idType */
+	uint8_t SchemaID ;
+	unsigned int SchemaID_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolReq',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(AppProtocol{1-20})',  derivedBy='RESTRICTION'.  */
+//#define appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE 5	//original setting
+#define appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE 20	//modified by Joseph
+struct appHandAnonType_supportedAppProtocolReq {
+	/* element: AppProtocol, Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct appHandAppProtocolType array[appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} AppProtocol;
+};
+
+
+
+
+
+/* Possible root elements of EXI Document */
+struct appHandEXIDocument {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	struct appHandAnonType_supportedAppProtocolReq supportedAppProtocolReq ;
+	struct appHandAnonType_supportedAppProtocolRes supportedAppProtocolRes ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int supportedAppProtocolReq_isUsed:1;
+	unsigned int supportedAppProtocolRes_isUsed:1;
+
+
+	int _warning_;
+};
+
+/* Initialization methods for structs */
+
+void init_appHandEXIDocument(struct appHandEXIDocument* exiDoc);
+void init_appHandAppProtocolType(struct appHandAppProtocolType* appHandAppProtocolType);
+void init_appHandAnonType_supportedAppProtocolReq(struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq);
+void init_appHandAnonType_supportedAppProtocolRes(struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 896 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesDecoder.c

@@ -0,0 +1,896 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_AppProtocol.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+
+#include "appHandEXIDatatypesDecoder.h"
+
+#include "../codec/DecoderChannel.h"
+#include "../codec/EXIHeaderDecoder.h"
+
+#include "appHandEXIDatatypes.h"
+#include "../codec/ErrorCodes.h"
+
+#ifndef EXI_appHand_DATATYPES_DECODER_C
+#define EXI_appHand_DATATYPES_DECODER_C
+
+/** event-code */
+static uint32_t eventCode;
+static int errn;
+static uint32_t uint32;
+
+
+/* Forward Declarations */
+static int decode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType);
+static int decode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq);
+static int decode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes);
+
+/* Deviant data decoding (skip functions) */
+
+
+
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)',  derivedBy='RESTRICTION'.  */
+static int decode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType) {
+	int grammarID = 0;
+	int done = 0;
+
+	init_appHandAppProtocolType(appHandAppProtocolType);
+
+	while(!done) {
+		switch(grammarID) {
+		case 0:
+			/* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* FirstStartTag[CHARACTERS[STRING]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeUnsignedInteger16(stream, &appHandAppProtocolType->ProtocolNamespace.charactersLen);
+							if (errn == 0) {
+								if (appHandAppProtocolType->ProtocolNamespace.charactersLen >= 2) {
+									appHandAppProtocolType->ProtocolNamespace.charactersLen = (uint16_t)(appHandAppProtocolType->ProtocolNamespace.charactersLen - 2); /* string table miss */
+									errn = decodeCharacters(stream, appHandAppProtocolType->ProtocolNamespace.charactersLen, appHandAppProtocolType->ProtocolNamespace.characters, appHandAppProtocolType_ProtocolNamespace_CHARACTERS_SIZE);
+								} else {
+									/* string table hit */
+									errn = EXI_ERROR_STRINGVALUES_NOT_SUPPORTED;
+								}
+							}
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(ProtocolNamespace) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 1;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 1:
+			/* Element[START_ELEMENT(VersionNumberMajor)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeUnsignedInteger32(stream, &appHandAppProtocolType->VersionNumberMajor);
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(VersionNumberMajor) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 2;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 2:
+			/* Element[START_ELEMENT(VersionNumberMinor)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeUnsignedInteger32(stream, &appHandAppProtocolType->VersionNumberMinor);
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(VersionNumberMinor) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 3;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 3:
+			/* Element[START_ELEMENT(SchemaID)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeNBitUnsignedInteger(stream, 8, &(uint32));
+							appHandAppProtocolType->SchemaID = (uint8_t)(uint32 + 0);
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(SchemaID) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 4;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 4:
+			/* Element[START_ELEMENT(Priority)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeNBitUnsignedInteger(stream, 5, &(uint32));
+							appHandAppProtocolType->Priority = (uint8_t)(uint32 + 1);
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(Priority) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 5;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 5:
+			/* Element[END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		default:
+			errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
+			break;
+		}
+		if(errn) {
+			done = 1;
+		}
+	}
+	return errn;
+}
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolReq',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(AppProtocol{1-20})',  derivedBy='RESTRICTION'.  */
+static int decode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq) {
+	int grammarID = 7;
+	int done = 0;
+
+	init_appHandAnonType_supportedAppProtocolReq(appHandAnonType_supportedAppProtocolReq);
+
+	while(!done) {
+		switch(grammarID) {
+		case 7:
+			/* FirstStartTag[START_ELEMENT(AppProtocol)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 8;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 8:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 9;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 9:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 10;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 10:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 11;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 11:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 12;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 12:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 13;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 13:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 14;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 14:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 15;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 15:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 16;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 16:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 17;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 17:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 18;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 18:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 19;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 19:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 20;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 20:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 21;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 21:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 22;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 22:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 23;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 23:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 24;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 24:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 25;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 25:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 26;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 26:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					if (appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen < appHandAnonType_supportedAppProtocolReq_AppProtocol_ARRAY_SIZE) {
+						errn = decode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array[appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen++]);
+					} else {
+						errn = EXI_ERROR_OUT_OF_BOUNDS;
+					}
+					grammarID = 5;
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 5:
+			/* Element[END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		default:
+			errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
+			break;
+		}
+		if(errn) {
+			done = 1;
+		}
+	}
+	return errn;
+}
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolRes',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ResponseCode,SchemaID{0-1})',  derivedBy='RESTRICTION'.  */
+static int decode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes) {
+	int grammarID = 27;
+	int done = 0;
+
+	init_appHandAnonType_supportedAppProtocolRes(appHandAnonType_supportedAppProtocolRes);
+
+	while(!done) {
+		switch(grammarID) {
+		case 27:
+			/* FirstStartTag[START_ELEMENT(ResponseCode)] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* FirstStartTag[CHARACTERS[ENUMERATION]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeNBitUnsignedInteger(stream, 2, &uint32);
+							appHandAnonType_supportedAppProtocolRes->ResponseCode = (appHandresponseCodeType) uint32;
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(ResponseCode) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 28;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 28:
+			/* Element[START_ELEMENT(SchemaID), END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
+					errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+					if(errn == 0) {
+						if(eventCode == 0) {
+							errn = decodeNBitUnsignedInteger(stream, 8, &(uint32));
+							appHandAnonType_supportedAppProtocolRes->SchemaID = (uint8_t)(uint32 + 0);
+							appHandAnonType_supportedAppProtocolRes->SchemaID_isUsed = 1u;
+						} else {
+							/* Second level event (e.g., xsi:type, xsi:nil, ...) */
+							errn = EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS;
+						}
+					}
+					if(errn == 0) {
+						/* valid EE for simple element START_ELEMENT(SchemaID) ? */
+						errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+						if(eventCode == 0) {
+						grammarID = 5;
+						} else {
+							errn = EXI_DEVIANT_SUPPORT_NOT_DEPLOYED; /* or also typecast and nillable */
+						}
+					}
+					break;
+				case 1:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		case 5:
+			/* Element[END_ELEMENT] */
+			errn = decodeNBitUnsignedInteger(stream, 1, &eventCode);
+			if (errn == 0) {
+				switch(eventCode) {
+				case 0:
+					done = 1;
+					grammarID = 6;
+					break;
+				default:
+					errn = EXI_ERROR_UNKOWN_EVENT_CODE;
+					break;
+				}
+			}
+			break;
+		default:
+			errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
+			break;
+		}
+		if(errn) {
+			done = 1;
+		}
+	}
+	return errn;
+}
+
+
+
+
+int decode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc) {
+	errn = readEXIHeader(stream);
+
+	if(errn == 0) {
+		/* DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */
+		init_appHandEXIDocument(exiDoc);
+		errn = decodeNBitUnsignedInteger(stream, 2, &eventCode);
+		if(errn == 0) {
+			switch(eventCode) {
+			case 0:
+				/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq) */
+				errn = decode_appHandAnonType_supportedAppProtocolReq(stream, &exiDoc->supportedAppProtocolReq);
+				exiDoc->supportedAppProtocolReq_isUsed = 1u;
+				break;
+			case 1:
+				/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes) */
+				errn = decode_appHandAnonType_supportedAppProtocolRes(stream, &exiDoc->supportedAppProtocolRes);
+				exiDoc->supportedAppProtocolRes_isUsed = 1u;
+				break;
+			default:
+				errn = EXI_ERROR_UNEXPECTED_EVENT_LEVEL1;
+				break;
+			}
+		}
+
+	}
+
+	return errn;
+}
+
+
+#endif
+

+ 57 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesDecoder.h

@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_AppProtocol.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesDecoder.h
+ * \brief 	Decoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_appHand_DATATYPES_DECODER_H
+#define EXI_appHand_DATATYPES_DECODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+#include "appHandEXIDatatypes.h"
+
+int decode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 671 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesEncoder.c

@@ -0,0 +1,671 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_AppProtocol.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+
+#include "appHandEXIDatatypesEncoder.h"
+
+#include "../codec/EncoderChannel.h"
+#include "../codec/EXIHeaderEncoder.h"
+
+#include "appHandEXIDatatypes.h"
+#include "../codec/ErrorCodes.h"
+
+#ifndef EXI_appHand_DATATYPES_ENCODER_C
+#define EXI_appHand_DATATYPES_ENCODER_C
+
+static int errn;
+
+/* Forward Declarations */
+static int encode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType);
+static int encode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq);
+static int encode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes);
+
+
+
/* Complex type name='urn:iso:15118:2:2010:AppProtocol,AppProtocolType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ProtocolNamespace,VersionNumberMajor,VersionNumberMinor,SchemaID,Priority)',  derivedBy='RESTRICTION'.  */
+static int encode_appHandAppProtocolType(bitstream_t* stream, struct appHandAppProtocolType* appHandAppProtocolType) {
+	int grammarID = 0;
+	int done = 0;
+
+
+	while(!done) {
+		switch(grammarID) {
+		case 0:
+			/* FirstStartTag[START_ELEMENT(ProtocolNamespace)] */
+			if ( 1 == 1 ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					/* FirstStartTag[CHARACTERS[STRING]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						/* encode string as string table miss (+2 len)*/
+						errn = encodeUnsignedInteger16(stream, (uint16_t)(appHandAppProtocolType->ProtocolNamespace.charactersLen + 2));
+						if (errn == 0) {
+							errn = encodeCharacters(stream, appHandAppProtocolType->ProtocolNamespace.characters, appHandAppProtocolType->ProtocolNamespace.charactersLen);
+						}
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 1;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 1:
+			/* Element[START_ELEMENT(VersionNumberMajor)] */
+			if ( 1 == 1 ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						errn = encodeUnsignedInteger32(stream, appHandAppProtocolType->VersionNumberMajor);
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 2;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 2:
+			/* Element[START_ELEMENT(VersionNumberMinor)] */
+			if ( 1 == 1 ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					/* First(xsi:type)StartTag[CHARACTERS[UNSIGNED_INTEGER]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						errn = encodeUnsignedInteger32(stream, appHandAppProtocolType->VersionNumberMinor);
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 3;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 3:
+			/* Element[START_ELEMENT(SchemaID)] */
+			if ( 1 == 1 ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(appHandAppProtocolType->SchemaID - 0));
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 4;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 4:
+			/* Element[START_ELEMENT(Priority)] */
+			if ( 1 == 1 ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						errn = encodeNBitUnsignedInteger(stream, 5, (uint32_t)(appHandAppProtocolType->Priority - 1));
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 5;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 5:
+			/* Element[END_ELEMENT] */
+			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		default:
+			errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
+			break;
+		}
+		if(errn) {
+			done = 1;
+		}
+	}
+	return errn;
+}
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolReq',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(AppProtocol{1-20})',  derivedBy='RESTRICTION'.  */
+static int encode_appHandAnonType_supportedAppProtocolReq(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolReq* appHandAnonType_supportedAppProtocolReq) {
+	int grammarID = 7;
+	int done = 0;
+
+	unsigned int appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex = 0;
+
+	while(!done) {
+		switch(grammarID) {
+		case 7:
+			/* FirstStartTag[START_ELEMENT(AppProtocol)] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 8;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 8:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 9;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 9:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 10;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 10:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 11;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 11:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 12;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 12:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 13;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 13:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 14;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 14:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 15;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 15:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 16;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 16:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 17;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 17:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 18;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 18:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 19;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 19:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 20;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 20:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 21;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 21:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 22;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 22:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 23;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 23:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 24;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 24:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 25;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 25:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 26;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 26:
+			/* Element[START_ELEMENT(AppProtocol), END_ELEMENT] */
+			if (appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex < appHandAnonType_supportedAppProtocolReq->AppProtocol.arrayLen ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					errn = encode_appHandAppProtocolType(stream, &appHandAnonType_supportedAppProtocolReq->AppProtocol.array [appHandAnonType_supportedAppProtocolReq_AppProtocol_currArrayIndex++]);
+				}
+				grammarID = 5;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 5:
+			/* Element[END_ELEMENT] */
+			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		default:
+			errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
+			break;
+		}
+		if(errn) {
+			done = 1;
+		}
+	}
+	return errn;
+}
+
+/* Complex type name='urn:iso:15118:2:2010:AppProtocol,#AnonType_supportedAppProtocolRes',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(ResponseCode,SchemaID{0-1})',  derivedBy='RESTRICTION'.  */
+static int encode_appHandAnonType_supportedAppProtocolRes(bitstream_t* stream, struct appHandAnonType_supportedAppProtocolRes* appHandAnonType_supportedAppProtocolRes) {
+	int grammarID = 27;
+	int done = 0;
+
+
+	while(!done) {
+		switch(grammarID) {
+		case 27:
+			/* FirstStartTag[START_ELEMENT(ResponseCode)] */
+			if ( 1 == 1 ) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					/* FirstStartTag[CHARACTERS[ENUMERATION]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						errn = encodeNBitUnsignedInteger(stream, 2, appHandAnonType_supportedAppProtocolRes->ResponseCode);
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 28;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 28:
+			/* Element[START_ELEMENT(SchemaID), END_ELEMENT] */
+			if ( appHandAnonType_supportedAppProtocolRes->SchemaID_isUsed == 1u ) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 0);
+				if(errn == 0) {
+					/* FirstStartTag[CHARACTERS[NBIT_UNSIGNED_INTEGER]] */
+					errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					if(errn == 0) {
+						errn = encodeNBitUnsignedInteger(stream, 8, (uint32_t)(appHandAnonType_supportedAppProtocolRes->SchemaID - 0));
+						/* valid EE */
+						errn = encodeNBitUnsignedInteger(stream, 1, 0);
+					}
+				}
+				grammarID = 5;
+			} else 			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 2, 1);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		case 5:
+			/* Element[END_ELEMENT] */
+			if (1==1) {
+				errn = encodeNBitUnsignedInteger(stream, 1, 0);
+				if(errn == 0) {
+					done = 1;
+				}
+				grammarID = 6;
+			} else {
+				errn = EXI_ERROR_UNKOWN_EVENT;
+			}
+			break;
+		default:
+			errn = EXI_ERROR_UNKOWN_GRAMMAR_ID;
+			break;
+		}
+		if(errn) {
+			done = 1;
+		}
+	}
+	return errn;
+}
+
+
+
+int encode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc) {
+	errn = writeEXIHeader(stream);
+
+	if(errn == 0) {
+		/* DocContent[START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq), START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes), START_ELEMENT_GENERIC] */
+		if ( exiDoc->supportedAppProtocolReq_isUsed == 1u ) {
+			/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq) */
+			errn = encodeNBitUnsignedInteger(stream, 2, 0);
+			if(errn == 0) {
+				errn = encode_appHandAnonType_supportedAppProtocolReq(stream, &exiDoc->supportedAppProtocolReq );
+			}
+		} else if ( exiDoc->supportedAppProtocolRes_isUsed == 1u ) {
+			/* START_ELEMENT({urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes) */
+			errn = encodeNBitUnsignedInteger(stream, 2, 1);
+			if(errn == 0) {
+				errn = encode_appHandAnonType_supportedAppProtocolRes(stream, &exiDoc->supportedAppProtocolRes );
+			}
+		} else {
+			errn = EXI_ERROR_UNKOWN_EVENT;
+		}
+
+	}
+
+	if(errn == 0) {
+		/* flush any pending bits */
+		errn = encodeFinish(stream);
+	}
+
+	return errn;
+}
+
+
+#endif
+

+ 58 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/appHandshake/appHandEXIDatatypesEncoder.h

@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_AppProtocol.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesEncoder.h
+ * \brief 	Encoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_appHand_DATATYPES_ENCODER_H
+#define EXI_appHand_DATATYPES_ENCODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+#include "appHandEXIDatatypes.h"
+
+
+int encode_appHandExiDocument(bitstream_t* stream, struct appHandEXIDocument* exiDoc);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 105 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitInputStream.c

@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include "BitInputStream.h"
+#include "EXIConfig.h"
+#include "EXITypes.h"
+#include "ErrorCodes.h"
+
+#ifndef BIT_INPUT_STREAM_C
+#define BIT_INPUT_STREAM_C
+
+/* internal method to (re)fill buffer */
+static int readBuffer(bitstream_t* stream)
+{
+	int errn = 0;
+	if(stream->capacity==0)
+	{
+#if EXI_STREAM == BYTE_ARRAY
+		if ( (*stream->pos) < stream->size ) {
+			stream->buffer = stream->data[(*stream->pos)++];
+			stream->capacity = BITS_IN_BYTE;
+		} else {
+			errn = EXI_ERROR_INPUT_STREAM_EOF;
+		}
+#endif
+#if EXI_STREAM == FILE_STREAM
+		stream->buffer = (uint8_t)(getc(stream->file));
+		/* EOF cannot be used, 0xFF valid value */
+		if ( feof(stream->file) || ferror(stream->file) ) {
+			errn = EXI_ERROR_INPUT_STREAM_EOF;
+		} else {
+			stream->capacity = BITS_IN_BYTE;
+		}
+#endif
+	}
+	return errn;
+}
+
+int readBits(bitstream_t* stream, size_t num_bits, uint32_t* b)
+{
+	int errn = readBuffer(stream);
+	if (errn == 0) {
+		/* read the bits in one step */
+		if(num_bits <= stream->capacity) {
+			stream->capacity = (uint8_t)(stream->capacity - num_bits);
+			*b = (uint32_t)((stream->buffer >> stream->capacity) & (0xff >> (BITS_IN_BYTE - num_bits)));
+		} else {
+			/* read bits as much as possible */
+			*b = (uint32_t)(stream->buffer & (0xff >> (BITS_IN_BYTE - stream->capacity)));
+			num_bits = (num_bits - stream->capacity);
+			stream->capacity = 0;
+
+			/* read whole bytes */
+			while(errn == 0 && num_bits >= 8)
+			{
+				errn = readBuffer(stream);
+				*b = ((*b) << BITS_IN_BYTE) | stream->buffer;
+				num_bits = (num_bits - BITS_IN_BYTE);
+				stream->capacity = 0;
+			}
+
+			/* read the spare bits in the buffer */
+			if(errn == 0 && num_bits > 0)
+			{
+				errn = readBuffer(stream);
+				if (errn == 0) {
+					*b = ( (*b) << num_bits) | (uint8_t)(stream->buffer  >> (BITS_IN_BYTE - num_bits)) ;
+					stream->capacity = (uint8_t)(BITS_IN_BYTE - num_bits);
+				}
+			}
+		}
+	}
+
+	return errn;
+}
+
+#endif

+ 67 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitInputStream.h

@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	BitInputStream.h
+ * \brief 	Bit Input Stream
+ *
+ * 			Read bits and bytes from an underlying input stream.
+ *
+ */
+
+#ifndef BIT_INPUT_STREAM_H
+#define BIT_INPUT_STREAM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "EXITypes.h"
+
+/**
+ * \brief 		Read bits
+ *
+ * 				Read the next num_bits bits and returns result an integer.
+ *
+ * \param       stream   		Input Stream
+ * \param       num_bits		Number of bits
+ * \param       b		   		Integer value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int readBits(bitstream_t* stream, size_t num_bits, uint32_t* b);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 124 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitOutputStream.c

@@ -0,0 +1,124 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include "BitOutputStream.h"
+#include "EXIConfig.h"
+#include "EXITypes.h"
+#include "ErrorCodes.h"
+
+#ifndef BIT_OUTPUT_STREAM_C
+#define BIT_OUTPUT_STREAM_C
+
+int writeBits(bitstream_t* stream, size_t nbits, uint32_t val) {
+	int errn = 0;
+	/*  is there enough space in the buffer */
+	if (nbits <= stream->capacity) {
+		/* all bits fit into the current buffer */
+		stream->buffer = (uint8_t)(stream->buffer << (nbits)) | (uint8_t)(val & (uint32_t)(0xff >> (uint32_t)(BITS_IN_BYTE - nbits)));
+		stream->capacity = (uint8_t)(stream->capacity - nbits);
+		/* if the buffer is full write byte */
+		if (stream->capacity == 0) {
+#if EXI_STREAM == BYTE_ARRAY
+			if ((*stream->pos) >= stream->size) {
+				errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+			} else {
+				stream->data[(*stream->pos)++] = stream->buffer;
+			}
+#endif
+#if EXI_STREAM == FILE_STREAM
+			if ( putc(stream->buffer, stream->file) == EOF ) {
+				errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+			}
+#endif
+			stream->capacity = BITS_IN_BYTE;
+			stream->buffer = 0;
+		}
+	} else {
+		/* the buffer is not enough
+		 * fill the buffer */
+		stream->buffer = (uint8_t)(stream->buffer << stream->capacity) |
+				( (uint8_t)(val >> (nbits - stream->capacity)) & (uint8_t)(0xff >> (BITS_IN_BYTE - stream->capacity)) );
+
+		nbits = (nbits - stream->capacity);
+#if EXI_STREAM == BYTE_ARRAY
+		if ((*stream->pos) >= stream->size) {
+			errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+		} else {
+			stream->data[(*stream->pos)++] = stream->buffer;
+		}
+#endif
+#if EXI_STREAM == FILE_STREAM
+		if ( putc(stream->buffer, stream->file) == EOF ) {
+			errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+		}
+#endif
+		stream->buffer = 0;
+
+		/* write whole bytes */
+		while (errn == 0 && nbits >= BITS_IN_BYTE) {
+			nbits = (nbits - BITS_IN_BYTE);
+#if EXI_STREAM == BYTE_ARRAY
+			if ((*stream->pos) >= stream->size) {
+				errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+			} else {
+				stream->data[(*stream->pos)++] = (uint8_t)(val >> (nbits));
+			}
+#endif
+#if EXI_STREAM == FILE_STREAM
+			if ( putc((int)(val >> (nbits)), stream->file) == EOF ) {
+				errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+			}
+#endif
+		}
+
+		/* spared bits are kept in the buffer */
+		stream->buffer = (uint8_t)val; /* Note: the high bits will be shifted out during further filling */
+		stream->capacity = (uint8_t)(BITS_IN_BYTE - (nbits));
+	}
+
+	return errn;
+}
+
+/**
+ * Flush output
+ */
+int flush(bitstream_t* stream) {
+	int errn = 0;
+	if (stream->capacity == BITS_IN_BYTE) {
+		/* nothing to do, no bits in buffer */
+	} else {
+		errn = writeBits(stream, stream->capacity, 0);
+	}
+	return errn;
+}
+
+#endif
+

+ 85 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/BitOutputStream.h

@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	BitOutputStream.h
+ * \brief 	Bit Output Stream
+ *
+ * 			Write bits and bytes to an underlying output stream.
+ *
+ */
+
+#ifndef BIT_OUTPUT_STREAM_H
+#define BIT_OUTPUT_STREAM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+#include "EXITypes.h"
+
+/**
+ * \brief 		Write bits
+ *
+ * 				Write the n least significant bits of parameter b starting
+ * 				with the most significant, i.e. from left to right.
+ *
+ * \param       stream   		Output Stream
+ * \param       nbits			Number of bits
+ * \param       bits		   	value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int writeBits(bitstream_t* stream, size_t nbits, uint32_t bits);
+
+
+/**
+ * \brief 		Flush output
+ *
+ * 				If there are some unwritten bits, pad them if necessary and
+ * 				write them out. Note that this method does flush the
+ * 				underlying stream.
+ *
+ * \param       stream   		Output Stream
+ * \return                  	Error-Code <> 0
+ *
+ */
+int flush(bitstream_t* stream);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

+ 88 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/ByteStream.c

@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/* Avoid VS warning, put before your included header files */
+/* warning C4996: ‘fopen’: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. */
+#define _CRT_SECURE_NO_DEPRECATE
+
+#include <stdio.h>
+
+#include "EXITypes.h"
+#include "ErrorCodes.h"
+
+#ifndef BYTE_STREAM_C
+#define BYTE_STREAM_C
+
+int readBytesFromFile(const char * filename, uint8_t* data, size_t size, size_t* pos) {
+	FILE* f;
+	int character;
+	int errn = 0;
+
+	f = fopen(filename, "rb");
+
+	if (f == NULL) {
+		errn = EXI_ERROR_INPUT_FILE_HANDLE;
+	} else {
+		/* read bytes */
+		while (errn == 0 && (character = getc(f)) != EOF) {
+			if (*pos >= size) {
+				errn = EXI_ERROR_OUT_OF_BYTE_BUFFER;
+			} else {
+				data[(*pos)++] = (uint8_t) character;
+			}
+		}
+		fclose(f);
+	}
+
+	return errn;
+}
+
+int writeBytesToFile(uint8_t* data, size_t len, const char * filename) {
+	size_t rlen;
+	FILE* f = fopen(filename, "wb+");
+
+	if (f == NULL) {
+		return -1;
+	} else {
+		rlen = fwrite(data, sizeof(uint8_t), len, f);
+		fflush(f);
+		fclose(f);
+		if(rlen == len) {
+			return 0;
+		} else {
+			return EXI_ERROR_OUTPUT_FILE;
+		}
+	}
+}
+
+
+#endif /* BYTE_STREAM_C */
+

+ 75 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/ByteStream.h

@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	ByteStream.h
+ * \brief 	Byte Stream utilities
+ *
+ */
+
+#ifndef BYTE_STREAM_H
+#define BYTE_STREAM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "EXITypes.h"
+
+/**
+ * \brief 		Write bytes to file
+ *
+ * \param       data	   		byte array
+ * \param       len				length
+ * \param       filename		File name
+ * \return                  	Error-Code <> 0
+ *
+ */
+int writeBytesToFile(uint8_t* data, size_t len, const char * filename);
+
+
+/**
+ * \brief 		Read bytes from file
+ *
+ * \param       filename   		File name
+ * \param       data			byte array
+ * \param       size		   	byte array size
+ * \param       pos			   	byte array position
+ * \return                  	Error-Code <> 0
+ *
+ */
+int readBytesFromFile(const char * filename, uint8_t* data, size_t size, size_t* pos);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* BYTE_STREAM_H */

+ 930 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/DecoderChannel.c

@@ -0,0 +1,930 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include "DecoderChannel.h"
+
+#include "EXIConfig.h"
+#include "EXIOptions.h"
+#include "BitInputStream.h"
+#include "EXITypes.h"
+#include "MethodsBag.h"
+/*#include "v2gEXICoder.h"*/
+#include "ErrorCodes.h"
+
+#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
+#include "DynamicMemory.h"
+#endif /* DYNAMIC_ALLOCATION */
+
+#ifndef DECODER_CHANNEL_C
+#define DECODER_CHANNEL_C
+
+/* unsigned long == 64 bits, 10 * 7bits = 70 bits */
+#define MAX_OCTETS_FOR_UNSIGNED_INTEGER_64 10
+/* unsigned int == 32 bits, 5 * 7bits = 35 bits */
+#define MAX_OCTETS_FOR_UNSIGNED_INTEGER_32 5
+
+/* buffer for reading (arbitrary) large integer values */
+static uint8_t maskedOctets[MAX_OCTETS_FOR_UNSIGNED_INTEGER_64];
+
+
+static int _decodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv, int negative) {
+	int errn = 0;
+	int i = 0;
+	uint8_t b;
+	int k;
+
+	do {
+		/* Read the next octet */
+		errn = decode(stream, &b);
+		if (errn == 0) {
+			if(i < MAX_OCTETS_FOR_UNSIGNED_INTEGER_64) {
+				/* the 7 least significant bits hold the actual value */
+				maskedOctets[i++] = (b & 127);
+			} else {
+				errn = EXI_UNSUPPORTED_INTEGER_VALUE;
+			}
+		}
+	} while( errn == 0 && b >= 128 ); /* no more octets ? */
+
+	if ( errn == 0 ) {
+		/* For negative values, the Unsigned Integer holds the
+		 * magnitude of the value minus 1 */
+
+		switch(i) {
+		case 1: /* 7 bits */
+			if (negative) {
+				iv->val.int8 =  (int8_t)(-( b + 1));
+				iv->type = EXI_INTEGER_8;
+			} else {
+				iv->val.uint8 = b;
+				iv->type = EXI_UNSIGNED_INTEGER_8;
+			}
+			break;
+		case 2: /* 14 bits */
+			iv->val.uint16 = 0;
+			for (k = i-1; k >= 0 ; k--) {
+				iv->val.uint16  = (uint16_t)((iv->val.uint16 << 7) | maskedOctets[k]);
+			}
+			if (negative) {
+				iv->val.int16 = (int16_t)( -( iv->val.uint16 + 1 ));
+				iv->type = EXI_INTEGER_16;
+			} else {
+				iv->type = EXI_UNSIGNED_INTEGER_16;
+			}
+			break;
+		case 3: /* 21 bits */
+		case 4: /* 28 bits */
+			iv->val.uint32 = 0;
+			for (k = i-1; k >= 0 ; k--) {
+				iv->val.uint32 = (iv->val.uint32 << 7) | maskedOctets[k];
+			}
+			if (negative) {
+				iv->val.int32 = (-(int32_t)(iv->val.uint32 + 1));
+				if (iv->val.int32 <= INT16_MAX && iv->val.int32 >= INT16_MIN ) {
+					iv->type = EXI_INTEGER_16;
+				} else {
+					iv->type = EXI_INTEGER_32;
+				}
+			} else {
+				if (iv->val.uint32 <= UINT16_MAX) {
+					iv->type = EXI_UNSIGNED_INTEGER_16;
+				} else {
+					iv->type = EXI_UNSIGNED_INTEGER_32;
+				}
+			}
+			break;
+		case 5: /* 35 bits */
+		case 6: /* 42 bits */
+		case 7: /* 49 bits */
+		case 8: /* 56 bits */
+		case 9: /* 63 bits */
+		case 10: /* 70 bits */
+			iv->val.uint64 = 0;
+			for (k = i-1; k >= 0 ; k--) {
+				iv->val.uint64  = (iv->val.uint64 << 7) | maskedOctets[k];
+			}
+			if (negative) {
+				if (i > 9) {
+					/* too large */
+					return EXI_UNSUPPORTED_INTEGER_VALUE;
+				}
+				iv->val.int64 = (-(int64_t)(iv->val.uint64 + 1));
+				if (iv->val.int64 <= INT32_MAX && iv->val.int64 >= INT32_MIN ) {
+					iv->type = EXI_INTEGER_32;
+				} else {
+					iv->type = EXI_INTEGER_64;
+				}
+			} else {
+				if (iv->val.uint64 <= UINT32_MAX) {
+					iv->type = EXI_UNSIGNED_INTEGER_32;
+					/* iv->val.uint32 = iv->val.uint64;*/
+				} else {
+					iv->type = EXI_UNSIGNED_INTEGER_64;
+				}
+			}
+			break;
+		default:
+			errn = EXI_UNSUPPORTED_INTEGER_VALUE;
+			break;
+		}
+	}
+
+	return errn;
+}
+
+int decodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv) {
+	return _decodeUnsignedInteger(stream, iv, 0);
+}
+
+int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16) {
+	unsigned int mShift = 0;
+	int errn = 0;
+	uint8_t b = 0;
+	*uint16 = 0;
+
+	do {
+		/* 1. Read the next octet */
+		errn = decode(stream, &b);
+		/* 2. Multiply the value of the unsigned number represented by the 7
+		 * least significant
+		 * bits of the octet by the current multiplier and add the result to
+		 * the current value */
+		*uint16 = (uint16_t)(*uint16 + ((b & 127) << mShift));
+		/* 3. Multiply the multiplier by 128 */
+		mShift += 7;
+		/* 4. If the most significant bit of the octet was 1, go back to step 1 */
+	} while (errn == 0 && (b >> 7) == 1);
+
+	return errn;
+}
+
+int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32) {
+	/* 0XXXXXXX ... 1XXXXXXX 1XXXXXXX */
+	unsigned int mShift = 0;
+	int errn = 0;
+	uint8_t b = 0;
+	*uint32 = 0;
+
+	do {
+		/* 1. Read the next octet */
+		errn = decode(stream, &b);
+		/* 2. Multiply the value of the unsigned number represented by the 7
+		 * least significant
+		 * bits of the octet by the current multiplier and add the result to
+		 * the current value */
+		*uint32 += (uint32_t)((b & 127) << mShift);
+		/* 3. Multiply the multiplier by 128 */
+		mShift += 7;
+		/* 4. If the most significant bit of the octet was 1, go back to step 1 */
+	} while (errn == 0 && (b >> 7) == 1);
+
+	return errn;
+}
+
+int decodeUnsignedIntegerSizeT(bitstream_t* stream, size_t* sizeT) {
+	int errn = 0;
+
+	/* TODO is there a better way to detect the actual size of size_t */
+	if(SIZE_MAX == UINT16_MAX) {
+		/* 16bit */
+		uint16_t uint16;
+		errn = decodeUnsignedInteger16(stream, &uint16);
+		if(errn == 0) {
+			*sizeT = (size_t)uint16;
+		}
+	} else if(SIZE_MAX == UINT32_MAX) {
+		/* 32bit */
+		uint32_t uint32;
+		errn = decodeUnsignedInteger32(stream, &uint32);
+		if(errn == 0) {
+			*sizeT = (size_t)uint32;
+		}
+	} else {
+		/* 64bit */
+		uint64_t uint64;
+		errn = decodeUnsignedInteger64(stream, &uint64);
+		if(errn == 0) {
+			*sizeT = (size_t)uint64;
+		}
+	}
+
+	return errn;
+}
+
+
+
+/**
+ * Decode an arbitrary precision non negative integer using a sequence of
+ * octets. The most significant bit of the last octet is set to zero to
+ * indicate sequence termination. Only seven bits per octet are used to
+ * store the integer's value.
+ */
+int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64) {
+	unsigned int mShift = 0;
+	int errn = 0;
+	uint8_t b;
+	*uint64 = 0L;
+
+	do {
+		errn = decode(stream, &b);
+		*uint64 += ((uint64_t) (b & 127)) << mShift;
+		mShift += 7;
+	} while (errn == 0 && (b >> 7) == 1);
+
+	return errn;
+}
+
+
+void _reverseArray(uint8_t *array, int number) {
+    int x, t;
+    number--;
+
+    for(x = 0; x < number; x ++, number --) {
+        t = array[x];
+        array[x] = array[number];
+        array[number] = t;
+    }
+}
+
+/**
+ * Decode an arbitrary precision non negative integer using a sequence of
+ * octets. The most significant bit of the last octet is set to zero to
+ * indicate sequence termination. Only seven bits per octet are used to
+ * store the integer's value.
+ */
+int decodeUnsignedIntegerBig(bitstream_t* stream, size_t size, uint8_t* data, size_t* len) {
+	int errn = 0;
+	uint8_t b = 0;
+	unsigned int mShift1 = 0;
+	unsigned int mShift2 = 0;
+	unsigned int mShift3 = 0;
+	unsigned int mShift4 = 0;
+	unsigned int nBytesRead = 0;
+	unsigned int nBitsAvailable = 0;
+	uint64_t uint64_1 = 0;
+	uint64_t uint64_2 = 0;
+	uint64_t uint64_3 = 0;
+	uint64_t uint64_4 = 0;
+
+	*len = 0;
+
+	do {
+		errn = decode(stream, &b);
+		nBytesRead++;
+		nBitsAvailable += 7;
+
+		if(nBytesRead <= 8) {
+			uint64_1 += ((uint64_t) (b & 127)) << mShift1;
+			mShift1 += 7;
+		} else if(nBytesRead <= 16) {
+			uint64_2 += ((uint64_t) (b & 127)) << mShift2;
+			mShift2 += 7;
+		} else if(nBytesRead <= 24) {
+			uint64_3 += ((uint64_t) (b & 127)) << mShift3;
+			mShift3 += 7;
+		} else if(nBytesRead <= 32) {
+			uint64_4 += ((uint64_t) (b & 127)) << mShift4;
+			mShift4 += 7;
+		} else {
+			return -1; // too large
+		}
+	} while (errn == 0 && (b >> 7) == 1);
+
+	// shift actual data into array
+	if(uint64_4 != 0) {
+		// 7 octets for uint64_1
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 1
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 2
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 3
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 4
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 5
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 6
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 7
+
+		// 7 octets for uint64_2
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 1
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 2
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 3
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 4
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 5
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 6
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 7
+
+		// 7 octets for uint64_3
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 1
+		uint64_3 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 2
+		uint64_3 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 3
+		uint64_3 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 4
+		uint64_3 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 5
+		uint64_3 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 6
+		uint64_3 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_3 & 0xFF); // 7
+
+		// remaining octets of uint64_4
+		while (uint64_4 != 0 && errn == 0) {
+			data[(*len)++] = uint64_4 & 0xFF;
+			uint64_4 >>= 8;
+		}
+	} else if(uint64_3 != 0) {
+		// 7 octets for uint64_1
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 1
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 2
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 3
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 4
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 5
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 6
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 7
+
+		// 7 octets for uint64_2
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 1
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 2
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 3
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 4
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 5
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 6
+		uint64_2 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_2 & 0xFF); // 7
+
+		// remaining octets of uint64_3
+		while (uint64_3 != 0 && errn == 0) {
+			data[(*len)++] = uint64_3 & 0xFF;
+			uint64_3 >>= 8;
+		}
+
+	} else if(uint64_2 != 0) {
+		// 7 octets for uint64_1
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 1
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 2
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 3
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 4
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 5
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 6
+		uint64_1 >>= 8;
+		data[(*len)++] = (uint8_t)(uint64_1 & 0xFF); // 7
+		// remaining octets of uint64_2
+		while (uint64_2 != 0 && errn == 0) {
+			data[(*len)++] = uint64_2 & 0xFF;
+			uint64_2 >>= 8;
+		}
+	} else if(uint64_1 != 0) {
+		while (uint64_1 != 0 && errn == 0) {
+			data[(*len)++] = uint64_1 & 0xFF;
+			uint64_1 >>= 8;
+		}
+	}
+
+	_reverseArray(data, *len);
+
+	return errn;
+}
+
+int decodeInteger(bitstream_t* stream, exi_integer_t* iv) {
+	int b;
+	int errn = decodeBoolean(stream, &b);
+	if (errn == 0) {
+		errn = _decodeUnsignedInteger(stream, iv, b);
+	}
+
+	return errn;
+}
+
+
+/**
+ * Decode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int decodeInteger16(bitstream_t* stream, int16_t* int16) {
+	int b;
+	uint16_t uint16;
+	int errn = decodeBoolean(stream, &b);
+
+	if (errn == 0) {
+		if (b) {
+			/* For negative values, the Unsigned Integer holds the
+			 * magnitude of the value minus 1 */
+			errn = decodeUnsignedInteger16(stream, &uint16);
+			*int16 = (int16_t)(-(uint16 + 1));
+		} else {
+			/* positive */
+			errn = decodeUnsignedInteger16(stream, &uint16);
+			*int16 = (int16_t)(uint16);
+		}
+	}
+
+	return errn;
+}
+
+/**
+ * Decode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int decodeInteger32(bitstream_t* stream, int32_t* int32) {
+	int b;
+	uint32_t uint32;
+	int errn = decodeBoolean(stream, &b);
+
+	if (errn == 0) {
+		if (b) {
+			/* For negative values, the Unsigned Integer holds the
+			 * magnitude of the value minus 1 */
+			errn = decodeUnsignedInteger32(stream, &uint32);
+			*int32 = (-(int32_t)(uint32 + 1));
+		} else {
+			/* positive */
+			errn = decodeUnsignedInteger32(stream, &uint32);
+			*int32 = (int32_t)(uint32);
+		}
+	}
+
+	return errn;
+}
+
+/**
+ * Decode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int decodeInteger64(bitstream_t* stream, int64_t* int64) {
+	int b;
+	uint64_t uint64;
+	int errn = decodeBoolean(stream, &b);
+
+	if (errn == 0) {
+		if (b) {
+			/* For negative values, the Unsigned Integer holds the
+			 * magnitude of the value minus 1 */
+			errn = decodeUnsignedInteger64(stream, &uint64);
+			*int64 = (-(int64_t)(uint64 + 1));
+		} else {
+			/* positive */
+			errn = decodeUnsignedInteger64(stream, &uint64);
+			*int64 = (int64_t)(uint64);
+		}
+	}
+
+	return errn;
+}
+
+/**
+ * Decode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int decodeIntegerBig(bitstream_t* stream, int* negative, size_t size, uint8_t* data, size_t* len) {
+	int errn = decodeBoolean(stream, negative);
+
+	if (errn == 0) {
+		if (*negative) {
+			/* For negative values, the Unsigned Integer holds the
+			 * magnitude of the value minus 1 */
+		} else {
+			/* positive */
+		}
+		errn = decodeUnsignedIntegerBig(stream, size, data, len);
+	}
+
+	return errn;
+}
+
+/**
+ * Decode a Float datatype as two consecutive Integers.
+ * The first Integer represents the mantissa of the floating point
+ * number and the second Integer represents the base-10 exponent
+ * of the floating point number.
+ */
+int decodeFloat(bitstream_t* stream, exi_float_me_t* f) {
+	int errn = decodeInteger64(stream, &f->mantissa);
+	if (errn == 0) {
+		errn = decodeInteger16(stream, &f->exponent);
+	}
+	return errn;
+}
+
+/**
+ * Decode a decimal represented as a Boolean sign followed by two Unsigned
+ * Integers. A sign value of zero (0) is used to represent positive Decimal
+ * values and a sign value of one (1) is used to represent negative Decimal
+ * values The first Integer represents the integral portion of the Decimal
+ * value. The second positive integer represents the fractional portion of
+ * the decimal with the digits in reverse order to preserve leading zeros.
+ */
+int decodeDecimal(bitstream_t* stream, exi_decimal_t* d) {
+	int errn = decodeBoolean(stream, &d->negative);
+	if (errn == 0) {
+		errn = decodeUnsignedInteger(stream, &d->integral);
+		if (errn == 0) {
+			errn = decodeUnsignedInteger(stream, &d->reverseFraction);
+		}
+	}
+
+	return errn;
+}
+
+/**
+ * Decode a sequence of characters for a given length.
+ */
+int decodeStringOnly(bitstream_t* stream, size_t len, exi_string_t* s) {
+	int errn = 0;
+	unsigned int extraChar = 0;
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+	extraChar = 1; /* null terminator */
+#endif /* STRING_REPRESENTATION_ASCII */
+
+	if ( (len + extraChar) > s->size) {
+#if MEMORY_ALLOCATION == STATIC_ALLOCATION
+		errn = EXI_ERROR_OUT_OF_STRING_BUFFER;
+#endif /* STATIC_ALLOCATION */
+#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
+		if(s->size > 0) {
+			errn = exiFreeDynamicStringMemory(s);
+			if(errn) {
+				return errn;
+			}
+		}
+		errn = exiAllocateDynamicStringMemory(s, (len + extraChar)); /*s->len*/
+#endif /* DYNAMIC_ALLOCATION */
+	}
+	if(errn == 0) {
+		errn = decodeCharacters(stream, len, s->characters, s->size);
+		s->len = len;
+	}
+
+	return errn;
+}
+
+/**
+ * Decode a length prefixed sequence of characters.
+ */
+int decodeString(bitstream_t* stream, exi_string_t* s) {
+	int errn = decodeUnsignedIntegerSizeT(stream, &s->len);
+	if (errn == 0) {
+		errn = decodeStringOnly(stream, s->len, s);
+	}
+	return errn;
+}
+
+/**
+ * Decode a sequence of characters according to a given length.
+ * Each character is represented by its UCS [ISO/IEC 10646]
+ * code point encoded as an Unsigned Integer
+ */
+int decodeCharacters(bitstream_t* stream, size_t len, exi_string_character_t* chars, size_t charsSize) {
+	unsigned int i;
+	int errn = 0;
+
+	unsigned int extraChar = 0;
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+	extraChar = 1; /* null terminator */
+#endif /* STRING_REPRESENTATION_ASCII */
+
+	if ( (len + extraChar) > charsSize) {
+		errn = EXI_ERROR_OUT_OF_STRING_BUFFER;
+		return errn;
+	}
+
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+	uint8_t b;
+	for (i = 0; i < len && errn == 0; i++) {
+		errn = decode(stream, &b);
+		if(b < 128) {
+			chars[i] = (exi_string_character_t)b;
+		} else {
+			errn = EXI_ERROR_STRINGVALUES_CHARACTER;
+		}
+	}
+	/* null terminator \0 */
+	chars[i] = '\0';
+
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+	for (i = 0; i < len && errn == 0; i++) {
+		errn = decodeUnsignedInteger32(stream, &chars[i]);
+	}
+#endif /* STRING_REPRESENTATION_UCS */
+
+
+
+
+	return errn;
+}
+
+int decodeRCSCharacters(bitstream_t* stream, size_t len, exi_string_character_t* chars, size_t charsSize, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[]) {
+	unsigned int i;
+	int errn = 0;
+	uint32_t uint32;
+	unsigned int extraChar = 0;
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+	uint8_t b;
+	extraChar = 1; /* null terminator */
+#endif /* STRING_REPRESENTATION_ASCII */
+
+	if ( (len + extraChar) > charsSize) {
+		errn = EXI_ERROR_OUT_OF_STRING_BUFFER;
+		return errn;
+	}
+
+
+	for (i = 0; i < len && errn == 0; i++) {
+		errn = decodeNBitUnsignedInteger(stream, rcsCodeLength, &uint32);
+		if(errn == 0) {
+			if ( uint32 == rcsSize ) {
+				/* RCS deviation */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+				errn = decode(stream, &b);
+				if(b < 128) {
+					chars[i] = (exi_string_character_t)b;
+				} else {
+					errn = EXI_ERROR_STRINGVALUES_CHARACTER;
+				}
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+				errn = decodeUnsignedInteger32(stream, &chars[i]);
+#endif /* STRING_REPRESENTATION_UCS */
+
+			} else {
+				/* RCS match */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+				chars[i] = rcsSet[uint32];
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+				chars[i] = rcsSet[uint32];
+#endif /* STRING_REPRESENTATION_UCS */
+			}
+		}
+	}
+
+	return errn;
+}
+
+
+/**
+ * Decode a binary value as a length-prefixed sequence of octets.
+ */
+int decodeBinary(bitstream_t* stream, exi_bytes_t* bytes) {
+	int errn = decodeUnsignedIntegerSizeT(stream, &bytes->len);
+	if (errn == 0) {
+		if (bytes->len > bytes->size) {
+#if MEMORY_ALLOCATION == STATIC_ALLOCATION
+			errn = EXI_ERROR_OUT_OF_BYTE_BUFFER;
+#endif /* STATIC_ALLOCATION */
+#if MEMORY_ALLOCATION == DYNAMIC_ALLOCATION
+			errn = exiFreeDynamicBinaryMemory(bytes);
+			if(errn == 0) {
+				errn = exiAllocateDynamicBinaryMemory(bytes, bytes->len);
+			}
+#endif /* DYNAMIC_ALLOCATION */
+		}
+
+		errn = decodeBytes(stream, bytes->len, bytes->data);
+	}
+
+	return errn;
+}
+
+
+int decodeBytes(bitstream_t* stream, size_t len, uint8_t* data) {
+	unsigned int i;
+	int errn = 0;
+	uint8_t b = 0;
+
+	for (i = 0; i < len && errn == 0; i++) {
+		errn = decode(stream, &b);
+		data[i] = (uint8_t)b;
+	}
+
+	return errn;
+}
+
+/**
+ * Decode Date-Time as sequence of values representing the individual
+ * components of the Date-Time.
+ */
+int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, exi_datetime_t* datetime) {
+	int errn = 0;
+
+	datetime->type = type;
+
+	datetime->year = 0;
+	datetime->monthDay = 0;
+	datetime->time = 0;
+	datetime->presenceFractionalSecs = 0;
+	datetime->fractionalSecs = 0;
+	datetime->presenceTimezone = 0;
+	datetime->timezone = 0;
+
+	switch (type) {
+	case EXI_DATETIME_GYEAR: /* Year, [Time-Zone] */
+		errn = decodeInteger32(stream, &datetime->year);
+		if (errn == 0) {
+			datetime->year += DATETIME_YEAR_OFFSET;
+		}
+		break;
+	case EXI_DATETIME_GYEARMONTH: /* Year, MonthDay, [TimeZone] */
+	case EXI_DATETIME_DATE:
+		errn = decodeInteger32(stream, &datetime->year);
+		if (errn == 0) {
+			datetime->year += DATETIME_YEAR_OFFSET;
+			errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay);
+		}
+		break;
+	case EXI_DATETIME_DATETIME: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
+		/* e.g. "0001-01-01T00:00:00.111+00:33"  */
+		errn = decodeInteger32(stream, &datetime->year);
+		if (errn == 0) {
+			datetime->year += DATETIME_YEAR_OFFSET;
+			errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay);
+			if (errn != 0) {
+				break;
+			}
+		}
+		/* no break */
+	case EXI_DATETIME_TIME: /* Time, [FractionalSecs], [TimeZone] */
+		/* e.g. "12:34:56.135"  */
+		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME, &datetime->time);
+		if (errn == 0) {
+			errn = decodeBoolean(stream, &datetime->presenceFractionalSecs);
+			if (errn == 0) {
+				if (datetime->presenceFractionalSecs) {
+					errn = decodeUnsignedInteger32(stream, &datetime->fractionalSecs);
+				}
+			}
+		}
+		break;
+	case EXI_DATETIME_GMONTH: /* MonthDay, [TimeZone] */
+		/* e.g. "--12" */
+	case EXI_DATETIME_GMONTHDAY: /* MonthDay, [TimeZone] */
+		/* e.g. "--01-28"  */
+	case EXI_DATETIME_GDAY: /* MonthDay, [TimeZone] */
+		/* "---16"  */
+		errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY, &datetime->monthDay );
+		break;
+	default:
+		errn = EXI_UNSUPPORTED_DATETIME_TYPE;
+		break;
+	}
+
+	if(errn == 0) {
+		errn = decodeBoolean(stream, &datetime->presenceTimezone );
+		if (errn == 0 && datetime->presenceTimezone) {
+			errn = decodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIMEZONE, &datetime->timezone);
+			datetime->timezone -= DATETIME_TIMEZONE_OFFSET_IN_MINUTES;
+		}
+	}
+
+	return errn;
+}
+
+
+
+int decode(bitstream_t* stream, uint8_t* b) {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+	uint32_t bb;
+	int errn =  readBits(stream, 8, &bb);
+	if (errn == 0) {
+		if (bb > 256) {
+			errn = EXI_ERROR_UNEXPECTED_BYTE_VALUE;
+		} else {
+			*b = (uint8_t)bb;
+		}
+	}
+
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	int errn = 0;
+#if EXI_STREAM == BYTE_ARRAY
+	if ( (*stream->pos) < stream->size ) {
+		*b = stream->data[(*stream->pos)++];
+	} else {
+		errn = EXI_ERROR_INPUT_STREAM_EOF;
+	}
+#endif /* EXI_STREAM == BYTE_ARRAY */
+#if EXI_STREAM == FILE_STREAM
+	*b = (uint8_t)(getc(stream->file));
+	/* EOF cannot be used, 0xFF valid value */
+	if ( feof(stream->file) || ferror(stream->file) ) {
+		errn = EXI_ERROR_INPUT_STREAM_EOF;
+	}
+#endif /* EXI_STREAM == FILE_STREAM */
+
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+}
+
+int decodeBoolean(bitstream_t* stream, int* b) {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+	uint32_t ub;
+	int errn = readBits(stream, 1, &ub);
+	*b = (ub == 0) ? 0 : 1;
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	uint8_t bb;
+	int errn = decode(stream, &bb);
+	*b = (bb == 0) ? 0 : 1;
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+
+}
+
+/**
+ * Decodes and returns an n-bit unsigned integer using the minimum number of
+ * bytes required for n bits.
+ */
+int decodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint32_t* uint32) {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+	int errn = 0;
+	if (nbits == 0) {
+		*uint32 = 0;
+	} else {
+		errn= readBits(stream, nbits, uint32);
+	}
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	size_t bitsRead = 0;
+	uint8_t b;
+	int errn = 0;
+	*uint32 = 0;
+
+	while (errn == 0 && bitsRead < nbits) {
+		errn = decode(stream, &b);
+		*uint32 = *uint32 + (uint32_t)(b << bitsRead);
+		bitsRead = (bitsRead + 8);
+	}
+
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+}
+
+
+
+#endif
+

+ 441 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/DecoderChannel.h

@@ -0,0 +1,441 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	DecoderChannel.h
+ * \brief 	EXI Decoder Channel
+ *
+ */
+
+#ifndef DECODER_CHANNEL_H
+#define DECODER_CHANNEL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "EXIOptions.h"
+#include "EXITypes.h"
+
+/**
+ * \brief 		Decode byte value
+ *
+ * \param       stream   		Input Stream
+ * \param       b		   		byte (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decode(bitstream_t* stream, uint8_t* b);
+
+
+/**
+ * \brief 		Decode boolean
+ *
+ * 				Decode a single boolean value. The value false is
+ * 				represented by 0, and the value true is represented by 1.
+ *
+ * \param       stream   		Input Stream
+ * \param       b		   		boolean (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeBoolean(bitstream_t* stream, int* b);
+
+
+/**
+ * \brief 		Decode n-bit unsigned integer
+ *
+ * 				Decodes and returns an n-bit unsigned integer.
+ *
+ * \param       stream   		Input Stream
+ * \param       nbits		   	Number of bits
+ * \param       uint32		   	Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint32_t* uint32);
+
+
+/**
+ * \brief 		Decode unsigned integer
+ *
+ * 				Decode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       iv		   		Unsigned Integer Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv);
+
+
+/**
+ * \brief 		Decode unsigned integer
+ *
+ * 				Decode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       uint16		   	Unsigned Integer Value 16 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeUnsignedInteger16(bitstream_t* stream, uint16_t* uint16);
+
+
+/**
+ * \brief 		Decode unsigned integer
+ *
+ * 				Decode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       uint32		   	Unsigned Integer Value 32 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeUnsignedInteger32(bitstream_t* stream, uint32_t* uint32);
+
+
+/**
+ * \brief 		Decode unsigned integer
+ *
+ * 				Decode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       sizeT			Unsigned Integer Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeUnsignedIntegerSizeT(bitstream_t* stream, size_t* sizeT);
+
+
+/**
+ * \brief 		Decode unsigned integer
+ *
+ * 				Decode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       uint64		   	Unsigned Integer Value 64 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeUnsignedInteger64(bitstream_t* stream, uint64_t* uint64);
+
+/**
+ * \brief 		Decode unsigned integer
+ *
+ * 				Decode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       size		   	size array
+ * \param       data		   	data array
+ * \param       len		   		length array
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeUnsignedIntegerBig(bitstream_t* stream, size_t size, uint8_t* data, size_t* len);
+
+
+/**
+ * \brief 		Decode integer
+ *
+ * 				Decode an arbitrary precision integer using a sign bit
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       iv		   		Integer Value 64 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeInteger(bitstream_t* stream, exi_integer_t* iv);
+
+
+/**
+ * \brief 		Decode integer
+ *
+ * 				Decode an arbitrary precision integer using a sign bit
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       int16		   	Integer Value 16 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeInteger16(bitstream_t* stream, int16_t* int16);
+
+
+/**
+ * \brief 		Decode integer
+ *
+ * 				Decode an arbitrary precision integer using a sign bit
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       int32		   	Integer Value 32 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeInteger32(bitstream_t* stream, int32_t* int32);
+
+
+/**
+ * \brief 		Decode integer
+ *
+ * 				Decode an arbitrary precision integer using a sign bit
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       int64		   	Integer Value 64 bits (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeInteger64(bitstream_t* stream, int64_t* int64);
+
+/**
+ * \brief 		Decode integer
+ *
+ * 				Decode an arbitrary precision integer using a sign bit
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Input Stream
+ * \param       negative		negative integer
+ * \param       size		   	size array
+ * \param       data		   	data array
+ * \param       len		   		length array
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeIntegerBig(bitstream_t* stream, int* negative, size_t size, uint8_t* data, size_t* len);
+
+/**
+ * \brief 		Decode float
+ *
+ * 				Decode a Float datatype as two consecutive Integers. The
+ * 				first Integer represents the mantissa of the floating point
+ * 				number and the second Integer represents the base-10 exponent
+ * 				of the floating point number.
+ *
+ * \param       stream   		Input Stream
+ * \param       f			   	Float Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeFloat(bitstream_t* stream, exi_float_me_t* f);
+
+
+/**
+ * \brief 		Decode decimal
+ *
+ * 				Decode a decimal represented as a Boolean sign followed by two
+ * 				Unsigned Integers. A sign value of zero (0) is used to represent
+ * 				positive Decimal values and a sign value of one (1) is used to
+ * 				represent negative Decimal values The first Integer represents
+ * 				the integral portion of the Decimal value. The second positive
+ * 				integer represents the fractional portion of the decimal with
+ * 				the digits in reverse order to preserve leading zeros.
+ *
+ * \param       stream   		Input Stream
+ * \param       d			   	Decimal Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeDecimal(bitstream_t* stream, exi_decimal_t* d);
+
+
+/**
+ * \brief 		Decode String (no length prefix)
+ *
+ * 				Decode a sequence of characters for a given length.
+ *
+ * \param       stream   		Input Stream
+ * \param       len			   	Characters length
+ * \param       s			   	String Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeStringOnly(bitstream_t* stream, size_t len, exi_string_t* s);
+
+
+/**
+ * \brief 		Decode String
+ *
+ * 				Decode a length prefixed sequence of characters.
+ *
+ * \param       stream   		Input Stream
+ * \param       s			   	String Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeString(bitstream_t* stream, exi_string_t* s);
+
+
+
+/**
+ * \brief 		Decode String value
+ *
+ * 				Decode a length prefixed sequence of characters in the sense of string tables.
+ * 				length == 0: local value partition hit.
+ * 				length == 1: global value partition hit.
+ * 				length > 1: string literal is encoded as a String with the length incremented by two
+ *
+ * \param       stream   		Input Stream
+ * \param       stringTable   	String Table
+ * \param       qnameID   		Qualified Name ID
+ * \param       namespaceUriID  Qualified Namespace ID
+ * \param       localNameID  	Qualified LocalName ID
+ * \param       s			   	String Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeStringValue(bitstream_t* stream, exi_value_string_table_t* stringTable, size_t namespaceUriID, size_t localNameID, exi_string_value_t* s);
+
+
+/**
+ * \brief 		Decode Restricted characters set string value
+ *
+ * \param       stream   		Input Stream
+ * \param       stringTable   	StringTable
+ * \param       namespaceUriID  qualified namespace ID
+ * \param       localNameID   	qualified localName ID
+ * \param       rcs		   		Restricted character set
+ * \param       s			   	String Value (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeRCSStringValue(bitstream_t* stream, exi_value_string_table_t* stringTable, size_t namespaceUriID, size_t localNameID, exi_rcs_t* rcs, exi_string_value_t* s);
+
+
+/**
+ * \brief 		Decode characters
+ *
+ * 				Decode a sequence of characters according to a given length.
+ *
+ * \param       stream   		Input Stream
+ * \param       len		   		Length
+ * \param       chars   		Characters (out)
+ * \param       charsSize		Size of possible characters
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeCharacters(bitstream_t* stream, size_t len, exi_string_character_t* chars, size_t charsSize);
+
+
+/**
+ * \brief 		Decode restricted character set characters
+ *
+ * 				Decode a sequence of characters according to a given length and rcs code-length, size and set.
+ *
+ * \param       stream   		Input Stream
+ * \param       len		   		Length
+ * \param       chars   		Characters (out)
+ * \param       charsSize		Size of possible characters
+ * \param       rcsCodeLength   RCS code-length
+ * \param       rcsCodeLength   RCS size
+ * \param       rcsCodeLength   RCS set
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeRCSCharacters(bitstream_t* stream, size_t len, exi_string_character_t* chars, size_t charsSize, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[]);
+
+
+
+/**
+ * \brief 		Decode Binary
+ *
+ * 				Decode a binary value as a length-prefixed sequence of octets.
+ *
+ * \param       stream   		Input Stream
+ * \param       bytes   		Bytes (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeBinary(bitstream_t* stream, exi_bytes_t* bytes);
+
+/**
+ * \brief 		Decode Binary data
+ *
+ * 				Decode a sequence of octets.
+ *
+ * \param       stream   		Input Stream
+ * \param       len		   		Length
+ * \param       data	   		Bytes (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeBytes(bitstream_t* stream, size_t len, uint8_t* data);
+
+/**
+ * \brief 		Decode DateTime
+ *
+ * 				Decode Date-Time as sequence of values representing the
+ * 				individual components of the Date-Time.
+ *
+ * \param       stream   		Input Stream
+ * \param       type   			Datetime type
+ * \param       datetime   		Datetime (out)
+ * \return                  	Error-Code <> 0
+ *
+ */
+int decodeDateTime(bitstream_t* stream, exi_datetime_type_t type, exi_datetime_t* datetime);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 106 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIConfig.h

@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-23
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIConfig.h
+ * \brief 	EXI Configurations for the EXI Codec
+ *
+ */
+
+#ifndef EXI_CONFIG_H
+#define EXI_CONFIG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** EXI stream - Option Byte Array */
+#define BYTE_ARRAY 1
+/** EXI stream - Option File */
+#define FILE_STREAM 2
+/** \brief 	EXI stream
+ *
+ * 			Byte array or file
+ * */
+#define EXI_STREAM BYTE_ARRAY
+
+
+
+
+
+/** Memory allocation - static */
+#define STATIC_ALLOCATION 1
+/** Memory allocation - dynamic */
+#define DYNAMIC_ALLOCATION  2
+/** */
+/** \brief 	Memory allocation mode
+ *
+ * 			static or dynamic memory allocation
+ * */
+#define MEMORY_ALLOCATION STATIC_ALLOCATION
+
+
+
+/** String representation ASCII */
+#define STRING_REPRESENTATION_ASCII 1
+/** String representation Universal Character Set (UCS) */
+#define STRING_REPRESENTATION_UCS 2
+/** */
+/** \brief 	String representation mode
+ *
+ * 			ASCII or UCS
+ * */
+#define STRING_REPRESENTATION STRING_REPRESENTATION_UCS
+
+
+/* in the case of ASCII an extra char (null terminator) for printf and other functions is useful */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+#define EXTRA_CHAR 1
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+#define EXTRA_CHAR 0
+#endif /* STRING_REPRESENTATION_UCS */
+
+
+
+
+
+/** Maximum number of cascading elements, XML tree depth */
+#define EXI_ELEMENT_STACK_SIZE 24
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EXI_CONFIG_H */
+

+ 66 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderDecoder.c

@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include "EXIHeaderDecoder.h"
+#include "BitInputStream.h"
+#include "DecoderChannel.h"
+#include "ErrorCodes.h"
+
+#ifndef EXI_HEADER_DECODER_C
+#define EXI_HEADER_DECODER_C
+
+int readEXIHeader(bitstream_t* stream) {
+	int errn;
+	uint32_t header = 0;
+
+	/* init stream */
+	stream->buffer = 0;
+	stream->capacity = 0;
+
+	errn = readBits(stream, 8, &header);
+	if (errn == 0) {
+		if(header == '$') {
+			/*	we do not support "EXI Cookie" */
+			errn = EXI_UNSUPPORTED_HEADER_COOKIE;
+		} else if ( header & 0x20 ) {
+			/* we do not support "Presence Bit for EXI Options" */
+			errn = EXI_UNSUPPORTED_HEADER_OPTIONS;
+		} else {
+			/* Yes, a *simple* header */
+			errn = 0;
+		}
+	}
+
+	return errn;
+}
+
+
+#endif

+ 60 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderDecoder.h

@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIHeaderDecoder.h
+ * \brief 	EXI Header Decoder
+ *
+ */
+
+#ifndef EXI_HEADER_DECODER_H
+#define EXI_HEADER_DECODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "EXITypes.h"
+
+/**
+ * \brief 		Reads EXI header
+ *
+ * \param       stream   		Input Stream
+ * \return                  	Error-Code <> 0
+ *
+ */
+int readEXIHeader(bitstream_t* stream);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 50 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderEncoder.c

@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include "EXIHeaderEncoder.h"
+#include "BitOutputStream.h"
+#include "EncoderChannel.h"
+
+#ifndef EXI_HEADER_ENCODER_C
+#define EXI_HEADER_ENCODER_C
+
+int writeEXIHeader(bitstream_t* stream) {
+	/* init stream */
+	stream->buffer = 0;
+	stream->capacity = 8;
+
+	return writeBits(stream, 8, 128);
+}
+
+
+#endif
+
+

+ 61 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIHeaderEncoder.h

@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIHeaderEncoder.h
+ * \brief 	EXI Header Encoder
+ *
+ */
+
+#ifndef EXI_HEADER_ENCODER_H
+#define EXI_HEADER_ENCODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "EXITypes.h"
+
+
+/**
+ * \brief 		Writes EXI header
+ *
+ * \param       stream   		Output Stream
+ * \return                  	Error-Code <> 0
+ *
+ */
+int writeEXIHeader(bitstream_t* stream);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 93 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXIOptions.h

@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIOptions.h
+ * \brief 	EXI Options for the EXI Codec
+ *
+ */
+
+#ifndef EXI_OPTIONS_H
+#define EXI_OPTIONS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/** EXI alignment - Option bit-packed */
+#define BIT_PACKED 1
+/** EXI alignment - Option byte-packed */
+#define BYTE_ALIGNMENT  2
+/** EXI alignment */
+/**
+ * \brief 		EXI Option 'alignment'
+ *
+ *				The alignment option is used to control the alignment of event codes and content items.
+ *				Default Value: bit-packed
+ */
+#define EXI_OPTION_ALIGNMENT BIT_PACKED
+
+
+
+/**
+ * \brief 		EXI Option 'strict'
+ *
+ *				Strict interpretation of schemas is used to achieve better compactness.
+ *				Default Value: false
+ */
+#define EXI_OPTION_STRICT 0
+
+
+/**
+ * \brief 		EXI Option 'valueMaxLength'
+ *
+ *				Specifies the maximum string length of value content items to be
+ *				considered for addition to the string table.
+ *				Default Value: unbounded (-1)
+ */
+#define EXI_OPTION_VALUE_MAX_LENGTH -1
+
+
+/**
+ * \brief 		EXI Option 'valuePartitionCapacity'
+ *
+ *				Specifies the total capacity of value partitions in a string table.
+ *				Default Value: unbounded (-1)
+ */
+#define EXI_OPTION_VALUE_PARTITION_CAPACITY 0
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* EXI_OPTIONS_H */

+ 591 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EXITypes.h

@@ -0,0 +1,591 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXITypes.h
+ * \brief 	Basic type definitions and structs
+ *
+ */
+
+#ifndef EXI_TYPES_H
+#define EXI_TYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stdio.h>
+#include "EXIConfig.h"
+#if EXI_STREAM == FILE_STREAM
+#include <stdio.h>
+#endif
+
+
+/** Number of bits for each byte */
+#define BITS_IN_BYTE 8
+
+/** EXI Date-Time offset for year */
+#define DATETIME_YEAR_OFFSET 2000
+/** EXI Date-Time number of bits for monthDay */
+#define DATETIME_NUMBER_BITS_MONTHDAY 9
+/** EXI Date-Time number of bits for time */
+#define DATETIME_NUMBER_BITS_TIME 17
+/** EXI Date-Time number of bits for timezone */
+#define DATETIME_NUMBER_BITS_TIMEZONE 11
+/** EXI Date-Time month multiplicator */
+#define DATETIME_MONTH_MULTIPLICATOR 32
+/** EXI Date-Time offset for timzone minutes */
+#define DATETIME_TIMEZONE_OFFSET_IN_MINUTES 896
+
+/** Maximum integer value for uint */
+#define UINT_MAX_VALUE 65535
+
+
+/** EXI Float exponent special values */
+#define FLOAT_EXPONENT_SPECIAL_VALUES -16384
+/** EXI Float mantissa infinity */
+#define FLOAT_MANTISSA_INFINITY 1
+/** EXI Float minus mantissa infinity */
+#define FLOAT_MANTISSA_MINUS_INFINITY -1
+/** EXI Float not a number */
+#define FLOAT_MANTISSA_NOT_A_NUMBER 0
+
+/** \brief EXI Events */
+typedef enum {
+	/** Start Document SD */
+	EXI_EVENT_START_DOCUMENT,
+	/** End Document ED */
+	EXI_EVENT_END_DOCUMENT,
+	/** Start Element SE(qname) */
+	EXI_EVENT_START_ELEMENT,
+	/** Start Element SE(uri:*) */
+	EXI_EVENT_START_ELEMENT_NS,
+	/** Start Element SE(*) generic */
+	EXI_EVENT_START_ELEMENT_GENERIC,
+	/** Start Element SE(*) generic undeclared */
+	EXI_EVENT_START_ELEMENT_GENERIC_UNDECLARED,
+	/** End Element EE */
+	EXI_EVENT_END_ELEMENT,
+	/** End Element EE undeclared*/
+	EXI_EVENT_END_ELEMENT_UNDECLARED,
+	/** Characters CH */
+	EXI_EVENT_CHARACTERS,
+	/** Characters CH generic */
+	EXI_EVENT_CHARACTERS_GENERIC,
+	/** Characters CH generic undeclared */
+	EXI_EVENT_CHARACTERS_GENERIC_UNDECLARED,
+	/** Attribute AT(xsi:type) */
+	EXI_EVENT_ATTRIBUTE_XSI_TYPE,
+	/** Attribute AT(xsi:nil) */
+	EXI_EVENT_ATTRIBUTE_XSI_NIL,
+	/** Attribute AT(qname) */
+	EXI_EVENT_ATTRIBUTE,
+	/** Attribute AT(uri:*) */
+	EXI_EVENT_ATTRIBUTE_NS,
+	/** Attribute AT(*) generic */
+	EXI_EVENT_ATTRIBUTE_GENERIC,
+	/** Attribute AT(*) invalid value */
+	EXI_EVENT_ATTRIBUTE_INVALID_VALUE,
+	/** Attribute AT(*) any invalid value */
+	EXI_EVENT_ATTRIBUTE_ANY_INVALID_VALUE,
+	/** Attribute AT(*) generic undeclared */
+	EXI_EVENT_ATTRIBUTE_GENERIC_UNDECLARED,
+	/* error state */
+	EXI_EVENT_ERROR
+} exi_event_t;
+
+
+/**
+ * \brief 	Bit stream container
+ *
+ *	Structure for byteArray/file stream.
+ *
+ *	# General
+ *	.size defines the maximum size of the byte array (see .data)
+ *
+ *	.data points to the input/output array of bytes (unsigned char*).
+ *
+ *	.pos has to be set to an pointer to an 32 bit long unsigned integer (uint32_t *)
+ *	 as this variable is read/write.
+ *	 Therefore it is best practice to declare the variable itself and use the &-operator
+ *	 to assign the address. The value of that variable points to the position inside the
+ *	 buffer where the stream begins. Which is usually the first (0th) byte but can also be
+ *	 another value if there more information transferred in that stream.
+ *	 After processing .pos points to the next "available" byte (if any left).
+ *
+ *	.buffer has to be set to 0 for internal use only (single byte buffer)
+ *
+ *	# Receiving data (input)
+ *	.capacity is used for addressing single bits in the actual byte (see .buffer)
+ *	 and has to be set to 0, which means there are 0 bits read so far and a new
+ *	 byte needs to be read from the input stream/data-array to the current byte buffer.
+ *
+ *	# Sending data (output)
+ *	.capacity is used for addressing single bits in the actual byte (see .buffer)
+ *	 and has to be set to 8, which means there are still 8 bits left to fill up
+ *	 the current byte buffer before writing the final byte to the output stream/data-array.
+ *
+ */
+typedef struct {
+#if EXI_STREAM == BYTE_ARRAY
+	/**	byte array size */
+	size_t size;
+	/**	byte array data */
+	uint8_t* data;
+	/**	byte array next position in array */
+	size_t* pos;
+#endif
+#if EXI_STREAM == FILE_STREAM
+	/** file pointer */
+	FILE *file;
+#endif
+	/** Current byte buffer*/
+	uint8_t buffer;
+	/** Remaining bit capacity in current byte buffer*/
+	uint8_t capacity;
+} bitstream_t;
+
+
+/** \brief EXI Value Datatypes */
+typedef enum {
+	/** Binary Base64 */
+	EXI_DATATYPE_BINARY_BASE64,
+	/** Binary Hex */
+	EXI_DATATYPE_BINARY_HEX,
+	/** Boolean */
+	EXI_DATATYPE_BOOLEAN,
+	/** Boolean with Facets */
+	EXI_DATATYPE_BOOLEAN_FACET,
+	/** Decimal */
+	EXI_DATATYPE_DECIMAL,
+	/** Float & Double */
+	EXI_DATATYPE_FLOAT,
+	/** N-Bit Unsigned Integer */
+	EXI_DATATYPE_NBIT_UNSIGNED_INTEGER,
+	/** Unsigned Integer */
+	EXI_DATATYPE_UNSIGNED_INTEGER,
+	/** (Signed) Integer */
+	EXI_DATATYPE_INTEGER,
+	/** Datetime */
+	EXI_DATATYPE_DATETIME,
+	/** String */
+	EXI_DATATYPE_STRING,
+	/** Restricted Character Set String */
+	EXI_DATATYPE_RCS_STRING,
+	/** Enumeration */
+	EXI_DATATYPE_ENUMERATION,
+	/** List */
+	EXI_DATATYPE_LIST,
+	/** QName (e.g. xsi:type) */
+	EXI_DATATYPE_QNAME
+} exi_datatype_t;
+
+
+/** \brief EXI Integer Value types */
+typedef enum {
+	/** Unsigned Integer 8 bits */
+	EXI_UNSIGNED_INTEGER_8,
+	/** Unsigned Integer 16 bits */
+	EXI_UNSIGNED_INTEGER_16,
+	/** Unsigned Integer 32 bits */
+	EXI_UNSIGNED_INTEGER_32,
+	/** Unsigned Integer 64 bits */
+	EXI_UNSIGNED_INTEGER_64,
+	/** (Signed) Integer 8 bits */
+	EXI_INTEGER_8,
+	/** (Signed) Integer 16 bits */
+	EXI_INTEGER_16,
+	/** (Signed) Integer 32 bits */
+	EXI_INTEGER_32,
+	/** (Signed) Integer 64 bits */
+	EXI_INTEGER_64
+} exi_integer_type_t;
+
+
+/** \brief EXI Datetime types */
+typedef enum {
+	/** gYear */
+	EXI_DATETIME_GYEAR,
+	/** gYearMonth */
+	EXI_DATETIME_GYEARMONTH,
+	/** date */
+	EXI_DATETIME_DATE,
+	/** datetime */
+	EXI_DATETIME_DATETIME,
+	/** gMonth */
+	EXI_DATETIME_GMONTH,
+	/** gMonthDay */
+	EXI_DATETIME_GMONTHDAY,
+	/** gDay */
+	EXI_DATETIME_GDAY,
+	/** time */
+	EXI_DATETIME_TIME
+} exi_datetime_type_t;
+
+
+/** \brief String value type */
+typedef enum {
+	/** value miss */
+	EXI_STRING_VALUE_MISS,
+	/** value local-hit */
+	EXI_STRING_VALUE_LOCAL_HIT,
+	/** value global-hit */
+	EXI_STRING_VALUE_GLOBAL_HIT
+} exi_string_value_type_t;
+
+/** \brief EXI string character */
+/* Note: define whether you wan't to support ASCII only or UCS */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+typedef char exi_string_character_t;
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+typedef uint32_t exi_string_character_t;
+#endif /* STRING_REPRESENTATION_UCS */
+
+
+
+/** \brief Universal Character Set (UCS) strings */
+typedef struct {
+	/** container size  */
+	size_t size;
+	/** string character container */
+	exi_string_character_t* characters;
+	/** current string length == number of code-points, (len <= size) */
+	size_t len;
+} exi_string_t;
+
+
+/** \brief String value */
+typedef struct {
+	/** value type (e.g., miss, local-hit, global-hit) */
+	exi_string_value_type_t type;
+	/** miss entry */
+	exi_string_t miss;
+	/** (local) hit entry */
+	size_t localID;
+	/** (global) hit entry */
+	size_t globalID;
+} exi_string_value_t;
+
+
+/** \brief Restricted Characeter Set */
+typedef struct {
+	/** size */
+	size_t size;
+	/** rcs codepoints */
+	exi_string_character_t* characters;
+	/** character coding length (less than 256 characters) */
+	uint8_t codingLength;
+} exi_rcs_t;
+
+
+/** \brief Byte value container */
+typedef struct {
+	/** bytes array size */
+	size_t size;
+	/** bytes array data container */
+	uint8_t* data;
+	/** bytes array length (len <= size) */
+	size_t len;
+} exi_bytes_t;
+
+
+/** \brief Integer value container */
+typedef struct {
+	/** type */
+	exi_integer_type_t type;
+	union {
+		/* (signed) values */
+		/** (signed) int 8 bits */
+		int8_t int8;
+		/** (signed) int 16 bits */
+		int16_t int16;
+		/** (signed) int 32 bits */
+		int32_t int32;
+		/** (signed) int 64 bits */
+		int64_t int64;
+		/* unsigned values */
+		/** unsigned int 8 bits */
+		uint8_t uint8;
+		/** unsigned int 16 bits */
+		uint16_t uint16;
+		/** unsigned int 32 bits */
+		uint32_t uint32;
+		/** unsigned int 64 bits */
+		uint64_t uint64;
+	} val;
+} exi_integer_t;
+
+
+/** \brief Float value container */
+typedef struct {
+	/** range of the mantissa is -(2^63) to 2^63-1 */
+	int64_t mantissa;
+	/** range of the exponent is - (2^14-1) to 2^14-1 */
+	int16_t exponent; /* base-10 */
+} exi_float_me_t;
+
+
+/** \brief Decimal value container */
+typedef struct {
+	/** a sign value */
+	int negative;
+	/** represents the integral portion of the Decimal */
+	exi_integer_t integral;
+	/** represents the fractional portion of the Decimal with the digits in reverse order to preserve leading zeros */
+	exi_integer_t reverseFraction;
+} exi_decimal_t;
+
+
+/** \brief Datetime value container */
+typedef struct {
+	/** datetime type */
+	exi_datetime_type_t type;
+	/** Datetime value for year */
+	int32_t year;
+	/** Datetime value for monthDay */
+	uint32_t monthDay;
+	/** Datetime value for time */
+	uint32_t time;
+	/** Datetime value for presenceFractionalSecs */
+	int presenceFractionalSecs;
+	/** Datetime value for fractionalSecs */
+	uint32_t fractionalSecs;
+	/** Datetime value for presenceTimezone */
+	int presenceTimezone;
+	/** Datetime value for timezone */
+	uint32_t timezone;
+} exi_datetime_t;
+
+
+/** \brief List value container */
+typedef struct {
+	/** list item type */
+	exi_datatype_t type;
+	/** number of items */
+	size_t len;
+	/* Special datatype: integer */
+	/* exi_integer_type_t intType;*/
+	/** Special datatype: datetime */
+	exi_datetime_type_t datetimeType;
+} exi_list_t;
+
+
+/** \brief Efficient qname */
+typedef struct {
+	/** namespace URI ID*/
+	size_t namespaceURI;
+	/** local name ID*/
+	size_t localPart;
+} exi_eqname_t;
+
+
+/** \brief Name entry type */
+typedef enum {
+	/** As known IDs */
+	EXI_NAME_ENTRY_TYPE_ID,
+	/** As String */
+	EXI_NAME_ENTRY_TYPE_STRING_AND_ID
+} exi_name_entry_type_t;
+
+
+/** \brief Name entry */
+typedef struct {
+	/** type */
+	exi_name_entry_type_t type;
+	/** entry ID */
+	size_t id;
+	/** entry string */
+	exi_string_t str;
+} exi_name_entry_t;
+
+
+/** \brief Qualified name */
+typedef struct {
+	/** Uri */
+	exi_name_entry_t uri;
+	/** LocalName */
+	exi_name_entry_t localName;
+} exi_qname_t;
+
+/*TODO Doxygen Documentation */
+
+
+/* ==================================== */
+/* URI and LocalName Entries */
+typedef struct exiNameTablePrepopulated {
+	/* number of namespaces AND length name-partitions array */
+	size_t len;
+	/* number of localName entries divided by URI */
+	size_t* localNames;
+} exi_name_table_prepopulated_t;
+
+#define EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES 25
+
+typedef enum {
+	EXI_NAME_PARTITION_URI, EXI_NAME_PARTITION_LOCALNAME
+} exi_name_partition_type_t;
+
+typedef struct {
+	char* uri;
+	size_t uriID;
+} exi_uri_partition_t;
+
+typedef struct {
+	char* localName;
+	size_t localNameID;
+	size_t uriID;
+} exi_localname_partition_t;
+
+typedef struct {
+	exi_name_partition_type_t namePartitionType;
+	struct {
+		exi_uri_partition_t uriPartition;
+		exi_localname_partition_t localNamePartition;
+	} entry;
+} exi_name_partition_t;
+
+typedef struct exiNameTableRuntime {
+	/* maximum number of characters in the name partitions entries PLUS null terminators */
+	/* char characters[EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_CHARACTERS + EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES]; */
+	/* uint16_t numberOfUsedCharacters; *//* initially zero <= EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_CHARACTERS */
+	/* maximum number of name partitions entries. Name partitions entries consist in all uri, and local-name partition entries */
+	exi_name_partition_t
+			namePartitionsEntries[EXI_MAXIMUM_NUMBER_OF_NAME_PARTITION_ENTRIES];
+	/* uint16_t numberOfUsedNamePartitions; *//* initially zero */
+	/* added entries */
+	size_t addedUriEntries; /* initially zero */
+	size_t addedLocalNameEntries; /* initially zero */
+} exi_name_table_runtime_t;
+
+
+/* StartTagContent grammar initially empty */
+/* ElementContent grammar has EE per default */
+typedef struct {
+	size_t namespaceUriID;
+	size_t localNameID;
+	size_t numberOfProductions;
+	int hasXsiType; /* StartTagContent only */
+	int hasEE; /* ElementContentper default TRUE */
+} exi_runtime_element_t;
+
+/* Note: We do have twice as many runtime grammars (StartTagContent and ElementContent)*/
+#define MAX_NUMBER_OF_RUNTIME_ELEMENTS 80
+
+
+
+/* ==================================== */
+/* Value string table */
+typedef struct exiValueStringTableEntry {
+	/** Qualified namespace URI */
+	size_t namespaceUriID;
+	/** Qualified localName */
+	size_t localNameID;
+	/** Local Value ID */
+	size_t localValueID;
+	/** String */
+	exi_string_t str;
+} exi_value_string_table_entry_t;
+
+typedef struct exiValueStringTable {
+	/** maximum number of global string table entry size */
+	size_t size;
+	/** string table entry array container */
+	exi_value_string_table_entry_t* strs;
+	/** current number of string table entries (len <= size) */
+	size_t len;
+} exi_value_string_table_t;
+
+/* typedef struct { */
+	/** number of global strings */
+	/* uint16_t numberOfGlobalStrings; */
+	/** size of local-names container */
+	/* uint16_t sizeLocalStrings; */
+	/** number of local strings container */
+	/* uint16_t* numberOfLocalStrings; */
+	/** string values */
+/*	exi_value_string_table_t* valueStringTable;
+} exi_value_table_t;*/
+
+typedef struct {
+	/** stack of grammar states */
+	int16_t grammarStack[EXI_ELEMENT_STACK_SIZE];
+	/** stack of grammar elements / qnameIDs */
+	exi_eqname_t elementStack[EXI_ELEMENT_STACK_SIZE];
+	/** stack index for both stacks */
+	size_t stackIndex;
+
+	/** event-code */
+	uint32_t eventCode;
+
+	/** name table entries, pre-populated */
+	exi_name_table_prepopulated_t* nameTablePrepopulated;
+	/** name table entries, at runtime */
+	exi_name_table_runtime_t* nameTableRuntime;
+
+	/** next qname ID */
+	size_t nextQNameID;
+
+	/** string table entries */
+	exi_value_string_table_t* stringTable;
+
+	/** runtime built-in element grammars - numbers */
+	size_t numberOfRuntimeGrammars;
+	/** runtime built-in element grammars */
+	exi_runtime_element_t runtimeGrammars[MAX_NUMBER_OF_RUNTIME_ELEMENTS * 2];
+} exi_state_t;
+
+typedef struct {
+	/* type of value */
+	exi_datatype_t type;
+
+	/* base types */
+	int boolean;
+	uint32_t enumeration;
+
+	/* complex types: Integers, Bytes, Strings and Lists are not native types anymore */
+	exi_integer_t integer;
+	exi_bytes_t binary;
+	exi_string_value_t str;
+	exi_float_me_t float_me;
+	exi_decimal_t decimal;
+	exi_datetime_t datetime;
+	exi_list_t list;
+	exi_eqname_t eqname;
+} exi_value_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 704 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EncoderChannel.c

@@ -0,0 +1,704 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include "EncoderChannel.h"
+#include "EXIOptions.h"
+#include "BitOutputStream.h"
+#include "EXITypes.h"
+#include "ErrorCodes.h"
+#include "MethodsBag.h"
+/*#include "v2gEXICoder.h"*/
+
+#ifndef ENCODER_CHANNEL_C
+#define ENCODER_CHANNEL_C
+
+int encodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv) {
+	int errn = 0;
+	switch (iv->type) {
+	/* Unsigned Integer */
+	case EXI_UNSIGNED_INTEGER_8:
+		errn = encodeUnsignedInteger32(stream, iv->val.uint8);
+		break;
+	case EXI_UNSIGNED_INTEGER_16:
+		errn = encodeUnsignedInteger32(stream, iv->val.uint16);
+		break;
+	case EXI_UNSIGNED_INTEGER_32:
+		errn = encodeUnsignedInteger32(stream, iv->val.uint32);
+		break;
+	case EXI_UNSIGNED_INTEGER_64:
+		errn = encodeUnsignedInteger64(stream, iv->val.uint64);
+		break;
+		/* (Signed) Integer */
+	case EXI_INTEGER_8:
+		if (iv->val.int8 < 0) {
+			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
+		}
+		errn = encodeUnsignedInteger32(stream, (uint32_t)(iv->val.int8));
+		break;
+	case EXI_INTEGER_16:
+		if (iv->val.int16 < 0) {
+			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
+		}
+		errn = encodeUnsignedInteger32(stream, (uint32_t)(iv->val.int16));
+		break;
+	case EXI_INTEGER_32:
+		if (iv->val.int32 < 0) {
+			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
+		}
+		errn = encodeUnsignedInteger32(stream, (uint32_t)(iv->val.int32));
+		break;
+	case EXI_INTEGER_64:
+		if (iv->val.int64 < 0) {
+			return EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE;
+		}
+		errn = encodeUnsignedInteger64(stream, (uint64_t)(iv->val.int64));
+		break;
+	default:
+		errn = EXI_UNSUPPORTED_INTEGER_VALUE_TYPE;
+		break;
+	}
+
+	return errn;
+}
+
+/**
+ * Encode an arbitrary precision non negative integer using a sequence of
+ * octets. The most significant bit of the last octet is set to zero to
+ * indicate sequence termination. Only seven bits per octet are used to
+ * store the integer's value.
+ */
+int encodeUnsignedInteger16(bitstream_t* stream, uint16_t n) {
+	int errn = 0;
+	if (n < 128) {
+		/* write byte as is */
+		errn = encode(stream, (uint8_t) n);
+	} else {
+		uint8_t n7BitBlocks = numberOf7BitBlocksToRepresent(n);
+
+		switch (n7BitBlocks) {
+		case 3:
+			errn = encode(stream, (uint8_t) (128 | n));
+			n = n >> 7;
+			if (errn != 0) {
+				break;
+			}
+			/* no break */
+		case 2:
+			errn = encode(stream, (uint8_t) (128 | n));
+			n = n >> 7;
+			if (errn != 0) {
+				break;
+			}
+			/* no break */
+		case 1:
+			/* 0 .. 7 (last byte) */
+			errn = encode(stream, (uint8_t) (0 | n));
+			/* no break */
+		}
+	}
+
+	return errn;
+}
+
+/**
+ * Encode an arbitrary precision non negative integer using a sequence of
+ * octets. The most significant bit of the last octet is set to zero to
+ * indicate sequence termination. Only seven bits per octet are used to
+ * store the integer's value.
+ */
+int encodeUnsignedInteger32(bitstream_t* stream, uint32_t n) {
+	int errn = 0;
+	if (n < 128) {
+		/* write byte as is */
+		errn = encode(stream, (uint8_t) n);
+	} else {
+		uint8_t n7BitBlocks = numberOf7BitBlocksToRepresent(n);
+
+		switch (n7BitBlocks) {
+		case 5:
+			errn = encode(stream, (uint8_t) (128 | n));
+			n = n >> 7;
+			if (errn != 0) {
+				break;
+			}
+			/* no break */
+		case 4:
+			errn = encode(stream, (uint8_t) (128 | n));
+			n = n >> 7;
+			if (errn != 0) {
+				break;
+			}
+			/* no break */
+		case 3:
+			errn = encode(stream, (uint8_t) (128 | n));
+			n = n >> 7;
+			if (errn != 0) {
+				break;
+			}
+			/* no break */
+		case 2:
+			errn = encode(stream, (uint8_t) (128 | n));
+			n = n >> 7;
+			if (errn != 0) {
+				break;
+			}
+			/* no break */
+		case 1:
+			/* 0 .. 7 (last byte) */
+			errn = encode(stream, (uint8_t) (0 | n));
+			/* no break */
+		}
+	}
+
+	return errn;
+}
+
+/**
+ * Encode an arbitrary precision non negative integer using a sequence of
+ * octets. The most significant bit of the last octet is set to zero to
+ * indicate sequence termination. Only seven bits per octet are used to
+ * store the integer's value.
+ */
+int encodeUnsignedInteger64(bitstream_t* stream, uint64_t n) {
+	int errn = 0;
+	uint8_t lastEncode = (uint8_t) n;
+	n >>= 7;
+
+	while (n != 0 && errn == 0) {
+		errn = encode(stream, lastEncode | 128);
+		lastEncode = (uint8_t) n;
+		n >>= 7;
+	}
+
+	if (errn == 0) {
+		errn = encode(stream, lastEncode);
+	}
+
+	return errn;
+}
+
+void _shiftRight7(uint8_t* buf, int len) {
+	const int shift = 7;
+    unsigned char tmp = 0x00, tmp2 = 0x00;
+    for (int k = 0; k <= len; k++) {
+        if (k == 0) {
+            tmp = buf[k];
+            buf[k] >>= shift;
+        } else {
+            tmp2 = buf[k];
+            buf[k] >>= shift;
+            buf[k] |= ((tmp & 0x7F) << (8 - shift));
+
+            if (k != len) {
+                tmp = tmp2;
+            }
+        }
+    }
+}
+
+/**
+ * Encode an arbitrary precision non negative integer using a sequence of
+ * octets. The most significant bit of the last octet is set to zero to
+ * indicate sequence termination. Only seven bits per octet are used to
+ * store the integer's value.
+ */
+int encodeUnsignedIntegerBig(bitstream_t* stream, size_t size, uint8_t* data, size_t len) {
+	int errn = 0;
+	int i;
+	int lenM1 = len - 1;
+	const int MAX_BIGINT_ARRAY = 25;
+	uint8_t lastEncode = 0;
+	uint8_t bytesToShift[MAX_BIGINT_ARRAY]; // MAXIMUM
+	size_t bitsToEncode = len * 8;
+
+	if(MAX_BIGINT_ARRAY <= len) {
+		return -1;
+	}
+
+	/* init */
+	for(i=0; i<MAX_BIGINT_ARRAY; i++) {
+		bytesToShift[i] = 0;
+	}
+
+	/* copy bytes first in same order for shifting */
+	for(i=0; i < len; i++) {
+		bytesToShift[i] = data[i];
+	}
+
+	while(bitsToEncode > 7) {
+		lastEncode = bytesToShift[lenM1];
+		lastEncode = lastEncode | 128;
+		errn = encode(stream, lastEncode);
+		_shiftRight7(bytesToShift, len);
+		bitsToEncode -= 7;
+	}
+
+	if (errn == 0) {
+		errn = encode(stream, bytesToShift[lenM1]);
+	}
+
+	return errn;
+}
+
+int encodeInteger(bitstream_t* stream, exi_integer_t* iv) {
+	int errn = 0;
+	switch (iv->type) {
+	/* Unsigned Integer */
+	case EXI_UNSIGNED_INTEGER_8:
+		errn = encodeInteger32(stream, iv->val.uint8);
+		break;
+	case EXI_UNSIGNED_INTEGER_16:
+		errn = encodeInteger32(stream, iv->val.uint16);
+		break;
+	case EXI_UNSIGNED_INTEGER_32:
+		errn = encodeInteger64(stream, iv->val.uint32);
+		break;
+	case EXI_UNSIGNED_INTEGER_64:
+		errn = encodeInteger64(stream, (int64_t)(iv->val.uint64));
+		break;
+		/* (Signed) Integer */
+	case EXI_INTEGER_8:
+		errn = encodeInteger32(stream, iv->val.int8);
+		break;
+	case EXI_INTEGER_16:
+		errn = encodeInteger32(stream, iv->val.int16);
+		break;
+	case EXI_INTEGER_32:
+		errn = encodeInteger32(stream, iv->val.int32);
+		break;
+	case EXI_INTEGER_64:
+		errn = encodeInteger64(stream, iv->val.int64);
+		break;
+	default:
+		errn = EXI_UNSUPPORTED_INTEGER_VALUE_TYPE;
+		break;
+	}
+
+	return errn;
+}
+
+
+/**
+ * Encode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int encodeInteger16(bitstream_t* stream, int16_t n) {
+	int errn;
+	/* signalize sign */
+	if (n < 0) {
+		errn = encodeBoolean(stream, 1);
+		/* For negative values, the Unsigned Integer holds the
+		 * magnitude of the value minus 1 */
+		n = (int16_t)((-n) - 1);
+	} else {
+		errn = encodeBoolean(stream, 0);
+	}
+	if (errn == 0) {
+		errn = encodeUnsignedInteger16(stream, (uint16_t)n);
+	}
+	return errn;
+}
+
+
+
+/**
+ * Encode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int encodeInteger32(bitstream_t* stream, int32_t n) {
+	int errn;
+	/* signalize sign */
+	if (n < 0) {
+		errn = encodeBoolean(stream, 1);
+		/* For negative values, the Unsigned Integer holds the
+		 * magnitude of the value minus 1 */
+		n = (-n) - 1;
+	} else {
+		errn = encodeBoolean(stream, 0);
+	}
+	if (errn == 0) {
+		errn = encodeUnsignedInteger32(stream, (uint32_t)n);
+	}
+	return errn;
+}
+
+/**
+ * Encode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int encodeInteger64(bitstream_t* stream, int64_t n) {
+	int errn;
+	/* signalize sign */
+	if (n < 0) {
+		errn = encodeBoolean(stream, 1);
+		/* For negative values, the Unsigned Integer holds the
+		 * magnitude of the value minus 1 */
+		n = (-n) - 1;
+	} else {
+		errn = encodeBoolean(stream, 0);
+	}
+	if (errn == 0) {
+		errn = encodeUnsignedInteger64(stream, (uint64_t)n);
+	}
+	return errn;
+}
+
+
+/**
+ * Encode an arbitrary precision integer using a sign bit followed by a
+ * sequence of octets. The most significant bit of the last octet is set to
+ * zero to indicate sequence termination. Only seven bits per octet are used
+ * to store the integer's value.
+ */
+int encodeIntegerBig(bitstream_t* stream, int negative, size_t size, uint8_t* data, size_t len) {
+	int errn;
+	/* signalize sign */
+	if (negative) {
+		errn = encodeBoolean(stream, 1);
+		/* For negative values, the Unsigned Integer holds the
+		 * magnitude of the value minus 1 */
+		/* n = (-n) - 1; */
+	} else {
+		errn = encodeBoolean(stream, 0);
+	}
+	if (errn == 0) {
+		errn = encodeUnsignedIntegerBig(stream, size, data, len);
+	}
+	return errn;
+}
+
+/**
+ * The Float datatype representation is two consecutive Integers.
+ * The first Integer represents the mantissa of the floating point
+ * number and the second Integer represents the base-10 exponent
+ * of the floating point number.
+ */
+int encodeFloat(bitstream_t* stream, exi_float_me_t* f) {
+	int errn = encodeInteger64(stream, f->mantissa);
+	if (errn == 0) {
+		errn = encodeInteger32(stream, f->exponent);
+	}
+	return errn;
+}
+
+/**
+ * Encode a decimal represented as a Boolean sign followed by two Unsigned
+ * Integers. A sign value of zero (0) is used to represent positive Decimal
+ * values and a sign value of one (1) is used to represent negative Decimal
+ * values The first Integer represents the integral portion of the Decimal
+ * value. The second positive integer represents the fractional portion of
+ * the decimal with the digits in reverse order to preserve leading zeros.
+ */
+int encodeDecimal(bitstream_t* stream, exi_decimal_t* d) {
+	/* sign, integral, reverse fractional */
+	int errn = encodeBoolean(stream, d->negative);
+	if (errn == 0) {
+		errn = encodeUnsignedInteger(stream, &d->integral);
+		if (errn == 0) {
+			errn = encodeUnsignedInteger(stream, &d->reverseFraction);
+		}
+	}
+	return errn;
+}
+
+/**
+ * Encode a length prefixed sequence of characters.
+ */
+int encodeString(bitstream_t* stream, exi_string_t* string) {
+	int errn = encodeUnsignedInteger32(stream, string->len);
+	if (errn == 0) {
+		errn = encodeCharacters(stream, string->characters, string->len);
+	}
+	return errn;
+}
+
+/**
+ * Encode a sequence of characters according to a given length.
+ * Each character is represented by its UCS [ISO/IEC 10646]
+ * code point encoded as an Unsigned Integer
+ */
+int encodeCharacters(bitstream_t* stream, exi_string_character_t* chars, size_t len) {
+	unsigned int i;
+	int errn = 0;
+	for (i = 0; i < len && errn == 0; i++) {
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+		errn = encode(stream, (uint8_t)chars[i]);
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+		errn = encodeUnsignedInteger32(stream, chars[i]);
+#endif /* STRING_REPRESENTATION_UCS */
+	}
+	return errn;
+}
+
+
+int encodeRCSCharacters(bitstream_t* stream, exi_string_character_t* chars, size_t len, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[]) {
+	unsigned int i;
+	unsigned int k;
+	int errn = 0;
+	size_t rcsCode = SIZE_MAX;
+
+	for (i = 0; i < len && errn == 0; i++) {
+		/* try to find short code */
+		rcsCode = SIZE_MAX;
+		for(k=0; k<rcsSize && rcsCode == SIZE_MAX; k++) {
+			if(rcsSet[k] == chars[i]) {
+				rcsCode = k;
+			}
+		}
+
+		if( rcsCode == SIZE_MAX) {
+			/* RCS mis-match */
+			errn = encodeNBitUnsignedInteger(stream, rcsCodeLength, rcsSize);
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_ASCII
+			errn = encode(stream, (uint8_t)chars[i]);
+#endif /* STRING_REPRESENTATION_ASCII */
+#if STRING_REPRESENTATION == STRING_REPRESENTATION_UCS
+			errn = encodeUnsignedInteger32(stream, chars[i]);
+#endif /* STRING_REPRESENTATION_UCS */
+
+		} else {
+			/* RCS match */
+			errn = encodeNBitUnsignedInteger(stream, rcsCodeLength, (uint32_t)rcsCode);
+		}
+	}
+	return errn;
+}
+
+/**
+ * Encode a binary value as a length-prefixed sequence of octets.
+ */
+int encodeBinary(bitstream_t* stream, exi_bytes_t* bytes) {
+	int errn = encodeUnsignedInteger32(stream, bytes->len);
+
+	if(errn == 0) {
+		errn = encodeBytes(stream, bytes->data, bytes->len);
+	}
+
+	return errn;
+}
+
+int encodeBytes(bitstream_t* stream, uint8_t* data, size_t len) {
+	unsigned int i;
+	int errn = 0;
+
+	for (i = 0; i < len && errn == 0; i++) {
+		errn = encode(stream, data[i]);
+	}
+	return errn;
+}
+
+/**
+ * Encode a datetime representation which is a sequence of values
+ * representing the individual components of the Date-Time
+ */
+int encodeDateTime(bitstream_t* stream, exi_datetime_t* datetime) {
+	int errn = 0;
+	switch (datetime->type) {
+	case EXI_DATETIME_GYEAR: /* Year, [Time-Zone] */
+		errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
+		break;
+	case EXI_DATETIME_GYEARMONTH: /* Year, MonthDay, [TimeZone] */
+	case EXI_DATETIME_DATE: /* Year, MonthDay, [TimeZone] */
+		errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
+		if (errn == 0) {
+			errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY,
+					datetime->monthDay);
+		}
+		break;
+	case EXI_DATETIME_DATETIME: /* Year, MonthDay, Time, [FractionalSecs], [TimeZone] */
+		errn = encodeInteger32(stream, datetime->year - DATETIME_YEAR_OFFSET);
+		if (errn == 0) {
+			errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY,
+					datetime->monthDay);
+			if (errn != 0) {
+				break;
+			}
+		}
+		/* no break */
+	case EXI_DATETIME_TIME: /* Time, [FractionalSecs], [TimeZone] */
+		errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIME,
+				datetime->time);
+		if (errn == 0) {
+			if (datetime->presenceFractionalSecs) {
+				errn = encodeBoolean(stream, 1);
+				if (errn == 0) {
+					errn = encodeUnsignedInteger32(stream, datetime->fractionalSecs);
+				}
+			} else {
+				errn = encodeBoolean(stream, 0);
+			}
+		}
+		break;
+	case EXI_DATETIME_GMONTH: /* MonthDay, [TimeZone] */
+	case EXI_DATETIME_GMONTHDAY: /* MonthDay, [TimeZone] */
+	case EXI_DATETIME_GDAY: /* MonthDay, [TimeZone] */
+		errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_MONTHDAY,
+				datetime->monthDay);
+		break;
+	default:
+		errn = EXI_UNSUPPORTED_DATETIME_TYPE;
+		break;
+	}
+	if (errn == 0) {
+		/* [TimeZone] */
+		if (datetime->presenceTimezone) {
+			errn = encodeBoolean(stream, 1);
+			if (errn == 0) {
+				errn = encodeNBitUnsignedInteger(stream, DATETIME_NUMBER_BITS_TIMEZONE,
+						datetime->timezone + DATETIME_TIMEZONE_OFFSET_IN_MINUTES);
+			}
+		} else {
+			errn = encodeBoolean(stream, 0);
+		}
+	}
+
+	return errn;
+}
+
+
+
+
+int encode(bitstream_t* stream, uint8_t b) {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+	return writeBits(stream, 8, b);
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	int errn = 0;
+#if EXI_STREAM == BYTE_ARRAY
+	if ( (*stream->pos) < stream->size ) {
+		stream->data[(*stream->pos)++] = b;
+	} else {
+		errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+	}
+#endif /* EXI_STREAM == BYTE_ARRAY */
+#if EXI_STREAM == FILE_STREAM
+	if ( putc(b, stream->file) == EOF ) {
+		errn = EXI_ERROR_OUTPUT_STREAM_EOF;
+	}
+#endif /* EXI_STREAM == FILE_STREAM */
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+}
+
+/**
+ * Encode a single boolean value. A false value is encoded as bit 0 and true
+ * value is encode as bit 1.
+ */
+int encodeBoolean(bitstream_t* stream, int b) {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+	uint8_t val = b ? 1 : 0;
+	return writeBits(stream, 1, val);
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	uint8_t val = b ? 1 : 0;
+	return encode(stream, val);
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+}
+
+
+/**
+ * Encode n-bit unsigned integer. The n least significant bits of parameter
+ * b starting with the most significant, i.e. from left to right.
+ */
+int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint32_t val)  {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+	int errn = 0;
+	if (nbits > 0) {
+		errn = writeBits(stream, nbits, val);
+	}
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	int errn = 0;
+	if (nbits > 0) {
+		if (nbits < 9) {
+			/* 1 byte */
+			errn = encode(stream, val & 0xff);
+		} else if (nbits < 17) {
+			/* 2 bytes */
+			errn = encode(stream, val & 0x00ff);
+			if(errn == 0) {
+				errn = encode(stream, (uint8_t)((val & 0xff00) >> 8));
+			}
+		} else if (nbits < 25) {
+			/* 3 bytes */
+			errn = encode(stream, val & 0x0000ff);
+			if(errn == 0) {
+				errn = encode(stream, (uint8_t)((val & 0x00ff00) >> 8));
+				if(errn == 0) {
+					errn = encode(stream, (uint8_t)((val & 0xff0000) >> 16));
+				}
+			}
+		} else if (nbits < 33) {
+			/* 4 bytes */
+			errn = encode(stream, val & 0x000000ff);
+			if(errn == 0) {
+				errn = encode(stream, (uint8_t)((val & 0x0000ff00) >> 8));
+				if(errn == 0) {
+					errn = encode(stream, (uint8_t)((val & 0x00ff0000) >> 16));
+					if(errn == 0) {
+						errn = encode(stream, (uint8_t)((val & 0xff000000) >> 24));
+					}
+				}
+			}
+		} else {
+			/* TODO Currently not more than 4 Bytes allowed for NBitUnsignedInteger */
+			errn = EXI_UNSUPPORTED_NBIT_INTEGER_LENGTH;
+		}
+	}
+	return errn;
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+}
+
+/**
+ * Flush underlying output stream.
+ */
+int encodeFinish(bitstream_t* stream) {
+#if EXI_OPTION_ALIGNMENT == BIT_PACKED
+#endif /* EXI_OPTION_ALIGNMENT == BIT_PACKED */
+	return flush(stream);
+#if EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT
+	/* no pending bits in byte-aligned mode */
+	return 0;
+#endif /* EXI_OPTION_ALIGNMENT == BYTE_ALIGNMENT */
+}
+
+
+
+#endif
+

+ 423 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/EncoderChannel.h

@@ -0,0 +1,423 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EncoderChannel.h
+ * \brief 	EXI Encoder Channel
+ *
+ */
+
+#ifndef ENCODER_CHANNEL_H
+#define ENCODER_CHANNEL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "EXITypes.h"
+
+
+/**
+ * \brief 		Encode byte value
+ *
+ * \param       stream   		Output Stream
+ * \param       b		   		byte
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encode(bitstream_t* stream, uint8_t b);
+
+
+/**
+ * \brief 		Encode a single boolean value
+ *
+ * 				A false value is encoded as 0 and true value is encode as 1.
+ *
+ * \param       stream   		Output Stream
+ * \param       b		   		boolean
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeBoolean(bitstream_t* stream, int b);
+
+
+/**
+ * \brief 		Encode n-bit unsigned integer
+ *
+ * 				The n least significant bits of parameter b starting with the
+ * 				most significant, i.e. from left to right.
+ *
+ * \param       stream   		Output Stream
+ * \param       nbits		   	number of bits
+ * \param       val		   		value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint32_t val);
+
+
+/**
+ * \brief 		Encode unsigned integer
+ *
+ * 				Encode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       iv		   		Unsigned integer value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeUnsignedInteger(bitstream_t* stream, exi_integer_t* iv);
+
+
+/**
+ * \brief 		Encode unsigned integer
+ *
+ * 				Encode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       n		   		Unsigned integer value 16 bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeUnsignedInteger16(bitstream_t* stream, uint16_t n);
+
+
+
+/**
+ * \brief 		Encode unsigned integer
+ *
+ * 				Encode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       n		   		Unsigned integer value 32 bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeUnsignedInteger32(bitstream_t* stream, uint32_t n);
+
+
+/**
+ * \brief 		Encode unsigned integer
+ *
+ * 				Encode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       n		   		Unsigned integer value 64 bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeUnsignedInteger64(bitstream_t* stream, uint64_t n);
+
+/**
+ * \brief 		Encode unsigned integer
+ *
+ * 				Encode an arbitrary precision non negative integer using
+ * 				a sequence of octets. The most significant bit of the last
+ * 				octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       size		   	size array
+ * \param       data		   	data array
+ * \param       len		   		length array
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeUnsignedIntegerBig(bitstream_t* stream, size_t size, uint8_t* data, size_t len);
+
+
+/**
+ * \brief 		Encode integer
+ *
+ * 				Encode an arbitrary precision integer using a sign boolean
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       iv		   		Integer value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeInteger(bitstream_t* stream, exi_integer_t* iv);
+
+
+/**
+ * \brief 		Encode integer
+ *
+ * 				Encode an arbitrary precision integer using a sign boolean
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       n		   		Integer value 16 bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeInteger16(bitstream_t* stream, int16_t n);
+
+/**
+ * \brief 		Encode integer
+ *
+ * 				Encode an arbitrary precision integer using a sign boolean
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       n		   		Integer value 32 bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeInteger32(bitstream_t* stream, int32_t n);
+
+
+/**
+ * \brief 		Encode integer
+ *
+ * 				Encode an arbitrary precision integer using a sign boolean
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       n		   		Integer value 64 bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeInteger64(bitstream_t* stream, int64_t n);
+
+/**
+ * \brief 		Encode integer
+ *
+ * 				Encode an arbitrary precision integer using a sign boolean
+ * 				followed by a sequence of octets. The most significant bit
+ * 				of the last octet is set to zero to indicate sequence termination.
+ * 				Only seven bits per octet are used to store the integer's value.
+ *
+ * \param       stream   		Output Stream
+ * \param       negative		negative integer
+ * \param       size		   	size array
+ * \param       data		   	data array
+ * \param       len		   		length array
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeIntegerBig(bitstream_t* stream, int negative, size_t size, uint8_t* data, size_t len);
+
+/**
+ * \brief 		Encode float
+ *
+ * 				Encode a Float datatype as two consecutive Integers. The first
+ * 				Integer represents the mantissa of the floating point number
+ * 				and the second Integer represents the base-10 exponent of the
+ * 				floating point number.
+ *
+ * \param       stream   		Output Stream
+ * \param       f		   		Float value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeFloat(bitstream_t* stream, exi_float_me_t* f);
+
+
+/**
+ * \brief 		Encode decimal
+ *
+ * 				Encode a decimal represented as a Boolean sign followed by two
+ * 				Unsigned Integers. A sign value of zero (0) is used to represent
+ * 				positive Decimal values and a sign value of one (1) is used to
+ * 				represent negative Decimal values The first Integer represents
+ * 				the integral portion of the Decimal value. The second positive
+ * 				integer represents the fractional portion of the decimal with
+ * 				the digits in reverse order to preserve leading zeros.
+ *
+ * \param       stream   		Output Stream
+ * \param       d		   		Decimal value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeDecimal(bitstream_t* stream, exi_decimal_t* d);
+
+
+/**
+ * \brief 		Encode string
+ *
+ * 				Encode a length prefixed sequence of characters.
+ *
+ * \param       stream   		Output Stream
+ * \param       string		   	String
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeString(bitstream_t* stream, exi_string_t* string);
+
+
+/**
+ * \brief 		Encode string value
+ *
+ * 				 Encode a length prefixed sequence of characters
+ * 				 in the sense of string tables
+ *
+ * \param       stream   		Output Stream
+ * \param       stringTable   	String Table
+ * \param       namespaceUriID  Qualified Namespace ID
+ * \param       localNameID  	Qualified LocalName ID
+ * \param       string		   	String value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeStringValue(bitstream_t* stream, exi_value_string_table_t* stringTable, size_t namespaceUriID, size_t localNameID,
+		exi_string_value_t* string);
+
+
+/**
+ * \brief 		Encode restricted character set value
+ *
+ * 				 Encode a length prefixed sequence of characters
+ * 				 in the sense of string tables
+ *
+ * \param       stream   		Output Stream
+ * \param       StringTable   	StringTable
+ * \param       namespaceUriID  Qualified Namespace ID
+ * \param       localNameID  	Qualified LocalName ID
+ * \param       rcs   			Restricted character set
+ * \param       string		   	String value
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeRCSStringValue(bitstream_t* stream, exi_value_string_table_t* stringTable,
+		size_t namespaceUriID, size_t localNameID, exi_rcs_t* rcs, exi_string_value_t* string);
+
+
+/**
+ * \brief 		Encode characters
+ *
+ * 				Encode a sequence of characters according to a given length.
+ * 				Each character is represented by its UCS [ISO/IEC 10646]
+ * 				code point encoded as an Unsigned Integer.
+ *
+ * \param       stream   		Output Stream
+ * \param       chars   		Characters
+ * \param       len				Numbr of characters
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeCharacters(bitstream_t* stream, exi_string_character_t* chars, size_t len);
+
+
+/**
+ * \brief 		Encode characters
+ *
+ * 				Encode a sequence of characters according to a given length.
+ * 				Each character is represented by its UCS [ISO/IEC 10646]
+ * 				code point encoded as an Unsigned Integer.
+ *
+ * \param       stream   		Output Stream
+ * \param       chars   		Characters
+ * \param       len				Numbr of characters
+ *  \param       rcsCodeLength   RCS code-length
+ * \param       rcsCodeLength   RCS size
+ * \param       rcsCodeLength   RCS set
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeRCSCharacters(bitstream_t* stream, exi_string_character_t* chars, size_t len, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[]);
+
+
+
+/**
+ * \brief 		Encode binary
+ *
+ * 				Encode a binary value as a length-prefixed sequence of octets.
+ *
+ * \param       stream   		Output Stream
+ * \param       bytes   		Byte values
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeBinary(bitstream_t* stream, exi_bytes_t* bytes);
+
+
+/**
+ * \brief 		Encode binary data
+ *
+ * 				Encode a sequence of octets.
+ *
+ * \param       stream   		Output Stream
+ * \param       data	   		Byte values
+ * \param       len		   		Length
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeBytes(bitstream_t* stream, uint8_t* data, size_t len);
+
+/**
+ * \brief 		Encode datetime
+ *
+ * 				Encode a datetime representation which is a sequence of values
+ * 				representing the individual components of the Date-Time.
+ *
+ * \param       stream   		Output Stream
+ * \param       datetime   		Datetime values
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeDateTime(bitstream_t* stream, exi_datetime_t* datetime);
+
+
+/**
+ * \brief 		Flush underlying bit output stream
+ *
+ * \param       stream   		Output Stream
+ * \return                  	Error-Code <> 0
+ *
+ */
+int encodeFinish(bitstream_t* stream);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 120 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/ErrorCodes.h

@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	ErrorCodes.h
+ * \brief 	Error Codes descriptions
+ *
+ */
+
+#ifndef EXI_ERROR_CODES_H
+#define EXI_ERROR_CODES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define EXI_ERROR_INPUT_STREAM_EOF -10
+#define EXI_ERROR_OUTPUT_STREAM_EOF -11
+#define EXI_ERROR_INPUT_FILE_HANDLE -12
+#define EXI_ERROR_OUTPUT_FILE -13
+
+#define EXI_ERROR_OUT_OF_BOUNDS -100
+#define EXI_ERROR_OUT_OF_STRING_BUFFER -101
+/*#define EXI_ERROR_OUT_OF_ASCII_BUFFER -102 */
+#define EXI_ERROR_OUT_OF_BYTE_BUFFER -103
+#define EXI_ERROR_OUT_OF_GRAMMAR_STACK -104
+#define EXI_ERROR_OUT_OF_RUNTIME_GRAMMAR_STACK -105
+#define EXI_ERROR_OUT_OF_QNAMES -106
+
+#define EXI_ERROR_UNKOWN_GRAMMAR_ID -108
+#define EXI_ERROR_UNKOWN_EVENT -109
+#define EXI_ERROR_UNKOWN_EVENT_CODE -110
+#define EXI_ERROR_UNEXPECTED_EVENT_LEVEL1 -111
+#define EXI_ERROR_UNEXPECTED_EVENT_LEVEL2 -112
+
+#define EXI_ERROR_UNEXPECTED_START_DOCUMENT -113
+#define EXI_ERROR_UNEXPECTED_END_DOCUMENT -114
+#define EXI_ERROR_UNEXPECTED_START_ELEMENT -115
+#define EXI_ERROR_UNEXPECTED_START_ELEMENT_NS -116
+#define EXI_ERROR_UNEXPECTED_START_ELEMENT_GENERIC -117
+#define EXI_ERROR_UNEXPECTED_START_ELEMENT_GENERIC_UNDECLARED -118
+#define EXI_ERROR_UNEXPECTED_END_ELEMENT -119
+#define EXI_ERROR_UNEXPECTED_CHARACTERS -120
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE -121
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_NS -122
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_GENERIC -123
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_GENERIC_UNDECLARED -124
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_TYPE -125
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_XSI_NIL -126
+#define EXI_ERROR_UNEXPECTED_GRAMMAR_ID -127
+#define EXI_ERROR_UNEXPECTED_ATTRIBUTE_MOVE_TO_CONTENT_RULE -128
+
+#define EXI_UNSUPPORTED_NBIT_INTEGER_LENGTH -132
+#define EXI_UNSUPPORTED_EVENT_CODE_CHARACTERISTICS -133
+#define EXI_UNSUPPORTED_INTEGER_VALUE -134
+#define EXI_NEGATIVE_UNSIGNED_INTEGER_VALUE -135
+#define EXI_UNSUPPORTED_LIST_VALUE_TYPE -136
+#define EXI_UNSUPPORTED_HEADER_COOKIE -137
+#define EXI_UNSUPPORTED_HEADER_OPTIONS -138
+
+#define EXI_UNSUPPORTED_GLOBAL_ATTRIBUTE_VALUE_TYPE -139
+#define EXI_UNSUPPORTED_DATATYPE -140
+#define EXI_UNSUPPORTED_STRING_VALUE_TYPE -141
+#define EXI_UNSUPPORTED_INTEGER_VALUE_TYPE -142
+#define EXI_UNSUPPORTED_DATETIME_TYPE -143
+#define EXI_UNSUPPORTED_FRAGMENT_ELEMENT -144
+
+#define EXI_UNSUPPORTED_GRAMMAR_LEARNING_CH -150
+
+/* string values */
+#define EXI_ERROR_STRINGVALUES_NOT_SUPPORTED -160
+#define EXI_ERROR_STRINGVALUES_OUT_OF_ENTRIES -161
+#define EXI_ERROR_STRINGVALUES_OUT_OF_MEMORY -162
+#define EXI_ERROR_STRINGVALUES_OUT_OF_BOUND -163
+#define EXI_ERROR_STRINGVALUES_CHARACTER -164
+
+#define EXI_ERROR_UNEXPECTED_BYTE_VALUE -200
+
+
+#define EXI_ERROR_CONVERSION_NO_ASCII_CHARACTERS -300
+#define EXI_ERROR_CONVERSION_TYPE_TO_STRING -301
+
+
+#define EXI_DEVIANT_SUPPORT_NOT_DEPLOYED -500
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* EXI_ERROR_CODES_H */
+

+ 117 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/MethodsBag.c

@@ -0,0 +1,117 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#ifndef METHODS_BAG_C
+#define METHODS_BAG_C
+
+#include "MethodsBag.h"
+#include "ErrorCodes.h"
+
+static const uint16_t smallLengths[] = { 0, 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4,
+		4, 4, 4 };
+
+int exiGetCodingLength(size_t characteristics, size_t* codingLength) {
+	/* Note: we could use range expressions in switch statements but those are non-standard */
+	/* e.g., case 1 ... 5: */
+	int errn = 0;
+	if (characteristics < 17) {
+		*codingLength = smallLengths[characteristics];
+	} else if (characteristics < 33) {
+		/* 17 .. 32 */
+		*codingLength = 5;
+	} else if (characteristics < 65) {
+		/* 33 .. 64 */
+		*codingLength = 6;
+	} else if (characteristics < 129) {
+		/* 65 .. 128 */
+		*codingLength = 7;
+	} else if (characteristics < 257) {
+		/* 129 .. 256 */
+		*codingLength = 8;
+	} else if (characteristics < 513) {
+		/* 257 .. 512 */
+		*codingLength = 9;
+	} else if (characteristics < 1025) {
+		/* 513 .. 1024 */
+		*codingLength = 10;
+	} else if (characteristics < 2049) {
+		/* 1025 .. 2048 */
+		*codingLength = 11;
+	} else if (characteristics < 4097) {
+		/* 2049 .. 4096 */
+		*codingLength = 12;
+	} else if (characteristics < 8193) {
+		/* 4097 .. 8192 */
+		*codingLength = 13;
+	} else if (characteristics < 16385) {
+		/* 8193 .. 16384 */
+		*codingLength = 14;
+	} else if (characteristics < 32769) {
+		/* 16385 .. 32768 */
+		*codingLength = 15;
+	} else {
+		/* 32769 .. 65536 */
+		*codingLength = 16;
+	}
+	return errn;
+}
+
+
+uint8_t numberOf7BitBlocksToRepresent(uint32_t n) {
+	/* assert (n >= 0); */
+
+	/* 7 bits */
+	if (n < 128) {
+		return 1;
+	}
+	/* 14 bits */
+	else if (n < 16384) {
+		return 2;
+	}
+	/* 21 bits */
+	else if (n < 2097152) {
+		return 3;
+	}
+	/* 28 bits */
+	else if (n < 268435456) {
+		return 4;
+	}
+	/* 35 bits */
+	else {
+		/* int, 32 bits */
+		return 5;
+	}
+}
+
+
+
+#endif
+

+ 70 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/codec/MethodsBag.h

@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 2017-03-02 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+* \file 	MethodsBag.h
+* \brief 	Method bag for bit and octet functions
+*
+*/
+
+#ifndef METHODS_BAG_H
+#define METHODS_BAG_H
+
+
+
+#include <stdint.h>
+#include <stddef.h>
+
+/**
+ * \brief  	Returns the number of bits to identify the characteristics.
+ *
+ * \param       characteristics	number of characteristics
+ * \param       codingLength   	number of bits
+ * \return                  	Error-Code <> 0
+ *
+ */
+int exiGetCodingLength(size_t characteristics, size_t* codingLength);
+
+
+/**
+ * \brief  	Returns the least number of 7 bit-blocks that is needed to represent the passed integer value
+ *
+ *			Note: Returns 1 if passed parameter is 0.
+ *
+ * \param       n				integer value
+ * \return                  	Error-Code <> 0
+ *
+ */
+uint8_t numberOf7BitBlocksToRepresent(uint32_t n);
+
+
+#endif
+

+ 969 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypes.c

@@ -0,0 +1,969 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include <stdint.h>
+
+#include "dinEXIDatatypes.h"
+#include "../codec/EXITypes.h"
+
+
+#ifndef EXI_din_DATATYPES_C
+#define EXI_din_DATATYPES_C
+
+#if DEPLOY_DIN_CODEC == SUPPORT_YES
+
+
+void init_dinEXIDocument(struct dinEXIDocument* exiDoc) {
+	exiDoc->BodyElement_isUsed = 0u;
+	exiDoc->V2G_Message_isUsed = 0u;
+	exiDoc->SignatureProperty_isUsed = 0u;
+	exiDoc->DSAKeyValue_isUsed = 0u;
+	exiDoc->SignatureProperties_isUsed = 0u;
+	exiDoc->KeyValue_isUsed = 0u;
+	exiDoc->Transforms_isUsed = 0u;
+	exiDoc->DigestMethod_isUsed = 0u;
+	exiDoc->Signature_isUsed = 0u;
+	exiDoc->RetrievalMethod_isUsed = 0u;
+	exiDoc->Manifest_isUsed = 0u;
+	exiDoc->Reference_isUsed = 0u;
+	exiDoc->CanonicalizationMethod_isUsed = 0u;
+	exiDoc->RSAKeyValue_isUsed = 0u;
+	exiDoc->Transform_isUsed = 0u;
+	exiDoc->PGPData_isUsed = 0u;
+	exiDoc->MgmtData_isUsed = 0u;
+	exiDoc->SignatureMethod_isUsed = 0u;
+	exiDoc->KeyInfo_isUsed = 0u;
+	exiDoc->SPKIData_isUsed = 0u;
+	exiDoc->X509Data_isUsed = 0u;
+	exiDoc->SignatureValue_isUsed = 0u;
+	exiDoc->KeyName_isUsed = 0u;
+	exiDoc->DigestValue_isUsed = 0u;
+	exiDoc->SignedInfo_isUsed = 0u;
+	exiDoc->Object_isUsed = 0u;
+	exiDoc->DC_EVSEStatus_isUsed = 0u;
+	exiDoc->RelativeTimeInterval_isUsed = 0u;
+	exiDoc->SalesTariffEntry_isUsed = 0u;
+	exiDoc->DC_EVPowerDeliveryParameter_isUsed = 0u;
+	exiDoc->SASchedules_isUsed = 0u;
+	exiDoc->AC_EVChargeParameter_isUsed = 0u;
+	exiDoc->SAScheduleList_isUsed = 0u;
+	exiDoc->DC_EVStatus_isUsed = 0u;
+	exiDoc->ServiceCharge_isUsed = 0u;
+	exiDoc->EVStatus_isUsed = 0u;
+	exiDoc->DC_EVChargeParameter_isUsed = 0u;
+	exiDoc->DC_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->EVSEStatus_isUsed = 0u;
+	exiDoc->TimeInterval_isUsed = 0u;
+	exiDoc->EVPowerDeliveryParameter_isUsed = 0u;
+	exiDoc->EVSEChargeParameter_isUsed = 0u;
+	exiDoc->AC_EVSEStatus_isUsed = 0u;
+	exiDoc->Entry_isUsed = 0u;
+	exiDoc->AC_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->PMaxScheduleEntry_isUsed = 0u;
+	exiDoc->EVChargeParameter_isUsed = 0u;
+	exiDoc->ServiceDiscoveryReq_isUsed = 0u;
+	exiDoc->ServiceDiscoveryRes_isUsed = 0u;
+	exiDoc->MeteringReceiptReq_isUsed = 0u;
+	exiDoc->PaymentDetailsReq_isUsed = 0u;
+	exiDoc->MeteringReceiptRes_isUsed = 0u;
+	exiDoc->PaymentDetailsRes_isUsed = 0u;
+	exiDoc->SessionSetupReq_isUsed = 0u;
+	exiDoc->SessionSetupRes_isUsed = 0u;
+	exiDoc->CableCheckReq_isUsed = 0u;
+	exiDoc->CableCheckRes_isUsed = 0u;
+	exiDoc->ContractAuthenticationReq_isUsed = 0u;
+	exiDoc->CertificateInstallationReq_isUsed = 0u;
+	exiDoc->ContractAuthenticationRes_isUsed = 0u;
+	exiDoc->CertificateInstallationRes_isUsed = 0u;
+	exiDoc->WeldingDetectionReq_isUsed = 0u;
+	exiDoc->WeldingDetectionRes_isUsed = 0u;
+	exiDoc->CertificateUpdateReq_isUsed = 0u;
+	exiDoc->CertificateUpdateRes_isUsed = 0u;
+	exiDoc->PowerDeliveryReq_isUsed = 0u;
+	exiDoc->PowerDeliveryRes_isUsed = 0u;
+	exiDoc->ChargingStatusReq_isUsed = 0u;
+	exiDoc->ChargingStatusRes_isUsed = 0u;
+	exiDoc->CurrentDemandReq_isUsed = 0u;
+	exiDoc->PreChargeReq_isUsed = 0u;
+	exiDoc->CurrentDemandRes_isUsed = 0u;
+	exiDoc->PreChargeRes_isUsed = 0u;
+	exiDoc->ServicePaymentSelectionReq_isUsed = 0u;
+	exiDoc->SessionStopReq_isUsed = 0u;
+	exiDoc->ServicePaymentSelectionRes_isUsed = 0u;
+	exiDoc->SessionStopRes_isUsed = 0u;
+	exiDoc->ChargeParameterDiscoveryReq_isUsed = 0u;
+	exiDoc->ChargeParameterDiscoveryRes_isUsed = 0u;
+	exiDoc->ServiceDetailReq_isUsed = 0u;
+	exiDoc->ServiceDetailRes_isUsed = 0u;
+}
+
+
+#if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES
+void init_dinEXIFragment(struct dinEXIFragment* exiFrag) {
+	exiFrag->Unit_isUsed = 0u;
+	exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->EVPowerDeliveryParameter_isUsed = 0u;
+	exiFrag->ChargingProfileEntryMaxPower_isUsed = 0u;
+	exiFrag->TMeter_isUsed = 0u;
+	exiFrag->EVSEPowerLimitAchieved_isUsed = 0u;
+	exiFrag->duration_isUsed = 0u;
+	exiFrag->EVMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->Parameter_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->AC_EVChargeParameter_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->PMaxScheduleEntry_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->SelectedService_isUsed = 0u;
+	exiFrag->Certificate_isUsed = 0u;
+	exiFrag->Certificate_isUsed = 0u;
+	exiFrag->EVSEMaximumPowerLimit_isUsed = 0u;
+	exiFrag->EVReady_isUsed = 0u;
+	exiFrag->X509SerialNumber_isUsed = 0u;
+	exiFrag->RetrievalMethod_isUsed = 0u;
+	exiFrag->RetryCounter_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->MeteringReceiptReq_isUsed = 0u;
+	exiFrag->ReadyToChargeState_isUsed = 0u;
+	exiFrag->Multiplier_isUsed = 0u;
+	exiFrag->EPriceLevel_isUsed = 0u;
+	exiFrag->stringValue_isUsed = 0u;
+	exiFrag->ServiceDiscoveryReq_isUsed = 0u;
+	exiFrag->Transforms_isUsed = 0u;
+	exiFrag->MeteringReceiptRes_isUsed = 0u;
+	exiFrag->PreChargeReq_isUsed = 0u;
+	exiFrag->OEMProvisioningCert_isUsed = 0u;
+	exiFrag->ServiceDiscoveryRes_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ContractAuthenticationReq_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractAuthenticationRes_isUsed = 0u;
+	exiFrag->HMACOutputLength_isUsed = 0u;
+	exiFrag->BulkChargingComplete_isUsed = 0u;
+	exiFrag->Exponent_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->SAScheduleTuple_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DepartureTime_isUsed = 0u;
+	exiFrag->X509IssuerSerial_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SPKIData_isUsed = 0u;
+	exiFrag->RelativeTimeInterval_isUsed = 0u;
+	exiFrag->EVEnergyRequest_isUsed = 0u;
+	exiFrag->PreChargeRes_isUsed = 0u;
+	exiFrag->SessionID_isUsed = 0u;
+	exiFrag->PMaxSchedule_isUsed = 0u;
+	exiFrag->ServiceCharge_isUsed = 0u;
+	exiFrag->PgenCounter_isUsed = 0u;
+	exiFrag->ChargingStatusReq_isUsed = 0u;
+	exiFrag->X509Data_isUsed = 0u;
+	exiFrag->SalesTariffEntry_isUsed = 0u;
+	exiFrag->KeyValue_isUsed = 0u;
+	exiFrag->ChargingStatusRes_isUsed = 0u;
+	exiFrag->V2G_Message_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->ServicePaymentSelectionReq_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->EVSEIsolationStatus_isUsed = 0u;
+	exiFrag->ServicePaymentSelectionRes_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->BodyElement_isUsed = 0u;
+	exiFrag->EVCCID_isUsed = 0u;
+	exiFrag->PGPData_isUsed = 0u;
+	exiFrag->RootCertificateID_isUsed = 0u;
+	exiFrag->FaultCode_isUsed = 0u;
+	exiFrag->CableCheckReq_isUsed = 0u;
+	exiFrag->EVSEVoltageLimitAchieved_isUsed = 0u;
+	exiFrag->EVRESSConditioning_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->CableCheckRes_isUsed = 0u;
+	exiFrag->ChargingProfileEntryStart_isUsed = 0u;
+	exiFrag->SignatureProperty_isUsed = 0u;
+	exiFrag->EVMaxCurrent_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->Seed_isUsed = 0u;
+	exiFrag->RSAKeyValue_isUsed = 0u;
+	exiFrag->costKind_isUsed = 0u;
+	exiFrag->EAmount_isUsed = 0u;
+	exiFrag->EVSEPresentCurrent_isUsed = 0u;
+	exiFrag->PowerDeliveryRes_isUsed = 0u;
+	exiFrag->NumEPriceLevels_isUsed = 0u;
+	exiFrag->SessionStopRes_isUsed = 0u;
+	exiFrag->PowerDeliveryReq_isUsed = 0u;
+	exiFrag->SessionStopReq_isUsed = 0u;
+	exiFrag->XPath_isUsed = 0u;
+	exiFrag->BulkSOC_isUsed = 0u;
+	exiFrag->PMax_isUsed = 0u;
+	exiFrag->ParameterSetID_isUsed = 0u;
+	exiFrag->ParameterSetID_isUsed = 0u;
+	exiFrag->ContractID_isUsed = 0u;
+	exiFrag->ContractID_isUsed = 0u;
+	exiFrag->ContractID_isUsed = 0u;
+	exiFrag->ContractID_isUsed = 0u;
+	exiFrag->Signature_isUsed = 0u;
+	exiFrag->EVMaxVoltage_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ChargingComplete_isUsed = 0u;
+	exiFrag->ChargingProfile_isUsed = 0u;
+	exiFrag->PaymentOptions_isUsed = 0u;
+	exiFrag->SessionSetupRes_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->ServiceDetailRes_isUsed = 0u;
+	exiFrag->DC_EVPowerDeliveryParameter_isUsed = 0u;
+	exiFrag->PaymentDetailsRes_isUsed = 0u;
+	exiFrag->PaymentDetailsReq_isUsed = 0u;
+	exiFrag->MgmtData_isUsed = 0u;
+	exiFrag->Value_isUsed = 0u;
+	exiFrag->EVSENotification_isUsed = 0u;
+	exiFrag->EVSENotification_isUsed = 0u;
+	exiFrag->EVSEMaximumPowerLimit_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->RemainingTimeToBulkSoC_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->SessionSetupReq_isUsed = 0u;
+	exiFrag->EVSECurrentLimitAchieved_isUsed = 0u;
+	exiFrag->ServiceDetailReq_isUsed = 0u;
+	exiFrag->byteValue_isUsed = 0u;
+	exiFrag->EVMaximumPowerLimit_isUsed = 0u;
+	exiFrag->PowerSwitchClosed_isUsed = 0u;
+	exiFrag->Manifest_isUsed = 0u;
+	exiFrag->P_isUsed = 0u;
+	exiFrag->SAScheduleList_isUsed = 0u;
+	exiFrag->Q_isUsed = 0u;
+	exiFrag->X509SubjectName_isUsed = 0u;
+	exiFrag->G_isUsed = 0u;
+	exiFrag->SessionID_isUsed = 0u;
+	exiFrag->J_isUsed = 0u;
+	exiFrag->CertificateInstallationRes_isUsed = 0u;
+	exiFrag->CertificateInstallationReq_isUsed = 0u;
+	exiFrag->SalesTariff_isUsed = 0u;
+	exiFrag->Header_isUsed = 0u;
+	exiFrag->EVSEMinimumCurrentLimit_isUsed = 0u;
+	exiFrag->X509CRL_isUsed = 0u;
+	exiFrag->EVMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->Y_isUsed = 0u;
+	exiFrag->DigestValue_isUsed = 0u;
+	exiFrag->DC_EVChargeParameter_isUsed = 0u;
+	exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u;
+	exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u;
+	exiFrag->DigestMethod_isUsed = 0u;
+	exiFrag->SPKISexp_isUsed = 0u;
+	exiFrag->ChargeService_isUsed = 0u;
+	exiFrag->EVSEEnergyToBeDelivered_isUsed = 0u;
+	exiFrag->SignatureProperties_isUsed = 0u;
+	exiFrag->EVSEMaxCurrent_isUsed = 0u;
+	exiFrag->EVMaximumPowerLimit_isUsed = 0u;
+	exiFrag->EVSEStatus_isUsed = 0u;
+	exiFrag->Service_isUsed = 0u;
+	exiFrag->DHParams_isUsed = 0u;
+	exiFrag->DHParams_isUsed = 0u;
+	exiFrag->DHParams_isUsed = 0u;
+	exiFrag->DHParams_isUsed = 0u;
+	exiFrag->PGPKeyID_isUsed = 0u;
+	exiFrag->DSAKeyValue_isUsed = 0u;
+	exiFrag->EnergyTransferType_isUsed = 0u;
+	exiFrag->WeldingDetectionRes_isUsed = 0u;
+	exiFrag->FreeService_isUsed = 0u;
+	exiFrag->SelectedServiceList_isUsed = 0u;
+	exiFrag->WeldingDetectionReq_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->CanonicalizationMethod_isUsed = 0u;
+	exiFrag->X509Certificate_isUsed = 0u;
+	exiFrag->CertificateUpdateRes_isUsed = 0u;
+	exiFrag->CertificateUpdateReq_isUsed = 0u;
+	exiFrag->EVSEMaxVoltage_isUsed = 0u;
+	exiFrag->SignedInfo_isUsed = 0u;
+	exiFrag->AC_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->EVEnergyCapacity_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->EVSECurrentRegulationTolerance_isUsed = 0u;
+	exiFrag->ServiceParameterList_isUsed = 0u;
+	exiFrag->ListOfRootCertificateIDs_isUsed = 0u;
+	exiFrag->ListOfRootCertificateIDs_isUsed = 0u;
+	exiFrag->ProfileEntry_isUsed = 0u;
+	exiFrag->EVSEMinimumVoltageLimit_isUsed = 0u;
+	exiFrag->CurrentDemandRes_isUsed = 0u;
+	exiFrag->EVRESSSOC_isUsed = 0u;
+	exiFrag->MeterReading_isUsed = 0u;
+	exiFrag->CurrentDemandReq_isUsed = 0u;
+	exiFrag->physicalValue_isUsed = 0u;
+	exiFrag->ChargingComplete_isUsed = 0u;
+	exiFrag->TimeInterval_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->EVMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->SignatureValue_isUsed = 0u;
+	exiFrag->DateTimeNow_isUsed = 0u;
+	exiFrag->DateTimeNow_isUsed = 0u;
+	exiFrag->ServiceTag_isUsed = 0u;
+	exiFrag->intValue_isUsed = 0u;
+	exiFrag->SelectedPaymentOption_isUsed = 0u;
+	exiFrag->ServiceName_isUsed = 0u;
+	exiFrag->EVCabinConditioning_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->ServiceScope_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->MeterStatus_isUsed = 0u;
+	exiFrag->EVRequestedEnergyTransferType_isUsed = 0u;
+	exiFrag->ServiceCategory_isUsed = 0u;
+	exiFrag->GenChallenge_isUsed = 0u;
+	exiFrag->GenChallenge_isUsed = 0u;
+	exiFrag->SalesTariffDescription_isUsed = 0u;
+	exiFrag->NotificationMaxDelay_isUsed = 0u;
+	exiFrag->NotificationMaxDelay_isUsed = 0u;
+	exiFrag->boolValue_isUsed = 0u;
+	exiFrag->EVSEStatusCode_isUsed = 0u;
+	exiFrag->ServiceScope_isUsed = 0u;
+	exiFrag->FaultMsg_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->BulkChargingComplete_isUsed = 0u;
+	exiFrag->KeyName_isUsed = 0u;
+	exiFrag->ParameterSet_isUsed = 0u;
+	exiFrag->SigMeterReading_isUsed = 0u;
+	exiFrag->EVSEChargeParameter_isUsed = 0u;
+	exiFrag->Body_isUsed = 0u;
+	exiFrag->SASchedules_isUsed = 0u;
+	exiFrag->ServiceCategory_isUsed = 0u;
+	exiFrag->KeyInfo_isUsed = 0u;
+	exiFrag->PMaxScheduleID_isUsed = 0u;
+	exiFrag->RemainingTimeToFullSoC_isUsed = 0u;
+	exiFrag->EVStatus_isUsed = 0u;
+	exiFrag->SubCertificates_isUsed = 0u;
+	exiFrag->PaymentOption_isUsed = 0u;
+	exiFrag->X509SKI_isUsed = 0u;
+	exiFrag->EVMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->ServiceList_isUsed = 0u;
+	exiFrag->Cost_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->SignatureMethod_isUsed = 0u;
+	exiFrag->EVSEMinCurrent_isUsed = 0u;
+	exiFrag->ConsumptionCost_isUsed = 0u;
+	exiFrag->EVSEPeakCurrentRipple_isUsed = 0u;
+	exiFrag->EVErrorCode_isUsed = 0u;
+	exiFrag->EVChargeParameter_isUsed = 0u;
+	exiFrag->start_isUsed = 0u;
+	exiFrag->X509IssuerName_isUsed = 0u;
+	exiFrag->Reference_isUsed = 0u;
+	exiFrag->EVMinCurrent_isUsed = 0u;
+	exiFrag->FullSOC_isUsed = 0u;
+	exiFrag->amount_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->shortValue_isUsed = 0u;
+	exiFrag->DC_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->Entry_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->SalesTariffID_isUsed = 0u;
+	exiFrag->MeterID_isUsed = 0u;
+	exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->ChargeParameterDiscoveryReq_isUsed = 0u;
+	exiFrag->amountMultiplier_isUsed = 0u;
+	exiFrag->ChargeParameterDiscoveryRes_isUsed = 0u;
+	exiFrag->Transform_isUsed = 0u;
+	exiFrag->Object_isUsed = 0u;
+	exiFrag->RCD_isUsed = 0u;
+	exiFrag->Notification_isUsed = 0u;
+	exiFrag->startValue_isUsed = 0u;
+	exiFrag->Modulus_isUsed = 0u;
+	exiFrag->EVSEMaxCurrent_isUsed = 0u;
+}
+#endif /* DEPLOY_DIN_CODEC_FRAGMENT */
+
+void init_dinMeteringReceiptReqType(struct dinMeteringReceiptReqType* dinMeteringReceiptReqType) {
+	dinMeteringReceiptReqType->Id_isUsed = 0u;
+	dinMeteringReceiptReqType->SAScheduleTupleID_isUsed = 0u;
+}
+
+void init_dinBodyType(struct dinBodyType* dinBodyType) {
+	dinBodyType->BodyElement_isUsed = 0u;
+	dinBodyType->SessionSetupReq_isUsed = 0u;
+	dinBodyType->SessionSetupRes_isUsed = 0u;
+	dinBodyType->ServiceDiscoveryReq_isUsed = 0u;
+	dinBodyType->ServiceDiscoveryRes_isUsed = 0u;
+	dinBodyType->ServiceDetailReq_isUsed = 0u;
+	dinBodyType->ServiceDetailRes_isUsed = 0u;
+	dinBodyType->ServicePaymentSelectionReq_isUsed = 0u;
+	dinBodyType->ServicePaymentSelectionRes_isUsed = 0u;
+	dinBodyType->PaymentDetailsReq_isUsed = 0u;
+	dinBodyType->PaymentDetailsRes_isUsed = 0u;
+	dinBodyType->ContractAuthenticationReq_isUsed = 0u;
+	dinBodyType->ContractAuthenticationRes_isUsed = 0u;
+	dinBodyType->ChargeParameterDiscoveryReq_isUsed = 0u;
+	dinBodyType->ChargeParameterDiscoveryRes_isUsed = 0u;
+	dinBodyType->PowerDeliveryReq_isUsed = 0u;
+	dinBodyType->PowerDeliveryRes_isUsed = 0u;
+	dinBodyType->ChargingStatusReq_isUsed = 0u;
+	dinBodyType->ChargingStatusRes_isUsed = 0u;
+	dinBodyType->MeteringReceiptReq_isUsed = 0u;
+	dinBodyType->MeteringReceiptRes_isUsed = 0u;
+	dinBodyType->SessionStopReq_isUsed = 0u;
+	dinBodyType->SessionStopRes_isUsed = 0u;
+	dinBodyType->CertificateUpdateReq_isUsed = 0u;
+	dinBodyType->CertificateUpdateRes_isUsed = 0u;
+	dinBodyType->CertificateInstallationReq_isUsed = 0u;
+	dinBodyType->CertificateInstallationRes_isUsed = 0u;
+	dinBodyType->CableCheckReq_isUsed = 0u;
+	dinBodyType->CableCheckRes_isUsed = 0u;
+	dinBodyType->PreChargeReq_isUsed = 0u;
+	dinBodyType->PreChargeRes_isUsed = 0u;
+	dinBodyType->CurrentDemandReq_isUsed = 0u;
+	dinBodyType->CurrentDemandRes_isUsed = 0u;
+	dinBodyType->WeldingDetectionReq_isUsed = 0u;
+	dinBodyType->WeldingDetectionRes_isUsed = 0u;
+}
+
+void init_dinSessionSetupReqType(struct dinSessionSetupReqType* dinSessionSetupReqType) {
+	(void)dinSessionSetupReqType; /* avoid unused warning */
+}
+
+void init_dinPowerDeliveryResType(struct dinPowerDeliveryResType* dinPowerDeliveryResType) {
+	dinPowerDeliveryResType->EVSEStatus_isUsed = 0u;
+	dinPowerDeliveryResType->AC_EVSEStatus_isUsed = 0u;
+	dinPowerDeliveryResType->DC_EVSEStatus_isUsed = 0u;
+}
+
+void init_dinServiceDetailResType(struct dinServiceDetailResType* dinServiceDetailResType) {
+	dinServiceDetailResType->ServiceParameterList_isUsed = 0u;
+}
+
+void init_dinWeldingDetectionResType(struct dinWeldingDetectionResType* dinWeldingDetectionResType) {
+	(void)dinWeldingDetectionResType; /* avoid unused warning */
+}
+
+void init_dinContractAuthenticationResType(struct dinContractAuthenticationResType* dinContractAuthenticationResType) {
+	(void)dinContractAuthenticationResType; /* avoid unused warning */
+}
+
+void init_dinCanonicalizationMethodType(struct dinCanonicalizationMethodType* dinCanonicalizationMethodType) {
+	dinCanonicalizationMethodType->ANY_isUsed = 0u;
+}
+
+void init_dinSPKIDataType(struct dinSPKIDataType* dinSPKIDataType) {
+	dinSPKIDataType->SPKISexp.arrayLen = 0u;
+	dinSPKIDataType->ANY_isUsed = 0u;
+}
+
+void init_dinListOfRootCertificateIDsType(struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType) {
+	dinListOfRootCertificateIDsType->RootCertificateID.arrayLen = 0u;
+}
+
+void init_dinSelectedServiceListType(struct dinSelectedServiceListType* dinSelectedServiceListType) {
+	dinSelectedServiceListType->SelectedService.arrayLen = 0u;
+}
+
+void init_dinCurrentDemandResType(struct dinCurrentDemandResType* dinCurrentDemandResType) {
+	dinCurrentDemandResType->EVSEMaximumVoltageLimit_isUsed = 0u;
+	dinCurrentDemandResType->EVSEMaximumCurrentLimit_isUsed = 0u;
+	dinCurrentDemandResType->EVSEMaximumPowerLimit_isUsed = 0u;
+}
+
+void init_dinTransformType(struct dinTransformType* dinTransformType) {
+	dinTransformType->ANY_isUsed = 0u;
+	dinTransformType->XPath.arrayLen = 0u;
+}
+
+void init_dinAC_EVChargeParameterType(struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType) {
+	(void)dinAC_EVChargeParameterType; /* avoid unused warning */
+}
+
+void init_dinX509DataType(struct dinX509DataType* dinX509DataType) {
+	dinX509DataType->X509IssuerSerial.arrayLen = 0u;
+	dinX509DataType->X509SKI.arrayLen = 0u;
+	dinX509DataType->X509SubjectName.arrayLen = 0u;
+	dinX509DataType->X509Certificate.arrayLen = 0u;
+	dinX509DataType->X509CRL.arrayLen = 0u;
+	dinX509DataType->ANY_isUsed = 0u;
+}
+
+void init_dinChargingStatusResType(struct dinChargingStatusResType* dinChargingStatusResType) {
+	dinChargingStatusResType->EVSEMaxCurrent_isUsed = 0u;
+	dinChargingStatusResType->MeterInfo_isUsed = 0u;
+}
+
+void init_dinWeldingDetectionReqType(struct dinWeldingDetectionReqType* dinWeldingDetectionReqType) {
+	(void)dinWeldingDetectionReqType; /* avoid unused warning */
+}
+
+void init_dinSignaturePropertiesType(struct dinSignaturePropertiesType* dinSignaturePropertiesType) {
+	dinSignaturePropertiesType->Id_isUsed = 0u;
+	dinSignaturePropertiesType->SignatureProperty.arrayLen = 0u;
+}
+
+void init_dinContractAuthenticationReqType(struct dinContractAuthenticationReqType* dinContractAuthenticationReqType) {
+	dinContractAuthenticationReqType->Id_isUsed = 0u;
+	dinContractAuthenticationReqType->GenChallenge_isUsed = 0u;
+}
+
+void init_dinDC_EVPowerDeliveryParameterType(struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType) {
+	dinDC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed = 0u;
+}
+
+void init_dinEVSEChargeParameterType(struct dinEVSEChargeParameterType* dinEVSEChargeParameterType) {
+	(void)dinEVSEChargeParameterType; /* avoid unused warning */
+}
+
+void init_dinCableCheckReqType(struct dinCableCheckReqType* dinCableCheckReqType) {
+	(void)dinCableCheckReqType; /* avoid unused warning */
+}
+
+void init_dinDC_EVChargeParameterType(struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType) {
+	dinDC_EVChargeParameterType->EVMaximumPowerLimit_isUsed = 0u;
+	dinDC_EVChargeParameterType->EVEnergyCapacity_isUsed = 0u;
+	dinDC_EVChargeParameterType->EVEnergyRequest_isUsed = 0u;
+	dinDC_EVChargeParameterType->FullSOC_isUsed = 0u;
+	dinDC_EVChargeParameterType->BulkSOC_isUsed = 0u;
+}
+
+void init_dinSAScheduleListType(struct dinSAScheduleListType* dinSAScheduleListType) {
+	dinSAScheduleListType->SAScheduleTuple.arrayLen = 0u;
+}
+
+void init_dinPMaxScheduleType(struct dinPMaxScheduleType* dinPMaxScheduleType) {
+	dinPMaxScheduleType->PMaxScheduleEntry.arrayLen = 0u;
+}
+
+void init_dinServicePaymentSelectionReqType(struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType) {
+	(void)dinServicePaymentSelectionReqType; /* avoid unused warning */
+}
+
+void init_dinRelativeTimeIntervalType(struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType) {
+	dinRelativeTimeIntervalType->duration_isUsed = 0u;
+}
+
+void init_dinEVStatusType(struct dinEVStatusType* dinEVStatusType) {
+	(void)dinEVStatusType; /* avoid unused warning */
+}
+
+void init_dinPreChargeResType(struct dinPreChargeResType* dinPreChargeResType) {
+	(void)dinPreChargeResType; /* avoid unused warning */
+}
+
+void init_dinDC_EVSEChargeParameterType(struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType) {
+	dinDC_EVSEChargeParameterType->EVSEMaximumPowerLimit_isUsed = 0u;
+	dinDC_EVSEChargeParameterType->EVSECurrentRegulationTolerance_isUsed = 0u;
+	dinDC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed = 0u;
+}
+
+void init_dinPaymentDetailsResType(struct dinPaymentDetailsResType* dinPaymentDetailsResType) {
+	(void)dinPaymentDetailsResType; /* avoid unused warning */
+}
+
+void init_dinDSAKeyValueType(struct dinDSAKeyValueType* dinDSAKeyValueType) {
+	dinDSAKeyValueType->P_isUsed = 0u;
+	dinDSAKeyValueType->Q_isUsed = 0u;
+	dinDSAKeyValueType->G_isUsed = 0u;
+	dinDSAKeyValueType->J_isUsed = 0u;
+	dinDSAKeyValueType->Seed_isUsed = 0u;
+	dinDSAKeyValueType->PgenCounter_isUsed = 0u;
+}
+
+void init_dinSASchedulesType(struct dinSASchedulesType* dinSASchedulesType) {
+	(void)dinSASchedulesType; /* avoid unused warning */
+}
+
+void init_dinCertificateUpdateResType(struct dinCertificateUpdateResType* dinCertificateUpdateResType) {
+	(void)dinCertificateUpdateResType; /* avoid unused warning */
+}
+
+void init_dinEVChargeParameterType(struct dinEVChargeParameterType* dinEVChargeParameterType) {
+	(void)dinEVChargeParameterType; /* avoid unused warning */
+}
+
+void init_dinMessageHeaderType(struct dinMessageHeaderType* dinMessageHeaderType) {
+	dinMessageHeaderType->Notification_isUsed = 0u;
+	dinMessageHeaderType->Signature_isUsed = 0u;
+}
+
+void init_dinBodyBaseType(struct dinBodyBaseType* dinBodyBaseType) {
+	(void)dinBodyBaseType; /* avoid unused warning */
+}
+
+void init_dinKeyValueType(struct dinKeyValueType* dinKeyValueType) {
+	dinKeyValueType->DSAKeyValue_isUsed = 0u;
+	dinKeyValueType->RSAKeyValue_isUsed = 0u;
+	dinKeyValueType->ANY_isUsed = 0u;
+}
+
+void init_dinIntervalType(struct dinIntervalType* dinIntervalType) {
+	(void)dinIntervalType; /* avoid unused warning */
+}
+
+void init_dinChargeParameterDiscoveryResType(struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType) {
+	dinChargeParameterDiscoveryResType->SASchedules_isUsed = 0u;
+	dinChargeParameterDiscoveryResType->SAScheduleList_isUsed = 0u;
+	dinChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed = 0u;
+	dinChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed = 0u;
+	dinChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed = 0u;
+}
+
+void init_dinPowerDeliveryReqType(struct dinPowerDeliveryReqType* dinPowerDeliveryReqType) {
+	dinPowerDeliveryReqType->ChargingProfile_isUsed = 0u;
+	dinPowerDeliveryReqType->EVPowerDeliveryParameter_isUsed = 0u;
+	dinPowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed = 0u;
+}
+
+void init_dinCertificateChainType(struct dinCertificateChainType* dinCertificateChainType) {
+	dinCertificateChainType->SubCertificates_isUsed = 0u;
+}
+
+void init_dinTransformsType(struct dinTransformsType* dinTransformsType) {
+	dinTransformsType->Transform.arrayLen = 0u;
+}
+
+void init_dinEntryType(struct dinEntryType* dinEntryType) {
+	dinEntryType->TimeInterval_isUsed = 0u;
+	dinEntryType->RelativeTimeInterval_isUsed = 0u;
+}
+
+void init_dinSessionStopType(struct dinSessionStopType* dinSessionStopType) {
+	(void)dinSessionStopType; /* avoid unused warning */
+}
+
+void init_dinServiceDetailReqType(struct dinServiceDetailReqType* dinServiceDetailReqType) {
+	(void)dinServiceDetailReqType; /* avoid unused warning */
+}
+
+void init_dinDigestMethodType(struct dinDigestMethodType* dinDigestMethodType) {
+	dinDigestMethodType->ANY_isUsed = 0u;
+}
+
+void init_dinParameterType(struct dinParameterType* dinParameterType) {
+	dinParameterType->boolValue_isUsed = 0u;
+	dinParameterType->byteValue_isUsed = 0u;
+	dinParameterType->shortValue_isUsed = 0u;
+	dinParameterType->intValue_isUsed = 0u;
+	dinParameterType->physicalValue_isUsed = 0u;
+	dinParameterType->stringValue_isUsed = 0u;
+}
+
+void init_dinChargingStatusReqType(struct dinChargingStatusReqType* dinChargingStatusReqType) {
+	(void)dinChargingStatusReqType; /* avoid unused warning */
+}
+
+void init_dinSignatureMethodType(struct dinSignatureMethodType* dinSignatureMethodType) {
+	dinSignatureMethodType->HMACOutputLength_isUsed = 0u;
+	dinSignatureMethodType->ANY_isUsed = 0u;
+}
+
+void init_dinCertificateInstallationReqType(struct dinCertificateInstallationReqType* dinCertificateInstallationReqType) {
+	dinCertificateInstallationReqType->Id_isUsed = 0u;
+}
+
+void init_dinSalesTariffEntryType(struct dinSalesTariffEntryType* dinSalesTariffEntryType) {
+	dinSalesTariffEntryType->TimeInterval_isUsed = 0u;
+	dinSalesTariffEntryType->RelativeTimeInterval_isUsed = 0u;
+	dinSalesTariffEntryType->ConsumptionCost.arrayLen = 0u;
+}
+
+void init_dinServiceDiscoveryResType(struct dinServiceDiscoveryResType* dinServiceDiscoveryResType) {
+	dinServiceDiscoveryResType->ServiceList_isUsed = 0u;
+}
+
+void init_dinParameterSetType(struct dinParameterSetType* dinParameterSetType) {
+	dinParameterSetType->Parameter.arrayLen = 0u;
+}
+
+void init_dinCurrentDemandReqType(struct dinCurrentDemandReqType* dinCurrentDemandReqType) {
+	dinCurrentDemandReqType->EVMaximumVoltageLimit_isUsed = 0u;
+	dinCurrentDemandReqType->EVMaximumCurrentLimit_isUsed = 0u;
+	dinCurrentDemandReqType->EVMaximumPowerLimit_isUsed = 0u;
+	dinCurrentDemandReqType->BulkChargingComplete_isUsed = 0u;
+	dinCurrentDemandReqType->RemainingTimeToFullSoC_isUsed = 0u;
+	dinCurrentDemandReqType->RemainingTimeToBulkSoC_isUsed = 0u;
+}
+
+void init_dinPreChargeReqType(struct dinPreChargeReqType* dinPreChargeReqType) {
+	(void)dinPreChargeReqType; /* avoid unused warning */
+}
+
+void init_dinSignatureType(struct dinSignatureType* dinSignatureType) {
+	dinSignatureType->Id_isUsed = 0u;
+	dinSignatureType->KeyInfo_isUsed = 0u;
+	dinSignatureType->Object.arrayLen = 0u;
+}
+
+void init_dinReferenceType(struct dinReferenceType* dinReferenceType) {
+	dinReferenceType->Id_isUsed = 0u;
+	dinReferenceType->URI_isUsed = 0u;
+	dinReferenceType->Type_isUsed = 0u;
+	dinReferenceType->Transforms_isUsed = 0u;
+}
+
+void init_dinProfileEntryType(struct dinProfileEntryType* dinProfileEntryType) {
+	(void)dinProfileEntryType; /* avoid unused warning */
+}
+
+void init_dinAnonType_V2G_Message(struct dinAnonType_V2G_Message* dinAnonType_V2G_Message) {
+	(void)dinAnonType_V2G_Message; /* avoid unused warning */
+}
+
+void init_dinChargeParameterDiscoveryReqType(struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType) {
+	dinChargeParameterDiscoveryReqType->EVChargeParameter_isUsed = 0u;
+	dinChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed = 0u;
+	dinChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed = 0u;
+}
+
+void init_dinConsumptionCostType(struct dinConsumptionCostType* dinConsumptionCostType) {
+	dinConsumptionCostType->Cost.arrayLen = 0u;
+}
+
+void init_dinRSAKeyValueType(struct dinRSAKeyValueType* dinRSAKeyValueType) {
+	(void)dinRSAKeyValueType; /* avoid unused warning */
+}
+
+void init_dinServiceType(struct dinServiceType* dinServiceType) {
+	(void)dinServiceType; /* avoid unused warning */
+}
+
+void init_dinServiceTagListType(struct dinServiceTagListType* dinServiceTagListType) {
+	dinServiceTagListType->Service.arrayLen = 0u;
+}
+
+void init_dinEVSEStatusType(struct dinEVSEStatusType* dinEVSEStatusType) {
+	(void)dinEVSEStatusType; /* avoid unused warning */
+}
+
+void init_dinSessionSetupResType(struct dinSessionSetupResType* dinSessionSetupResType) {
+	dinSessionSetupResType->DateTimeNow_isUsed = 0u;
+}
+
+void init_dinEVPowerDeliveryParameterType(struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType) {
+	(void)dinEVPowerDeliveryParameterType; /* avoid unused warning */
+}
+
+void init_dinX509IssuerSerialType(struct dinX509IssuerSerialType* dinX509IssuerSerialType) {
+	(void)dinX509IssuerSerialType; /* avoid unused warning */
+}
+
+void init_dinSelectedServiceType(struct dinSelectedServiceType* dinSelectedServiceType) {
+	dinSelectedServiceType->ParameterSetID_isUsed = 0u;
+}
+
+void init_dinMeteringReceiptResType(struct dinMeteringReceiptResType* dinMeteringReceiptResType) {
+	(void)dinMeteringReceiptResType; /* avoid unused warning */
+}
+
+void init_dinDC_EVStatusType(struct dinDC_EVStatusType* dinDC_EVStatusType) {
+	dinDC_EVStatusType->EVCabinConditioning_isUsed = 0u;
+	dinDC_EVStatusType->EVRESSConditioning_isUsed = 0u;
+}
+
+void init_dinPhysicalValueType(struct dinPhysicalValueType* dinPhysicalValueType) {
+	dinPhysicalValueType->Unit_isUsed = 0u;
+}
+
+void init_dinManifestType(struct dinManifestType* dinManifestType) {
+	dinManifestType->Id_isUsed = 0u;
+	dinManifestType->Reference.arrayLen = 0u;
+}
+
+void init_dinPMaxScheduleEntryType(struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType) {
+	dinPMaxScheduleEntryType->TimeInterval_isUsed = 0u;
+	dinPMaxScheduleEntryType->RelativeTimeInterval_isUsed = 0u;
+}
+
+void init_dinServiceParameterListType(struct dinServiceParameterListType* dinServiceParameterListType) {
+	dinServiceParameterListType->ParameterSet.arrayLen = 0u;
+}
+
+void init_dinSignatureValueType(struct dinSignatureValueType* dinSignatureValueType) {
+	dinSignatureValueType->Id_isUsed = 0u;
+}
+
+void init_dinPaymentOptionsType(struct dinPaymentOptionsType* dinPaymentOptionsType) {
+	dinPaymentOptionsType->PaymentOption.arrayLen = 0u;
+}
+
+void init_dinServiceTagType(struct dinServiceTagType* dinServiceTagType) {
+	dinServiceTagType->ServiceName_isUsed = 0u;
+	dinServiceTagType->ServiceScope_isUsed = 0u;
+}
+
+void init_dinAC_EVSEStatusType(struct dinAC_EVSEStatusType* dinAC_EVSEStatusType) {
+	(void)dinAC_EVSEStatusType; /* avoid unused warning */
+}
+
+void init_dinCertificateUpdateReqType(struct dinCertificateUpdateReqType* dinCertificateUpdateReqType) {
+	dinCertificateUpdateReqType->Id_isUsed = 0u;
+}
+
+void init_dinServicePaymentSelectionResType(struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType) {
+	(void)dinServicePaymentSelectionResType; /* avoid unused warning */
+}
+
+void init_dinSAScheduleTupleType(struct dinSAScheduleTupleType* dinSAScheduleTupleType) {
+	dinSAScheduleTupleType->SalesTariff_isUsed = 0u;
+}
+
+void init_dinChargingProfileType(struct dinChargingProfileType* dinChargingProfileType) {
+	dinChargingProfileType->ProfileEntry.arrayLen = 0u;
+}
+
+void init_dinServiceDiscoveryReqType(struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType) {
+	dinServiceDiscoveryReqType->ServiceScope_isUsed = 0u;
+	dinServiceDiscoveryReqType->ServiceCategory_isUsed = 0u;
+}
+
+void init_dinAC_EVSEChargeParameterType(struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType) {
+	(void)dinAC_EVSEChargeParameterType; /* avoid unused warning */
+}
+
+void init_dinKeyInfoType(struct dinKeyInfoType* dinKeyInfoType) {
+	dinKeyInfoType->Id_isUsed = 0u;
+	dinKeyInfoType->KeyName.arrayLen = 0u;
+	dinKeyInfoType->KeyValue.arrayLen = 0u;
+	dinKeyInfoType->RetrievalMethod.arrayLen = 0u;
+	dinKeyInfoType->X509Data.arrayLen = 0u;
+	dinKeyInfoType->PGPData.arrayLen = 0u;
+	dinKeyInfoType->SPKIData.arrayLen = 0u;
+	dinKeyInfoType->MgmtData.arrayLen = 0u;
+	dinKeyInfoType->ANY_isUsed = 0u;
+}
+
+void init_dinPaymentDetailsReqType(struct dinPaymentDetailsReqType* dinPaymentDetailsReqType) {
+	(void)dinPaymentDetailsReqType; /* avoid unused warning */
+}
+
+void init_dinCableCheckResType(struct dinCableCheckResType* dinCableCheckResType) {
+	(void)dinCableCheckResType; /* avoid unused warning */
+}
+
+void init_dinObjectType(struct dinObjectType* dinObjectType) {
+	dinObjectType->Id_isUsed = 0u;
+	dinObjectType->MimeType_isUsed = 0u;
+	dinObjectType->Encoding_isUsed = 0u;
+	dinObjectType->ANY_isUsed = 0u;
+}
+
+void init_dinSessionStopResType(struct dinSessionStopResType* dinSessionStopResType) {
+	(void)dinSessionStopResType; /* avoid unused warning */
+}
+
+void init_dinSignedInfoType(struct dinSignedInfoType* dinSignedInfoType) {
+	dinSignedInfoType->Id_isUsed = 0u;
+	dinSignedInfoType->Reference.arrayLen = 0u;
+}
+
+void init_dinSalesTariffType(struct dinSalesTariffType* dinSalesTariffType) {
+	dinSalesTariffType->SalesTariffDescription_isUsed = 0u;
+	dinSalesTariffType->SalesTariffEntry.arrayLen = 0u;
+}
+
+void init_dinCostType(struct dinCostType* dinCostType) {
+	dinCostType->amountMultiplier_isUsed = 0u;
+}
+
+void init_dinServiceChargeType(struct dinServiceChargeType* dinServiceChargeType) {
+	(void)dinServiceChargeType; /* avoid unused warning */
+}
+
+void init_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType* dinDC_EVSEStatusType) {
+	dinDC_EVSEStatusType->EVSEIsolationStatus_isUsed = 0u;
+}
+
+void init_dinRetrievalMethodType(struct dinRetrievalMethodType* dinRetrievalMethodType) {
+	dinRetrievalMethodType->URI_isUsed = 0u;
+	dinRetrievalMethodType->Type_isUsed = 0u;
+	dinRetrievalMethodType->Transforms_isUsed = 0u;
+}
+
+void init_dinNotificationType(struct dinNotificationType* dinNotificationType) {
+	dinNotificationType->FaultMsg_isUsed = 0u;
+}
+
+void init_dinPGPDataType(struct dinPGPDataType* dinPGPDataType) {
+	dinPGPDataType->PGPKeyID_isUsed = 0u;
+	dinPGPDataType->PGPKeyPacket_isUsed = 0u;
+	dinPGPDataType->ANY_isUsed = 0u;
+}
+
+void init_dinCertificateInstallationResType(struct dinCertificateInstallationResType* dinCertificateInstallationResType) {
+	(void)dinCertificateInstallationResType; /* avoid unused warning */
+}
+
+void init_dinSignaturePropertyType(struct dinSignaturePropertyType* dinSignaturePropertyType) {
+	dinSignaturePropertyType->Id_isUsed = 0u;
+	dinSignaturePropertyType->ANY_isUsed = 0u;
+}
+
+void init_dinMeterInfoType(struct dinMeterInfoType* dinMeterInfoType) {
+	dinMeterInfoType->MeterReading_isUsed = 0u;
+	dinMeterInfoType->SigMeterReading_isUsed = 0u;
+	dinMeterInfoType->MeterStatus_isUsed = 0u;
+	dinMeterInfoType->TMeter_isUsed = 0u;
+}
+
+void init_dinSubCertificatesType(struct dinSubCertificatesType* dinSubCertificatesType) {
+	dinSubCertificatesType->Certificate.arrayLen = 0u;
+}
+
+
+
+#endif /* DEPLOY_DIN_CODEC */
+
+#endif
+

+ 2934 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypes.h

@@ -0,0 +1,2934 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypes.h
+ * \brief 	Datatype definitions and structs for given XML Schema definitions and initialization methods
+ *
+ */
+
+#ifndef EXI_din_DATATYPES_H
+#define EXI_din_DATATYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SUPPORT_YES 1
+#define SUPPORT_NO 2
+#define DEPLOY_DIN_CODEC SUPPORT_YES
+#define DEPLOY_DIN_CODEC_FRAGMENT SUPPORT_NO
+
+#if DEPLOY_DIN_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+/* Datatype definitions and structs for given XML Schema definitions */
+
+#define UNION_YES 1
+#define UNION_NO 2
+#define SAVE_MEMORY_WITH_UNNAMED_UNION UNION_YES
+
+/* Note: Please find below a list of occurrence limits that have been applied */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SPKISexp from unbounded to 1 (see #define dinSPKIDataType_SPKISexp_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID from unbounded to 5 (see #define dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":XPath from unbounded to 1 (see #define dinTransformType_XPath_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Transform from unbounded to 1 (see #define dinTransformsType_Transform_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Reference from unbounded to 1 (see #define dinManifestType_Reference_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":PaymentOption from unbounded to 5 (see #define dinPaymentOptionsType_PaymentOption_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry from unbounded to 24 (see #define dinChargingProfileType_ProfileEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Reference from unbounded to 1 (see #define dinSignedInfoType_Reference_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":Certificate from unbounded to 5 (see #define dinSubCertificatesType_Certificate_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":SelectedService from unbounded to 16 (see #define dinSelectedServiceListType_SelectedService_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial from unbounded to 1 (see #define dinX509DataType_X509IssuerSerial_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509SKI from unbounded to 1 (see #define dinX509DataType_X509SKI_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509SubjectName from unbounded to 1 (see #define dinX509DataType_X509SubjectName_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509Certificate from unbounded to 1 (see #define dinX509DataType_X509Certificate_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509CRL from unbounded to 1 (see #define dinX509DataType_X509CRL_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SignatureProperty from unbounded to 1 (see #define dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry from unbounded to 5 (see #define dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":Parameter from unbounded to 16 (see #define dinParameterSetType_Parameter_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":Cost from unbounded to 5 (see #define dinConsumptionCostType_Cost_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":Service from unbounded to 8 (see #define dinServiceTagListType_Service_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":ParameterSet from unbounded to 5 (see #define dinServiceParameterListType_ParameterSet_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":KeyName from unbounded to 1 (see #define dinKeyInfoType_KeyName_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":KeyValue from unbounded to 1 (see #define dinKeyInfoType_KeyValue_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod from unbounded to 1 (see #define dinKeyInfoType_RetrievalMethod_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509Data from unbounded to 1 (see #define dinKeyInfoType_X509Data_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":PGPData from unbounded to 1 (see #define dinKeyInfoType_PGPData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SPKIData from unbounded to 1 (see #define dinKeyInfoType_SPKIData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":MgmtData from unbounded to 1 (see #define dinKeyInfoType_MgmtData_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost from unbounded to 5 (see #define dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Object from unbounded to 1 (see #define dinSignatureType_Object_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry from unbounded to 5 (see #define dinSalesTariffType_SalesTariffEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTuple from unbounded to 5 (see #define dinSAScheduleListType_SAScheduleTuple_ARRAY_SIZE) */
+
+
+typedef enum {
+	dinDC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	dinDC_EVSEStatusCodeType_EVSE_Ready = 1,
+	dinDC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	dinDC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	dinDC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	dinDC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	dinDC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	dinDC_EVSEStatusCodeType_Reserved_8 = 7,
+	dinDC_EVSEStatusCodeType_Reserved_9 = 8,
+	dinDC_EVSEStatusCodeType_Reserved_A = 9,
+	dinDC_EVSEStatusCodeType_Reserved_B = 10,
+	dinDC_EVSEStatusCodeType_Reserved_C = 11
+} dinDC_EVSEStatusCodeType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":EVCCID)',  derivedBy='EXTENSION'.  */
+#define dinSessionSetupReqType_EVCCID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evccIDType is 8 */
+struct dinSessionSetupReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVCCID, urn:iso:15118:2:2010:MsgDataTypes,evccIDType */
+	struct {
+		uint8_t bytes[dinSessionSetupReqType_EVCCID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVCCID ;
+};
+
+typedef enum {
+	dinEVSEProcessingType_Finished = 0,
+	dinEVSEProcessingType_Ongoing = 1
+} dinEVSEProcessingType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define dinCanonicalizationMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinCanonicalizationMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[dinCanonicalizationMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define dinSPKIDataType_SPKISexp_BYTES_SIZE 350
+#define dinSPKIDataType_SPKISexp_ARRAY_SIZE 1
+#define dinSPKIDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinSPKIDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKISexp, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[dinSPKIDataType_SPKISexp_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[dinSPKIDataType_SPKISexp_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKISexp;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinSPKIDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinListOfRootCertificateIDsType_RootCertificateID_CHARACTERS_SIZE 40 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType is 40 */
+#define dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE 5
+struct dinListOfRootCertificateIDsType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID, urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType */
+	struct {
+		struct {
+			exi_string_character_t characters[dinListOfRootCertificateIDsType_RootCertificateID_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[dinListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RootCertificateID;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define dinTransformType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define dinTransformType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinTransformType_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinTransformType_XPath_ARRAY_SIZE 1
+struct dinTransformType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinTransformType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinTransformType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":XPath, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[dinTransformType_XPath_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[dinTransformType_XPath_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} XPath;
+};
+
+typedef enum {
+	dinDC_EVErrorCodeType_NO_ERROR = 0,
+	dinDC_EVErrorCodeType_FAILED_RESSTemperatureInhibit = 1,
+	dinDC_EVErrorCodeType_FAILED_EVShiftPosition = 2,
+	dinDC_EVErrorCodeType_FAILED_ChargerConnectorLockFault = 3,
+	dinDC_EVErrorCodeType_FAILED_EVRESSMalfunction = 4,
+	dinDC_EVErrorCodeType_FAILED_ChargingCurrentdifferential = 5,
+	dinDC_EVErrorCodeType_FAILED_ChargingVoltageOutOfRange = 6,
+	dinDC_EVErrorCodeType_Reserved_A = 7,
+	dinDC_EVErrorCodeType_Reserved_B = 8,
+	dinDC_EVErrorCodeType_Reserved_C = 9,
+	dinDC_EVErrorCodeType_FAILED_ChargingSystemIncompatibility = 10,
+	dinDC_EVErrorCodeType_NoData = 11
+} dinDC_EVErrorCodeType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":GenChallenge{0-1})',  derivedBy='EXTENSION'.  */
+#define dinContractAuthenticationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinContractAuthenticationReqType_GenChallenge_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinContractAuthenticationReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinContractAuthenticationReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":GenChallenge, urn:iso:15118:2:2010:MsgDataTypes,genChallengeType */
+	struct {
+		exi_string_character_t characters[dinContractAuthenticationReqType_GenChallenge_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  GenChallenge ;
+	unsigned int GenChallenge_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEChargeParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinEVSEChargeParameterType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+struct dinRelativeTimeIntervalType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":start, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t start ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":duration, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t duration ;
+	unsigned int duration_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVStatusType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinEVStatusType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+#define dinDSAKeyValueType_P_BYTES_SIZE 350
+#define dinDSAKeyValueType_Q_BYTES_SIZE 350
+#define dinDSAKeyValueType_G_BYTES_SIZE 350
+#define dinDSAKeyValueType_Y_BYTES_SIZE 350
+#define dinDSAKeyValueType_J_BYTES_SIZE 350
+#define dinDSAKeyValueType_Seed_BYTES_SIZE 350
+#define dinDSAKeyValueType_PgenCounter_BYTES_SIZE 350
+struct dinDSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":P, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	unsigned int P_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Q, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	unsigned int Q_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":G, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	unsigned int G_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Y, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":J, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	unsigned int J_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Seed, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	unsigned int Seed_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PgenCounter, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinDSAKeyValueType_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	unsigned int PgenCounter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SASchedulesType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinSASchedulesType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinEVChargeParameterType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinBodyBaseType {
+	int noContent; /* avoid warning */
+};
+
+typedef enum {
+	dinunitSymbolType_h = 0,
+	dinunitSymbolType_m = 1,
+	dinunitSymbolType_s = 2,
+	dinunitSymbolType_A = 3,
+	dinunitSymbolType_Ah = 4,
+	dinunitSymbolType_V = 5,
+	dinunitSymbolType_VA = 6,
+	dinunitSymbolType_W = 7,
+	dinunitSymbolType_W_s = 8,
+	dinunitSymbolType_Wh = 9
+} dinunitSymbolType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinIntervalType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinTransformsType_Transform_ARRAY_SIZE 1
+struct dinTransformsType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transform, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinTransformType array[dinTransformsType_Transform_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Transform;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval)',  derivedBy='RESTRICTION'.  */
+struct dinEntryType {
+	/* substitutionGroup */
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		/* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct dinIntervalType TimeInterval ;
+		/* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinRelativeTimeIntervalType RelativeTimeInterval ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		unsigned int TimeInterval_isUsed:1;
+		unsigned int RelativeTimeInterval_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+struct dinSessionStopType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ServiceID)',  derivedBy='EXTENSION'.  */
+struct dinServiceDetailReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinDigestMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define dinDigestMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinDigestMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinDigestMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinDigestMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+typedef enum {
+	dinvalueType_bool = 0,
+	dinvalueType_byte = 1,
+	dinvalueType_short = 2,
+	dinvalueType_int = 3,
+	dinvalueType_physicalValue = 4,
+	dinvalueType_string = 5
+} dinvalueType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+struct dinChargingStatusReqType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSignatureMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define dinSignatureMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinSignatureMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinSignatureMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":HMACOutputLength, http://www.w3.org/2000/09/xmldsig#,HMACOutputLengthType */
+	int64_t HMACOutputLength ;
+	unsigned int HMACOutputLength_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinSignatureMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)',  derivedBy='EXTENSION'.  */
+#define dinCertificateInstallationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinCertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */
+#define dinCertificateInstallationReqType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */
+struct dinCertificateInstallationReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinCertificateInstallationReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":OEMProvisioningCert, urn:iso:15118:2:2010:MsgDataTypes,certificateType */
+	struct {
+		uint8_t bytes[dinCertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  OEMProvisioningCert ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DHParams, urn:iso:15118:2:2010:MsgDataTypes,dHParamsType */
+	struct {
+		uint8_t bytes[dinCertificateInstallationReqType_DHParams_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DHParams ;
+};
+
+typedef enum {
+	dinEVRequestedEnergyTransferType_AC_single_phase_core = 0,
+	dinEVRequestedEnergyTransferType_AC_three_phase_core = 1,
+	dinEVRequestedEnergyTransferType_DC_core = 2,
+	dinEVRequestedEnergyTransferType_DC_extended = 3,
+	dinEVRequestedEnergyTransferType_DC_combo_core = 4,
+	dinEVRequestedEnergyTransferType_DC_unique = 5
+} dinEVRequestedEnergyTransferType;
+
+typedef enum {
+	dinpaymentOptionType_Contract = 0,
+	dinpaymentOptionType_ExternalPayment = 1
+} dinpaymentOptionType;
+
+typedef enum {
+	dinEVSESupportedEnergyTransferType_AC_single_phase_core = 0,
+	dinEVSESupportedEnergyTransferType_AC_three_phase_core = 1,
+	dinEVSESupportedEnergyTransferType_DC_core = 2,
+	dinEVSESupportedEnergyTransferType_DC_extended = 3,
+	dinEVSESupportedEnergyTransferType_DC_combo_core = 4,
+	dinEVSESupportedEnergyTransferType_DC_dual = 5,
+	dinEVSESupportedEnergyTransferType_AC_core1p_DC_extended = 6,
+	dinEVSESupportedEnergyTransferType_AC_single_DC_core = 7,
+	dinEVSESupportedEnergyTransferType_AC_single_phase_three_phase_core_DC_extended = 8,
+	dinEVSESupportedEnergyTransferType_AC_core3p_DC_extended = 9
+} dinEVSESupportedEnergyTransferType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+#define dinReferenceType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinReferenceType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinReferenceType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinReferenceType_DigestValue_BYTES_SIZE 350
+struct dinReferenceType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinReferenceType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinReferenceType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinReferenceType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinTransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinDigestMethodType DigestMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestValue, http://www.w3.org/2000/09/xmldsig#,DigestValueType */
+	struct {
+		uint8_t bytes[dinReferenceType_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)',  derivedBy='RESTRICTION'.  */
+struct dinProfileEntryType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t ChargingProfileEntryStart ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower, urn:iso:15118:2:2010:MsgDataTypes,PMaxType */
+	int16_t ChargingProfileEntryMaxPower ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+#define dinRSAKeyValueType_Modulus_BYTES_SIZE 350
+#define dinRSAKeyValueType_Exponent_BYTES_SIZE 350
+struct dinRSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Modulus, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinRSAKeyValueType_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Exponent, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[dinRSAKeyValueType_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+};
+
+typedef enum {
+	dinfaultCodeType_ParsingError = 0,
+	dinfaultCodeType_NoTLSRootCertificatAvailable = 1,
+	dinfaultCodeType_UnknownError = 2
+} dinfaultCodeType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinEVSEStatusType {
+	int noContent; /* avoid warning */
+};
+
+typedef enum {
+	dinserviceCategoryType_EVCharging = 0,
+	dinserviceCategoryType_Internet = 1,
+	dinserviceCategoryType_ContractCertificate = 2,
+	dinserviceCategoryType_OtherCustom = 3
+} dinserviceCategoryType;
+
+typedef enum {
+	dinEVSENotificationType_None = 0,
+	dinEVSENotificationType_StopCharging = 1,
+	dinEVSENotificationType_ReNegotiation = 2
+} dinEVSENotificationType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct dinEVPowerDeliveryParameterType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+#define dinX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinX509IssuerSerialType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[dinX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SerialNumber, http://www.w3.org/2001/XMLSchema,integer */
+	int64_t X509SerialNumber ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})',  derivedBy='RESTRICTION'.  */
+struct dinSelectedServiceType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,short */
+	int16_t ParameterSetID ;
+	unsigned int ParameterSetID_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+struct dinDC_EVStatusType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVReady, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVReady ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVCabinConditioning ;
+	unsigned int EVCabinConditioning_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVRESSConditioning ;
+	unsigned int EVRESSConditioning_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode, urn:iso:15118:2:2010:MsgDataTypes,DC_EVErrorCodeType */
+	dinDC_EVErrorCodeType EVErrorCode ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */
+	int8_t EVRESSSOC ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+struct dinPhysicalValueType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Multiplier, urn:iso:15118:2:2010:MsgDataTypes,unitMultiplierType */
+	int8_t Multiplier ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Unit, urn:iso:15118:2:2010:MsgDataTypes,unitSymbolType */
+	dinunitSymbolType Unit ;
+	unsigned int Unit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Value, http://www.w3.org/2001/XMLSchema,short */
+	int16_t Value ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinManifestType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinManifestType_Reference_ARRAY_SIZE 1
+struct dinManifestType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinManifestType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinReferenceType array[dinManifestType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+typedef enum {
+	dincostKindType_relativePricePercentage = 0,
+	dincostKindType_RenewableGenerationPercentage = 1,
+	dincostKindType_CarbonDioxideEmission = 2
+} dincostKindType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))',  derivedBy='EXTENSION'.  */
+struct dinPMaxScheduleEntryType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinIntervalType TimeInterval ;
+	unsigned int TimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+	struct dinRelativeTimeIntervalType RelativeTimeInterval ;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":PMax, urn:iso:15118:2:2010:MsgDataTypes,PMaxType */
+	int16_t PMax ;
+};
+
+typedef enum {
+	dinisolationLevelType_Invalid = 0,
+	dinisolationLevelType_Valid = 1,
+	dinisolationLevelType_Warning = 2,
+	dinisolationLevelType_Fault = 3
+} dinisolationLevelType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define dinSignatureValueType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSignatureValueType_CONTENT_BYTES_SIZE 350
+struct dinSignatureValueType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinSignatureValueType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* simple content: http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[dinSignatureValueType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinPaymentOptionsType_PaymentOption_ARRAY_SIZE 5
+struct dinPaymentOptionsType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":PaymentOption, urn:iso:15118:2:2010:MsgDataTypes,paymentOptionType */
+	struct {
+		dinpaymentOptionType array[dinPaymentOptionsType_PaymentOption_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PaymentOption;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})',  derivedBy='RESTRICTION'.  */
+#define dinServiceTagType_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceNameType is 32 */
+#define dinServiceTagType_ServiceScope_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */
+struct dinServiceTagType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceName, urn:iso:15118:2:2010:MsgDataTypes,serviceNameType */
+	struct {
+		exi_string_character_t characters[dinServiceTagType_ServiceName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceName ;
+	unsigned int ServiceName_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory, urn:iso:15118:2:2010:MsgDataTypes,serviceCategoryType */
+	dinserviceCategoryType ServiceCategory ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceScope, urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType */
+	struct {
+		exi_string_character_t characters[dinServiceTagType_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	unsigned int ServiceScope_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+struct dinAC_EVSEStatusType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed, http://www.w3.org/2001/XMLSchema,boolean */
+	int PowerSwitchClosed ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":RCD, http://www.w3.org/2001/XMLSchema,boolean */
+	int RCD ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t NotificationMaxDelay ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSENotification, urn:iso:15118:2:2010:MsgDataTypes,EVSENotificationType */
+	dinEVSENotificationType EVSENotification ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinChargingProfileType_ProfileEntry_ARRAY_SIZE 24
+struct dinChargingProfileType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */
+	int16_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ProfileEntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2010:MsgDataTypes":ChargingProfileEntryMaxPower)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinProfileEntryType array[dinChargingProfileType_ProfileEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ProfileEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2010:MsgBody":ServiceCategory{0-1})',  derivedBy='EXTENSION'.  */
+#define dinServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */
+struct dinServiceDiscoveryReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ServiceScope, urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType */
+	struct {
+		exi_string_character_t characters[dinServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	unsigned int ServiceScope_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ServiceCategory, urn:iso:15118:2:2010:MsgDataTypes,serviceCategoryType */
+	dinserviceCategoryType ServiceCategory ;
+	unsigned int ServiceCategory_isUsed:1;
+};
+
+typedef enum {
+	dinresponseCodeType_OK = 0,
+	dinresponseCodeType_OK_NewSessionEstablished = 1,
+	dinresponseCodeType_OK_OldSessionJoined = 2,
+	dinresponseCodeType_OK_CertificateExpiresSoon = 3,
+	dinresponseCodeType_FAILED = 4,
+	dinresponseCodeType_FAILED_SequenceError = 5,
+	dinresponseCodeType_FAILED_ServiceIDInvalid = 6,
+	dinresponseCodeType_FAILED_UnknownSession = 7,
+	dinresponseCodeType_FAILED_ServiceSelectionInvalid = 8,
+	dinresponseCodeType_FAILED_PaymentSelectionInvalid = 9,
+	dinresponseCodeType_FAILED_CertificateExpired = 10,
+	dinresponseCodeType_FAILED_SignatureError = 11,
+	dinresponseCodeType_FAILED_NoCertificateAvailable = 12,
+	dinresponseCodeType_FAILED_CertChainError = 13,
+	dinresponseCodeType_FAILED_ChallengeInvalid = 14,
+	dinresponseCodeType_FAILED_ContractCanceled = 15,
+	dinresponseCodeType_FAILED_WrongChargeParameter = 16,
+	dinresponseCodeType_FAILED_PowerDeliveryNotApplied = 17,
+	dinresponseCodeType_FAILED_TariffSelectionInvalid = 18,
+	dinresponseCodeType_FAILED_ChargingProfileInvalid = 19,
+	dinresponseCodeType_FAILED_EVSEPresentVoltageToLow = 20,
+	dinresponseCodeType_FAILED_MeteringSignatureNotValid = 21,
+	dinresponseCodeType_FAILED_WrongEnergyTransferType = 22
+} dinresponseCodeType;
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent)',  derivedBy='EXTENSION'.  */
+struct dinAC_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinAC_EVSEStatusType AC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaxVoltage ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaxCurrent ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMinCurrent ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define dinObjectType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinObjectType_MimeType_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinObjectType_Encoding_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinObjectType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinObjectType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinObjectType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: MimeType {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[dinObjectType_MimeType_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MimeType ;
+	unsigned int MimeType_isUsed:1;
+	/* attribute: Encoding {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinObjectType_Encoding_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Encoding ;
+	unsigned int Encoding_isUsed:1;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[dinObjectType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+struct dinSessionStopResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSignedInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSignedInfoType_Reference_ARRAY_SIZE 1
+struct dinSignedInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinSignedInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinCanonicalizationMethodType CanonicalizationMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinSignatureMethodType SignatureMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinReferenceType array[dinSignedInfoType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})',  derivedBy='RESTRICTION'.  */
+struct dinCostType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":costKind, urn:iso:15118:2:2010:MsgDataTypes,costKindType */
+	dincostKindType costKind ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":amount, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t amount ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier, urn:iso:15118:2:2010:MsgDataTypes,unitMultiplierType */
+	int8_t amountMultiplier ;
+	unsigned int amountMultiplier_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType',  base type name='ServiceType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))',  derivedBy='EXTENSION'.  */
+struct dinServiceChargeType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceTag, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinServiceTagType ServiceTag ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */
+	int FreeService ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType, urn:iso:15118:2:2010:MsgDataTypes,EVSESupportedEnergyTransferType */
+	dinEVSESupportedEnergyTransferType EnergyTransferType ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+struct dinDC_EVSEStatusType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus, urn:iso:15118:2:2010:MsgDataTypes,isolationLevelType */
+	dinisolationLevelType EVSEIsolationStatus ;
+	unsigned int EVSEIsolationStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode, urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusCodeType */
+	dinDC_EVSEStatusCodeType EVSEStatusCode ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t NotificationMaxDelay ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSENotification, urn:iso:15118:2:2010:MsgDataTypes,EVSENotificationType */
+	dinEVSENotificationType EVSENotification ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+#define dinRetrievalMethodType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinRetrievalMethodType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinRetrievalMethodType {
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinRetrievalMethodType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinRetrievalMethodType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinTransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,NotificationType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":FaultCode,"urn:iso:15118:2:2010:MsgDataTypes":FaultMsg{0-1})',  derivedBy='RESTRICTION'.  */
+#define dinNotificationType_FaultMsg_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,faultMsgType is 64 */
+struct dinNotificationType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":FaultCode, urn:iso:15118:2:2010:MsgDataTypes,faultCodeType */
+	dinfaultCodeType FaultCode ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":FaultMsg, urn:iso:15118:2:2010:MsgDataTypes,faultMsgType */
+	struct {
+		exi_string_character_t characters[dinNotificationType_FaultMsg_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  FaultMsg ;
+	unsigned int FaultMsg_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+#define dinPGPDataType_PGPKeyID_BYTES_SIZE 350
+#define dinPGPDataType_PGPKeyPacket_BYTES_SIZE 350
+#define dinPGPDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinPGPDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyID, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[dinPGPDataType_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	unsigned int PGPKeyID_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[dinPGPDataType_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	unsigned int PGPKeyPacket_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinPGPDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define dinSignaturePropertyType_Target_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSignaturePropertyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSignaturePropertyType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinSignaturePropertyType {
+	/* attribute: Target {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[dinSignaturePropertyType_Target_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Target ;
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinSignaturePropertyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinSignaturePropertyType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+#define dinMeterInfoType_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,meterIDType is 32 */
+#define dinMeterInfoType_SigMeterReading_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType is 32 */
+struct dinMeterInfoType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterID, urn:iso:15118:2:2010:MsgDataTypes,meterIDType */
+	struct {
+		exi_string_character_t characters[dinMeterInfoType_MeterID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MeterID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterReading, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType MeterReading ;
+	unsigned int MeterReading_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading, urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType */
+	struct {
+		uint8_t bytes[dinMeterInfoType_SigMeterReading_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SigMeterReading ;
+	unsigned int SigMeterReading_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":MeterStatus, urn:iso:15118:2:2010:MsgDataTypes,meterStatusType */
+	int16_t MeterStatus ;
+	unsigned int MeterStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":TMeter, http://www.w3.org/2001/XMLSchema,long */
+	int64_t TMeter ;
+	unsigned int TMeter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSubCertificatesType_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */
+#define dinSubCertificatesType_Certificate_ARRAY_SIZE 5
+struct dinSubCertificatesType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Certificate, urn:iso:15118:2:2010:MsgDataTypes,certificateType */
+	struct {
+		struct {
+			uint8_t bytes[dinSubCertificatesType_Certificate_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[dinSubCertificatesType_Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Certificate;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":SessionID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo)',  derivedBy='EXTENSION'.  */
+#define dinMeteringReceiptReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinMeteringReceiptReqType_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */
+struct dinMeteringReceiptReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinMeteringReceiptReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":SessionID, urn:iso:15118:2:2010:MsgDataTypes,sessionIDType */
+	struct {
+		uint8_t bytes[dinMeteringReceiptReqType_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */
+	int16_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinMeterInfoType MeterInfo ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus)',  derivedBy='EXTENSION'.  */
+struct dinPowerDeliveryResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinEVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinAC_EVSEStatusType AC_EVSEStatus ;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	unsigned int DC_EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+struct dinWeldingDetectionResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEPresentVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+struct dinContractAuthenticationResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */
+	dinEVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSelectedServiceListType_SelectedService_ARRAY_SIZE 16
+struct dinSelectedServiceListType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SelectedService, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinSelectedServiceType array[dinSelectedServiceListType_SelectedService_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SelectedService;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit{0-1})',  derivedBy='EXTENSION'.  */
+struct dinCurrentDemandResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEPresentVoltage ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEPresentCurrent ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSECurrentLimitAchieved ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEVoltageLimitAchieved ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEPowerLimitAchieved ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaximumVoltageLimit ;
+	unsigned int EVSEMaximumVoltageLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaximumCurrentLimit ;
+	unsigned int EVSEMaximumCurrentLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaximumPowerLimit ;
+	unsigned int EVSEMaximumPowerLimit_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)',  derivedBy='EXTENSION'.  */
+struct dinAC_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EAmount, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EAmount ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaxVoltage ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaxCurrent ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMinCurrent ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define dinX509DataType_X509IssuerSerial_ARRAY_SIZE 1
+#define dinX509DataType_X509SKI_BYTES_SIZE 350
+#define dinX509DataType_X509SKI_ARRAY_SIZE 1
+#define dinX509DataType_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinX509DataType_X509SubjectName_ARRAY_SIZE 1
+#define dinX509DataType_X509Certificate_BYTES_SIZE 350
+#define dinX509DataType_X509Certificate_ARRAY_SIZE 1
+#define dinX509DataType_X509CRL_BYTES_SIZE 350
+#define dinX509DataType_X509CRL_ARRAY_SIZE 1
+#define dinX509DataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinX509DataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinX509IssuerSerialType array[dinX509DataType_X509IssuerSerial_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509IssuerSerial;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SKI, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[dinX509DataType_X509SKI_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[dinX509DataType_X509SKI_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SKI;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SubjectName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[dinX509DataType_X509SubjectName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[dinX509DataType_X509SubjectName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SubjectName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Certificate, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[dinX509DataType_X509Certificate_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[dinX509DataType_X509Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Certificate;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509CRL, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[dinX509DataType_X509CRL_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[dinX509DataType_X509CRL_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509CRL;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinX509DataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2010:MsgBody":ReceiptRequired,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)',  derivedBy='EXTENSION'.  */
+#define dinChargingStatusResType_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */
+struct dinChargingStatusResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEID, urn:iso:15118:2:2010:MsgDataTypes,evseIDType */
+	struct {
+		uint8_t bytes[dinChargingStatusResType_EVSEID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */
+	int16_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaxCurrent ;
+	unsigned int EVSEMaxCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":MeterID,"urn:iso:15118:2:2010:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2010:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinMeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinAC_EVSEStatusType AC_EVSEStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+struct dinWeldingDetectionReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVStatusType DC_EVStatus ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSignaturePropertiesType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE 1
+struct dinSignaturePropertiesType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinSignaturePropertiesType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureProperty, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinSignaturePropertyType array[dinSignaturePropertiesType_SignatureProperty_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SignatureProperty;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType',  base type name='EVPowerDeliveryParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)',  derivedBy='EXTENSION'.  */
+struct dinDC_EVPowerDeliveryParameterType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int BulkChargingComplete ;
+	unsigned int BulkChargingComplete_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int ChargingComplete ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+struct dinCableCheckReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVStatusType DC_EVStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})',  derivedBy='EXTENSION'.  */
+struct dinDC_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaximumCurrentLimit ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaximumPowerLimit ;
+	unsigned int EVMaximumPowerLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaximumVoltageLimit ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVEnergyCapacity ;
+	unsigned int EVEnergyCapacity_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVEnergyRequest ;
+	unsigned int EVEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":FullSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */
+	int8_t FullSOC ;
+	unsigned int FullSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":BulkSOC, urn:iso:15118:2:2010:MsgDataTypes,percentValueType */
+	int8_t BulkSOC ;
+	unsigned int BulkSOC_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE 5
+struct dinPMaxScheduleType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */
+	int16_t PMaxScheduleID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":PMax))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct dinPMaxScheduleEntryType array[dinPMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PMaxScheduleEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2010:MsgBody":SelectedServiceList)',  derivedBy='EXTENSION'.  */
+struct dinServicePaymentSelectionReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption, urn:iso:15118:2:2010:MsgDataTypes,paymentOptionType */
+	dinpaymentOptionType SelectedPaymentOption ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":SelectedServiceList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SelectedServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SelectedService{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinSelectedServiceListType SelectedServiceList ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+struct dinPreChargeResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEPresentVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})',  derivedBy='EXTENSION'.  */
+struct dinDC_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaximumCurrentLimit ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaximumPowerLimit ;
+	unsigned int EVSEMaximumPowerLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMaximumVoltageLimit ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMinimumCurrentLimit ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEMinimumVoltageLimit ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSECurrentRegulationTolerance ;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEPeakCurrentRipple ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVSEEnergyToBeDelivered ;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":GenChallenge,"urn:iso:15118:2:2010:MsgBody":DateTimeNow)',  derivedBy='EXTENSION'.  */
+#define dinPaymentDetailsResType_GenChallenge_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinPaymentDetailsResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":GenChallenge, urn:iso:15118:2:2010:MsgDataTypes,genChallengeType */
+	struct {
+		exi_string_character_t characters[dinPaymentDetailsResType_GenChallenge_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  GenChallenge ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DateTimeNow, http://www.w3.org/2001/XMLSchema,long */
+	int64_t DateTimeNow ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+#define dinKeyValueType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinDSAKeyValueType DSAKeyValue ;
+	unsigned int DSAKeyValue_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+	struct dinRSAKeyValueType RSAKeyValue ;
+	unsigned int RSAKeyValue_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinKeyValueType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ReadyToChargeState,"urn:iso:15118:2:2010:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter{0-1})',  derivedBy='EXTENSION'.  */
+struct dinPowerDeliveryReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ReadyToChargeState, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReadyToChargeState ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ChargingProfile, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ChargingProfileType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":ProfileEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinChargingProfileType ChargingProfile ;
+	unsigned int ChargingProfile_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVPowerDeliveryParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ;
+	unsigned int EVPowerDeliveryParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVPowerDeliveryParameterType',  base type name='EVPowerDeliveryParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ChargingComplete)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ;
+	unsigned int DC_EVPowerDeliveryParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+#define dinCertificateChainType_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */
+struct dinCertificateChainType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Certificate, urn:iso:15118:2:2010:MsgDataTypes,certificateType */
+	struct {
+		uint8_t bytes[dinCertificateChainType_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Certificate ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SubCertificates, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SubCertificatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinSubCertificatesType SubCertificates ;
+	unsigned int SubCertificates_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":boolValue|"urn:iso:15118:2:2010:MsgDataTypes":byteValue|"urn:iso:15118:2:2010:MsgDataTypes":shortValue|"urn:iso:15118:2:2010:MsgDataTypes":intValue|"urn:iso:15118:2:2010:MsgDataTypes":physicalValue|"urn:iso:15118:2:2010:MsgDataTypes":stringValue)',  derivedBy='RESTRICTION'.  */
+#define dinParameterType_Name_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinParameterType_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinParameterType {
+	/* attribute: Name {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[dinParameterType_Name_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Name ;
+	/* attribute: ValueType {urn:iso:15118:2:2010:MsgDataTypes,valueType} */
+	dinvalueType ValueType ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":boolValue, http://www.w3.org/2001/XMLSchema,boolean */
+	int boolValue ;
+	unsigned int boolValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":byteValue, http://www.w3.org/2001/XMLSchema,byte */
+	int8_t byteValue ;
+	unsigned int byteValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":shortValue, http://www.w3.org/2001/XMLSchema,short */
+	int16_t shortValue ;
+	unsigned int shortValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":intValue, http://www.w3.org/2001/XMLSchema,int */
+	int32_t intValue ;
+	unsigned int intValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":physicalValue, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType physicalValue ;
+	unsigned int physicalValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":stringValue, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[dinParameterType_stringValue_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  stringValue ;
+	unsigned int stringValue_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinParameterSetType_Parameter_ARRAY_SIZE 16
+struct dinParameterSetType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,short */
+	int16_t ParameterSetID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Parameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":boolValue|"urn:iso:15118:2:2010:MsgDataTypes":byteValue|"urn:iso:15118:2:2010:MsgDataTypes":shortValue|"urn:iso:15118:2:2010:MsgDataTypes":intValue|"urn:iso:15118:2:2010:MsgDataTypes":physicalValue|"urn:iso:15118:2:2010:MsgDataTypes":stringValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinParameterType array[dinParameterSetType_Parameter_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Parameter;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2010:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgBody":ChargingComplete,"urn:iso:15118:2:2010:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2010:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage)',  derivedBy='EXTENSION'.  */
+struct dinCurrentDemandReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVTargetCurrent ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaximumVoltageLimit ;
+	unsigned int EVMaximumVoltageLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaximumCurrentLimit ;
+	unsigned int EVMaximumCurrentLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVMaximumPowerLimit, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVMaximumPowerLimit ;
+	unsigned int EVMaximumPowerLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int BulkChargingComplete ;
+	unsigned int BulkChargingComplete_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int ChargingComplete ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":RemainingTimeToFullSoC, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType RemainingTimeToFullSoC ;
+	unsigned int RemainingTimeToFullSoC_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":RemainingTimeToBulkSoC, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType RemainingTimeToBulkSoC ;
+	unsigned int RemainingTimeToBulkSoC_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVTargetVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent)',  derivedBy='EXTENSION'.  */
+struct dinPreChargeReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVReady,"urn:iso:15118:2:2010:MsgDataTypes":EVCabinConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVRESSConditioning{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2010:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVTargetVoltage ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Multiplier,"urn:iso:15118:2:2010:MsgDataTypes":Unit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct dinPhysicalValueType EVTargetCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType,"urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter)',  derivedBy='EXTENSION'.  */
+struct dinChargeParameterDiscoveryReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType, urn:iso:15118:2:2010:MsgDataTypes,EVRequestedEnergyTransferType */
+	dinEVRequestedEnergyTransferType EVRequestedEnergyTransferType ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVChargeParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinEVChargeParameterType EVChargeParameter ;
+	unsigned int EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DepartureTime,"urn:iso:15118:2:2010:MsgDataTypes":EAmount,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVMinCurrent)',  derivedBy='EXTENSION'.  */
+	struct dinAC_EVChargeParameterType AC_EVChargeParameter ;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2010:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2010:MsgDataTypes":BulkSOC{0-1})',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVChargeParameterType DC_EVChargeParameter ;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinConsumptionCostType_Cost_ARRAY_SIZE 5
+struct dinConsumptionCostType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":startValue, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t startValue ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Cost, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":costKind,"urn:iso:15118:2:2010:MsgDataTypes":amount,"urn:iso:15118:2:2010:MsgDataTypes":amountMultiplier{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinCostType array[dinConsumptionCostType_Cost_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Cost;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)',  derivedBy='RESTRICTION'.  */
+struct dinServiceType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ServiceTag, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceID,"urn:iso:15118:2:2010:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2010:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2010:MsgDataTypes":ServiceScope{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinServiceTagType ServiceTag ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */
+	int FreeService ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinServiceTagListType_Service_ARRAY_SIZE 8
+struct dinServiceTagListType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":Service, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinServiceType array[dinServiceTagListType_Service_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Service;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":DateTimeNow{0-1})',  derivedBy='EXTENSION'.  */
+#define dinSessionSetupResType_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */
+struct dinSessionSetupResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEID, urn:iso:15118:2:2010:MsgDataTypes,evseIDType */
+	struct {
+		uint8_t bytes[dinSessionSetupResType_EVSEID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DateTimeNow, http://www.w3.org/2001/XMLSchema,long */
+	int64_t DateTimeNow ;
+	unsigned int DateTimeNow_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)',  derivedBy='EXTENSION'.  */
+struct dinMeteringReceiptResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PowerSwitchClosed,"urn:iso:15118:2:2010:MsgDataTypes":RCD,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinAC_EVSEStatusType AC_EVSEStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceParameterListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSet{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinServiceParameterListType_ParameterSet_ARRAY_SIZE 5
+struct dinServiceParameterListType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ParameterSet, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2010:MsgDataTypes":Parameter{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinParameterSetType array[dinServiceParameterListType_ParameterSet_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ParameterSet;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)',  derivedBy='EXTENSION'.  */
+#define dinCertificateUpdateReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinCertificateUpdateReqType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */
+#define dinCertificateUpdateReqType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */
+struct dinCertificateUpdateReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinCertificateUpdateReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinCertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */
+	struct {
+		exi_string_character_t characters[dinCertificateUpdateReqType_ContractID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ContractID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":RootCertificateID{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DHParams, urn:iso:15118:2:2010:MsgDataTypes,dHParamsType */
+	struct {
+		uint8_t bytes[dinCertificateUpdateReqType_DHParams_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DHParams ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+struct dinServicePaymentSelectionResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define dinKeyInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinKeyInfoType_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinKeyInfoType_KeyName_ARRAY_SIZE 1
+#define dinKeyInfoType_KeyValue_ARRAY_SIZE 1
+#define dinKeyInfoType_RetrievalMethod_ARRAY_SIZE 1
+#define dinKeyInfoType_X509Data_ARRAY_SIZE 1
+#define dinKeyInfoType_PGPData_ARRAY_SIZE 1
+#define dinKeyInfoType_SPKIData_ARRAY_SIZE 1
+#define dinKeyInfoType_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinKeyInfoType_MgmtData_ARRAY_SIZE 1
+#define dinKeyInfoType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct dinKeyInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinKeyInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[dinKeyInfoType_KeyName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[dinKeyInfoType_KeyName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinKeyValueType array[dinKeyInfoType_KeyValue_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyValue;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinRetrievalMethodType array[dinKeyInfoType_RetrievalMethod_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RetrievalMethod;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Data, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinX509DataType array[dinKeyInfoType_X509Data_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Data;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPData, Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinPGPDataType array[dinKeyInfoType_PGPData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PGPData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKIData, Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinSPKIDataType array[dinKeyInfoType_SPKIData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKIData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":MgmtData, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[dinKeyInfoType_MgmtData_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[dinKeyInfoType_MgmtData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MgmtData;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[dinKeyInfoType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain)',  derivedBy='EXTENSION'.  */
+#define dinPaymentDetailsReqType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */
+struct dinPaymentDetailsReqType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */
+	struct {
+		exi_string_character_t characters[dinPaymentDetailsReqType_ContractID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ContractID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinCertificateChainType ContractSignatureCertChain ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+struct dinCableCheckResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatusCode,"urn:iso:15118:2:2010:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2010:MsgDataTypes":EVSENotification)',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */
+	dinEVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID)',  derivedBy='EXTENSION'.  */
+#define dinCertificateInstallationResType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinCertificateInstallationResType_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */
+#define dinCertificateInstallationResType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */
+#define dinCertificateInstallationResType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */
+struct dinCertificateInstallationResType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinCertificateInstallationResType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinCertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey, urn:iso:15118:2:2010:MsgDataTypes,privateKeyType */
+	struct {
+		uint8_t bytes[dinCertificateInstallationResType_ContractSignatureEncryptedPrivateKey_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  ContractSignatureEncryptedPrivateKey ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DHParams, urn:iso:15118:2:2010:MsgDataTypes,dHParamsType */
+	struct {
+		uint8_t bytes[dinCertificateInstallationResType_DHParams_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DHParams ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */
+	struct {
+		exi_string_character_t characters[dinCertificateInstallationResType_ContractID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ContractID ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ServiceID,"urn:iso:15118:2:2010:MsgBody":ServiceParameterList{0-1})',  derivedBy='EXTENSION'.  */
+struct dinServiceDetailResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ServiceID, urn:iso:15118:2:2010:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ServiceParameterList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceParameterListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":ParameterSet{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinServiceParameterListType ServiceParameterList ;
+	unsigned int ServiceParameterList_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":RetryCounter)',  derivedBy='EXTENSION'.  */
+#define dinCertificateUpdateResType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinCertificateUpdateResType_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */
+#define dinCertificateUpdateResType_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */
+#define dinCertificateUpdateResType_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */
+struct dinCertificateUpdateResType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinCertificateUpdateResType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Certificate,"urn:iso:15118:2:2010:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinCertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey, urn:iso:15118:2:2010:MsgDataTypes,privateKeyType */
+	struct {
+		uint8_t bytes[dinCertificateUpdateResType_ContractSignatureEncryptedPrivateKey_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  ContractSignatureEncryptedPrivateKey ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":DHParams, urn:iso:15118:2:2010:MsgDataTypes,dHParamsType */
+	struct {
+		uint8_t bytes[dinCertificateUpdateResType_DHParams_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DHParams ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ContractID, urn:iso:15118:2:2010:MsgDataTypes,contractIDType */
+	struct {
+		exi_string_character_t characters[dinCertificateUpdateResType_ContractID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ContractID ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":RetryCounter, http://www.w3.org/2001/XMLSchema,short */
+	int16_t RetryCounter ;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel,"urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost{0-UNBOUNDED}))',  derivedBy='EXTENSION'.  */
+#define dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE 5
+struct dinSalesTariffEntryType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinIntervalType TimeInterval ;
+	unsigned int TimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":start,"urn:iso:15118:2:2010:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+	struct dinRelativeTimeIntervalType RelativeTimeInterval ;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t EPriceLevel ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ConsumptionCostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":startValue,"urn:iso:15118:2:2010:MsgDataTypes":Cost{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinConsumptionCostType array[dinSalesTariffEntryType_ConsumptionCost_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ConsumptionCost;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":PaymentOptions,"urn:iso:15118:2:2010:MsgBody":ChargeService,"urn:iso:15118:2:2010:MsgBody":ServiceList{0-1})',  derivedBy='EXTENSION'.  */
+struct dinServiceDiscoveryResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":PaymentOptions, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PaymentOptionsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PaymentOption{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinPaymentOptionsType PaymentOptions ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ChargeService, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceChargeType',  base type name='ServiceType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2010:MsgDataTypes":ServiceTag,"urn:iso:15118:2:2010:MsgDataTypes":FreeService),("urn:iso:15118:2:2010:MsgDataTypes":EnergyTransferType))',  derivedBy='EXTENSION'.  */
+	struct dinServiceChargeType ChargeService ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":ServiceList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,ServiceTagListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":Service{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinServiceTagListType ServiceList ;
+	unsigned int ServiceList_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSignatureType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSignatureType_Object_ARRAY_SIZE 1
+struct dinSignatureType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[dinSignatureType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignedInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinSignedInfoType SignedInfo ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct dinSignatureValueType SignatureValue ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct dinKeyInfoType KeyInfo ;
+	unsigned int KeyInfo_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Object, Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinObjectType array[dinSignatureType_Object_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Object;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2010:MsgDataTypes":NumEPriceLevels,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define dinSalesTariffType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinSalesTariffType_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType is 32 */
+#define dinSalesTariffType_SalesTariffEntry_ARRAY_SIZE 5
+struct dinSalesTariffType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,IDREF} */
+	struct {
+		exi_string_character_t characters[dinSalesTariffType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SalesTariffID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */
+	int16_t SalesTariffID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SalesTariffDescription, urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType */
+	struct {
+		exi_string_character_t characters[dinSalesTariffType_SalesTariffDescription_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  SalesTariffDescription ;
+	unsigned int SalesTariffDescription_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":NumEPriceLevels, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumEPriceLevels ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2010:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2010:MsgDataTypes":EPriceLevel,"urn:iso:15118:2:2010:MsgDataTypes":ConsumptionCost{0-UNBOUNDED}))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct dinSalesTariffEntryType array[dinSalesTariffType_SalesTariffEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SalesTariffEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgHeader,MessageHeaderType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgHeader":SessionID,"urn:iso:15118:2:2010:MsgHeader":Notification{0-1},"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})',  derivedBy='RESTRICTION'.  */
+#define dinMessageHeaderType_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */
+struct dinMessageHeaderType {
+	/* element: "urn:iso:15118:2:2010:MsgHeader":SessionID, urn:iso:15118:2:2010:MsgDataTypes,sessionIDType */
+	struct {
+		uint8_t bytes[dinMessageHeaderType_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	/* element: "urn:iso:15118:2:2010:MsgHeader":Notification, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,NotificationType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":FaultCode,"urn:iso:15118:2:2010:MsgDataTypes":FaultMsg{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinNotificationType Notification ;
+	unsigned int Notification_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Signature, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinSignatureType Signature ;
+	unsigned int Signature_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleTupleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariff{0-1})',  derivedBy='RESTRICTION'.  */
+struct dinSAScheduleTupleType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID, urn:iso:15118:2:2010:MsgDataTypes,SAIDType */
+	int16_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":PMaxSchedule, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinPMaxScheduleType PMaxSchedule ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SalesTariff, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2010:MsgDataTypes":NumEPriceLevels,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct dinSalesTariffType SalesTariff ;
+	unsigned int SalesTariff_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleListType',  base type name='SASchedulesType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTuple{1-UNBOUNDED})',  derivedBy='EXTENSION'.  */
+#define dinSAScheduleListType_SAScheduleTuple_ARRAY_SIZE 5
+struct dinSAScheduleListType {
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTuple, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleTupleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2010:MsgDataTypes":SalesTariff{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct dinSAScheduleTupleType array[dinSAScheduleListType_SAScheduleTuple_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SAScheduleTuple;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing,"urn:iso:15118:2:2010:MsgDataTypes":SASchedules,"urn:iso:15118:2:2010:MsgDataTypes":EVSEChargeParameter)',  derivedBy='EXTENSION'.  */
+struct dinChargeParameterDiscoveryResType {
+	/* element: "urn:iso:15118:2:2010:MsgBody":ResponseCode, urn:iso:15118:2:2010:MsgDataTypes,responseCodeType */
+	dinresponseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2010:MsgBody":EVSEProcessing, urn:iso:15118:2:2010:MsgDataTypes,EVSEProcessingType */
+	dinEVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SASchedules, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SASchedulesType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinSASchedulesType SASchedules ;
+	unsigned int SASchedules_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":SAScheduleList, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,SAScheduleListType',  base type name='SASchedulesType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":SAScheduleTuple{1-UNBOUNDED})',  derivedBy='EXTENSION'.  */
+	struct dinSAScheduleListType SAScheduleList ;
+	unsigned int SAScheduleList_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":EVSEChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,EVSEChargeParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct dinEVSEChargeParameterType EVSEChargeParameter ;
+	unsigned int EVSEChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,AC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxVoltage,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaxCurrent,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinCurrent)',  derivedBy='EXTENSION'.  */
+	struct dinAC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2010:MsgDataTypes,DC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2010:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2010:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})',  derivedBy='EXTENSION'.  */
+	struct dinDC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDef,BodyType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDef":BodyElement{0-1})',  derivedBy='RESTRICTION'.  */
+struct dinBodyType {
+	/* substitutionGroup */
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		/* element: "urn:iso:15118:2:2010:MsgDef":BodyElement, Complex type name='urn:iso:15118:2:2010:MsgDef,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct dinBodyBaseType BodyElement ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":SessionSetupReq, Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":EVCCID)',  derivedBy='EXTENSION'.  */
+		struct dinSessionSetupReqType SessionSetupReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":SessionSetupRes, Complex type name='urn:iso:15118:2:2010:MsgBody,SessionSetupResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":DateTimeNow{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinSessionSetupResType SessionSetupRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ServiceDiscoveryReq, Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2010:MsgBody":ServiceCategory{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinServiceDiscoveryReqType ServiceDiscoveryReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ServiceDiscoveryRes, Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":PaymentOptions,"urn:iso:15118:2:2010:MsgBody":ChargeService,"urn:iso:15118:2:2010:MsgBody":ServiceList{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinServiceDiscoveryResType ServiceDiscoveryRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ServiceDetailReq, Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ServiceID)',  derivedBy='EXTENSION'.  */
+		struct dinServiceDetailReqType ServiceDetailReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ServiceDetailRes, Complex type name='urn:iso:15118:2:2010:MsgBody,ServiceDetailResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ServiceID,"urn:iso:15118:2:2010:MsgBody":ServiceParameterList{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinServiceDetailResType ServiceDetailRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ServicePaymentSelectionReq, Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2010:MsgBody":SelectedServiceList)',  derivedBy='EXTENSION'.  */
+		struct dinServicePaymentSelectionReqType ServicePaymentSelectionReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ServicePaymentSelectionRes, Complex type name='urn:iso:15118:2:2010:MsgBody,ServicePaymentSelectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+		struct dinServicePaymentSelectionResType ServicePaymentSelectionRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":PaymentDetailsReq, Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain)',  derivedBy='EXTENSION'.  */
+		struct dinPaymentDetailsReqType PaymentDetailsReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":PaymentDetailsRes, Complex type name='urn:iso:15118:2:2010:MsgBody,PaymentDetailsResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":GenChallenge,"urn:iso:15118:2:2010:MsgBody":DateTimeNow)',  derivedBy='EXTENSION'.  */
+		struct dinPaymentDetailsResType PaymentDetailsRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ContractAuthenticationReq, Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":GenChallenge{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinContractAuthenticationReqType ContractAuthenticationReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ContractAuthenticationRes, Complex type name='urn:iso:15118:2:2010:MsgBody,ContractAuthenticationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+		struct dinContractAuthenticationResType ContractAuthenticationRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ChargeParameterDiscoveryReq, Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":EVRequestedEnergyTransferType,"urn:iso:15118:2:2010:MsgDataTypes":EVChargeParameter)',  derivedBy='EXTENSION'.  */
+		struct dinChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ChargeParameterDiscoveryRes, Complex type name='urn:iso:15118:2:2010:MsgBody,ChargeParameterDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing,"urn:iso:15118:2:2010:MsgDataTypes":SASchedules,"urn:iso:15118:2:2010:MsgDataTypes":EVSEChargeParameter)',  derivedBy='EXTENSION'.  */
+		struct dinChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":PowerDeliveryReq, Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ReadyToChargeState,"urn:iso:15118:2:2010:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2010:MsgDataTypes":EVPowerDeliveryParameter{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinPowerDeliveryReqType PowerDeliveryReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":PowerDeliveryRes, Complex type name='urn:iso:15118:2:2010:MsgBody,PowerDeliveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgDataTypes":EVSEStatus)',  derivedBy='EXTENSION'.  */
+		struct dinPowerDeliveryResType PowerDeliveryRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ChargingStatusReq, Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+		struct dinChargingStatusReqType ChargingStatusReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":ChargingStatusRes, Complex type name='urn:iso:15118:2:2010:MsgBody,ChargingStatusResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":EVSEID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2010:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2010:MsgBody":ReceiptRequired,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)',  derivedBy='EXTENSION'.  */
+		struct dinChargingStatusResType ChargingStatusRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":MeteringReceiptReq, Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":SessionID,"urn:iso:15118:2:2010:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2010:MsgBody":MeterInfo)',  derivedBy='EXTENSION'.  */
+		struct dinMeteringReceiptReqType MeteringReceiptReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":MeteringReceiptRes, Complex type name='urn:iso:15118:2:2010:MsgBody,MeteringReceiptResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":AC_EVSEStatus)',  derivedBy='EXTENSION'.  */
+		struct dinMeteringReceiptResType MeteringReceiptRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":SessionStopReq, Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+		struct dinSessionStopType SessionStopReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":SessionStopRes, Complex type name='urn:iso:15118:2:2010:MsgBody,SessionStopResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+		struct dinSessionStopResType SessionStopRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CertificateUpdateReq, Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)',  derivedBy='EXTENSION'.  */
+		struct dinCertificateUpdateReqType CertificateUpdateReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CertificateUpdateRes, Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateUpdateResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID,"urn:iso:15118:2:2010:MsgBody":RetryCounter)',  derivedBy='EXTENSION'.  */
+		struct dinCertificateUpdateResType CertificateUpdateRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CertificateInstallationReq, Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2010:MsgBody":ListOfRootCertificateIDs,"urn:iso:15118:2:2010:MsgBody":DHParams)',  derivedBy='EXTENSION'.  */
+		struct dinCertificateInstallationReqType CertificateInstallationReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CertificateInstallationRes, Complex type name='urn:iso:15118:2:2010:MsgBody,CertificateInstallationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2010:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2010:MsgBody":DHParams,"urn:iso:15118:2:2010:MsgBody":ContractID)',  derivedBy='EXTENSION'.  */
+		struct dinCertificateInstallationResType CertificateInstallationRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CableCheckReq, Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+		struct dinCableCheckReqType CableCheckReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CableCheckRes, Complex type name='urn:iso:15118:2:2010:MsgBody,CableCheckResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+		struct dinCableCheckResType CableCheckRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":PreChargeReq, Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent)',  derivedBy='EXTENSION'.  */
+		struct dinPreChargeReqType PreChargeReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":PreChargeRes, Complex type name='urn:iso:15118:2:2010:MsgBody,PreChargeResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+		struct dinPreChargeResType PreChargeRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CurrentDemandReq, Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus,"urn:iso:15118:2:2010:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2010:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2010:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2010:MsgBody":ChargingComplete,"urn:iso:15118:2:2010:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2010:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2010:MsgBody":EVTargetVoltage)',  derivedBy='EXTENSION'.  */
+		struct dinCurrentDemandReqType CurrentDemandReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":CurrentDemandRes, Complex type name='urn:iso:15118:2:2010:MsgBody,CurrentDemandResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2010:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2010:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2010:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2010:MsgBody":EVSEMaximumPowerLimit{0-1})',  derivedBy='EXTENSION'.  */
+		struct dinCurrentDemandResType CurrentDemandRes ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":WeldingDetectionReq, Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+		struct dinWeldingDetectionReqType WeldingDetectionReq ;
+		/* element: "urn:iso:15118:2:2010:MsgBody":WeldingDetectionRes, Complex type name='urn:iso:15118:2:2010:MsgBody,WeldingDetectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgBody":ResponseCode,"urn:iso:15118:2:2010:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2010:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+		struct dinWeldingDetectionResType WeldingDetectionRes ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		unsigned int BodyElement_isUsed:1;
+		unsigned int SessionSetupReq_isUsed:1;
+		unsigned int SessionSetupRes_isUsed:1;
+		unsigned int ServiceDiscoveryReq_isUsed:1;
+		unsigned int ServiceDiscoveryRes_isUsed:1;
+		unsigned int ServiceDetailReq_isUsed:1;
+		unsigned int ServiceDetailRes_isUsed:1;
+		unsigned int ServicePaymentSelectionReq_isUsed:1;
+		unsigned int ServicePaymentSelectionRes_isUsed:1;
+		unsigned int PaymentDetailsReq_isUsed:1;
+		unsigned int PaymentDetailsRes_isUsed:1;
+		unsigned int ContractAuthenticationReq_isUsed:1;
+		unsigned int ContractAuthenticationRes_isUsed:1;
+		unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+		unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+		unsigned int PowerDeliveryReq_isUsed:1;
+		unsigned int PowerDeliveryRes_isUsed:1;
+		unsigned int ChargingStatusReq_isUsed:1;
+		unsigned int ChargingStatusRes_isUsed:1;
+		unsigned int MeteringReceiptReq_isUsed:1;
+		unsigned int MeteringReceiptRes_isUsed:1;
+		unsigned int SessionStopReq_isUsed:1;
+		unsigned int SessionStopRes_isUsed:1;
+		unsigned int CertificateUpdateReq_isUsed:1;
+		unsigned int CertificateUpdateRes_isUsed:1;
+		unsigned int CertificateInstallationReq_isUsed:1;
+		unsigned int CertificateInstallationRes_isUsed:1;
+		unsigned int CableCheckReq_isUsed:1;
+		unsigned int CableCheckRes_isUsed:1;
+		unsigned int PreChargeReq_isUsed:1;
+		unsigned int PreChargeRes_isUsed:1;
+		unsigned int CurrentDemandReq_isUsed:1;
+		unsigned int CurrentDemandRes_isUsed:1;
+		unsigned int WeldingDetectionReq_isUsed:1;
+		unsigned int WeldingDetectionRes_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2010:MsgDef,#AnonType_V2G_Message',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDef":Header,"urn:iso:15118:2:2010:MsgDef":Body)',  derivedBy='RESTRICTION'.  */
+struct dinAnonType_V2G_Message {
+	/* element: "urn:iso:15118:2:2010:MsgDef":Header, Complex type name='urn:iso:15118:2:2010:MsgHeader,MessageHeaderType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgHeader":SessionID,"urn:iso:15118:2:2010:MsgHeader":Notification{0-1},"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinMessageHeaderType Header ;
+	/* element: "urn:iso:15118:2:2010:MsgDef":Body, Complex type name='urn:iso:15118:2:2010:MsgDef,BodyType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2010:MsgDef":BodyElement{0-1})',  derivedBy='RESTRICTION'.  */
+	struct dinBodyType Body ;
+};
+
+
+
+#define dinEXIDocument_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIDocument_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIDocument_DigestValue_BYTES_SIZE 350
+#define dinEXIFragment_Certificate_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */
+#define dinEXIFragment_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_OEMProvisioningCert_BYTES_SIZE 1200 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,certificateType is 1200 */
+#define dinEXIFragment_Exponent_BYTES_SIZE 350
+#define dinEXIFragment_SessionID_BYTES_SIZE 8 /* XML schema facet length for urn:iso:15118:2:2010:MsgDataTypes,sessionIDType is 8 */
+#define dinEXIFragment_PgenCounter_BYTES_SIZE 350
+#define dinEXIFragment_EVCCID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evccIDType is 8 */
+#define dinEXIFragment_RootCertificateID_CHARACTERS_SIZE 40 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,rootCertificateIDType is 40 */
+#define dinEXIFragment_PGPKeyPacket_BYTES_SIZE 350
+#define dinEXIFragment_Seed_BYTES_SIZE 350
+#define dinEXIFragment_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_ContractID_CHARACTERS_SIZE 24 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,contractIDType is 24 */
+#define dinEXIFragment_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_P_BYTES_SIZE 350
+#define dinEXIFragment_Q_BYTES_SIZE 350
+#define dinEXIFragment_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_G_BYTES_SIZE 350
+#define dinEXIFragment_J_BYTES_SIZE 350
+#define dinEXIFragment_X509CRL_BYTES_SIZE 350
+#define dinEXIFragment_Y_BYTES_SIZE 350
+#define dinEXIFragment_DigestValue_BYTES_SIZE 350
+#define dinEXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE 128 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,privateKeyType is 128 */
+#define dinEXIFragment_SPKISexp_BYTES_SIZE 350
+#define dinEXIFragment_DHParams_BYTES_SIZE 256 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,dHParamsType is 256 */
+#define dinEXIFragment_PGPKeyID_BYTES_SIZE 350
+#define dinEXIFragment_X509Certificate_BYTES_SIZE 350
+#define dinEXIFragment_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceNameType is 32 */
+#define dinEXIFragment_EVSEID_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,evseIDType is 32 */
+#define dinEXIFragment_ServiceScope_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,serviceScopeType is 32 */
+#define dinEXIFragment_GenChallenge_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,tariffDescriptionType is 32 */
+#define dinEXIFragment_FaultMsg_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,faultMsgType is 64 */
+#define dinEXIFragment_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_SigMeterReading_BYTES_SIZE 32 /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,sigMeterReadingType is 32 */
+#define dinEXIFragment_X509SKI_BYTES_SIZE 350
+#define dinEXIFragment_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define dinEXIFragment_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2010:MsgDataTypes,meterIDType is 32 */
+#define dinEXIFragment_Modulus_BYTES_SIZE 350
+
+
+/* Global elements of EXI Document */
+struct dinEXIDocument {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	struct dinBodyBaseType BodyElement ;
+	struct dinAnonType_V2G_Message V2G_Message ;
+	struct dinSignaturePropertyType SignatureProperty ;
+	struct dinDSAKeyValueType DSAKeyValue ;
+	struct dinSignaturePropertiesType SignatureProperties ;
+	struct dinKeyValueType KeyValue ;
+	struct dinTransformsType Transforms ;
+	struct dinDigestMethodType DigestMethod ;
+	struct dinSignatureType Signature ;
+	struct dinRetrievalMethodType RetrievalMethod ;
+	struct dinManifestType Manifest ;
+	struct dinReferenceType Reference ;
+	struct dinCanonicalizationMethodType CanonicalizationMethod ;
+	struct dinRSAKeyValueType RSAKeyValue ;
+	struct dinTransformType Transform ;
+	struct dinPGPDataType PGPData ;
+	struct {
+		exi_string_character_t characters[dinEXIDocument_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct dinSignatureMethodType SignatureMethod ;
+	struct dinKeyInfoType KeyInfo ;
+	struct dinSPKIDataType SPKIData ;
+	struct dinX509DataType X509Data ;
+	struct dinSignatureValueType SignatureValue ;
+	struct {
+		exi_string_character_t characters[dinEXIDocument_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct {
+		uint8_t bytes[dinEXIDocument_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct dinSignedInfoType SignedInfo ;
+	struct dinObjectType Object ;
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	struct dinRelativeTimeIntervalType RelativeTimeInterval ;
+	struct dinSalesTariffEntryType SalesTariffEntry ;
+	struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ;
+	struct dinSASchedulesType SASchedules ;
+	struct dinAC_EVChargeParameterType AC_EVChargeParameter ;
+	struct dinSAScheduleListType SAScheduleList ;
+	struct dinDC_EVStatusType DC_EVStatus ;
+	struct dinServiceChargeType ServiceCharge ;
+	struct dinEVStatusType EVStatus ;
+	struct dinDC_EVChargeParameterType DC_EVChargeParameter ;
+	struct dinDC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	struct dinEVSEStatusType EVSEStatus ;
+	struct dinIntervalType TimeInterval ;
+	struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ;
+	struct dinEVSEChargeParameterType EVSEChargeParameter ;
+	struct dinAC_EVSEStatusType AC_EVSEStatus ;
+	struct dinEntryType Entry ;
+	struct dinAC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	struct dinPMaxScheduleEntryType PMaxScheduleEntry ;
+	struct dinEVChargeParameterType EVChargeParameter ;
+	struct dinServiceDiscoveryReqType ServiceDiscoveryReq ;
+	struct dinServiceDiscoveryResType ServiceDiscoveryRes ;
+	struct dinMeteringReceiptReqType MeteringReceiptReq ;
+	struct dinPaymentDetailsReqType PaymentDetailsReq ;
+	struct dinMeteringReceiptResType MeteringReceiptRes ;
+	struct dinPaymentDetailsResType PaymentDetailsRes ;
+	struct dinSessionSetupReqType SessionSetupReq ;
+	struct dinSessionSetupResType SessionSetupRes ;
+	struct dinCableCheckReqType CableCheckReq ;
+	struct dinCableCheckResType CableCheckRes ;
+	struct dinContractAuthenticationReqType ContractAuthenticationReq ;
+	struct dinCertificateInstallationReqType CertificateInstallationReq ;
+	struct dinContractAuthenticationResType ContractAuthenticationRes ;
+	struct dinCertificateInstallationResType CertificateInstallationRes ;
+	struct dinWeldingDetectionReqType WeldingDetectionReq ;
+	struct dinWeldingDetectionResType WeldingDetectionRes ;
+	struct dinCertificateUpdateReqType CertificateUpdateReq ;
+	struct dinCertificateUpdateResType CertificateUpdateRes ;
+	struct dinPowerDeliveryReqType PowerDeliveryReq ;
+	struct dinPowerDeliveryResType PowerDeliveryRes ;
+	struct dinChargingStatusReqType ChargingStatusReq ;
+	struct dinChargingStatusResType ChargingStatusRes ;
+	struct dinCurrentDemandReqType CurrentDemandReq ;
+	struct dinPreChargeReqType PreChargeReq ;
+	struct dinCurrentDemandResType CurrentDemandRes ;
+	struct dinPreChargeResType PreChargeRes ;
+	struct dinServicePaymentSelectionReqType ServicePaymentSelectionReq ;
+	struct dinSessionStopType SessionStopReq ;
+	struct dinServicePaymentSelectionResType ServicePaymentSelectionRes ;
+	struct dinSessionStopResType SessionStopRes ;
+	struct dinChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+	struct dinChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+	struct dinServiceDetailReqType ServiceDetailReq ;
+	struct dinServiceDetailResType ServiceDetailRes ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int BodyElement_isUsed:1;
+	unsigned int V2G_Message_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int Object_isUsed:1;
+	unsigned int DC_EVSEStatus_isUsed:1;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	unsigned int SalesTariffEntry_isUsed:1;
+	unsigned int DC_EVPowerDeliveryParameter_isUsed:1;
+	unsigned int SASchedules_isUsed:1;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	unsigned int SAScheduleList_isUsed:1;
+	unsigned int DC_EVStatus_isUsed:1;
+	unsigned int ServiceCharge_isUsed:1;
+	unsigned int EVStatus_isUsed:1;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	unsigned int EVSEStatus_isUsed:1;
+	unsigned int TimeInterval_isUsed:1;
+	unsigned int EVPowerDeliveryParameter_isUsed:1;
+	unsigned int EVSEChargeParameter_isUsed:1;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	unsigned int Entry_isUsed:1;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	unsigned int PMaxScheduleEntry_isUsed:1;
+	unsigned int EVChargeParameter_isUsed:1;
+	unsigned int ServiceDiscoveryReq_isUsed:1;
+	unsigned int ServiceDiscoveryRes_isUsed:1;
+	unsigned int MeteringReceiptReq_isUsed:1;
+	unsigned int PaymentDetailsReq_isUsed:1;
+	unsigned int MeteringReceiptRes_isUsed:1;
+	unsigned int PaymentDetailsRes_isUsed:1;
+	unsigned int SessionSetupReq_isUsed:1;
+	unsigned int SessionSetupRes_isUsed:1;
+	unsigned int CableCheckReq_isUsed:1;
+	unsigned int CableCheckRes_isUsed:1;
+	unsigned int ContractAuthenticationReq_isUsed:1;
+	unsigned int CertificateInstallationReq_isUsed:1;
+	unsigned int ContractAuthenticationRes_isUsed:1;
+	unsigned int CertificateInstallationRes_isUsed:1;
+	unsigned int WeldingDetectionReq_isUsed:1;
+	unsigned int WeldingDetectionRes_isUsed:1;
+	unsigned int CertificateUpdateReq_isUsed:1;
+	unsigned int CertificateUpdateRes_isUsed:1;
+	unsigned int PowerDeliveryReq_isUsed:1;
+	unsigned int PowerDeliveryRes_isUsed:1;
+	unsigned int ChargingStatusReq_isUsed:1;
+	unsigned int ChargingStatusRes_isUsed:1;
+	unsigned int CurrentDemandReq_isUsed:1;
+	unsigned int PreChargeReq_isUsed:1;
+	unsigned int CurrentDemandRes_isUsed:1;
+	unsigned int PreChargeRes_isUsed:1;
+	unsigned int ServicePaymentSelectionReq_isUsed:1;
+	unsigned int SessionStopReq_isUsed:1;
+	unsigned int ServicePaymentSelectionRes_isUsed:1;
+	unsigned int SessionStopRes_isUsed:1;
+	unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+	unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+	unsigned int ServiceDetailReq_isUsed:1;
+	unsigned int ServiceDetailRes_isUsed:1;
+
+
+	int _warning_;
+};
+
+
+#if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES
+/* Possible elements of EXI Fragment */
+struct dinEXIFragment {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	dinunitSymbolType Unit ;
+	struct dinPhysicalValueType EVSEMaximumCurrentLimit ;
+	struct dinEVPowerDeliveryParameterType EVPowerDeliveryParameter ;
+	int16_t ChargingProfileEntryMaxPower ;
+	int64_t TMeter ;
+	int EVSEPowerLimitAchieved ;
+	uint32_t duration ;
+	struct dinPhysicalValueType EVMaximumCurrentLimit ;
+	struct dinParameterType Parameter ;
+	dinEVSEProcessingType EVSEProcessing ;
+	struct dinAC_EVChargeParameterType AC_EVChargeParameter ;
+	struct dinPMaxScheduleEntryType PMaxScheduleEntry ;
+	struct dinPhysicalValueType EVSEMaximumVoltageLimit ;
+	struct dinSelectedServiceType SelectedService ;
+	struct {
+		uint8_t bytes[dinEXIFragment_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Certificate ;
+	struct dinPhysicalValueType EVSEMaximumPowerLimit ;
+	int EVReady ;
+	int64_t X509SerialNumber ;
+	struct dinRetrievalMethodType RetrievalMethod ;
+	int16_t RetryCounter ;
+	struct dinDC_EVSEStatusType DC_EVSEStatus ;
+	struct dinMeteringReceiptReqType MeteringReceiptReq ;
+	int ReadyToChargeState ;
+	int8_t Multiplier ;
+	uint8_t EPriceLevel ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_stringValue_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  stringValue ;
+	struct dinServiceDiscoveryReqType ServiceDiscoveryReq ;
+	struct dinTransformsType Transforms ;
+	struct dinMeteringReceiptResType MeteringReceiptRes ;
+	struct dinPreChargeReqType PreChargeReq ;
+	struct {
+		uint8_t bytes[dinEXIFragment_OEMProvisioningCert_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  OEMProvisioningCert ;
+	struct dinServiceDiscoveryResType ServiceDiscoveryRes ;
+	dinresponseCodeType ResponseCode ;
+	struct dinContractAuthenticationReqType ContractAuthenticationReq ;
+	struct dinCertificateChainType ContractSignatureCertChain ;
+	struct dinContractAuthenticationResType ContractAuthenticationRes ;
+	int64_t HMACOutputLength ;
+	int BulkChargingComplete ;
+	struct {
+		uint8_t bytes[dinEXIFragment_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+	struct dinDC_EVStatusType DC_EVStatus ;
+	struct dinSAScheduleTupleType SAScheduleTuple ;
+	uint32_t DepartureTime ;
+	struct dinX509IssuerSerialType X509IssuerSerial ;
+	int16_t SAScheduleTupleID ;
+	struct dinSPKIDataType SPKIData ;
+	struct dinRelativeTimeIntervalType RelativeTimeInterval ;
+	struct dinPhysicalValueType EVEnergyRequest ;
+	struct dinPreChargeResType PreChargeRes ;
+	struct {
+		uint8_t bytes[dinEXIFragment_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	struct dinPMaxScheduleType PMaxSchedule ;
+	struct dinServiceChargeType ServiceCharge ;
+	struct {
+		uint8_t bytes[dinEXIFragment_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	struct dinChargingStatusReqType ChargingStatusReq ;
+	struct dinX509DataType X509Data ;
+	struct dinSalesTariffEntryType SalesTariffEntry ;
+	struct dinKeyValueType KeyValue ;
+	struct dinChargingStatusResType ChargingStatusRes ;
+	struct dinAnonType_V2G_Message V2G_Message ;
+	struct dinServicePaymentSelectionReqType ServicePaymentSelectionReq ;
+	dinisolationLevelType EVSEIsolationStatus ;
+	struct dinServicePaymentSelectionResType ServicePaymentSelectionRes ;
+	struct dinPhysicalValueType EVSEPresentVoltage ;
+	struct dinBodyBaseType BodyElement ;
+	struct {
+		uint8_t bytes[dinEXIFragment_EVCCID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVCCID ;
+	struct dinPGPDataType PGPData ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_RootCertificateID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  RootCertificateID ;
+	dinfaultCodeType FaultCode ;
+	struct dinCableCheckReqType CableCheckReq ;
+	int EVSEVoltageLimitAchieved ;
+	int EVRESSConditioning ;
+	struct dinMeterInfoType MeterInfo ;
+	struct dinCableCheckResType CableCheckRes ;
+	uint32_t ChargingProfileEntryStart ;
+	struct dinSignaturePropertyType SignatureProperty ;
+	struct dinPhysicalValueType EVMaxCurrent ;
+	struct {
+		uint8_t bytes[dinEXIFragment_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	struct {
+		uint8_t bytes[dinEXIFragment_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	struct dinRSAKeyValueType RSAKeyValue ;
+	dincostKindType costKind ;
+	struct dinPhysicalValueType EAmount ;
+	struct dinPhysicalValueType EVSEPresentCurrent ;
+	struct dinPowerDeliveryResType PowerDeliveryRes ;
+	uint8_t NumEPriceLevels ;
+	struct dinSessionStopResType SessionStopRes ;
+	struct dinPowerDeliveryReqType PowerDeliveryReq ;
+	struct dinSessionStopType SessionStopReq ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_XPath_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  XPath ;
+	int8_t BulkSOC ;
+	int16_t PMax ;
+	int16_t ParameterSetID ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_ContractID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ContractID ;
+	struct dinSignatureType Signature ;
+	struct dinPhysicalValueType EVMaxVoltage ;
+	int ReceiptRequired ;
+	int ChargingComplete ;
+	struct dinChargingProfileType ChargingProfile ;
+	struct dinPaymentOptionsType PaymentOptions ;
+	struct dinSessionSetupResType SessionSetupRes ;
+	struct dinServiceDetailResType ServiceDetailRes ;
+	struct dinDC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ;
+	struct dinPaymentDetailsResType PaymentDetailsRes ;
+	struct dinPaymentDetailsReqType PaymentDetailsReq ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	int16_t Value ;
+	dinEVSENotificationType EVSENotification ;
+	struct dinPhysicalValueType EVTargetCurrent ;
+	struct dinPhysicalValueType RemainingTimeToBulkSoC ;
+	struct dinSessionSetupReqType SessionSetupReq ;
+	int EVSECurrentLimitAchieved ;
+	struct dinServiceDetailReqType ServiceDetailReq ;
+	int8_t byteValue ;
+	struct dinPhysicalValueType EVMaximumPowerLimit ;
+	int PowerSwitchClosed ;
+	struct dinManifestType Manifest ;
+	struct {
+		uint8_t bytes[dinEXIFragment_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	struct dinSAScheduleListType SAScheduleList ;
+	struct {
+		uint8_t bytes[dinEXIFragment_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_X509SubjectName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509SubjectName ;
+	struct {
+		uint8_t bytes[dinEXIFragment_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	struct {
+		uint8_t bytes[dinEXIFragment_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	struct dinCertificateInstallationResType CertificateInstallationRes ;
+	struct dinCertificateInstallationReqType CertificateInstallationReq ;
+	struct dinSalesTariffType SalesTariff ;
+	struct dinMessageHeaderType Header ;
+	struct dinPhysicalValueType EVSEMinimumCurrentLimit ;
+	struct {
+		uint8_t bytes[dinEXIFragment_X509CRL_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509CRL ;
+	struct {
+		uint8_t bytes[dinEXIFragment_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	struct {
+		uint8_t bytes[dinEXIFragment_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct dinDC_EVChargeParameterType DC_EVChargeParameter ;
+	struct {
+		uint8_t bytes[dinEXIFragment_ContractSignatureEncryptedPrivateKey_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  ContractSignatureEncryptedPrivateKey ;
+	struct dinDigestMethodType DigestMethod ;
+	struct {
+		uint8_t bytes[dinEXIFragment_SPKISexp_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SPKISexp ;
+	struct dinServiceChargeType ChargeService ;
+	struct dinPhysicalValueType EVSEEnergyToBeDelivered ;
+	struct dinSignaturePropertiesType SignatureProperties ;
+	struct dinPhysicalValueType EVSEMaxCurrent ;
+	struct dinEVSEStatusType EVSEStatus ;
+	struct dinServiceType Service ;
+	struct {
+		uint8_t bytes[dinEXIFragment_DHParams_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DHParams ;
+	struct {
+		uint8_t bytes[dinEXIFragment_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	struct dinDSAKeyValueType DSAKeyValue ;
+	dinEVSESupportedEnergyTransferType EnergyTransferType ;
+	struct dinWeldingDetectionResType WeldingDetectionRes ;
+	int FreeService ;
+	struct dinSelectedServiceListType SelectedServiceList ;
+	struct dinWeldingDetectionReqType WeldingDetectionReq ;
+	struct dinPhysicalValueType EVTargetVoltage ;
+	struct dinCanonicalizationMethodType CanonicalizationMethod ;
+	struct {
+		uint8_t bytes[dinEXIFragment_X509Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509Certificate ;
+	struct dinCertificateUpdateResType CertificateUpdateRes ;
+	struct dinCertificateUpdateReqType CertificateUpdateReq ;
+	struct dinPhysicalValueType EVSEMaxVoltage ;
+	struct dinSignedInfoType SignedInfo ;
+	struct dinAC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	struct dinPhysicalValueType EVEnergyCapacity ;
+	uint16_t ServiceID ;
+	struct dinPhysicalValueType EVSECurrentRegulationTolerance ;
+	struct dinServiceParameterListType ServiceParameterList ;
+	struct dinListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+	struct dinProfileEntryType ProfileEntry ;
+	struct dinPhysicalValueType EVSEMinimumVoltageLimit ;
+	struct dinCurrentDemandResType CurrentDemandRes ;
+	int8_t EVRESSSOC ;
+	struct dinPhysicalValueType MeterReading ;
+	struct dinCurrentDemandReqType CurrentDemandReq ;
+	struct dinPhysicalValueType physicalValue ;
+	struct dinIntervalType TimeInterval ;
+	struct dinAC_EVSEStatusType AC_EVSEStatus ;
+	struct dinPhysicalValueType EVMaximumVoltageLimit ;
+	struct dinSignatureValueType SignatureValue ;
+	int64_t DateTimeNow ;
+	struct dinServiceTagType ServiceTag ;
+	int32_t intValue ;
+	dinpaymentOptionType SelectedPaymentOption ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_ServiceName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceName ;
+	int EVCabinConditioning ;
+	struct {
+		uint8_t bytes[dinEXIFragment_EVSEID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVSEID ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	int16_t MeterStatus ;
+	dinEVRequestedEnergyTransferType EVRequestedEnergyTransferType ;
+	dinserviceCategoryType ServiceCategory ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_GenChallenge_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  GenChallenge ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_SalesTariffDescription_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  SalesTariffDescription ;
+	uint32_t NotificationMaxDelay ;
+	int boolValue ;
+	dinDC_EVSEStatusCodeType EVSEStatusCode ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_FaultMsg_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  FaultMsg ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct dinParameterSetType ParameterSet ;
+	struct {
+		uint8_t bytes[dinEXIFragment_SigMeterReading_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SigMeterReading ;
+	struct dinEVSEChargeParameterType EVSEChargeParameter ;
+	struct dinBodyType Body ;
+	struct dinSASchedulesType SASchedules ;
+	struct dinKeyInfoType KeyInfo ;
+	int16_t PMaxScheduleID ;
+	struct dinPhysicalValueType RemainingTimeToFullSoC ;
+	struct dinEVStatusType EVStatus ;
+	struct dinSubCertificatesType SubCertificates ;
+	dinpaymentOptionType PaymentOption ;
+	struct {
+		uint8_t bytes[dinEXIFragment_X509SKI_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509SKI ;
+	struct dinServiceTagListType ServiceList ;
+	struct dinCostType Cost ;
+	struct dinSignatureMethodType SignatureMethod ;
+	struct dinPhysicalValueType EVSEMinCurrent ;
+	struct dinConsumptionCostType ConsumptionCost ;
+	struct dinPhysicalValueType EVSEPeakCurrentRipple ;
+	dinDC_EVErrorCodeType EVErrorCode ;
+	struct dinEVChargeParameterType EVChargeParameter ;
+	uint32_t start ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	struct dinReferenceType Reference ;
+	struct dinPhysicalValueType EVMinCurrent ;
+	int8_t FullSOC ;
+	uint32_t amount ;
+	int16_t shortValue ;
+	struct dinDC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	struct dinEntryType Entry ;
+	int16_t SalesTariffID ;
+	struct {
+		exi_string_character_t characters[dinEXIFragment_MeterID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MeterID ;
+	struct dinChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+	int8_t amountMultiplier ;
+	struct dinChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+	struct dinTransformType Transform ;
+	struct dinObjectType Object ;
+	int RCD ;
+	struct dinNotificationType Notification ;
+	uint32_t startValue ;
+	struct {
+		uint8_t bytes[dinEXIFragment_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int Unit_isUsed:1;
+	unsigned int EVSEMaximumCurrentLimit_isUsed:1;
+	unsigned int EVPowerDeliveryParameter_isUsed:1;
+	unsigned int ChargingProfileEntryMaxPower_isUsed:1;
+	unsigned int TMeter_isUsed:1;
+	unsigned int EVSEPowerLimitAchieved_isUsed:1;
+	unsigned int duration_isUsed:1;
+	unsigned int EVMaximumCurrentLimit_isUsed:1;
+	unsigned int Parameter_isUsed:1;
+	unsigned int EVSEProcessing_isUsed:1;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	unsigned int PMaxScheduleEntry_isUsed:1;
+	unsigned int EVSEMaximumVoltageLimit_isUsed:1;
+	unsigned int SelectedService_isUsed:1;
+	unsigned int Certificate_isUsed:1;
+	unsigned int EVSEMaximumPowerLimit_isUsed:1;
+	unsigned int EVReady_isUsed:1;
+	unsigned int X509SerialNumber_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int RetryCounter_isUsed:1;
+	unsigned int DC_EVSEStatus_isUsed:1;
+	unsigned int MeteringReceiptReq_isUsed:1;
+	unsigned int ReadyToChargeState_isUsed:1;
+	unsigned int Multiplier_isUsed:1;
+	unsigned int EPriceLevel_isUsed:1;
+	unsigned int stringValue_isUsed:1;
+	unsigned int ServiceDiscoveryReq_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int MeteringReceiptRes_isUsed:1;
+	unsigned int PreChargeReq_isUsed:1;
+	unsigned int OEMProvisioningCert_isUsed:1;
+	unsigned int ServiceDiscoveryRes_isUsed:1;
+	unsigned int ResponseCode_isUsed:1;
+	unsigned int ContractAuthenticationReq_isUsed:1;
+	unsigned int ContractSignatureCertChain_isUsed:1;
+	unsigned int ContractAuthenticationRes_isUsed:1;
+	unsigned int HMACOutputLength_isUsed:1;
+	unsigned int BulkChargingComplete_isUsed:1;
+	unsigned int Exponent_isUsed:1;
+	unsigned int DC_EVStatus_isUsed:1;
+	unsigned int SAScheduleTuple_isUsed:1;
+	unsigned int DepartureTime_isUsed:1;
+	unsigned int X509IssuerSerial_isUsed:1;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	unsigned int EVEnergyRequest_isUsed:1;
+	unsigned int PreChargeRes_isUsed:1;
+	unsigned int SessionID_isUsed:1;
+	unsigned int PMaxSchedule_isUsed:1;
+	unsigned int ServiceCharge_isUsed:1;
+	unsigned int PgenCounter_isUsed:1;
+	unsigned int ChargingStatusReq_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int SalesTariffEntry_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int ChargingStatusRes_isUsed:1;
+	unsigned int V2G_Message_isUsed:1;
+	unsigned int ServicePaymentSelectionReq_isUsed:1;
+	unsigned int EVSEIsolationStatus_isUsed:1;
+	unsigned int ServicePaymentSelectionRes_isUsed:1;
+	unsigned int EVSEPresentVoltage_isUsed:1;
+	unsigned int BodyElement_isUsed:1;
+	unsigned int EVCCID_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int RootCertificateID_isUsed:1;
+	unsigned int FaultCode_isUsed:1;
+	unsigned int CableCheckReq_isUsed:1;
+	unsigned int EVSEVoltageLimitAchieved_isUsed:1;
+	unsigned int EVRESSConditioning_isUsed:1;
+	unsigned int MeterInfo_isUsed:1;
+	unsigned int CableCheckRes_isUsed:1;
+	unsigned int ChargingProfileEntryStart_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int EVMaxCurrent_isUsed:1;
+	unsigned int PGPKeyPacket_isUsed:1;
+	unsigned int Seed_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int costKind_isUsed:1;
+	unsigned int EAmount_isUsed:1;
+	unsigned int EVSEPresentCurrent_isUsed:1;
+	unsigned int PowerDeliveryRes_isUsed:1;
+	unsigned int NumEPriceLevels_isUsed:1;
+	unsigned int SessionStopRes_isUsed:1;
+	unsigned int PowerDeliveryReq_isUsed:1;
+	unsigned int SessionStopReq_isUsed:1;
+	unsigned int XPath_isUsed:1;
+	unsigned int BulkSOC_isUsed:1;
+	unsigned int PMax_isUsed:1;
+	unsigned int ParameterSetID_isUsed:1;
+	unsigned int ContractID_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int EVMaxVoltage_isUsed:1;
+	unsigned int ReceiptRequired_isUsed:1;
+	unsigned int ChargingComplete_isUsed:1;
+	unsigned int ChargingProfile_isUsed:1;
+	unsigned int PaymentOptions_isUsed:1;
+	unsigned int SessionSetupRes_isUsed:1;
+	unsigned int ServiceDetailRes_isUsed:1;
+	unsigned int DC_EVPowerDeliveryParameter_isUsed:1;
+	unsigned int PaymentDetailsRes_isUsed:1;
+	unsigned int PaymentDetailsReq_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int Value_isUsed:1;
+	unsigned int EVSENotification_isUsed:1;
+	unsigned int EVTargetCurrent_isUsed:1;
+	unsigned int RemainingTimeToBulkSoC_isUsed:1;
+	unsigned int SessionSetupReq_isUsed:1;
+	unsigned int EVSECurrentLimitAchieved_isUsed:1;
+	unsigned int ServiceDetailReq_isUsed:1;
+	unsigned int byteValue_isUsed:1;
+	unsigned int EVMaximumPowerLimit_isUsed:1;
+	unsigned int PowerSwitchClosed_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int P_isUsed:1;
+	unsigned int SAScheduleList_isUsed:1;
+	unsigned int Q_isUsed:1;
+	unsigned int X509SubjectName_isUsed:1;
+	unsigned int G_isUsed:1;
+	unsigned int J_isUsed:1;
+	unsigned int CertificateInstallationRes_isUsed:1;
+	unsigned int CertificateInstallationReq_isUsed:1;
+	unsigned int SalesTariff_isUsed:1;
+	unsigned int Header_isUsed:1;
+	unsigned int EVSEMinimumCurrentLimit_isUsed:1;
+	unsigned int X509CRL_isUsed:1;
+	unsigned int Y_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	unsigned int ContractSignatureEncryptedPrivateKey_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int SPKISexp_isUsed:1;
+	unsigned int ChargeService_isUsed:1;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int EVSEMaxCurrent_isUsed:1;
+	unsigned int EVSEStatus_isUsed:1;
+	unsigned int Service_isUsed:1;
+	unsigned int DHParams_isUsed:1;
+	unsigned int PGPKeyID_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int EnergyTransferType_isUsed:1;
+	unsigned int WeldingDetectionRes_isUsed:1;
+	unsigned int FreeService_isUsed:1;
+	unsigned int SelectedServiceList_isUsed:1;
+	unsigned int WeldingDetectionReq_isUsed:1;
+	unsigned int EVTargetVoltage_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int X509Certificate_isUsed:1;
+	unsigned int CertificateUpdateRes_isUsed:1;
+	unsigned int CertificateUpdateReq_isUsed:1;
+	unsigned int EVSEMaxVoltage_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	unsigned int EVEnergyCapacity_isUsed:1;
+	unsigned int ServiceID_isUsed:1;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	unsigned int ServiceParameterList_isUsed:1;
+	unsigned int ListOfRootCertificateIDs_isUsed:1;
+	unsigned int ProfileEntry_isUsed:1;
+	unsigned int EVSEMinimumVoltageLimit_isUsed:1;
+	unsigned int CurrentDemandRes_isUsed:1;
+	unsigned int EVRESSSOC_isUsed:1;
+	unsigned int MeterReading_isUsed:1;
+	unsigned int CurrentDemandReq_isUsed:1;
+	unsigned int physicalValue_isUsed:1;
+	unsigned int TimeInterval_isUsed:1;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	unsigned int EVMaximumVoltageLimit_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int DateTimeNow_isUsed:1;
+	unsigned int ServiceTag_isUsed:1;
+	unsigned int intValue_isUsed:1;
+	unsigned int SelectedPaymentOption_isUsed:1;
+	unsigned int ServiceName_isUsed:1;
+	unsigned int EVCabinConditioning_isUsed:1;
+	unsigned int EVSEID_isUsed:1;
+	unsigned int ServiceScope_isUsed:1;
+	unsigned int MeterStatus_isUsed:1;
+	unsigned int EVRequestedEnergyTransferType_isUsed:1;
+	unsigned int ServiceCategory_isUsed:1;
+	unsigned int GenChallenge_isUsed:1;
+	unsigned int SalesTariffDescription_isUsed:1;
+	unsigned int NotificationMaxDelay_isUsed:1;
+	unsigned int boolValue_isUsed:1;
+	unsigned int EVSEStatusCode_isUsed:1;
+	unsigned int FaultMsg_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int ParameterSet_isUsed:1;
+	unsigned int SigMeterReading_isUsed:1;
+	unsigned int EVSEChargeParameter_isUsed:1;
+	unsigned int Body_isUsed:1;
+	unsigned int SASchedules_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int PMaxScheduleID_isUsed:1;
+	unsigned int RemainingTimeToFullSoC_isUsed:1;
+	unsigned int EVStatus_isUsed:1;
+	unsigned int SubCertificates_isUsed:1;
+	unsigned int PaymentOption_isUsed:1;
+	unsigned int X509SKI_isUsed:1;
+	unsigned int ServiceList_isUsed:1;
+	unsigned int Cost_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int EVSEMinCurrent_isUsed:1;
+	unsigned int ConsumptionCost_isUsed:1;
+	unsigned int EVSEPeakCurrentRipple_isUsed:1;
+	unsigned int EVErrorCode_isUsed:1;
+	unsigned int EVChargeParameter_isUsed:1;
+	unsigned int start_isUsed:1;
+	unsigned int X509IssuerName_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int EVMinCurrent_isUsed:1;
+	unsigned int FullSOC_isUsed:1;
+	unsigned int amount_isUsed:1;
+	unsigned int shortValue_isUsed:1;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	unsigned int Entry_isUsed:1;
+	unsigned int SalesTariffID_isUsed:1;
+	unsigned int MeterID_isUsed:1;
+	unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+	unsigned int amountMultiplier_isUsed:1;
+	unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int Object_isUsed:1;
+	unsigned int RCD_isUsed:1;
+	unsigned int Notification_isUsed:1;
+	unsigned int startValue_isUsed:1;
+	unsigned int Modulus_isUsed:1;
+
+
+	int _warning_;
+};
+#endif /* DEPLOY_DIN_CODEC_FRAGMENT */
+
+
+/* Initialization methods for structs */
+
+void init_dinEXIDocument(struct dinEXIDocument* exiDoc);
+#if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES
+void init_dinEXIFragment(struct dinEXIFragment* exiFrag);
+#endif /* DEPLOY_DIN_CODEC_FRAGMENT */
+void init_dinMeteringReceiptReqType(struct dinMeteringReceiptReqType* dinMeteringReceiptReqType);
+void init_dinBodyType(struct dinBodyType* dinBodyType);
+void init_dinSessionSetupReqType(struct dinSessionSetupReqType* dinSessionSetupReqType);
+void init_dinPowerDeliveryResType(struct dinPowerDeliveryResType* dinPowerDeliveryResType);
+void init_dinServiceDetailResType(struct dinServiceDetailResType* dinServiceDetailResType);
+void init_dinWeldingDetectionResType(struct dinWeldingDetectionResType* dinWeldingDetectionResType);
+void init_dinContractAuthenticationResType(struct dinContractAuthenticationResType* dinContractAuthenticationResType);
+void init_dinCanonicalizationMethodType(struct dinCanonicalizationMethodType* dinCanonicalizationMethodType);
+void init_dinSPKIDataType(struct dinSPKIDataType* dinSPKIDataType);
+void init_dinListOfRootCertificateIDsType(struct dinListOfRootCertificateIDsType* dinListOfRootCertificateIDsType);
+void init_dinSelectedServiceListType(struct dinSelectedServiceListType* dinSelectedServiceListType);
+void init_dinCurrentDemandResType(struct dinCurrentDemandResType* dinCurrentDemandResType);
+void init_dinTransformType(struct dinTransformType* dinTransformType);
+void init_dinAC_EVChargeParameterType(struct dinAC_EVChargeParameterType* dinAC_EVChargeParameterType);
+void init_dinX509DataType(struct dinX509DataType* dinX509DataType);
+void init_dinChargingStatusResType(struct dinChargingStatusResType* dinChargingStatusResType);
+void init_dinWeldingDetectionReqType(struct dinWeldingDetectionReqType* dinWeldingDetectionReqType);
+void init_dinSignaturePropertiesType(struct dinSignaturePropertiesType* dinSignaturePropertiesType);
+void init_dinContractAuthenticationReqType(struct dinContractAuthenticationReqType* dinContractAuthenticationReqType);
+void init_dinDC_EVPowerDeliveryParameterType(struct dinDC_EVPowerDeliveryParameterType* dinDC_EVPowerDeliveryParameterType);
+void init_dinEVSEChargeParameterType(struct dinEVSEChargeParameterType* dinEVSEChargeParameterType);
+void init_dinCableCheckReqType(struct dinCableCheckReqType* dinCableCheckReqType);
+void init_dinDC_EVChargeParameterType(struct dinDC_EVChargeParameterType* dinDC_EVChargeParameterType);
+void init_dinSAScheduleListType(struct dinSAScheduleListType* dinSAScheduleListType);
+void init_dinPMaxScheduleType(struct dinPMaxScheduleType* dinPMaxScheduleType);
+void init_dinServicePaymentSelectionReqType(struct dinServicePaymentSelectionReqType* dinServicePaymentSelectionReqType);
+void init_dinRelativeTimeIntervalType(struct dinRelativeTimeIntervalType* dinRelativeTimeIntervalType);
+void init_dinEVStatusType(struct dinEVStatusType* dinEVStatusType);
+void init_dinPreChargeResType(struct dinPreChargeResType* dinPreChargeResType);
+void init_dinDC_EVSEChargeParameterType(struct dinDC_EVSEChargeParameterType* dinDC_EVSEChargeParameterType);
+void init_dinPaymentDetailsResType(struct dinPaymentDetailsResType* dinPaymentDetailsResType);
+void init_dinDSAKeyValueType(struct dinDSAKeyValueType* dinDSAKeyValueType);
+void init_dinSASchedulesType(struct dinSASchedulesType* dinSASchedulesType);
+void init_dinCertificateUpdateResType(struct dinCertificateUpdateResType* dinCertificateUpdateResType);
+void init_dinEVChargeParameterType(struct dinEVChargeParameterType* dinEVChargeParameterType);
+void init_dinMessageHeaderType(struct dinMessageHeaderType* dinMessageHeaderType);
+void init_dinBodyBaseType(struct dinBodyBaseType* dinBodyBaseType);
+void init_dinKeyValueType(struct dinKeyValueType* dinKeyValueType);
+void init_dinIntervalType(struct dinIntervalType* dinIntervalType);
+void init_dinChargeParameterDiscoveryResType(struct dinChargeParameterDiscoveryResType* dinChargeParameterDiscoveryResType);
+void init_dinPowerDeliveryReqType(struct dinPowerDeliveryReqType* dinPowerDeliveryReqType);
+void init_dinCertificateChainType(struct dinCertificateChainType* dinCertificateChainType);
+void init_dinTransformsType(struct dinTransformsType* dinTransformsType);
+void init_dinEntryType(struct dinEntryType* dinEntryType);
+void init_dinSessionStopType(struct dinSessionStopType* dinSessionStopType);
+void init_dinServiceDetailReqType(struct dinServiceDetailReqType* dinServiceDetailReqType);
+void init_dinDigestMethodType(struct dinDigestMethodType* dinDigestMethodType);
+void init_dinParameterType(struct dinParameterType* dinParameterType);
+void init_dinChargingStatusReqType(struct dinChargingStatusReqType* dinChargingStatusReqType);
+void init_dinSignatureMethodType(struct dinSignatureMethodType* dinSignatureMethodType);
+void init_dinCertificateInstallationReqType(struct dinCertificateInstallationReqType* dinCertificateInstallationReqType);
+void init_dinSalesTariffEntryType(struct dinSalesTariffEntryType* dinSalesTariffEntryType);
+void init_dinServiceDiscoveryResType(struct dinServiceDiscoveryResType* dinServiceDiscoveryResType);
+void init_dinParameterSetType(struct dinParameterSetType* dinParameterSetType);
+void init_dinCurrentDemandReqType(struct dinCurrentDemandReqType* dinCurrentDemandReqType);
+void init_dinPreChargeReqType(struct dinPreChargeReqType* dinPreChargeReqType);
+void init_dinSignatureType(struct dinSignatureType* dinSignatureType);
+void init_dinReferenceType(struct dinReferenceType* dinReferenceType);
+void init_dinProfileEntryType(struct dinProfileEntryType* dinProfileEntryType);
+void init_dinAnonType_V2G_Message(struct dinAnonType_V2G_Message* dinAnonType_V2G_Message);
+void init_dinChargeParameterDiscoveryReqType(struct dinChargeParameterDiscoveryReqType* dinChargeParameterDiscoveryReqType);
+void init_dinConsumptionCostType(struct dinConsumptionCostType* dinConsumptionCostType);
+void init_dinRSAKeyValueType(struct dinRSAKeyValueType* dinRSAKeyValueType);
+void init_dinServiceType(struct dinServiceType* dinServiceType);
+void init_dinServiceTagListType(struct dinServiceTagListType* dinServiceTagListType);
+void init_dinEVSEStatusType(struct dinEVSEStatusType* dinEVSEStatusType);
+void init_dinSessionSetupResType(struct dinSessionSetupResType* dinSessionSetupResType);
+void init_dinEVPowerDeliveryParameterType(struct dinEVPowerDeliveryParameterType* dinEVPowerDeliveryParameterType);
+void init_dinX509IssuerSerialType(struct dinX509IssuerSerialType* dinX509IssuerSerialType);
+void init_dinSelectedServiceType(struct dinSelectedServiceType* dinSelectedServiceType);
+void init_dinMeteringReceiptResType(struct dinMeteringReceiptResType* dinMeteringReceiptResType);
+void init_dinDC_EVStatusType(struct dinDC_EVStatusType* dinDC_EVStatusType);
+void init_dinPhysicalValueType(struct dinPhysicalValueType* dinPhysicalValueType);
+void init_dinManifestType(struct dinManifestType* dinManifestType);
+void init_dinPMaxScheduleEntryType(struct dinPMaxScheduleEntryType* dinPMaxScheduleEntryType);
+void init_dinServiceParameterListType(struct dinServiceParameterListType* dinServiceParameterListType);
+void init_dinSignatureValueType(struct dinSignatureValueType* dinSignatureValueType);
+void init_dinPaymentOptionsType(struct dinPaymentOptionsType* dinPaymentOptionsType);
+void init_dinServiceTagType(struct dinServiceTagType* dinServiceTagType);
+void init_dinAC_EVSEStatusType(struct dinAC_EVSEStatusType* dinAC_EVSEStatusType);
+void init_dinCertificateUpdateReqType(struct dinCertificateUpdateReqType* dinCertificateUpdateReqType);
+void init_dinServicePaymentSelectionResType(struct dinServicePaymentSelectionResType* dinServicePaymentSelectionResType);
+void init_dinSAScheduleTupleType(struct dinSAScheduleTupleType* dinSAScheduleTupleType);
+void init_dinChargingProfileType(struct dinChargingProfileType* dinChargingProfileType);
+void init_dinServiceDiscoveryReqType(struct dinServiceDiscoveryReqType* dinServiceDiscoveryReqType);
+void init_dinAC_EVSEChargeParameterType(struct dinAC_EVSEChargeParameterType* dinAC_EVSEChargeParameterType);
+void init_dinKeyInfoType(struct dinKeyInfoType* dinKeyInfoType);
+void init_dinPaymentDetailsReqType(struct dinPaymentDetailsReqType* dinPaymentDetailsReqType);
+void init_dinCableCheckResType(struct dinCableCheckResType* dinCableCheckResType);
+void init_dinObjectType(struct dinObjectType* dinObjectType);
+void init_dinSessionStopResType(struct dinSessionStopResType* dinSessionStopResType);
+void init_dinSignedInfoType(struct dinSignedInfoType* dinSignedInfoType);
+void init_dinSalesTariffType(struct dinSalesTariffType* dinSalesTariffType);
+void init_dinCostType(struct dinCostType* dinCostType);
+void init_dinServiceChargeType(struct dinServiceChargeType* dinServiceChargeType);
+void init_dinDC_EVSEStatusType(struct dinDC_EVSEStatusType* dinDC_EVSEStatusType);
+void init_dinRetrievalMethodType(struct dinRetrievalMethodType* dinRetrievalMethodType);
+void init_dinNotificationType(struct dinNotificationType* dinNotificationType);
+void init_dinPGPDataType(struct dinPGPDataType* dinPGPDataType);
+void init_dinCertificateInstallationResType(struct dinCertificateInstallationResType* dinCertificateInstallationResType);
+void init_dinSignaturePropertyType(struct dinSignaturePropertyType* dinSignaturePropertyType);
+void init_dinMeterInfoType(struct dinMeterInfoType* dinMeterInfoType);
+void init_dinSubCertificatesType(struct dinSubCertificatesType* dinSubCertificatesType);
+
+
+#endif /* DEPLOY_DIN_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 345 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesDecoder.c


+ 65 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesDecoder.h

@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesDecoder.h
+ * \brief 	Decoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_din_DATATYPES_DECODER_H
+#define EXI_din_DATATYPES_DECODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "dinEXIDatatypes.h"
+
+#if DEPLOY_DIN_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+int decode_dinExiDocument(bitstream_t* stream, struct dinEXIDocument* exiDoc);
+
+#if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES
+int decode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag);
+#endif /* DEPLOY_DIN_CODEC_FRAGMENT */
+
+#endif /* DEPLOY_DIN_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 281 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesEncoder.c


+ 68 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/din/dinEXIDatatypesEncoder.h

@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesEncoder.h
+ * \brief 	Encoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_din_DATATYPES_ENCODER_H
+#define EXI_din_DATATYPES_ENCODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "dinEXIDatatypes.h"
+
+#if DEPLOY_DIN_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+int encode_dinExiDocument(bitstream_t* stream, struct dinEXIDocument* exiDoc);
+
+#if DEPLOY_DIN_CODEC_FRAGMENT == SUPPORT_YES
+int encode_dinExiFragment(bitstream_t* stream, struct dinEXIFragment* exiFrag);
+#endif /* DEPLOY_DIN_CODEC_FRAGMENT */
+
+
+#endif /* DEPLOY_DIN_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 992 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypes.c

@@ -0,0 +1,992 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include <stdint.h>
+
+#include "iso1EXIDatatypes.h"
+#include "../codec/EXITypes.h"
+
+
+#ifndef EXI_iso1_DATATYPES_C
+#define EXI_iso1_DATATYPES_C
+
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
+
+
+void init_iso1EXIDocument(struct iso1EXIDocument* exiDoc) {
+	exiDoc->V2G_Message_isUsed = 0u;
+	exiDoc->ServiceDiscoveryReq_isUsed = 0u;
+	exiDoc->ServiceDiscoveryRes_isUsed = 0u;
+	exiDoc->MeteringReceiptReq_isUsed = 0u;
+	exiDoc->PaymentDetailsReq_isUsed = 0u;
+	exiDoc->MeteringReceiptRes_isUsed = 0u;
+	exiDoc->PaymentDetailsRes_isUsed = 0u;
+	exiDoc->SessionSetupReq_isUsed = 0u;
+	exiDoc->SessionSetupRes_isUsed = 0u;
+	exiDoc->CableCheckReq_isUsed = 0u;
+	exiDoc->CableCheckRes_isUsed = 0u;
+	exiDoc->CertificateInstallationReq_isUsed = 0u;
+	exiDoc->CertificateInstallationRes_isUsed = 0u;
+	exiDoc->WeldingDetectionReq_isUsed = 0u;
+	exiDoc->WeldingDetectionRes_isUsed = 0u;
+	exiDoc->CertificateUpdateReq_isUsed = 0u;
+	exiDoc->CertificateUpdateRes_isUsed = 0u;
+	exiDoc->PaymentServiceSelectionReq_isUsed = 0u;
+	exiDoc->PowerDeliveryReq_isUsed = 0u;
+	exiDoc->PaymentServiceSelectionRes_isUsed = 0u;
+	exiDoc->PowerDeliveryRes_isUsed = 0u;
+	exiDoc->ChargingStatusReq_isUsed = 0u;
+	exiDoc->ChargingStatusRes_isUsed = 0u;
+	exiDoc->BodyElement_isUsed = 0u;
+	exiDoc->CurrentDemandReq_isUsed = 0u;
+	exiDoc->PreChargeReq_isUsed = 0u;
+	exiDoc->CurrentDemandRes_isUsed = 0u;
+	exiDoc->PreChargeRes_isUsed = 0u;
+	exiDoc->SessionStopReq_isUsed = 0u;
+	exiDoc->AuthorizationReq_isUsed = 0u;
+	exiDoc->SessionStopRes_isUsed = 0u;
+	exiDoc->AuthorizationRes_isUsed = 0u;
+	exiDoc->ChargeParameterDiscoveryReq_isUsed = 0u;
+	exiDoc->ChargeParameterDiscoveryRes_isUsed = 0u;
+	exiDoc->ServiceDetailReq_isUsed = 0u;
+	exiDoc->ServiceDetailRes_isUsed = 0u;
+	exiDoc->DC_EVSEStatus_isUsed = 0u;
+	exiDoc->RelativeTimeInterval_isUsed = 0u;
+	exiDoc->SalesTariffEntry_isUsed = 0u;
+	exiDoc->DC_EVPowerDeliveryParameter_isUsed = 0u;
+	exiDoc->SASchedules_isUsed = 0u;
+	exiDoc->AC_EVChargeParameter_isUsed = 0u;
+	exiDoc->SAScheduleList_isUsed = 0u;
+	exiDoc->DC_EVStatus_isUsed = 0u;
+	exiDoc->EVStatus_isUsed = 0u;
+	exiDoc->DC_EVChargeParameter_isUsed = 0u;
+	exiDoc->DC_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->EVSEStatus_isUsed = 0u;
+	exiDoc->TimeInterval_isUsed = 0u;
+	exiDoc->EVPowerDeliveryParameter_isUsed = 0u;
+	exiDoc->EVSEChargeParameter_isUsed = 0u;
+	exiDoc->AC_EVSEStatus_isUsed = 0u;
+	exiDoc->Entry_isUsed = 0u;
+	exiDoc->AC_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->PMaxScheduleEntry_isUsed = 0u;
+	exiDoc->EVChargeParameter_isUsed = 0u;
+	exiDoc->SignatureProperty_isUsed = 0u;
+	exiDoc->DSAKeyValue_isUsed = 0u;
+	exiDoc->SignatureProperties_isUsed = 0u;
+	exiDoc->KeyValue_isUsed = 0u;
+	exiDoc->Transforms_isUsed = 0u;
+	exiDoc->DigestMethod_isUsed = 0u;
+	exiDoc->Signature_isUsed = 0u;
+	exiDoc->RetrievalMethod_isUsed = 0u;
+	exiDoc->Manifest_isUsed = 0u;
+	exiDoc->Reference_isUsed = 0u;
+	exiDoc->CanonicalizationMethod_isUsed = 0u;
+	exiDoc->RSAKeyValue_isUsed = 0u;
+	exiDoc->Transform_isUsed = 0u;
+	exiDoc->PGPData_isUsed = 0u;
+	exiDoc->MgmtData_isUsed = 0u;
+	exiDoc->SignatureMethod_isUsed = 0u;
+	exiDoc->KeyInfo_isUsed = 0u;
+	exiDoc->SPKIData_isUsed = 0u;
+	exiDoc->X509Data_isUsed = 0u;
+	exiDoc->SignatureValue_isUsed = 0u;
+	exiDoc->KeyName_isUsed = 0u;
+	exiDoc->DigestValue_isUsed = 0u;
+	exiDoc->SignedInfo_isUsed = 0u;
+	exiDoc->Object_isUsed = 0u;
+}
+
+
+#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES
+void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag) {
+	exiFrag->ChargingComplete_isUsed = 0u;
+	exiFrag->EVMaxVoltage_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->EVRESSSOC_isUsed = 0u;
+	exiFrag->MeterReading_isUsed = 0u;
+	exiFrag->physicalValue_isUsed = 0u;
+	exiFrag->TimeInterval_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->EVMaxCurrent_isUsed = 0u;
+	exiFrag->ChargingProfileEntryStart_isUsed = 0u;
+	exiFrag->EVSEMaxCurrent_isUsed = 0u;
+	exiFrag->costKind_isUsed = 0u;
+	exiFrag->EAmount_isUsed = 0u;
+	exiFrag->EnergyTransferMode_isUsed = 0u;
+	exiFrag->X509SerialNumber_isUsed = 0u;
+	exiFrag->NumEPriceLevels_isUsed = 0u;
+	exiFrag->RetrievalMethod_isUsed = 0u;
+	exiFrag->PMax_isUsed = 0u;
+	exiFrag->ParameterSetID_isUsed = 0u;
+	exiFrag->ParameterSetID_isUsed = 0u;
+	exiFrag->BulkSOC_isUsed = 0u;
+	exiFrag->EVSEMinimumCurrentLimit_isUsed = 0u;
+	exiFrag->EVSEPowerLimitAchieved_isUsed = 0u;
+	exiFrag->SalesTariffEntry_isUsed = 0u;
+	exiFrag->Transforms_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEIsolationStatus_isUsed = 0u;
+	exiFrag->BulkChargingComplete_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->FaultCode_isUsed = 0u;
+	exiFrag->RootCertificateID_isUsed = 0u;
+	exiFrag->HMACOutputLength_isUsed = 0u;
+	exiFrag->Exponent_isUsed = 0u;
+	exiFrag->X509IssuerSerial_isUsed = 0u;
+	exiFrag->byteValue_isUsed = 0u;
+	exiFrag->SPKIData_isUsed = 0u;
+	exiFrag->SAScheduleList_isUsed = 0u;
+	exiFrag->EVMaximumPowerLimit_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->RetryCounter_isUsed = 0u;
+	exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->SalesTariff_isUsed = 0u;
+	exiFrag->PgenCounter_isUsed = 0u;
+	exiFrag->X509Data_isUsed = 0u;
+	exiFrag->EVSECurrentRegulationTolerance_isUsed = 0u;
+	exiFrag->KeyValue_isUsed = 0u;
+	exiFrag->V2G_Message_isUsed = 0u;
+	exiFrag->EVSEMinimumVoltageLimit_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ProfileEntry_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->start_isUsed = 0u;
+	exiFrag->EVErrorCode_isUsed = 0u;
+	exiFrag->EVChargeParameter_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->EVSEPresentCurrent_isUsed = 0u;
+	exiFrag->PGPData_isUsed = 0u;
+	exiFrag->EVMinCurrent_isUsed = 0u;
+	exiFrag->FullSOC_isUsed = 0u;
+	exiFrag->amount_isUsed = 0u;
+	exiFrag->DC_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->Entry_isUsed = 0u;
+	exiFrag->SessionStopRes_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->DC_EVSEStatus_isUsed = 0u;
+	exiFrag->shortValue_isUsed = 0u;
+	exiFrag->SAProvisioningCertificateChain_isUsed = 0u;
+	exiFrag->SAProvisioningCertificateChain_isUsed = 0u;
+	exiFrag->PowerDeliveryReq_isUsed = 0u;
+	exiFrag->PowerDeliveryRes_isUsed = 0u;
+	exiFrag->SessionStopReq_isUsed = 0u;
+	exiFrag->SignatureProperty_isUsed = 0u;
+	exiFrag->SessionID_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->Header_isUsed = 0u;
+	exiFrag->Seed_isUsed = 0u;
+	exiFrag->RSAKeyValue_isUsed = 0u;
+	exiFrag->FreeService_isUsed = 0u;
+	exiFrag->EVSENominalVoltage_isUsed = 0u;
+	exiFrag->XPath_isUsed = 0u;
+	exiFrag->MeteringReceiptRes_isUsed = 0u;
+	exiFrag->ServiceDiscoveryReq_isUsed = 0u;
+	exiFrag->MeteringReceiptReq_isUsed = 0u;
+	exiFrag->PreChargeRes_isUsed = 0u;
+	exiFrag->OEMProvisioningCert_isUsed = 0u;
+	exiFrag->EVEnergyCapacity_isUsed = 0u;
+	exiFrag->Signature_isUsed = 0u;
+	exiFrag->AC_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->ServiceDiscoveryRes_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->PreChargeReq_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->NotificationMaxDelay_isUsed = 0u;
+	exiFrag->CableCheckReq_isUsed = 0u;
+	exiFrag->SalesTariffDescription_isUsed = 0u;
+	exiFrag->EVSEVoltageLimitAchieved_isUsed = 0u;
+	exiFrag->boolValue_isUsed = 0u;
+	exiFrag->EVCCID_isUsed = 0u;
+	exiFrag->DC_EVChargeParameter_isUsed = 0u;
+	exiFrag->ChargingStatusReq_isUsed = 0u;
+	exiFrag->CableCheckRes_isUsed = 0u;
+	exiFrag->MgmtData_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->EVSEEnergyToBeDelivered_isUsed = 0u;
+	exiFrag->EVSEMaxCurrent_isUsed = 0u;
+	exiFrag->EVSEStatus_isUsed = 0u;
+	exiFrag->Service_isUsed = 0u;
+	exiFrag->Manifest_isUsed = 0u;
+	exiFrag->EVMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->P_isUsed = 0u;
+	exiFrag->Q_isUsed = 0u;
+	exiFrag->X509SubjectName_isUsed = 0u;
+	exiFrag->intValue_isUsed = 0u;
+	exiFrag->ChargingProfile_isUsed = 0u;
+	exiFrag->G_isUsed = 0u;
+	exiFrag->J_isUsed = 0u;
+	exiFrag->ServiceScope_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ServiceName_isUsed = 0u;
+	exiFrag->MeterStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->ChargingStatusRes_isUsed = 0u;
+	exiFrag->ServiceCategory_isUsed = 0u;
+	exiFrag->Notification_isUsed = 0u;
+	exiFrag->X509CRL_isUsed = 0u;
+	exiFrag->Y_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->DigestValue_isUsed = 0u;
+	exiFrag->EVSEMaximumPowerLimit_isUsed = 0u;
+	exiFrag->EVSETimeStamp_isUsed = 0u;
+	exiFrag->EVSETimeStamp_isUsed = 0u;
+	exiFrag->Cost_isUsed = 0u;
+	exiFrag->EVSEPeakCurrentRipple_isUsed = 0u;
+	exiFrag->ConsumptionCost_isUsed = 0u;
+	exiFrag->DigestMethod_isUsed = 0u;
+	exiFrag->SPKISexp_isUsed = 0u;
+	exiFrag->SessionSetupRes_isUsed = 0u;
+	exiFrag->EVSECurrentLimitAchieved_isUsed = 0u;
+	exiFrag->ServiceDetailReq_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->ServiceDetailRes_isUsed = 0u;
+	exiFrag->SignatureProperties_isUsed = 0u;
+	exiFrag->EPriceLevel_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->RemainingTimeToBulkSoC_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->stringValue_isUsed = 0u;
+	exiFrag->SessionSetupReq_isUsed = 0u;
+	exiFrag->Multiplier_isUsed = 0u;
+	exiFrag->CertificateUpdateRes_isUsed = 0u;
+	exiFrag->PGPKeyID_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->DSAKeyValue_isUsed = 0u;
+	exiFrag->CertificateUpdateReq_isUsed = 0u;
+	exiFrag->EVMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->CanonicalizationMethod_isUsed = 0u;
+	exiFrag->X509Certificate_isUsed = 0u;
+	exiFrag->CertificateInstallationReq_isUsed = 0u;
+	exiFrag->CertificateInstallationRes_isUsed = 0u;
+	exiFrag->EVStatus_isUsed = 0u;
+	exiFrag->SupportedEnergyTransferMode_isUsed = 0u;
+	exiFrag->SignedInfo_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->MaxEntriesSAScheduleTuple_isUsed = 0u;
+	exiFrag->PaymentOption_isUsed = 0u;
+	exiFrag->SubCertificates_isUsed = 0u;
+	exiFrag->PaymentDetailsReq_isUsed = 0u;
+	exiFrag->AuthorizationReq_isUsed = 0u;
+	exiFrag->PaymentDetailsRes_isUsed = 0u;
+	exiFrag->AuthorizationRes_isUsed = 0u;
+	exiFrag->EVSEStatusCode_isUsed = 0u;
+	exiFrag->PaymentOptionList_isUsed = 0u;
+	exiFrag->SelectedServiceList_isUsed = 0u;
+	exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u;
+	exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->WeldingDetectionReq_isUsed = 0u;
+	exiFrag->FaultMsg_isUsed = 0u;
+	exiFrag->WeldingDetectionRes_isUsed = 0u;
+	exiFrag->ChargeProgress_isUsed = 0u;
+	exiFrag->SelectedPaymentOption_isUsed = 0u;
+	exiFrag->BulkChargingComplete_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->ParameterSet_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEChargeParameter_isUsed = 0u;
+	exiFrag->SigMeterReading_isUsed = 0u;
+	exiFrag->SignatureValue_isUsed = 0u;
+	exiFrag->SASchedules_isUsed = 0u;
+	exiFrag->SalesTariffID_isUsed = 0u;
+	exiFrag->DHpublickey_isUsed = 0u;
+	exiFrag->DHpublickey_isUsed = 0u;
+	exiFrag->ServiceParameterList_isUsed = 0u;
+	exiFrag->ListOfRootCertificateIDs_isUsed = 0u;
+	exiFrag->ListOfRootCertificateIDs_isUsed = 0u;
+	exiFrag->MeterID_isUsed = 0u;
+	exiFrag->EVSEMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->ChargeService_isUsed = 0u;
+	exiFrag->amountMultiplier_isUsed = 0u;
+	exiFrag->RCD_isUsed = 0u;
+	exiFrag->EVMaximumPowerLimit_isUsed = 0u;
+	exiFrag->startValue_isUsed = 0u;
+	exiFrag->CurrentDemandReq_isUsed = 0u;
+	exiFrag->KeyName_isUsed = 0u;
+	exiFrag->DC_EVPowerDeliveryParameter_isUsed = 0u;
+	exiFrag->Body_isUsed = 0u;
+	exiFrag->ChargingComplete_isUsed = 0u;
+	exiFrag->EVSENotification_isUsed = 0u;
+	exiFrag->Value_isUsed = 0u;
+	exiFrag->KeyInfo_isUsed = 0u;
+	exiFrag->GenChallenge_isUsed = 0u;
+	exiFrag->GenChallenge_isUsed = 0u;
+	exiFrag->AC_EVChargeParameter_isUsed = 0u;
+	exiFrag->PMaxScheduleEntry_isUsed = 0u;
+	exiFrag->Parameter_isUsed = 0u;
+	exiFrag->X509SKI_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->SelectedService_isUsed = 0u;
+	exiFrag->PaymentServiceSelectionReq_isUsed = 0u;
+	exiFrag->PaymentServiceSelectionRes_isUsed = 0u;
+	exiFrag->Certificate_isUsed = 0u;
+	exiFrag->Certificate_isUsed = 0u;
+	exiFrag->CurrentDemandRes_isUsed = 0u;
+	exiFrag->EVReady_isUsed = 0u;
+	exiFrag->EVSEMaximumPowerLimit_isUsed = 0u;
+	exiFrag->SignatureMethod_isUsed = 0u;
+	exiFrag->PMaxSchedule_isUsed = 0u;
+	exiFrag->ServiceCategory_isUsed = 0u;
+	exiFrag->Unit_isUsed = 0u;
+	exiFrag->X509IssuerName_isUsed = 0u;
+	exiFrag->Reference_isUsed = 0u;
+	exiFrag->ChargingProfileEntryMaxNumberOfPhasesInUse_isUsed = 0u;
+	exiFrag->EVPowerDeliveryParameter_isUsed = 0u;
+	exiFrag->ChargingProfileEntryMaxPower_isUsed = 0u;
+	exiFrag->ChargeParameterDiscoveryReq_isUsed = 0u;
+	exiFrag->duration_isUsed = 0u;
+	exiFrag->TMeter_isUsed = 0u;
+	exiFrag->ChargeParameterDiscoveryRes_isUsed = 0u;
+	exiFrag->EVMaximumCurrentLimit_isUsed = 0u;
+	exiFrag->ServiceList_isUsed = 0u;
+	exiFrag->AC_EVSEStatus_isUsed = 0u;
+	exiFrag->EVMaximumVoltageLimit_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->SAScheduleTuple_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->DC_EVStatus_isUsed = 0u;
+	exiFrag->BodyElement_isUsed = 0u;
+	exiFrag->RemainingTimeToFullSoC_isUsed = 0u;
+	exiFrag->RelativeTimeInterval_isUsed = 0u;
+	exiFrag->Transform_isUsed = 0u;
+	exiFrag->DepartureTime_isUsed = 0u;
+	exiFrag->Object_isUsed = 0u;
+	exiFrag->EVEnergyRequest_isUsed = 0u;
+	exiFrag->ServiceScope_isUsed = 0u;
+	exiFrag->Modulus_isUsed = 0u;
+	exiFrag->ChargingSession_isUsed = 0u;
+	exiFrag->RequestedEnergyTransferMode_isUsed = 0u;
+	exiFrag->SessionID_isUsed = 0u;
+}
+void init_iso1EXISchemaInformedElementFragmentGrammar(struct iso1EXISchemaInformedElementFragmentGrammar* exiFrag) {
+	exiFrag->Id_isUsed = 0u;
+	exiFrag->CHARACTERS_GENERIC_isUsed = 0u;
+}
+#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */
+
+void init_iso1MessageHeaderType(struct iso1MessageHeaderType* iso1MessageHeaderType) {
+	iso1MessageHeaderType->Notification_isUsed = 0u;
+	iso1MessageHeaderType->Signature_isUsed = 0u;
+}
+
+void init_iso1SignatureType(struct iso1SignatureType* iso1SignatureType) {
+	iso1SignatureType->Id_isUsed = 0u;
+	iso1SignatureType->KeyInfo_isUsed = 0u;
+	iso1SignatureType->Object.arrayLen = 0u;
+}
+
+void init_iso1PowerDeliveryReqType(struct iso1PowerDeliveryReqType* iso1PowerDeliveryReqType) {
+	iso1PowerDeliveryReqType->ChargingProfile_isUsed = 0u;
+	iso1PowerDeliveryReqType->EVPowerDeliveryParameter_isUsed = 0u;
+	iso1PowerDeliveryReqType->DC_EVPowerDeliveryParameter_isUsed = 0u;
+}
+
+void init_iso1ParameterType(struct iso1ParameterType* iso1ParameterType) {
+	iso1ParameterType->boolValue_isUsed = 0u;
+	iso1ParameterType->byteValue_isUsed = 0u;
+	iso1ParameterType->shortValue_isUsed = 0u;
+	iso1ParameterType->intValue_isUsed = 0u;
+	iso1ParameterType->physicalValue_isUsed = 0u;
+	iso1ParameterType->stringValue_isUsed = 0u;
+}
+
+void init_iso1CertificateInstallationReqType(struct iso1CertificateInstallationReqType* iso1CertificateInstallationReqType) {
+	(void)iso1CertificateInstallationReqType; /* avoid unused warning */
+}
+
+void init_iso1SessionSetupResType(struct iso1SessionSetupResType* iso1SessionSetupResType) {
+	iso1SessionSetupResType->EVSETimeStamp_isUsed = 0u;
+}
+
+void init_iso1EVChargeParameterType(struct iso1EVChargeParameterType* iso1EVChargeParameterType) {
+	iso1EVChargeParameterType->DepartureTime_isUsed = 0u;
+}
+
+void init_iso1DiffieHellmanPublickeyType(struct iso1DiffieHellmanPublickeyType* iso1DiffieHellmanPublickeyType) {
+	(void)iso1DiffieHellmanPublickeyType; /* avoid unused warning */
+}
+
+void init_iso1ServiceDiscoveryResType(struct iso1ServiceDiscoveryResType* iso1ServiceDiscoveryResType) {
+	iso1ServiceDiscoveryResType->ServiceList_isUsed = 0u;
+}
+
+void init_iso1ServiceParameterListType(struct iso1ServiceParameterListType* iso1ServiceParameterListType) {
+	iso1ServiceParameterListType->ParameterSet.arrayLen = 0u;
+}
+
+void init_iso1CertificateChainType(struct iso1CertificateChainType* iso1CertificateChainType) {
+	iso1CertificateChainType->Id_isUsed = 0u;
+	iso1CertificateChainType->SubCertificates_isUsed = 0u;
+}
+
+void init_iso1SASchedulesType(struct iso1SASchedulesType* iso1SASchedulesType) {
+	(void)iso1SASchedulesType; /* avoid unused warning */
+}
+
+void init_iso1DC_EVSEStatusType(struct iso1DC_EVSEStatusType* iso1DC_EVSEStatusType) {
+	iso1DC_EVSEStatusType->EVSEIsolationStatus_isUsed = 0u;
+}
+
+void init_iso1PreChargeResType(struct iso1PreChargeResType* iso1PreChargeResType) {
+	(void)iso1PreChargeResType; /* avoid unused warning */
+}
+
+void init_iso1ParameterSetType(struct iso1ParameterSetType* iso1ParameterSetType) {
+	iso1ParameterSetType->Parameter.arrayLen = 0u;
+}
+
+void init_iso1ServiceDetailReqType(struct iso1ServiceDetailReqType* iso1ServiceDetailReqType) {
+	(void)iso1ServiceDetailReqType; /* avoid unused warning */
+}
+
+void init_iso1RelativeTimeIntervalType(struct iso1RelativeTimeIntervalType* iso1RelativeTimeIntervalType) {
+	iso1RelativeTimeIntervalType->duration_isUsed = 0u;
+}
+
+void init_iso1SignedInfoType(struct iso1SignedInfoType* iso1SignedInfoType) {
+	iso1SignedInfoType->Id_isUsed = 0u;
+	iso1SignedInfoType->Reference.arrayLen = 0u;
+}
+
+void init_iso1EMAIDType(struct iso1EMAIDType* iso1EMAIDType) {
+	(void)iso1EMAIDType; /* avoid unused warning */
+}
+
+void init_iso1EVStatusType(struct iso1EVStatusType* iso1EVStatusType) {
+	(void)iso1EVStatusType; /* avoid unused warning */
+}
+
+void init_iso1ServiceListType(struct iso1ServiceListType* iso1ServiceListType) {
+	iso1ServiceListType->Service.arrayLen = 0u;
+}
+
+void init_iso1EVSEChargeParameterType(struct iso1EVSEChargeParameterType* iso1EVSEChargeParameterType) {
+	(void)iso1EVSEChargeParameterType; /* avoid unused warning */
+}
+
+void init_iso1EVPowerDeliveryParameterType(struct iso1EVPowerDeliveryParameterType* iso1EVPowerDeliveryParameterType) {
+	(void)iso1EVPowerDeliveryParameterType; /* avoid unused warning */
+}
+
+void init_iso1ProfileEntryType(struct iso1ProfileEntryType* iso1ProfileEntryType) {
+	iso1ProfileEntryType->ChargingProfileEntryMaxNumberOfPhasesInUse_isUsed = 0u;
+}
+
+void init_iso1AuthorizationReqType(struct iso1AuthorizationReqType* iso1AuthorizationReqType) {
+	iso1AuthorizationReqType->Id_isUsed = 0u;
+	iso1AuthorizationReqType->GenChallenge_isUsed = 0u;
+}
+
+void init_iso1MeterInfoType(struct iso1MeterInfoType* iso1MeterInfoType) {
+	iso1MeterInfoType->MeterReading_isUsed = 0u;
+	iso1MeterInfoType->SigMeterReading_isUsed = 0u;
+	iso1MeterInfoType->MeterStatus_isUsed = 0u;
+	iso1MeterInfoType->TMeter_isUsed = 0u;
+}
+
+void init_iso1ManifestType(struct iso1ManifestType* iso1ManifestType) {
+	iso1ManifestType->Id_isUsed = 0u;
+	iso1ManifestType->Reference.arrayLen = 0u;
+}
+
+void init_iso1ChargeParameterDiscoveryResType(struct iso1ChargeParameterDiscoveryResType* iso1ChargeParameterDiscoveryResType) {
+	iso1ChargeParameterDiscoveryResType->SASchedules_isUsed = 0u;
+	iso1ChargeParameterDiscoveryResType->SAScheduleList_isUsed = 0u;
+	iso1ChargeParameterDiscoveryResType->EVSEChargeParameter_isUsed = 0u;
+	iso1ChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed = 0u;
+	iso1ChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed = 0u;
+}
+
+void init_iso1PowerDeliveryResType(struct iso1PowerDeliveryResType* iso1PowerDeliveryResType) {
+	iso1PowerDeliveryResType->EVSEStatus_isUsed = 0u;
+	iso1PowerDeliveryResType->AC_EVSEStatus_isUsed = 0u;
+	iso1PowerDeliveryResType->DC_EVSEStatus_isUsed = 0u;
+}
+
+void init_iso1DC_EVChargeParameterType(struct iso1DC_EVChargeParameterType* iso1DC_EVChargeParameterType) {
+	iso1DC_EVChargeParameterType->DepartureTime_isUsed = 0u;
+	iso1DC_EVChargeParameterType->EVMaximumPowerLimit_isUsed = 0u;
+	iso1DC_EVChargeParameterType->EVEnergyCapacity_isUsed = 0u;
+	iso1DC_EVChargeParameterType->EVEnergyRequest_isUsed = 0u;
+	iso1DC_EVChargeParameterType->FullSOC_isUsed = 0u;
+	iso1DC_EVChargeParameterType->BulkSOC_isUsed = 0u;
+}
+
+void init_iso1ConsumptionCostType(struct iso1ConsumptionCostType* iso1ConsumptionCostType) {
+	iso1ConsumptionCostType->Cost.arrayLen = 0u;
+}
+
+void init_iso1PMaxScheduleType(struct iso1PMaxScheduleType* iso1PMaxScheduleType) {
+	iso1PMaxScheduleType->PMaxScheduleEntry.arrayLen = 0u;
+}
+
+void init_iso1PaymentOptionListType(struct iso1PaymentOptionListType* iso1PaymentOptionListType) {
+	iso1PaymentOptionListType->PaymentOption.arrayLen = 0u;
+}
+
+void init_iso1ObjectType(struct iso1ObjectType* iso1ObjectType) {
+	iso1ObjectType->Id_isUsed = 0u;
+	iso1ObjectType->MimeType_isUsed = 0u;
+	iso1ObjectType->Encoding_isUsed = 0u;
+	iso1ObjectType->ANY_isUsed = 0u;
+}
+
+void init_iso1PhysicalValueType(struct iso1PhysicalValueType* iso1PhysicalValueType) {
+	(void)iso1PhysicalValueType; /* avoid unused warning */
+}
+
+void init_iso1RSAKeyValueType(struct iso1RSAKeyValueType* iso1RSAKeyValueType) {
+	(void)iso1RSAKeyValueType; /* avoid unused warning */
+}
+
+void init_iso1SessionStopResType(struct iso1SessionStopResType* iso1SessionStopResType) {
+	(void)iso1SessionStopResType; /* avoid unused warning */
+}
+
+void init_iso1CertificateUpdateReqType(struct iso1CertificateUpdateReqType* iso1CertificateUpdateReqType) {
+	(void)iso1CertificateUpdateReqType; /* avoid unused warning */
+}
+
+void init_iso1SignatureValueType(struct iso1SignatureValueType* iso1SignatureValueType) {
+	iso1SignatureValueType->Id_isUsed = 0u;
+}
+
+void init_iso1PaymentDetailsReqType(struct iso1PaymentDetailsReqType* iso1PaymentDetailsReqType) {
+	(void)iso1PaymentDetailsReqType; /* avoid unused warning */
+}
+
+void init_iso1AuthorizationResType(struct iso1AuthorizationResType* iso1AuthorizationResType) {
+	(void)iso1AuthorizationResType; /* avoid unused warning */
+}
+
+void init_iso1DC_EVSEChargeParameterType(struct iso1DC_EVSEChargeParameterType* iso1DC_EVSEChargeParameterType) {
+	iso1DC_EVSEChargeParameterType->EVSECurrentRegulationTolerance_isUsed = 0u;
+	iso1DC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed = 0u;
+}
+
+void init_iso1SubCertificatesType(struct iso1SubCertificatesType* iso1SubCertificatesType) {
+	iso1SubCertificatesType->Certificate.arrayLen = 0u;
+}
+
+void init_iso1ChargingStatusResType(struct iso1ChargingStatusResType* iso1ChargingStatusResType) {
+	iso1ChargingStatusResType->EVSEMaxCurrent_isUsed = 0u;
+	iso1ChargingStatusResType->MeterInfo_isUsed = 0u;
+	iso1ChargingStatusResType->ReceiptRequired_isUsed = 0u;
+}
+
+void init_iso1DSAKeyValueType(struct iso1DSAKeyValueType* iso1DSAKeyValueType) {
+	iso1DSAKeyValueType->P_isUsed = 0u;
+	iso1DSAKeyValueType->Q_isUsed = 0u;
+	iso1DSAKeyValueType->G_isUsed = 0u;
+	iso1DSAKeyValueType->J_isUsed = 0u;
+	iso1DSAKeyValueType->Seed_isUsed = 0u;
+	iso1DSAKeyValueType->PgenCounter_isUsed = 0u;
+}
+
+void init_iso1ListOfRootCertificateIDsType(struct iso1ListOfRootCertificateIDsType* iso1ListOfRootCertificateIDsType) {
+	iso1ListOfRootCertificateIDsType->RootCertificateID.arrayLen = 0u;
+}
+
+void init_iso1ChargeServiceType(struct iso1ChargeServiceType* iso1ChargeServiceType) {
+	iso1ChargeServiceType->ServiceName_isUsed = 0u;
+	iso1ChargeServiceType->ServiceScope_isUsed = 0u;
+}
+
+void init_iso1IntervalType(struct iso1IntervalType* iso1IntervalType) {
+	(void)iso1IntervalType; /* avoid unused warning */
+}
+
+void init_iso1MeteringReceiptReqType(struct iso1MeteringReceiptReqType* iso1MeteringReceiptReqType) {
+	iso1MeteringReceiptReqType->Id_isUsed = 0u;
+	iso1MeteringReceiptReqType->SAScheduleTupleID_isUsed = 0u;
+}
+
+void init_iso1ServiceDetailResType(struct iso1ServiceDetailResType* iso1ServiceDetailResType) {
+	iso1ServiceDetailResType->ServiceParameterList_isUsed = 0u;
+}
+
+void init_iso1KeyValueType(struct iso1KeyValueType* iso1KeyValueType) {
+	iso1KeyValueType->DSAKeyValue_isUsed = 0u;
+	iso1KeyValueType->RSAKeyValue_isUsed = 0u;
+	iso1KeyValueType->ANY_isUsed = 0u;
+}
+
+void init_iso1SelectedServiceListType(struct iso1SelectedServiceListType* iso1SelectedServiceListType) {
+	iso1SelectedServiceListType->SelectedService.arrayLen = 0u;
+}
+
+void init_iso1CableCheckResType(struct iso1CableCheckResType* iso1CableCheckResType) {
+	(void)iso1CableCheckResType; /* avoid unused warning */
+}
+
+void init_iso1X509IssuerSerialType(struct iso1X509IssuerSerialType* iso1X509IssuerSerialType) {
+	(void)iso1X509IssuerSerialType; /* avoid unused warning */
+}
+
+void init_iso1KeyInfoType(struct iso1KeyInfoType* iso1KeyInfoType) {
+	iso1KeyInfoType->Id_isUsed = 0u;
+	iso1KeyInfoType->KeyName.arrayLen = 0u;
+	iso1KeyInfoType->KeyValue.arrayLen = 0u;
+	iso1KeyInfoType->RetrievalMethod.arrayLen = 0u;
+	iso1KeyInfoType->X509Data.arrayLen = 0u;
+	iso1KeyInfoType->PGPData.arrayLen = 0u;
+	iso1KeyInfoType->SPKIData.arrayLen = 0u;
+	iso1KeyInfoType->MgmtData.arrayLen = 0u;
+	iso1KeyInfoType->ANY_isUsed = 0u;
+}
+
+void init_iso1TransformsType(struct iso1TransformsType* iso1TransformsType) {
+	iso1TransformsType->Transform.arrayLen = 0u;
+}
+
+void init_iso1ChargeParameterDiscoveryReqType(struct iso1ChargeParameterDiscoveryReqType* iso1ChargeParameterDiscoveryReqType) {
+	iso1ChargeParameterDiscoveryReqType->MaxEntriesSAScheduleTuple_isUsed = 0u;
+	iso1ChargeParameterDiscoveryReqType->EVChargeParameter_isUsed = 0u;
+	iso1ChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed = 0u;
+	iso1ChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed = 0u;
+}
+
+void init_iso1PreChargeReqType(struct iso1PreChargeReqType* iso1PreChargeReqType) {
+	(void)iso1PreChargeReqType; /* avoid unused warning */
+}
+
+void init_iso1EVSEStatusType(struct iso1EVSEStatusType* iso1EVSEStatusType) {
+	(void)iso1EVSEStatusType; /* avoid unused warning */
+}
+
+void init_iso1SignatureMethodType(struct iso1SignatureMethodType* iso1SignatureMethodType) {
+	iso1SignatureMethodType->HMACOutputLength_isUsed = 0u;
+	iso1SignatureMethodType->ANY_isUsed = 0u;
+}
+
+void init_iso1X509DataType(struct iso1X509DataType* iso1X509DataType) {
+	iso1X509DataType->X509IssuerSerial.arrayLen = 0u;
+	iso1X509DataType->X509SKI.arrayLen = 0u;
+	iso1X509DataType->X509SubjectName.arrayLen = 0u;
+	iso1X509DataType->X509Certificate.arrayLen = 0u;
+	iso1X509DataType->X509CRL.arrayLen = 0u;
+	iso1X509DataType->ANY_isUsed = 0u;
+}
+
+void init_iso1NotificationType(struct iso1NotificationType* iso1NotificationType) {
+	iso1NotificationType->FaultMsg_isUsed = 0u;
+}
+
+void init_iso1SAScheduleListType(struct iso1SAScheduleListType* iso1SAScheduleListType) {
+	iso1SAScheduleListType->SAScheduleTuple.arrayLen = 0u;
+}
+
+void init_iso1BodyType(struct iso1BodyType* iso1BodyType) {
+	iso1BodyType->BodyElement_isUsed = 0u;
+	iso1BodyType->SessionSetupReq_isUsed = 0u;
+	iso1BodyType->SessionSetupRes_isUsed = 0u;
+	iso1BodyType->ServiceDiscoveryReq_isUsed = 0u;
+	iso1BodyType->ServiceDiscoveryRes_isUsed = 0u;
+	iso1BodyType->ServiceDetailReq_isUsed = 0u;
+	iso1BodyType->ServiceDetailRes_isUsed = 0u;
+	iso1BodyType->PaymentServiceSelectionReq_isUsed = 0u;
+	iso1BodyType->PaymentServiceSelectionRes_isUsed = 0u;
+	iso1BodyType->PaymentDetailsReq_isUsed = 0u;
+	iso1BodyType->PaymentDetailsRes_isUsed = 0u;
+	iso1BodyType->AuthorizationReq_isUsed = 0u;
+	iso1BodyType->AuthorizationRes_isUsed = 0u;
+	iso1BodyType->ChargeParameterDiscoveryReq_isUsed = 0u;
+	iso1BodyType->ChargeParameterDiscoveryRes_isUsed = 0u;
+	iso1BodyType->PowerDeliveryReq_isUsed = 0u;
+	iso1BodyType->PowerDeliveryRes_isUsed = 0u;
+	iso1BodyType->MeteringReceiptReq_isUsed = 0u;
+	iso1BodyType->MeteringReceiptRes_isUsed = 0u;
+	iso1BodyType->SessionStopReq_isUsed = 0u;
+	iso1BodyType->SessionStopRes_isUsed = 0u;
+	iso1BodyType->CertificateUpdateReq_isUsed = 0u;
+	iso1BodyType->CertificateUpdateRes_isUsed = 0u;
+	iso1BodyType->CertificateInstallationReq_isUsed = 0u;
+	iso1BodyType->CertificateInstallationRes_isUsed = 0u;
+	iso1BodyType->ChargingStatusReq_isUsed = 0u;
+	iso1BodyType->ChargingStatusRes_isUsed = 0u;
+	iso1BodyType->CableCheckReq_isUsed = 0u;
+	iso1BodyType->CableCheckRes_isUsed = 0u;
+	iso1BodyType->PreChargeReq_isUsed = 0u;
+	iso1BodyType->PreChargeRes_isUsed = 0u;
+	iso1BodyType->CurrentDemandReq_isUsed = 0u;
+	iso1BodyType->CurrentDemandRes_isUsed = 0u;
+	iso1BodyType->WeldingDetectionReq_isUsed = 0u;
+	iso1BodyType->WeldingDetectionRes_isUsed = 0u;
+}
+
+void init_iso1ChargingProfileType(struct iso1ChargingProfileType* iso1ChargingProfileType) {
+	iso1ChargingProfileType->ProfileEntry.arrayLen = 0u;
+}
+
+void init_iso1TransformType(struct iso1TransformType* iso1TransformType) {
+	iso1TransformType->ANY_isUsed = 0u;
+	iso1TransformType->XPath.arrayLen = 0u;
+}
+
+void init_iso1SAScheduleTupleType(struct iso1SAScheduleTupleType* iso1SAScheduleTupleType) {
+	iso1SAScheduleTupleType->SalesTariff_isUsed = 0u;
+}
+
+void init_iso1AC_EVChargeParameterType(struct iso1AC_EVChargeParameterType* iso1AC_EVChargeParameterType) {
+	iso1AC_EVChargeParameterType->DepartureTime_isUsed = 0u;
+}
+
+void init_iso1AnonType_V2G_Message(struct iso1AnonType_V2G_Message* iso1AnonType_V2G_Message) {
+	(void)iso1AnonType_V2G_Message; /* avoid unused warning */
+}
+
+void init_iso1PaymentDetailsResType(struct iso1PaymentDetailsResType* iso1PaymentDetailsResType) {
+	(void)iso1PaymentDetailsResType; /* avoid unused warning */
+}
+
+void init_iso1ContractSignatureEncryptedPrivateKeyType(struct iso1ContractSignatureEncryptedPrivateKeyType* iso1ContractSignatureEncryptedPrivateKeyType) {
+	(void)iso1ContractSignatureEncryptedPrivateKeyType; /* avoid unused warning */
+}
+
+void init_iso1PMaxScheduleEntryType(struct iso1PMaxScheduleEntryType* iso1PMaxScheduleEntryType) {
+	iso1PMaxScheduleEntryType->TimeInterval_isUsed = 0u;
+	iso1PMaxScheduleEntryType->RelativeTimeInterval_isUsed = 0u;
+}
+
+void init_iso1SPKIDataType(struct iso1SPKIDataType* iso1SPKIDataType) {
+	iso1SPKIDataType->SPKISexp.arrayLen = 0u;
+	iso1SPKIDataType->ANY_isUsed = 0u;
+}
+
+void init_iso1MeteringReceiptResType(struct iso1MeteringReceiptResType* iso1MeteringReceiptResType) {
+	iso1MeteringReceiptResType->EVSEStatus_isUsed = 0u;
+	iso1MeteringReceiptResType->AC_EVSEStatus_isUsed = 0u;
+	iso1MeteringReceiptResType->DC_EVSEStatus_isUsed = 0u;
+}
+
+void init_iso1SessionStopReqType(struct iso1SessionStopReqType* iso1SessionStopReqType) {
+	(void)iso1SessionStopReqType; /* avoid unused warning */
+}
+
+void init_iso1WeldingDetectionResType(struct iso1WeldingDetectionResType* iso1WeldingDetectionResType) {
+	(void)iso1WeldingDetectionResType; /* avoid unused warning */
+}
+
+void init_iso1ReferenceType(struct iso1ReferenceType* iso1ReferenceType) {
+	iso1ReferenceType->Id_isUsed = 0u;
+	iso1ReferenceType->URI_isUsed = 0u;
+	iso1ReferenceType->Type_isUsed = 0u;
+	iso1ReferenceType->Transforms_isUsed = 0u;
+}
+
+void init_iso1CurrentDemandReqType(struct iso1CurrentDemandReqType* iso1CurrentDemandReqType) {
+	iso1CurrentDemandReqType->EVMaximumVoltageLimit_isUsed = 0u;
+	iso1CurrentDemandReqType->EVMaximumCurrentLimit_isUsed = 0u;
+	iso1CurrentDemandReqType->EVMaximumPowerLimit_isUsed = 0u;
+	iso1CurrentDemandReqType->BulkChargingComplete_isUsed = 0u;
+	iso1CurrentDemandReqType->RemainingTimeToFullSoC_isUsed = 0u;
+	iso1CurrentDemandReqType->RemainingTimeToBulkSoC_isUsed = 0u;
+}
+
+void init_iso1SalesTariffEntryType(struct iso1SalesTariffEntryType* iso1SalesTariffEntryType) {
+	iso1SalesTariffEntryType->TimeInterval_isUsed = 0u;
+	iso1SalesTariffEntryType->RelativeTimeInterval_isUsed = 0u;
+	iso1SalesTariffEntryType->EPriceLevel_isUsed = 0u;
+	iso1SalesTariffEntryType->ConsumptionCost.arrayLen = 0u;
+}
+
+void init_iso1EntryType(struct iso1EntryType* iso1EntryType) {
+	iso1EntryType->TimeInterval_isUsed = 0u;
+	iso1EntryType->RelativeTimeInterval_isUsed = 0u;
+}
+
+void init_iso1SessionSetupReqType(struct iso1SessionSetupReqType* iso1SessionSetupReqType) {
+	(void)iso1SessionSetupReqType; /* avoid unused warning */
+}
+
+void init_iso1CostType(struct iso1CostType* iso1CostType) {
+	iso1CostType->amountMultiplier_isUsed = 0u;
+}
+
+void init_iso1DC_EVPowerDeliveryParameterType(struct iso1DC_EVPowerDeliveryParameterType* iso1DC_EVPowerDeliveryParameterType) {
+	iso1DC_EVPowerDeliveryParameterType->BulkChargingComplete_isUsed = 0u;
+}
+
+void init_iso1RetrievalMethodType(struct iso1RetrievalMethodType* iso1RetrievalMethodType) {
+	iso1RetrievalMethodType->URI_isUsed = 0u;
+	iso1RetrievalMethodType->Type_isUsed = 0u;
+	iso1RetrievalMethodType->Transforms_isUsed = 0u;
+}
+
+void init_iso1CertificateUpdateResType(struct iso1CertificateUpdateResType* iso1CertificateUpdateResType) {
+	iso1CertificateUpdateResType->RetryCounter_isUsed = 0u;
+}
+
+void init_iso1CertificateInstallationResType(struct iso1CertificateInstallationResType* iso1CertificateInstallationResType) {
+	(void)iso1CertificateInstallationResType; /* avoid unused warning */
+}
+
+void init_iso1CanonicalizationMethodType(struct iso1CanonicalizationMethodType* iso1CanonicalizationMethodType) {
+	iso1CanonicalizationMethodType->ANY_isUsed = 0u;
+}
+
+void init_iso1WeldingDetectionReqType(struct iso1WeldingDetectionReqType* iso1WeldingDetectionReqType) {
+	(void)iso1WeldingDetectionReqType; /* avoid unused warning */
+}
+
+void init_iso1DC_EVStatusType(struct iso1DC_EVStatusType* iso1DC_EVStatusType) {
+	(void)iso1DC_EVStatusType; /* avoid unused warning */
+}
+
+void init_iso1CurrentDemandResType(struct iso1CurrentDemandResType* iso1CurrentDemandResType) {
+	iso1CurrentDemandResType->EVSEMaximumVoltageLimit_isUsed = 0u;
+	iso1CurrentDemandResType->EVSEMaximumCurrentLimit_isUsed = 0u;
+	iso1CurrentDemandResType->EVSEMaximumPowerLimit_isUsed = 0u;
+	iso1CurrentDemandResType->MeterInfo_isUsed = 0u;
+	iso1CurrentDemandResType->ReceiptRequired_isUsed = 0u;
+}
+
+void init_iso1ServiceType(struct iso1ServiceType* iso1ServiceType) {
+	iso1ServiceType->ServiceName_isUsed = 0u;
+	iso1ServiceType->ServiceScope_isUsed = 0u;
+}
+
+void init_iso1ServiceDiscoveryReqType(struct iso1ServiceDiscoveryReqType* iso1ServiceDiscoveryReqType) {
+	iso1ServiceDiscoveryReqType->ServiceScope_isUsed = 0u;
+	iso1ServiceDiscoveryReqType->ServiceCategory_isUsed = 0u;
+}
+
+void init_iso1AC_EVSEChargeParameterType(struct iso1AC_EVSEChargeParameterType* iso1AC_EVSEChargeParameterType) {
+	(void)iso1AC_EVSEChargeParameterType; /* avoid unused warning */
+}
+
+void init_iso1CableCheckReqType(struct iso1CableCheckReqType* iso1CableCheckReqType) {
+	(void)iso1CableCheckReqType; /* avoid unused warning */
+}
+
+void init_iso1SelectedServiceType(struct iso1SelectedServiceType* iso1SelectedServiceType) {
+	iso1SelectedServiceType->ParameterSetID_isUsed = 0u;
+}
+
+void init_iso1AC_EVSEStatusType(struct iso1AC_EVSEStatusType* iso1AC_EVSEStatusType) {
+	(void)iso1AC_EVSEStatusType; /* avoid unused warning */
+}
+
+void init_iso1SalesTariffType(struct iso1SalesTariffType* iso1SalesTariffType) {
+	iso1SalesTariffType->Id_isUsed = 0u;
+	iso1SalesTariffType->SalesTariffDescription_isUsed = 0u;
+	iso1SalesTariffType->NumEPriceLevels_isUsed = 0u;
+	iso1SalesTariffType->SalesTariffEntry.arrayLen = 0u;
+}
+
+void init_iso1PaymentServiceSelectionReqType(struct iso1PaymentServiceSelectionReqType* iso1PaymentServiceSelectionReqType) {
+	(void)iso1PaymentServiceSelectionReqType; /* avoid unused warning */
+}
+
+void init_iso1SignaturePropertiesType(struct iso1SignaturePropertiesType* iso1SignaturePropertiesType) {
+	iso1SignaturePropertiesType->Id_isUsed = 0u;
+	iso1SignaturePropertiesType->SignatureProperty.arrayLen = 0u;
+}
+
+void init_iso1BodyBaseType(struct iso1BodyBaseType* iso1BodyBaseType) {
+	(void)iso1BodyBaseType; /* avoid unused warning */
+}
+
+void init_iso1SupportedEnergyTransferModeType(struct iso1SupportedEnergyTransferModeType* iso1SupportedEnergyTransferModeType) {
+	iso1SupportedEnergyTransferModeType->EnergyTransferMode.arrayLen = 0u;
+}
+
+void init_iso1ChargingStatusReqType(struct iso1ChargingStatusReqType* iso1ChargingStatusReqType) {
+	(void)iso1ChargingStatusReqType; /* avoid unused warning */
+}
+
+void init_iso1PaymentServiceSelectionResType(struct iso1PaymentServiceSelectionResType* iso1PaymentServiceSelectionResType) {
+	(void)iso1PaymentServiceSelectionResType; /* avoid unused warning */
+}
+
+void init_iso1DigestMethodType(struct iso1DigestMethodType* iso1DigestMethodType) {
+	iso1DigestMethodType->ANY_isUsed = 0u;
+}
+
+void init_iso1SignaturePropertyType(struct iso1SignaturePropertyType* iso1SignaturePropertyType) {
+	iso1SignaturePropertyType->Id_isUsed = 0u;
+	iso1SignaturePropertyType->ANY_isUsed = 0u;
+}
+
+void init_iso1PGPDataType(struct iso1PGPDataType* iso1PGPDataType) {
+	iso1PGPDataType->PGPKeyID_isUsed = 0u;
+	iso1PGPDataType->PGPKeyPacket_isUsed = 0u;
+	iso1PGPDataType->ANY_isUsed = 0u;
+}
+
+
+
+#endif /* DEPLOY_ISO1_CODEC */
+
+#endif
+

+ 2992 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypes.h

@@ -0,0 +1,2992 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypes.h
+ * \brief 	Datatype definitions and structs for given XML Schema definitions and initialization methods
+ *
+ */
+
+#ifndef EXI_iso1_DATATYPES_H
+#define EXI_iso1_DATATYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SUPPORT_YES 1
+#define SUPPORT_NO 2
+#define DEPLOY_ISO1_CODEC SUPPORT_YES
+#define DEPLOY_ISO1_CODEC_FRAGMENT SUPPORT_YES
+
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+/* Datatype definitions and structs for given XML Schema definitions */
+
+#define UNION_YES 1
+#define UNION_NO 2
+#define SAVE_MEMORY_WITH_UNNAMED_UNION UNION_YES
+
+/* Note: Please find below a list of occurrence limits that have been applied */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial from unbounded to 1 (see #define iso1X509DataType_X509IssuerSerial_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509SKI from unbounded to 1 (see #define iso1X509DataType_X509SKI_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509SubjectName from unbounded to 1 (see #define iso1X509DataType_X509SubjectName_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509Certificate from unbounded to 1 (see #define iso1X509DataType_X509Certificate_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509CRL from unbounded to 1 (see #define iso1X509DataType_X509CRL_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":XPath from unbounded to 1 (see #define iso1TransformType_XPath_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SPKISexp from unbounded to 1 (see #define iso1SPKIDataType_SPKISexp_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2013:MsgDataTypes":RootCertificateID from unbounded to 5 (see #define iso1ListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Transform from unbounded to 1 (see #define iso1TransformsType_Transform_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SignatureProperty from unbounded to 1 (see #define iso1SignaturePropertiesType_SignatureProperty_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Reference from unbounded to 1 (see #define iso1SignedInfoType_Reference_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Reference from unbounded to 1 (see #define iso1ManifestType_Reference_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2013:MsgDataTypes":PMaxScheduleEntry from unbounded to 5 (see #define iso1PMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":KeyName from unbounded to 1 (see #define iso1KeyInfoType_KeyName_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":KeyValue from unbounded to 1 (see #define iso1KeyInfoType_KeyValue_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod from unbounded to 1 (see #define iso1KeyInfoType_RetrievalMethod_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509Data from unbounded to 1 (see #define iso1KeyInfoType_X509Data_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":PGPData from unbounded to 1 (see #define iso1KeyInfoType_PGPData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SPKIData from unbounded to 1 (see #define iso1KeyInfoType_SPKIData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":MgmtData from unbounded to 1 (see #define iso1KeyInfoType_MgmtData_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2013:MsgDataTypes":SalesTariffEntry from unbounded to 5 (see #define iso1SalesTariffType_SalesTariffEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Object from unbounded to 1 (see #define iso1SignatureType_Object_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2013:MsgDataTypes":ParameterSet from unbounded to 5 (see #define iso1ServiceParameterListType_ParameterSet_ARRAY_SIZE) */
+
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVChargeParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":DepartureTime{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso1EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	unsigned int DepartureTime_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DiffieHellmanPublickeyType',  base type name='dHpublickeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso1DiffieHellmanPublickeyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1DiffieHellmanPublickeyType_CONTENT_BYTES_SIZE 350
+struct iso1DiffieHellmanPublickeyType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1DiffieHellmanPublickeyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* simple content: urn:iso:15118:2:2013:MsgDataTypes,dHpublickeyType */
+	struct {
+		uint8_t bytes[iso1DiffieHellmanPublickeyType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SASchedulesType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso1SASchedulesType {
+	int noContent; /* avoid warning */
+};
+
+typedef enum {
+	iso1DC_EVErrorCodeType_NO_ERROR = 0,
+	iso1DC_EVErrorCodeType_FAILED_RESSTemperatureInhibit = 1,
+	iso1DC_EVErrorCodeType_FAILED_EVShiftPosition = 2,
+	iso1DC_EVErrorCodeType_FAILED_ChargerConnectorLockFault = 3,
+	iso1DC_EVErrorCodeType_FAILED_EVRESSMalfunction = 4,
+	iso1DC_EVErrorCodeType_FAILED_ChargingCurrentdifferential = 5,
+	iso1DC_EVErrorCodeType_FAILED_ChargingVoltageOutOfRange = 6,
+	iso1DC_EVErrorCodeType_Reserved_A = 7,
+	iso1DC_EVErrorCodeType_Reserved_B = 8,
+	iso1DC_EVErrorCodeType_Reserved_C = 9,
+	iso1DC_EVErrorCodeType_FAILED_ChargingSystemIncompatibility = 10,
+	iso1DC_EVErrorCodeType_NoData = 11
+} iso1DC_EVErrorCodeType;
+
+typedef enum {
+	iso1EVSENotificationType_None = 0,
+	iso1EVSENotificationType_StopCharging = 1,
+	iso1EVSENotificationType_ReNegotiation = 2
+} iso1EVSENotificationType;
+
+typedef enum {
+	iso1responseCodeType_OK = 0,
+	iso1responseCodeType_OK_NewSessionEstablished = 1,
+	iso1responseCodeType_OK_OldSessionJoined = 2,
+	iso1responseCodeType_OK_CertificateExpiresSoon = 3,
+	iso1responseCodeType_FAILED = 4,
+	iso1responseCodeType_FAILED_SequenceError = 5,
+	iso1responseCodeType_FAILED_ServiceIDInvalid = 6,
+	iso1responseCodeType_FAILED_UnknownSession = 7,
+	iso1responseCodeType_FAILED_ServiceSelectionInvalid = 8,
+	iso1responseCodeType_FAILED_PaymentSelectionInvalid = 9,
+	iso1responseCodeType_FAILED_CertificateExpired = 10,
+	iso1responseCodeType_FAILED_SignatureError = 11,
+	iso1responseCodeType_FAILED_NoCertificateAvailable = 12,
+	iso1responseCodeType_FAILED_CertChainError = 13,
+	iso1responseCodeType_FAILED_ChallengeInvalid = 14,
+	iso1responseCodeType_FAILED_ContractCanceled = 15,
+	iso1responseCodeType_FAILED_WrongChargeParameter = 16,
+	iso1responseCodeType_FAILED_PowerDeliveryNotApplied = 17,
+	iso1responseCodeType_FAILED_TariffSelectionInvalid = 18,
+	iso1responseCodeType_FAILED_ChargingProfileInvalid = 19,
+	iso1responseCodeType_FAILED_MeteringSignatureNotValid = 20,
+	iso1responseCodeType_FAILED_NoChargeServiceSelected = 21,
+	iso1responseCodeType_FAILED_WrongEnergyTransferMode = 22,
+	iso1responseCodeType_FAILED_ContactorError = 23,
+	iso1responseCodeType_FAILED_CertificateNotAllowedAtThisEVSE = 24,
+	iso1responseCodeType_FAILED_CertificateRevoked = 25
+} iso1responseCodeType;
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDetailReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ServiceID)',  derivedBy='EXTENSION'.  */
+struct iso1ServiceDetailReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ServiceID, urn:iso:15118:2:2013:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":start,"urn:iso:15118:2:2013:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+struct iso1RelativeTimeIntervalType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":start, urn:iso:15118:2:2013:MsgDataTypes,#AnonType_startRelativeTimeIntervalType */
+	uint32_t start ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":duration, urn:iso:15118:2:2013:MsgDataTypes,#AnonType_durationRelativeTimeIntervalType */
+	uint32_t duration ;
+	unsigned int duration_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EMAIDType',  base type name='eMAIDType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso1EMAIDType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EMAIDType_CONTENT_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1EMAIDType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1EMAIDType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* simple content: urn:iso:15118:2:2013:MsgDataTypes,eMAIDType */
+	struct {
+		exi_string_character_t characters[iso1EMAIDType_CONTENT_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVStatusType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso1EVStatusType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVSEChargeParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso1EVSEChargeParameterType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVPowerDeliveryParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso1EVPowerDeliveryParameterType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,AuthorizationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":GenChallenge{0-1})',  derivedBy='EXTENSION'.  */
+#define iso1AuthorizationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1AuthorizationReqType_GenChallenge_BYTES_SIZE 16 /* XML schema facet length for urn:iso:15118:2:2013:MsgDataTypes,genChallengeType is 16 */
+struct iso1AuthorizationReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1AuthorizationReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":GenChallenge, urn:iso:15118:2:2013:MsgDataTypes,genChallengeType */
+	struct {
+		uint8_t bytes[iso1AuthorizationReqType_GenChallenge_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  GenChallenge ;
+	unsigned int GenChallenge_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":MeterID,"urn:iso:15118:2:2013:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso1MeterInfoType_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,meterIDType is 32 */
+#define iso1MeterInfoType_SigMeterReading_BYTES_SIZE 64 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,sigMeterReadingType is 64 */
+struct iso1MeterInfoType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":MeterID, urn:iso:15118:2:2013:MsgDataTypes,meterIDType */
+	struct {
+		exi_string_character_t characters[iso1MeterInfoType_MeterID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MeterID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":MeterReading, http://www.w3.org/2001/XMLSchema,unsignedLong */
+	uint64_t MeterReading ;
+	unsigned int MeterReading_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SigMeterReading, urn:iso:15118:2:2013:MsgDataTypes,sigMeterReadingType */
+	struct {
+		uint8_t bytes[iso1MeterInfoType_SigMeterReading_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SigMeterReading ;
+	unsigned int SigMeterReading_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":MeterStatus, urn:iso:15118:2:2013:MsgDataTypes,meterStatusType */
+	int16_t MeterStatus ;
+	unsigned int MeterStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":TMeter, http://www.w3.org/2001/XMLSchema,long */
+	int64_t TMeter ;
+	unsigned int TMeter_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso1ObjectType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ObjectType_MimeType_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ObjectType_Encoding_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ObjectType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1ObjectType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1ObjectType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: MimeType {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[iso1ObjectType_MimeType_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MimeType ;
+	unsigned int MimeType_isUsed:1;
+	/* attribute: Encoding {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1ObjectType_Encoding_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Encoding ;
+	unsigned int Encoding_isUsed:1;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[iso1ObjectType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+#define iso1RSAKeyValueType_Modulus_BYTES_SIZE 350
+#define iso1RSAKeyValueType_Exponent_BYTES_SIZE 350
+struct iso1RSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Modulus, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1RSAKeyValueType_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Exponent, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1RSAKeyValueType_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,SessionStopResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+struct iso1SessionStopResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso1SignatureValueType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SignatureValueType_CONTENT_BYTES_SIZE 350
+struct iso1SignatureValueType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1SignatureValueType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* simple content: http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[iso1SignatureValueType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SubCertificatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate{1-4})',  derivedBy='RESTRICTION'.  */
+#define iso1SubCertificatesType_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,certificateType is 800 */
+#define iso1SubCertificatesType_Certificate_ARRAY_SIZE 4
+struct iso1SubCertificatesType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Certificate, urn:iso:15118:2:2013:MsgDataTypes,certificateType */
+	struct {
+		struct {
+		uint8_t bytes[iso1SubCertificatesType_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  array[iso1SubCertificatesType_Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Certificate;
+};
+
+typedef enum {
+	iso1faultCodeType_ParsingError = 0,
+	iso1faultCodeType_NoTLSRootCertificatAvailable = 1,
+	iso1faultCodeType_UnknownError = 2
+} iso1faultCodeType;
+
+typedef enum {
+	iso1DC_EVSEStatusCodeType_EVSE_NotReady = 0,
+	iso1DC_EVSEStatusCodeType_EVSE_Ready = 1,
+	iso1DC_EVSEStatusCodeType_EVSE_Shutdown = 2,
+	iso1DC_EVSEStatusCodeType_EVSE_UtilityInterruptEvent = 3,
+	iso1DC_EVSEStatusCodeType_EVSE_IsolationMonitoringActive = 4,
+	iso1DC_EVSEStatusCodeType_EVSE_EmergencyShutdown = 5,
+	iso1DC_EVSEStatusCodeType_EVSE_Malfunction = 6,
+	iso1DC_EVSEStatusCodeType_Reserved_8 = 7,
+	iso1DC_EVSEStatusCodeType_Reserved_9 = 8,
+	iso1DC_EVSEStatusCodeType_Reserved_A = 9,
+	iso1DC_EVSEStatusCodeType_Reserved_B = 10,
+	iso1DC_EVSEStatusCodeType_Reserved_C = 11
+} iso1DC_EVSEStatusCodeType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+#define iso1DSAKeyValueType_P_BYTES_SIZE 350
+#define iso1DSAKeyValueType_Q_BYTES_SIZE 350
+#define iso1DSAKeyValueType_G_BYTES_SIZE 350
+#define iso1DSAKeyValueType_Y_BYTES_SIZE 350
+#define iso1DSAKeyValueType_J_BYTES_SIZE 350
+#define iso1DSAKeyValueType_Seed_BYTES_SIZE 350
+#define iso1DSAKeyValueType_PgenCounter_BYTES_SIZE 350
+struct iso1DSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":P, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	unsigned int P_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Q, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	unsigned int Q_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":G, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	unsigned int G_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Y, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":J, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	unsigned int J_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Seed, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	unsigned int Seed_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PgenCounter, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso1DSAKeyValueType_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	unsigned int PgenCounter_isUsed:1;
+};
+
+typedef enum {
+	iso1EVSEProcessingType_Finished = 0,
+	iso1EVSEProcessingType_Ongoing = 1,
+	iso1EVSEProcessingType_Ongoing_WaitingForCustomerInteraction = 2
+} iso1EVSEProcessingType;
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso1IntervalType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,MeteringReceiptReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":SessionID,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2013:MsgBody":MeterInfo)',  derivedBy='EXTENSION'.  */
+#define iso1MeteringReceiptReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1MeteringReceiptReqType_SessionID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,sessionIDType is 8 */
+struct iso1MeteringReceiptReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1MeteringReceiptReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SessionID, urn:iso:15118:2:2013:MsgDataTypes,sessionIDType */
+	struct {
+		uint8_t bytes[iso1MeteringReceiptReqType_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2013:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":MeterID,"urn:iso:15118:2:2013:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1MeterInfoType MeterInfo ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+#define iso1KeyValueType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1KeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1DSAKeyValueType DSAKeyValue ;
+	unsigned int DSAKeyValue_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+	struct iso1RSAKeyValueType RSAKeyValue ;
+	unsigned int RSAKeyValue_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1KeyValueType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+#define iso1X509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1X509IssuerSerialType_X509SerialNumber_BYTES_SIZE 20
+struct iso1X509IssuerSerialType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[iso1X509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SerialNumber, http://www.w3.org/2001/XMLSchema,integer */
+	/* int64_t X509SerialNumber; */
+	struct {
+		/** a sign value */
+		int negative;
+		/* container size */
+		/* size_t size; iso1X509IssuerSerialType_X509SerialNumber_BYTES_SIZE */
+		/** array data container */
+		/* For negative values, the Unsigned Integer holds the
+		 * magnitude of the value minus 1 */
+		uint8_t data[iso1X509IssuerSerialType_X509SerialNumber_BYTES_SIZE];
+		/** array length (len <= size) */
+		size_t len;
+	} X509SerialNumber;
+};
+
+typedef enum {
+	iso1chargingSessionType_Terminate = 0,
+	iso1chargingSessionType_Pause = 1
+} iso1chargingSessionType;
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+struct iso1EVSEStatusType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t NotificationMaxDelay ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSENotification, urn:iso:15118:2:2013:MsgDataTypes,EVSENotificationType */
+	iso1EVSENotificationType EVSENotification ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1SignatureMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso1SignatureMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1SignatureMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1SignatureMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":HMACOutputLength, http://www.w3.org/2000/09/xmldsig#,HMACOutputLengthType */
+	int64_t HMACOutputLength ;
+	unsigned int HMACOutputLength_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1SignatureMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso1X509DataType_X509IssuerSerial_ARRAY_SIZE 1
+#define iso1X509DataType_X509SKI_BYTES_SIZE 350
+#define iso1X509DataType_X509SKI_ARRAY_SIZE 1
+#define iso1X509DataType_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1X509DataType_X509SubjectName_ARRAY_SIZE 1
+#define iso1X509DataType_X509Certificate_BYTES_SIZE 350
+#define iso1X509DataType_X509Certificate_ARRAY_SIZE 1
+#define iso1X509DataType_X509CRL_BYTES_SIZE 350
+#define iso1X509DataType_X509CRL_ARRAY_SIZE 1
+#define iso1X509DataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1X509DataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1X509IssuerSerialType array[iso1X509DataType_X509IssuerSerial_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509IssuerSerial;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SKI, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso1X509DataType_X509SKI_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso1X509DataType_X509SKI_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SKI;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SubjectName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso1X509DataType_X509SubjectName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso1X509DataType_X509SubjectName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SubjectName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Certificate, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso1X509DataType_X509Certificate_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso1X509DataType_X509Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Certificate;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509CRL, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso1X509DataType_X509CRL_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso1X509DataType_X509CRL_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509CRL;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1X509DataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+typedef enum {
+	iso1serviceCategoryType_EVCharging = 0,
+	iso1serviceCategoryType_Internet = 1,
+	iso1serviceCategoryType_ContractCertificate = 2,
+	iso1serviceCategoryType_OtherCustom = 3
+} iso1serviceCategoryType;
+
+typedef enum {
+	iso1paymentOptionType_Contract = 0,
+	iso1paymentOptionType_ExternalPayment = 1
+} iso1paymentOptionType;
+
+typedef enum {
+	iso1EnergyTransferModeType_AC_single_phase_core = 0,
+	iso1EnergyTransferModeType_AC_three_phase_core = 1,
+	iso1EnergyTransferModeType_DC_core = 2,
+	iso1EnergyTransferModeType_DC_extended = 3,
+	iso1EnergyTransferModeType_DC_combo_core = 4,
+	iso1EnergyTransferModeType_DC_unique = 5
+} iso1EnergyTransferModeType;
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,NotificationType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":FaultCode,"urn:iso:15118:2:2013:MsgDataTypes":FaultMsg{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso1NotificationType_FaultMsg_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,faultMsgType is 64 */
+struct iso1NotificationType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":FaultCode, urn:iso:15118:2:2013:MsgDataTypes,faultCodeType */
+	iso1faultCodeType FaultCode ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":FaultMsg, urn:iso:15118:2:2013:MsgDataTypes,faultMsgType */
+	struct {
+		exi_string_character_t characters[iso1NotificationType_FaultMsg_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  FaultMsg ;
+	unsigned int FaultMsg_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso1TransformType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso1TransformType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1TransformType_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1TransformType_XPath_ARRAY_SIZE 1
+struct iso1TransformType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1TransformType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1TransformType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":XPath, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso1TransformType_XPath_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso1TransformType_XPath_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} XPath;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentDetailsResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":GenChallenge,"urn:iso:15118:2:2013:MsgBody":EVSETimeStamp)',  derivedBy='EXTENSION'.  */
+#define iso1PaymentDetailsResType_GenChallenge_BYTES_SIZE 16 /* XML schema facet length for urn:iso:15118:2:2013:MsgDataTypes,genChallengeType is 16 */
+struct iso1PaymentDetailsResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":GenChallenge, urn:iso:15118:2:2013:MsgDataTypes,genChallengeType */
+	struct {
+		uint8_t bytes[iso1PaymentDetailsResType_GenChallenge_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  GenChallenge ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSETimeStamp, http://www.w3.org/2001/XMLSchema,long */
+	int64_t EVSETimeStamp ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ContractSignatureEncryptedPrivateKeyType',  base type name='privateKeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso1ContractSignatureEncryptedPrivateKeyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ContractSignatureEncryptedPrivateKeyType_CONTENT_BYTES_SIZE 350
+struct iso1ContractSignatureEncryptedPrivateKeyType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1ContractSignatureEncryptedPrivateKeyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* simple content: urn:iso:15118:2:2013:MsgDataTypes,privateKeyType */
+	struct {
+		uint8_t bytes[iso1ContractSignatureEncryptedPrivateKeyType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso1SPKIDataType_SPKISexp_BYTES_SIZE 350
+#define iso1SPKIDataType_SPKISexp_ARRAY_SIZE 1
+#define iso1SPKIDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1SPKIDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKISexp, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso1SPKIDataType_SPKISexp_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso1SPKIDataType_SPKISexp_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKISexp;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1SPKIDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,SessionStopReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ChargingSession)',  derivedBy='EXTENSION'.  */
+struct iso1SessionStopReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ChargingSession, urn:iso:15118:2:2013:MsgDataTypes,chargingSessionType */
+	iso1chargingSessionType ChargingSession ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":TimeInterval)',  derivedBy='RESTRICTION'.  */
+struct iso1EntryType {
+	/* substitutionGroup */
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		/* element: "urn:iso:15118:2:2013:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct iso1IntervalType TimeInterval ;
+		/* element: "urn:iso:15118:2:2013:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":start,"urn:iso:15118:2:2013:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1RelativeTimeIntervalType RelativeTimeInterval ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		unsigned int TimeInterval_isUsed:1;
+		unsigned int RelativeTimeInterval_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,SessionSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":EVCCID)',  derivedBy='EXTENSION'.  */
+#define iso1SessionSetupReqType_EVCCID_BYTES_SIZE 6 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,evccIDType is 6 */
+struct iso1SessionSetupReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVCCID, urn:iso:15118:2:2013:MsgDataTypes,evccIDType */
+	struct {
+		uint8_t bytes[iso1SessionSetupReqType_EVCCID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVCCID ;
+};
+
+typedef enum {
+	iso1isolationLevelType_Invalid = 0,
+	iso1isolationLevelType_Valid = 1,
+	iso1isolationLevelType_Warning = 2,
+	iso1isolationLevelType_Fault = 3,
+	iso1isolationLevelType_No_IMD = 4
+} iso1isolationLevelType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1CanonicalizationMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso1CanonicalizationMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1CanonicalizationMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1CanonicalizationMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[iso1CanonicalizationMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+struct iso1DC_EVStatusType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVReady, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVReady ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode, urn:iso:15118:2:2013:MsgDataTypes,DC_EVErrorCodeType */
+	iso1DC_EVErrorCodeType EVErrorCode ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC, urn:iso:15118:2:2013:MsgDataTypes,percentValueType */
+	int8_t EVRESSSOC ;
+};
+
+typedef enum {
+	iso1costKindType_relativePricePercentage = 0,
+	iso1costKindType_RenewableGenerationPercentage = 1,
+	iso1costKindType_CarbonDioxideEmission = 2
+} iso1costKindType;
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ServiceID,"urn:iso:15118:2:2013:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2013:MsgDataTypes":ServiceScope{0-1},"urn:iso:15118:2:2013:MsgDataTypes":FreeService)',  derivedBy='RESTRICTION'.  */
+#define iso1ServiceType_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceNameType is 32 */
+#define iso1ServiceType_ServiceScope_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType is 64 */
+struct iso1ServiceType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceID, urn:iso:15118:2:2013:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceName, urn:iso:15118:2:2013:MsgDataTypes,serviceNameType */
+	struct {
+		exi_string_character_t characters[iso1ServiceType_ServiceName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceName ;
+	unsigned int ServiceName_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceCategory, urn:iso:15118:2:2013:MsgDataTypes,serviceCategoryType */
+	iso1serviceCategoryType ServiceCategory ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceScope, urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType */
+	struct {
+		exi_string_character_t characters[iso1ServiceType_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	unsigned int ServiceScope_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */
+	int FreeService ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2013:MsgBody":ServiceCategory{0-1})',  derivedBy='EXTENSION'.  */
+#define iso1ServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType is 64 */
+struct iso1ServiceDiscoveryReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ServiceScope, urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType */
+	struct {
+		exi_string_character_t characters[iso1ServiceDiscoveryReqType_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	unsigned int ServiceScope_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ServiceCategory, urn:iso:15118:2:2013:MsgDataTypes,serviceCategoryType */
+	iso1serviceCategoryType ServiceCategory ;
+	unsigned int ServiceCategory_isUsed:1;
+};
+
+typedef enum {
+	iso1chargeProgressType_Start = 0,
+	iso1chargeProgressType_Stop = 1,
+	iso1chargeProgressType_Renegotiate = 2
+} iso1chargeProgressType;
+
+typedef enum {
+	iso1valueType_bool = 0,
+	iso1valueType_byte = 1,
+	iso1valueType_short = 2,
+	iso1valueType_int = 3,
+	iso1valueType_physicalValue = 4,
+	iso1valueType_string = 5
+} iso1valueType;
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CableCheckReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+struct iso1CableCheckReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVStatusType DC_EVStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ServiceID,"urn:iso:15118:2:2013:MsgDataTypes":ParameterSetID{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso1SelectedServiceType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceID, urn:iso:15118:2:2013:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,short */
+	int16_t ParameterSetID ;
+	unsigned int ParameterSetID_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":RCD))',  derivedBy='EXTENSION'.  */
+struct iso1AC_EVSEStatusType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t NotificationMaxDelay ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSENotification, urn:iso:15118:2:2013:MsgDataTypes,EVSENotificationType */
+	iso1EVSENotificationType EVSENotification ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":RCD, http://www.w3.org/2001/XMLSchema,boolean */
+	int RCD ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso1BodyBaseType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SupportedEnergyTransferModeType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EnergyTransferMode{1-6})',  derivedBy='RESTRICTION'.  */
+#define iso1SupportedEnergyTransferModeType_EnergyTransferMode_ARRAY_SIZE 6
+struct iso1SupportedEnergyTransferModeType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EnergyTransferMode, urn:iso:15118:2:2013:MsgDataTypes,EnergyTransferModeType */
+	struct {
+		iso1EnergyTransferModeType array[iso1SupportedEnergyTransferModeType_EnergyTransferMode_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} EnergyTransferMode;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ChargingStatusReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+struct iso1ChargingStatusReqType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentServiceSelectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+struct iso1PaymentServiceSelectionResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1DigestMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso1DigestMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1DigestMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1DigestMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1DigestMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso1SignaturePropertyType_Target_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SignaturePropertyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SignaturePropertyType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1SignaturePropertyType {
+	/* attribute: Target {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1SignaturePropertyType_Target_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Target ;
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1SignaturePropertyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1SignaturePropertyType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+typedef enum {
+	iso1unitSymbolType_h = 0,
+	iso1unitSymbolType_m = 1,
+	iso1unitSymbolType_s = 2,
+	iso1unitSymbolType_A = 3,
+	iso1unitSymbolType_V = 4,
+	iso1unitSymbolType_W = 5,
+	iso1unitSymbolType_Wh = 6
+} iso1unitSymbolType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+#define iso1PGPDataType_PGPKeyID_BYTES_SIZE 350
+#define iso1PGPDataType_PGPKeyPacket_BYTES_SIZE 350
+#define iso1PGPDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1PGPDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyID, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[iso1PGPDataType_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	unsigned int PGPKeyID_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[iso1PGPDataType_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	unsigned int PGPKeyPacket_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1PGPDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,SessionSetupResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEID,"urn:iso:15118:2:2013:MsgBody":EVSETimeStamp{0-1})',  derivedBy='EXTENSION'.  */
+#define iso1SessionSetupResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,evseIDType is 37 */
+struct iso1SessionSetupResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEID, urn:iso:15118:2:2013:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso1SessionSetupResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSETimeStamp, http://www.w3.org/2001/XMLSchema,long */
+	int64_t EVSETimeStamp ;
+	unsigned int EVSETimeStamp_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso1CertificateChainType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1CertificateChainType_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,certificateType is 800 */
+struct iso1CertificateChainType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1CertificateChainType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Certificate, urn:iso:15118:2:2013:MsgDataTypes,certificateType */
+	struct {
+		uint8_t bytes[iso1CertificateChainType_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Certificate ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SubCertificates, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SubCertificatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate{1-4})',  derivedBy='RESTRICTION'.  */
+	struct iso1SubCertificatesType SubCertificates ;
+	unsigned int SubCertificates_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+struct iso1DC_EVSEStatusType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t NotificationMaxDelay ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSENotification, urn:iso:15118:2:2013:MsgDataTypes,EVSENotificationType */
+	iso1EVSENotificationType EVSENotification ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus, urn:iso:15118:2:2013:MsgDataTypes,isolationLevelType */
+	iso1isolationLevelType EVSEIsolationStatus ;
+	unsigned int EVSEIsolationStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode, urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusCodeType */
+	iso1DC_EVSEStatusCodeType EVSEStatusCode ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Service{1-8})',  derivedBy='RESTRICTION'.  */
+#define iso1ServiceListType_Service_ARRAY_SIZE 8
+struct iso1ServiceListType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Service, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ServiceID,"urn:iso:15118:2:2013:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2013:MsgDataTypes":ServiceScope{0-1},"urn:iso:15118:2:2013:MsgDataTypes":FreeService)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ServiceType array[iso1ServiceListType_Service_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Service;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PowerDeliveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatus)',  derivedBy='EXTENSION'.  */
+struct iso1PowerDeliveryResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso1EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":RCD))',  derivedBy='EXTENSION'.  */
+	struct iso1AC_EVSEStatusType AC_EVSEStatus ;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	unsigned int DC_EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PaymentOptionListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":PaymentOption{1-2})',  derivedBy='RESTRICTION'.  */
+#define iso1PaymentOptionListType_PaymentOption_ARRAY_SIZE 2
+struct iso1PaymentOptionListType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":PaymentOption, urn:iso:15118:2:2013:MsgDataTypes,paymentOptionType */
+	struct {
+		iso1paymentOptionType array[iso1PaymentOptionListType_PaymentOption_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PaymentOption;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+struct iso1PhysicalValueType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Multiplier, urn:iso:15118:2:2013:MsgDataTypes,unitMultiplierType */
+	int8_t Multiplier ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Unit, urn:iso:15118:2:2013:MsgDataTypes,unitSymbolType */
+	iso1unitSymbolType Unit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Value, http://www.w3.org/2001/XMLSchema,short */
+	int16_t Value ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentDetailsReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":eMAID,"urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain)',  derivedBy='EXTENSION'.  */
+#define iso1PaymentDetailsReqType_eMAID_CHARACTERS_SIZE 15 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,eMAIDType is 15 */
+struct iso1PaymentDetailsReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":eMAID, urn:iso:15118:2:2013:MsgDataTypes,eMAIDType */
+	struct {
+		exi_string_character_t characters[iso1PaymentDetailsReqType_eMAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  eMAID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1CertificateChainType ContractSignatureCertChain ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,AuthorizationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+struct iso1AuthorizationResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEProcessing, urn:iso:15118:2:2013:MsgDataTypes,EVSEProcessingType */
+	iso1EVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumPowerLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2013:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})',  derivedBy='EXTENSION'.  */
+struct iso1DC_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaximumCurrentLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaximumPowerLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaximumVoltageLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEMinimumCurrentLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMinimumCurrentLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEMinimumVoltageLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMinimumVoltageLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSECurrentRegulationTolerance, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSECurrentRegulationTolerance ;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEPeakCurrentRipple, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEPeakCurrentRipple ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEEnergyToBeDelivered, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEEnergyToBeDelivered ;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ChargingStatusResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEID,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2013:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2013:MsgBody":ReceiptRequired{0-1},"urn:iso:15118:2:2013:MsgBody":AC_EVSEStatus)',  derivedBy='EXTENSION'.  */
+#define iso1ChargingStatusResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,evseIDType is 37 */
+struct iso1ChargingStatusResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEID, urn:iso:15118:2:2013:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso1ChargingStatusResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2013:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaxCurrent ;
+	unsigned int EVSEMaxCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":MeterID,"urn:iso:15118:2:2013:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":RCD))',  derivedBy='EXTENSION'.  */
+	struct iso1AC_EVSEStatusType AC_EVSEStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":RootCertificateID{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1ListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE 5
+struct iso1ListOfRootCertificateIDsType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":RootCertificateID, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1X509IssuerSerialType array[iso1ListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RootCertificateID;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ChargeServiceType',  base type name='ServiceType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":ServiceID,"urn:iso:15118:2:2013:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2013:MsgDataTypes":ServiceScope{0-1},"urn:iso:15118:2:2013:MsgDataTypes":FreeService),("urn:iso:15118:2:2013:MsgDataTypes":SupportedEnergyTransferMode))',  derivedBy='EXTENSION'.  */
+#define iso1ChargeServiceType_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceNameType is 32 */
+#define iso1ChargeServiceType_ServiceScope_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType is 64 */
+struct iso1ChargeServiceType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceID, urn:iso:15118:2:2013:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceName, urn:iso:15118:2:2013:MsgDataTypes,serviceNameType */
+	struct {
+		exi_string_character_t characters[iso1ChargeServiceType_ServiceName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceName ;
+	unsigned int ServiceName_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceCategory, urn:iso:15118:2:2013:MsgDataTypes,serviceCategoryType */
+	iso1serviceCategoryType ServiceCategory ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ServiceScope, urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType */
+	struct {
+		exi_string_character_t characters[iso1ChargeServiceType_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	unsigned int ServiceScope_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */
+	int FreeService ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SupportedEnergyTransferMode, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SupportedEnergyTransferModeType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EnergyTransferMode{1-6})',  derivedBy='RESTRICTION'.  */
+	struct iso1SupportedEnergyTransferModeType SupportedEnergyTransferMode ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SelectedServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SelectedService{1-16})',  derivedBy='RESTRICTION'.  */
+#define iso1SelectedServiceListType_SelectedService_ARRAY_SIZE 16
+struct iso1SelectedServiceListType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SelectedService, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ServiceID,"urn:iso:15118:2:2013:MsgDataTypes":ParameterSetID{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1SelectedServiceType array[iso1SelectedServiceListType_SelectedService_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SelectedService;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CableCheckResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+struct iso1CableCheckResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEProcessing, urn:iso:15118:2:2013:MsgDataTypes,EVSEProcessingType */
+	iso1EVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1TransformsType_Transform_ARRAY_SIZE 1
+struct iso1TransformsType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transform, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1TransformType array[iso1TransformsType_Transform_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Transform;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PreChargeReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus,"urn:iso:15118:2:2013:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2013:MsgBody":EVTargetCurrent)',  derivedBy='EXTENSION'.  */
+struct iso1PreChargeReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVTargetVoltage ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVTargetCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":DepartureTime{0-1}),("urn:iso:15118:2:2013:MsgDataTypes":EAmount,"urn:iso:15118:2:2013:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2013:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2013:MsgDataTypes":EVMinCurrent))',  derivedBy='EXTENSION'.  */
+struct iso1AC_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	unsigned int DepartureTime_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EAmount, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EAmount ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVMaxVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaxVoltage ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVMaxCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaxCurrent ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVMinCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMinCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2013:MsgDataTypes":PMax))',  derivedBy='EXTENSION'.  */
+struct iso1PMaxScheduleEntryType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso1IntervalType TimeInterval ;
+	unsigned int TimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":start,"urn:iso:15118:2:2013:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+	struct iso1RelativeTimeIntervalType RelativeTimeInterval ;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":PMax, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType PMax ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,MeteringReceiptResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatus)',  derivedBy='EXTENSION'.  */
+struct iso1MeteringReceiptResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso1EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":RCD))',  derivedBy='EXTENSION'.  */
+	struct iso1AC_EVSEStatusType AC_EVSEStatus ;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	unsigned int DC_EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,WeldingDetectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+struct iso1WeldingDetectionResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEPresentVoltage ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+#define iso1ReferenceType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ReferenceType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ReferenceType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ReferenceType_DigestValue_BYTES_SIZE 350
+struct iso1ReferenceType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1ReferenceType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1ReferenceType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1ReferenceType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1TransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1DigestMethodType DigestMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestValue, http://www.w3.org/2000/09/xmldsig#,DigestValueType */
+	struct {
+		uint8_t bytes[iso1ReferenceType_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CurrentDemandReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus,"urn:iso:15118:2:2013:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2013:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2013:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2013:MsgBody":ChargingComplete,"urn:iso:15118:2:2013:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2013:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2013:MsgBody":EVTargetVoltage)',  derivedBy='EXTENSION'.  */
+struct iso1CurrentDemandReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVTargetCurrent ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaximumVoltageLimit ;
+	unsigned int EVMaximumVoltageLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaximumCurrentLimit ;
+	unsigned int EVMaximumCurrentLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVMaximumPowerLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaximumPowerLimit ;
+	unsigned int EVMaximumPowerLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int BulkChargingComplete ;
+	unsigned int BulkChargingComplete_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int ChargingComplete ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":RemainingTimeToFullSoC, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType RemainingTimeToFullSoC ;
+	unsigned int RemainingTimeToFullSoC_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":RemainingTimeToBulkSoC, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType RemainingTimeToBulkSoC ;
+	unsigned int RemainingTimeToBulkSoC_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVTargetVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":costKind,"urn:iso:15118:2:2013:MsgDataTypes":amount,"urn:iso:15118:2:2013:MsgDataTypes":amountMultiplier{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso1CostType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":costKind, urn:iso:15118:2:2013:MsgDataTypes,costKindType */
+	iso1costKindType costKind ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":amount, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t amount ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":amountMultiplier, urn:iso:15118:2:2013:MsgDataTypes,unitMultiplierType */
+	int8_t amountMultiplier ;
+	unsigned int amountMultiplier_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVPowerDeliveryParameterType',  base type name='EVPowerDeliveryParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2013:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ChargingComplete)',  derivedBy='EXTENSION'.  */
+struct iso1DC_EVPowerDeliveryParameterType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int BulkChargingComplete ;
+	unsigned int BulkChargingComplete_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int ChargingComplete ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso1RetrievalMethodType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1RetrievalMethodType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1RetrievalMethodType {
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1RetrievalMethodType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso1RetrievalMethodType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1TransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateUpdateResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2013:MsgBody":DHpublickey,"urn:iso:15118:2:2013:MsgBody":eMAID,"urn:iso:15118:2:2013:MsgBody":RetryCounter{0-1})',  derivedBy='EXTENSION'.  */
+struct iso1CertificateUpdateResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SAProvisioningCertificateChain, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1CertificateChainType SAProvisioningCertificateChain ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1CertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ContractSignatureEncryptedPrivateKey, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ContractSignatureEncryptedPrivateKeyType',  base type name='privateKeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":DHpublickey, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DiffieHellmanPublickeyType',  base type name='dHpublickeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1DiffieHellmanPublickeyType DHpublickey ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":eMAID, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EMAIDType',  base type name='eMAIDType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1EMAIDType eMAID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":RetryCounter, http://www.w3.org/2001/XMLSchema,short */
+	int16_t RetryCounter ;
+	unsigned int RetryCounter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateInstallationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2013:MsgBody":DHpublickey,"urn:iso:15118:2:2013:MsgBody":eMAID)',  derivedBy='EXTENSION'.  */
+struct iso1CertificateInstallationResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SAProvisioningCertificateChain, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1CertificateChainType SAProvisioningCertificateChain ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1CertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ContractSignatureEncryptedPrivateKey, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ContractSignatureEncryptedPrivateKeyType',  base type name='privateKeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":DHpublickey, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DiffieHellmanPublickeyType',  base type name='dHpublickeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1DiffieHellmanPublickeyType DHpublickey ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":eMAID, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EMAIDType',  base type name='eMAIDType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1EMAIDType eMAID ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,WeldingDetectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+struct iso1WeldingDetectionReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVStatusType DC_EVStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CurrentDemandResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2013:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2013:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2013:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2013:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2013:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVSEID,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2013:MsgBody":ReceiptRequired{0-1})',  derivedBy='EXTENSION'.  */
+#define iso1CurrentDemandResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,evseIDType is 37 */
+struct iso1CurrentDemandResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEPresentVoltage ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEPresentCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEPresentCurrent ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSECurrentLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSECurrentLimitAchieved ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEVoltageLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEVoltageLimitAchieved ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEPowerLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEPowerLimitAchieved ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaximumVoltageLimit ;
+	unsigned int EVSEMaximumVoltageLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaximumCurrentLimit ;
+	unsigned int EVSEMaximumCurrentLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEMaximumPowerLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaximumPowerLimit ;
+	unsigned int EVSEMaximumPowerLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEID, urn:iso:15118:2:2013:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso1CurrentDemandResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2013:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":MeterID,"urn:iso:15118:2:2013:MsgDataTypes":MeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2013:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2013:MsgDataTypes":EVSENominalVoltage,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaxCurrent)',  derivedBy='EXTENSION'.  */
+struct iso1AC_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":AC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":RCD))',  derivedBy='EXTENSION'.  */
+	struct iso1AC_EVSEStatusType AC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSENominalVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSENominalVoltage ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEMaxCurrent, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEMaxCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentServiceSelectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2013:MsgBody":SelectedServiceList)',  derivedBy='EXTENSION'.  */
+struct iso1PaymentServiceSelectionReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":SelectedPaymentOption, urn:iso:15118:2:2013:MsgDataTypes,paymentOptionType */
+	iso1paymentOptionType SelectedPaymentOption ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SelectedServiceList, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SelectedServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SelectedService{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso1SelectedServiceListType SelectedServiceList ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1SignaturePropertiesType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SignaturePropertiesType_SignatureProperty_ARRAY_SIZE 1
+struct iso1SignaturePropertiesType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1SignaturePropertiesType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureProperty, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1SignaturePropertyType array[iso1SignaturePropertiesType_SignatureProperty_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SignatureProperty;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":boolValue|"urn:iso:15118:2:2013:MsgDataTypes":byteValue|"urn:iso:15118:2:2013:MsgDataTypes":shortValue|"urn:iso:15118:2:2013:MsgDataTypes":intValue|"urn:iso:15118:2:2013:MsgDataTypes":physicalValue|"urn:iso:15118:2:2013:MsgDataTypes":stringValue)',  derivedBy='RESTRICTION'.  */
+#define iso1ParameterType_Name_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ParameterType_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1ParameterType {
+	/* attribute: Name {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[iso1ParameterType_Name_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Name ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":boolValue, http://www.w3.org/2001/XMLSchema,boolean */
+	int boolValue ;
+	unsigned int boolValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":byteValue, http://www.w3.org/2001/XMLSchema,byte */
+	int8_t byteValue ;
+	unsigned int byteValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":shortValue, http://www.w3.org/2001/XMLSchema,short */
+	int16_t shortValue ;
+	unsigned int shortValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":intValue, http://www.w3.org/2001/XMLSchema,int */
+	int32_t intValue ;
+	unsigned int intValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":physicalValue, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType physicalValue ;
+	unsigned int physicalValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":stringValue, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[iso1ParameterType_stringValue_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  stringValue ;
+	unsigned int stringValue_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateInstallationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2013:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+#define iso1CertificateInstallationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1CertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,certificateType is 800 */
+struct iso1CertificateInstallationReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1CertificateInstallationReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":OEMProvisioningCert, urn:iso:15118:2:2013:MsgDataTypes,certificateType */
+	struct {
+		uint8_t bytes[iso1CertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  OEMProvisioningCert ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":RootCertificateID{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1ListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":PaymentOptionList,"urn:iso:15118:2:2013:MsgBody":ChargeService,"urn:iso:15118:2:2013:MsgBody":ServiceList{0-1})',  derivedBy='EXTENSION'.  */
+struct iso1ServiceDiscoveryResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":PaymentOptionList, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PaymentOptionListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":PaymentOption{1-2})',  derivedBy='RESTRICTION'.  */
+	struct iso1PaymentOptionListType PaymentOptionList ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ChargeService, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ChargeServiceType',  base type name='ServiceType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":ServiceID,"urn:iso:15118:2:2013:MsgDataTypes":ServiceName{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ServiceCategory,"urn:iso:15118:2:2013:MsgDataTypes":ServiceScope{0-1},"urn:iso:15118:2:2013:MsgDataTypes":FreeService),("urn:iso:15118:2:2013:MsgDataTypes":SupportedEnergyTransferMode))',  derivedBy='EXTENSION'.  */
+	struct iso1ChargeServiceType ChargeService ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ServiceList, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Service{1-8})',  derivedBy='RESTRICTION'.  */
+	struct iso1ServiceListType ServiceList ;
+	unsigned int ServiceList_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PreChargeResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+struct iso1PreChargeResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEStatusType',  base type name='EVSEStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2013:MsgDataTypes":EVSENotification),("urn:iso:15118:2:2013:MsgDataTypes":EVSEIsolationStatus{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatusCode))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVSEPresentVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2013:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+#define iso1ParameterSetType_Parameter_ARRAY_SIZE 16
+struct iso1ParameterSetType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,short */
+	int16_t ParameterSetID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Parameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":boolValue|"urn:iso:15118:2:2013:MsgDataTypes":byteValue|"urn:iso:15118:2:2013:MsgDataTypes":shortValue|"urn:iso:15118:2:2013:MsgDataTypes":intValue|"urn:iso:15118:2:2013:MsgDataTypes":physicalValue|"urn:iso:15118:2:2013:MsgDataTypes":stringValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ParameterType array[iso1ParameterSetType_Parameter_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Parameter;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1SignedInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SignedInfoType_Reference_ARRAY_SIZE 1
+struct iso1SignedInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1SignedInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1CanonicalizationMethodType CanonicalizationMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1SignatureMethodType SignatureMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ReferenceType array[iso1SignedInfoType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ProfileEntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryMaxPower,"urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryMaxNumberOfPhasesInUse{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso1ProfileEntryType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryStart, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t ChargingProfileEntryStart ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryMaxPower, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType ChargingProfileEntryMaxPower ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryMaxNumberOfPhasesInUse, urn:iso:15118:2:2013:MsgDataTypes,maxNumPhasesType */
+	int8_t ChargingProfileEntryMaxNumberOfPhasesInUse ;
+	unsigned int ChargingProfileEntryMaxNumberOfPhasesInUse_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1ManifestType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1ManifestType_Reference_ARRAY_SIZE 1
+struct iso1ManifestType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1ManifestType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ReferenceType array[iso1ManifestType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":DepartureTime{0-1}),("urn:iso:15118:2:2013:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2013:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2013:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2013:MsgDataTypes":BulkSOC{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso1DC_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	unsigned int DepartureTime_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVStatus, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVStatusType',  base type name='EVStatusType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":EVReady,"urn:iso:15118:2:2013:MsgDataTypes":EVErrorCode,"urn:iso:15118:2:2013:MsgDataTypes":EVRESSSOC)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVStatusType DC_EVStatus ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVMaximumCurrentLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaximumCurrentLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVMaximumPowerLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaximumPowerLimit ;
+	unsigned int EVMaximumPowerLimit_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVMaximumVoltageLimit, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVMaximumVoltageLimit ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVEnergyCapacity, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVEnergyCapacity ;
+	unsigned int EVEnergyCapacity_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVEnergyRequest, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType EVEnergyRequest ;
+	unsigned int EVEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":FullSOC, urn:iso:15118:2:2013:MsgDataTypes,percentValueType */
+	int8_t FullSOC ;
+	unsigned int FullSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":BulkSOC, urn:iso:15118:2:2013:MsgDataTypes,percentValueType */
+	int8_t BulkSOC ;
+	unsigned int BulkSOC_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ConsumptionCostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":startValue,"urn:iso:15118:2:2013:MsgDataTypes":Cost{1-3})',  derivedBy='RESTRICTION'.  */
+#define iso1ConsumptionCostType_Cost_ARRAY_SIZE 3
+struct iso1ConsumptionCostType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":startValue, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Multiplier,"urn:iso:15118:2:2013:MsgDataTypes":Unit,"urn:iso:15118:2:2013:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso1PhysicalValueType startValue ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":Cost, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":costKind,"urn:iso:15118:2:2013:MsgDataTypes":amount,"urn:iso:15118:2:2013:MsgDataTypes":amountMultiplier{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1CostType array[iso1ConsumptionCostType_Cost_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Cost;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1PMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE 5
+struct iso1PMaxScheduleType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":PMaxScheduleEntry, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2013:MsgDataTypes":PMax))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct iso1PMaxScheduleEntryType array[iso1PMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PMaxScheduleEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateUpdateReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2013:MsgBody":eMAID,"urn:iso:15118:2:2013:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+#define iso1CertificateUpdateReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1CertificateUpdateReqType_eMAID_CHARACTERS_SIZE 15 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,eMAIDType is 15 */
+struct iso1CertificateUpdateReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1CertificateUpdateReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":Certificate,"urn:iso:15118:2:2013:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1CertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":eMAID, urn:iso:15118:2:2013:MsgDataTypes,eMAIDType */
+	struct {
+		exi_string_character_t characters[iso1CertificateUpdateReqType_eMAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  eMAID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":RootCertificateID{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1ListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso1KeyInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1KeyInfoType_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1KeyInfoType_KeyName_ARRAY_SIZE 1
+#define iso1KeyInfoType_KeyValue_ARRAY_SIZE 1
+#define iso1KeyInfoType_RetrievalMethod_ARRAY_SIZE 1
+#define iso1KeyInfoType_X509Data_ARRAY_SIZE 1
+#define iso1KeyInfoType_PGPData_ARRAY_SIZE 1
+#define iso1KeyInfoType_SPKIData_ARRAY_SIZE 1
+#define iso1KeyInfoType_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1KeyInfoType_MgmtData_ARRAY_SIZE 1
+#define iso1KeyInfoType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso1KeyInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1KeyInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso1KeyInfoType_KeyName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso1KeyInfoType_KeyName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1KeyValueType array[iso1KeyInfoType_KeyValue_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyValue;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1RetrievalMethodType array[iso1KeyInfoType_RetrievalMethod_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RetrievalMethod;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Data, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1X509DataType array[iso1KeyInfoType_X509Data_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Data;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPData, Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1PGPDataType array[iso1KeyInfoType_PGPData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PGPData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKIData, Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1SPKIDataType array[iso1KeyInfoType_SPKIData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKIData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":MgmtData, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso1KeyInfoType_MgmtData_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso1KeyInfoType_MgmtData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MgmtData;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso1KeyInfoType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ChargeParameterDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":MaxEntriesSAScheduleTuple{0-1},"urn:iso:15118:2:2013:MsgBody":RequestedEnergyTransferMode,"urn:iso:15118:2:2013:MsgDataTypes":EVChargeParameter)',  derivedBy='EXTENSION'.  */
+struct iso1ChargeParameterDiscoveryReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":MaxEntriesSAScheduleTuple, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t MaxEntriesSAScheduleTuple ;
+	unsigned int MaxEntriesSAScheduleTuple_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgBody":RequestedEnergyTransferMode, urn:iso:15118:2:2013:MsgDataTypes,EnergyTransferModeType */
+	iso1EnergyTransferModeType RequestedEnergyTransferMode ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVChargeParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVChargeParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":DepartureTime{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1EVChargeParameterType EVChargeParameter ;
+	unsigned int EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":AC_EVChargeParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":DepartureTime{0-1}),("urn:iso:15118:2:2013:MsgDataTypes":EAmount,"urn:iso:15118:2:2013:MsgDataTypes":EVMaxVoltage,"urn:iso:15118:2:2013:MsgDataTypes":EVMaxCurrent,"urn:iso:15118:2:2013:MsgDataTypes":EVMinCurrent))',  derivedBy='EXTENSION'.  */
+	struct iso1AC_EVChargeParameterType AC_EVChargeParameter ;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVChargeParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVChargeParameterType',  base type name='EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":DepartureTime{0-1}),("urn:iso:15118:2:2013:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2013:MsgDataTypes":EVMaximumCurrentLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVMaximumVoltageLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVEnergyCapacity{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVEnergyRequest{0-1},"urn:iso:15118:2:2013:MsgDataTypes":FullSOC{0-1},"urn:iso:15118:2:2013:MsgDataTypes":BulkSOC{0-1}))',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVChargeParameterType DC_EVChargeParameter ;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ChargingProfileType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ProfileEntry{1-24})',  derivedBy='RESTRICTION'.  */
+#define iso1ChargingProfileType_ProfileEntry_ARRAY_SIZE 24
+struct iso1ChargingProfileType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ProfileEntry, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ProfileEntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryStart,"urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryMaxPower,"urn:iso:15118:2:2013:MsgDataTypes":ChargingProfileEntryMaxNumberOfPhasesInUse{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ProfileEntryType array[iso1ChargingProfileType_ProfileEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ProfileEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SalesTariffEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2013:MsgDataTypes":EPriceLevel{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ConsumptionCost{0-3}))',  derivedBy='EXTENSION'.  */
+#define iso1SalesTariffEntryType_ConsumptionCost_ARRAY_SIZE 3
+struct iso1SalesTariffEntryType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":TimeInterval, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,IntervalType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso1IntervalType TimeInterval ;
+	unsigned int TimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,RelativeTimeIntervalType',  base type name='IntervalType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":start,"urn:iso:15118:2:2013:MsgDataTypes":duration{0-1})',  derivedBy='EXTENSION'.  */
+	struct iso1RelativeTimeIntervalType RelativeTimeInterval ;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EPriceLevel, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t EPriceLevel ;
+	unsigned int EPriceLevel_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ConsumptionCost, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ConsumptionCostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":startValue,"urn:iso:15118:2:2013:MsgDataTypes":Cost{1-3})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ConsumptionCostType array[iso1SalesTariffEntryType_ConsumptionCost_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ConsumptionCost;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2013:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2013:MsgDataTypes":NumEPriceLevels{0-1},"urn:iso:15118:2:2013:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1SalesTariffType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SalesTariffType_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,tariffDescriptionType is 32 */
+#define iso1SalesTariffType_SalesTariffEntry_ARRAY_SIZE 5
+struct iso1SalesTariffType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1SalesTariffType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SalesTariffID, urn:iso:15118:2:2013:MsgDataTypes,SAIDType */
+	uint8_t SalesTariffID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SalesTariffDescription, urn:iso:15118:2:2013:MsgDataTypes,tariffDescriptionType */
+	struct {
+		exi_string_character_t characters[iso1SalesTariffType_SalesTariffDescription_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  SalesTariffDescription ;
+	unsigned int SalesTariffDescription_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":NumEPriceLevels, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumEPriceLevels ;
+	unsigned int NumEPriceLevels_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SalesTariffEntry, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SalesTariffEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2013:MsgDataTypes":TimeInterval),("urn:iso:15118:2:2013:MsgDataTypes":EPriceLevel{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ConsumptionCost{0-3}))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct iso1SalesTariffEntryType array[iso1SalesTariffType_SalesTariffEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SalesTariffEntry;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1SignatureType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1SignatureType_Object_ARRAY_SIZE 1
+struct iso1SignatureType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso1SignatureType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignedInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1SignedInfoType SignedInfo ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso1SignatureValueType SignatureValue ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct iso1KeyInfoType KeyInfo ;
+	unsigned int KeyInfo_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Object, Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ObjectType array[iso1SignatureType_Object_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Object;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,PowerDeliveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ChargeProgress,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVPowerDeliveryParameter{0-1})',  derivedBy='EXTENSION'.  */
+struct iso1PowerDeliveryReqType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ChargeProgress, urn:iso:15118:2:2013:MsgDataTypes,chargeProgressType */
+	iso1chargeProgressType ChargeProgress ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2013:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ChargingProfile, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ChargingProfileType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ProfileEntry{1-24})',  derivedBy='RESTRICTION'.  */
+	struct iso1ChargingProfileType ChargingProfile ;
+	unsigned int ChargingProfile_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVPowerDeliveryParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso1EVPowerDeliveryParameterType EVPowerDeliveryParameter ;
+	unsigned int EVPowerDeliveryParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVPowerDeliveryParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVPowerDeliveryParameterType',  base type name='EVPowerDeliveryParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":DC_EVStatus,"urn:iso:15118:2:2013:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2013:MsgDataTypes":ChargingComplete)',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ;
+	unsigned int DC_EVPowerDeliveryParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ServiceParameterListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ParameterSet{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso1ServiceParameterListType_ParameterSet_ARRAY_SIZE 5
+struct iso1ServiceParameterListType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":ParameterSet, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2013:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1ParameterSetType array[iso1ServiceParameterListType_ParameterSet_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ParameterSet;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDetailResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":ServiceID,"urn:iso:15118:2:2013:MsgBody":ServiceParameterList{0-1})',  derivedBy='EXTENSION'.  */
+struct iso1ServiceDetailResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ServiceID, urn:iso:15118:2:2013:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":ServiceParameterList, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,ServiceParameterListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":ParameterSet{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1ServiceParameterListType ServiceParameterList ;
+	unsigned int ServiceParameterList_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SAScheduleTupleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2013:MsgDataTypes":SalesTariff{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso1SAScheduleTupleType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SAScheduleTupleID, urn:iso:15118:2:2013:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":PMaxSchedule, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1PMaxScheduleType PMaxSchedule ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SalesTariff, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2013:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2013:MsgDataTypes":NumEPriceLevels{0-1},"urn:iso:15118:2:2013:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1SalesTariffType SalesTariff ;
+	unsigned int SalesTariff_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgHeader,MessageHeaderType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgHeader":SessionID,"urn:iso:15118:2:2013:MsgHeader":Notification{0-1},"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso1MessageHeaderType_SessionID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,sessionIDType is 8 */
+struct iso1MessageHeaderType {
+	/* element: "urn:iso:15118:2:2013:MsgHeader":SessionID, urn:iso:15118:2:2013:MsgDataTypes,sessionIDType */
+	struct {
+		uint8_t bytes[iso1MessageHeaderType_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	/* element: "urn:iso:15118:2:2013:MsgHeader":Notification, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,NotificationType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":FaultCode,"urn:iso:15118:2:2013:MsgDataTypes":FaultMsg{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1NotificationType Notification ;
+	unsigned int Notification_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Signature, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso1SignatureType Signature ;
+	unsigned int Signature_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SAScheduleListType',  base type name='SASchedulesType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SAScheduleTuple{1-3})',  derivedBy='EXTENSION'.  */
+#define iso1SAScheduleListType_SAScheduleTuple_ARRAY_SIZE 3
+struct iso1SAScheduleListType {
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SAScheduleTuple, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SAScheduleTupleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2013:MsgDataTypes":SalesTariff{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso1SAScheduleTupleType array[iso1SAScheduleListType_SAScheduleTuple_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SAScheduleTuple;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,ChargeParameterDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEProcessing,"urn:iso:15118:2:2013:MsgDataTypes":SASchedules{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEChargeParameter)',  derivedBy='EXTENSION'.  */
+struct iso1ChargeParameterDiscoveryResType {
+	/* element: "urn:iso:15118:2:2013:MsgBody":ResponseCode, urn:iso:15118:2:2013:MsgDataTypes,responseCodeType */
+	iso1responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2013:MsgBody":EVSEProcessing, urn:iso:15118:2:2013:MsgDataTypes,EVSEProcessingType */
+	iso1EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SASchedules, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SASchedulesType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso1SASchedulesType SASchedules ;
+	unsigned int SASchedules_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":SAScheduleList, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,SAScheduleListType',  base type name='SASchedulesType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":SAScheduleTuple{1-3})',  derivedBy='EXTENSION'.  */
+	struct iso1SAScheduleListType SAScheduleList ;
+	unsigned int SAScheduleList_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":EVSEChargeParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,EVSEChargeParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso1EVSEChargeParameterType EVSEChargeParameter ;
+	unsigned int EVSEChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":AC_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,AC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":AC_EVSEStatus,"urn:iso:15118:2:2013:MsgDataTypes":EVSENominalVoltage,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaxCurrent)',  derivedBy='EXTENSION'.  */
+	struct iso1AC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2013:MsgDataTypes":DC_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2013:MsgDataTypes,DC_EVSEChargeParameterType',  base type name='EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDataTypes":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumCurrentLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumPowerLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMaximumVoltageLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMinimumCurrentLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSEMinimumVoltageLimit,"urn:iso:15118:2:2013:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2013:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})',  derivedBy='EXTENSION'.  */
+	struct iso1DC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgBody,BodyType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":BodyElement{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso1BodyType {
+	/* substitutionGroup */
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		/* element: "urn:iso:15118:2:2013:MsgBody":BodyElement, Complex type name='urn:iso:15118:2:2013:MsgBody,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct iso1BodyBaseType BodyElement ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":SessionSetupReq, Complex type name='urn:iso:15118:2:2013:MsgBody,SessionSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":EVCCID)',  derivedBy='EXTENSION'.  */
+		struct iso1SessionSetupReqType SessionSetupReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":SessionSetupRes, Complex type name='urn:iso:15118:2:2013:MsgBody,SessionSetupResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEID,"urn:iso:15118:2:2013:MsgBody":EVSETimeStamp{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1SessionSetupResType SessionSetupRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ServiceDiscoveryReq, Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ServiceScope{0-1},"urn:iso:15118:2:2013:MsgBody":ServiceCategory{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1ServiceDiscoveryReqType ServiceDiscoveryReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ServiceDiscoveryRes, Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":PaymentOptionList,"urn:iso:15118:2:2013:MsgBody":ChargeService,"urn:iso:15118:2:2013:MsgBody":ServiceList{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1ServiceDiscoveryResType ServiceDiscoveryRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ServiceDetailReq, Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDetailReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ServiceID)',  derivedBy='EXTENSION'.  */
+		struct iso1ServiceDetailReqType ServiceDetailReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ServiceDetailRes, Complex type name='urn:iso:15118:2:2013:MsgBody,ServiceDetailResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":ServiceID,"urn:iso:15118:2:2013:MsgBody":ServiceParameterList{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1ServiceDetailResType ServiceDetailRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PaymentServiceSelectionReq, Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentServiceSelectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2013:MsgBody":SelectedServiceList)',  derivedBy='EXTENSION'.  */
+		struct iso1PaymentServiceSelectionReqType PaymentServiceSelectionReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PaymentServiceSelectionRes, Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentServiceSelectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+		struct iso1PaymentServiceSelectionResType PaymentServiceSelectionRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PaymentDetailsReq, Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentDetailsReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":eMAID,"urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain)',  derivedBy='EXTENSION'.  */
+		struct iso1PaymentDetailsReqType PaymentDetailsReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PaymentDetailsRes, Complex type name='urn:iso:15118:2:2013:MsgBody,PaymentDetailsResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":GenChallenge,"urn:iso:15118:2:2013:MsgBody":EVSETimeStamp)',  derivedBy='EXTENSION'.  */
+		struct iso1PaymentDetailsResType PaymentDetailsRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":AuthorizationReq, Complex type name='urn:iso:15118:2:2013:MsgBody,AuthorizationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":GenChallenge{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1AuthorizationReqType AuthorizationReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":AuthorizationRes, Complex type name='urn:iso:15118:2:2013:MsgBody,AuthorizationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+		struct iso1AuthorizationResType AuthorizationRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ChargeParameterDiscoveryReq, Complex type name='urn:iso:15118:2:2013:MsgBody,ChargeParameterDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":MaxEntriesSAScheduleTuple{0-1},"urn:iso:15118:2:2013:MsgBody":RequestedEnergyTransferMode,"urn:iso:15118:2:2013:MsgDataTypes":EVChargeParameter)',  derivedBy='EXTENSION'.  */
+		struct iso1ChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ChargeParameterDiscoveryRes, Complex type name='urn:iso:15118:2:2013:MsgBody,ChargeParameterDiscoveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEProcessing,"urn:iso:15118:2:2013:MsgDataTypes":SASchedules{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVSEChargeParameter)',  derivedBy='EXTENSION'.  */
+		struct iso1ChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PowerDeliveryReq, Complex type name='urn:iso:15118:2:2013:MsgBody,PowerDeliveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ChargeProgress,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgBody":ChargingProfile{0-1},"urn:iso:15118:2:2013:MsgDataTypes":EVPowerDeliveryParameter{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1PowerDeliveryReqType PowerDeliveryReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PowerDeliveryRes, Complex type name='urn:iso:15118:2:2013:MsgBody,PowerDeliveryResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatus)',  derivedBy='EXTENSION'.  */
+		struct iso1PowerDeliveryResType PowerDeliveryRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":MeteringReceiptReq, Complex type name='urn:iso:15118:2:2013:MsgBody,MeteringReceiptReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":SessionID,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2013:MsgBody":MeterInfo)',  derivedBy='EXTENSION'.  */
+		struct iso1MeteringReceiptReqType MeteringReceiptReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":MeteringReceiptRes, Complex type name='urn:iso:15118:2:2013:MsgBody,MeteringReceiptResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgDataTypes":EVSEStatus)',  derivedBy='EXTENSION'.  */
+		struct iso1MeteringReceiptResType MeteringReceiptRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":SessionStopReq, Complex type name='urn:iso:15118:2:2013:MsgBody,SessionStopReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ChargingSession)',  derivedBy='EXTENSION'.  */
+		struct iso1SessionStopReqType SessionStopReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":SessionStopRes, Complex type name='urn:iso:15118:2:2013:MsgBody,SessionStopResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode)',  derivedBy='EXTENSION'.  */
+		struct iso1SessionStopResType SessionStopRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CertificateUpdateReq, Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateUpdateReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2013:MsgBody":eMAID,"urn:iso:15118:2:2013:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+		struct iso1CertificateUpdateReqType CertificateUpdateReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CertificateUpdateRes, Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateUpdateResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2013:MsgBody":DHpublickey,"urn:iso:15118:2:2013:MsgBody":eMAID,"urn:iso:15118:2:2013:MsgBody":RetryCounter{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1CertificateUpdateResType CertificateUpdateRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CertificateInstallationReq, Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateInstallationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2013:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+		struct iso1CertificateInstallationReqType CertificateInstallationReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CertificateInstallationRes, Complex type name='urn:iso:15118:2:2013:MsgBody,CertificateInstallationResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2013:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2013:MsgBody":DHpublickey,"urn:iso:15118:2:2013:MsgBody":eMAID)',  derivedBy='EXTENSION'.  */
+		struct iso1CertificateInstallationResType CertificateInstallationRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ChargingStatusReq, Complex type name='urn:iso:15118:2:2013:MsgBody,ChargingStatusReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+		struct iso1ChargingStatusReqType ChargingStatusReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":ChargingStatusRes, Complex type name='urn:iso:15118:2:2013:MsgBody,ChargingStatusResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":EVSEID,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgBody":EVSEMaxCurrent{0-1},"urn:iso:15118:2:2013:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2013:MsgBody":ReceiptRequired{0-1},"urn:iso:15118:2:2013:MsgBody":AC_EVSEStatus)',  derivedBy='EXTENSION'.  */
+		struct iso1ChargingStatusResType ChargingStatusRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CableCheckReq, Complex type name='urn:iso:15118:2:2013:MsgBody,CableCheckReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+		struct iso1CableCheckReqType CableCheckReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CableCheckRes, Complex type name='urn:iso:15118:2:2013:MsgBody,CableCheckResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEProcessing)',  derivedBy='EXTENSION'.  */
+		struct iso1CableCheckResType CableCheckRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PreChargeReq, Complex type name='urn:iso:15118:2:2013:MsgBody,PreChargeReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus,"urn:iso:15118:2:2013:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2013:MsgBody":EVTargetCurrent)',  derivedBy='EXTENSION'.  */
+		struct iso1PreChargeReqType PreChargeReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":PreChargeRes, Complex type name='urn:iso:15118:2:2013:MsgBody,PreChargeResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+		struct iso1PreChargeResType PreChargeRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CurrentDemandReq, Complex type name='urn:iso:15118:2:2013:MsgBody,CurrentDemandReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus,"urn:iso:15118:2:2013:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2013:MsgBody":EVMaximumVoltageLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVMaximumCurrentLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVMaximumPowerLimit{0-1},"urn:iso:15118:2:2013:MsgBody":BulkChargingComplete{0-1},"urn:iso:15118:2:2013:MsgBody":ChargingComplete,"urn:iso:15118:2:2013:MsgBody":RemainingTimeToFullSoC{0-1},"urn:iso:15118:2:2013:MsgBody":RemainingTimeToBulkSoC{0-1},"urn:iso:15118:2:2013:MsgBody":EVTargetVoltage)',  derivedBy='EXTENSION'.  */
+		struct iso1CurrentDemandReqType CurrentDemandReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":CurrentDemandRes, Complex type name='urn:iso:15118:2:2013:MsgBody,CurrentDemandResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2013:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2013:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2013:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2013:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2013:MsgBody":EVSEMaximumVoltageLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVSEMaximumCurrentLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVSEMaximumPowerLimit{0-1},"urn:iso:15118:2:2013:MsgBody":EVSEID,"urn:iso:15118:2:2013:MsgBody":SAScheduleTupleID,"urn:iso:15118:2:2013:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2013:MsgBody":ReceiptRequired{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso1CurrentDemandResType CurrentDemandRes ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":WeldingDetectionReq, Complex type name='urn:iso:15118:2:2013:MsgBody,WeldingDetectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":DC_EVStatus)',  derivedBy='EXTENSION'.  */
+		struct iso1WeldingDetectionReqType WeldingDetectionReq ;
+		/* element: "urn:iso:15118:2:2013:MsgBody":WeldingDetectionRes, Complex type name='urn:iso:15118:2:2013:MsgBody,WeldingDetectionResType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":ResponseCode,"urn:iso:15118:2:2013:MsgBody":DC_EVSEStatus,"urn:iso:15118:2:2013:MsgBody":EVSEPresentVoltage)',  derivedBy='EXTENSION'.  */
+		struct iso1WeldingDetectionResType WeldingDetectionRes ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		unsigned int BodyElement_isUsed:1;
+		unsigned int SessionSetupReq_isUsed:1;
+		unsigned int SessionSetupRes_isUsed:1;
+		unsigned int ServiceDiscoveryReq_isUsed:1;
+		unsigned int ServiceDiscoveryRes_isUsed:1;
+		unsigned int ServiceDetailReq_isUsed:1;
+		unsigned int ServiceDetailRes_isUsed:1;
+		unsigned int PaymentServiceSelectionReq_isUsed:1;
+		unsigned int PaymentServiceSelectionRes_isUsed:1;
+		unsigned int PaymentDetailsReq_isUsed:1;
+		unsigned int PaymentDetailsRes_isUsed:1;
+		unsigned int AuthorizationReq_isUsed:1;
+		unsigned int AuthorizationRes_isUsed:1;
+		unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+		unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+		unsigned int PowerDeliveryReq_isUsed:1;
+		unsigned int PowerDeliveryRes_isUsed:1;
+		unsigned int MeteringReceiptReq_isUsed:1;
+		unsigned int MeteringReceiptRes_isUsed:1;
+		unsigned int SessionStopReq_isUsed:1;
+		unsigned int SessionStopRes_isUsed:1;
+		unsigned int CertificateUpdateReq_isUsed:1;
+		unsigned int CertificateUpdateRes_isUsed:1;
+		unsigned int CertificateInstallationReq_isUsed:1;
+		unsigned int CertificateInstallationRes_isUsed:1;
+		unsigned int ChargingStatusReq_isUsed:1;
+		unsigned int ChargingStatusRes_isUsed:1;
+		unsigned int CableCheckReq_isUsed:1;
+		unsigned int CableCheckRes_isUsed:1;
+		unsigned int PreChargeReq_isUsed:1;
+		unsigned int PreChargeRes_isUsed:1;
+		unsigned int CurrentDemandReq_isUsed:1;
+		unsigned int CurrentDemandRes_isUsed:1;
+		unsigned int WeldingDetectionReq_isUsed:1;
+		unsigned int WeldingDetectionRes_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2013:MsgDef,#AnonType_V2G_Message',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgDef":Header,"urn:iso:15118:2:2013:MsgDef":Body)',  derivedBy='RESTRICTION'.  */
+struct iso1AnonType_V2G_Message {
+	/* element: "urn:iso:15118:2:2013:MsgDef":Header, Complex type name='urn:iso:15118:2:2013:MsgHeader,MessageHeaderType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgHeader":SessionID,"urn:iso:15118:2:2013:MsgHeader":Notification{0-1},"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1MessageHeaderType Header ;
+	/* element: "urn:iso:15118:2:2013:MsgDef":Body, Complex type name='urn:iso:15118:2:2013:MsgBody,BodyType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2013:MsgBody":BodyElement{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso1BodyType Body ;
+};
+
+
+
+#define iso1EXIDocument_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIDocument_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIDocument_DigestValue_BYTES_SIZE 350
+#define iso1EXIFragment_Exponent_BYTES_SIZE 350
+#define iso1EXIFragment_PgenCounter_BYTES_SIZE 350
+#define iso1EXIFragment_SessionID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,sessionIDType is 8 */
+#define iso1EXIFragment_PGPKeyPacket_BYTES_SIZE 350
+#define iso1EXIFragment_Seed_BYTES_SIZE 350
+#define iso1EXIFragment_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIFragment_OEMProvisioningCert_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,certificateType is 800 */
+#define iso1EXIFragment_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,tariffDescriptionType is 32 */
+#define iso1EXIFragment_EVCCID_BYTES_SIZE 6 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,evccIDType is 6 */
+#define iso1EXIFragment_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIFragment_P_BYTES_SIZE 350
+#define iso1EXIFragment_Q_BYTES_SIZE 350
+#define iso1EXIFragment_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIFragment_G_BYTES_SIZE 350
+#define iso1EXIFragment_J_BYTES_SIZE 350
+#define iso1EXIFragment_ServiceScope_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceScopeType is 64 */
+#define iso1EXIFragment_ServiceName_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,serviceNameType is 32 */
+#define iso1EXIFragment_X509CRL_BYTES_SIZE 350
+#define iso1EXIFragment_Y_BYTES_SIZE 350
+#define iso1EXIFragment_DigestValue_BYTES_SIZE 350
+#define iso1EXIFragment_SPKISexp_BYTES_SIZE 350
+#define iso1EXIFragment_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIFragment_PGPKeyID_BYTES_SIZE 350
+#define iso1EXIFragment_X509Certificate_BYTES_SIZE 350
+#define iso1EXIFragment_FaultMsg_CHARACTERS_SIZE 64 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,faultMsgType is 64 */
+#define iso1EXIFragment_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,evseIDType is 37 */
+#define iso1EXIFragment_SigMeterReading_BYTES_SIZE 64 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,sigMeterReadingType is 64 */
+#define iso1EXIFragment_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,meterIDType is 32 */
+#define iso1EXIFragment_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIFragment_GenChallenge_BYTES_SIZE 16 /* XML schema facet length for urn:iso:15118:2:2013:MsgDataTypes,genChallengeType is 16 */
+#define iso1EXIFragment_X509SKI_BYTES_SIZE 350
+#define iso1EXIFragment_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2013:MsgDataTypes,certificateType is 800 */
+#define iso1EXIFragment_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1EXIFragment_Modulus_BYTES_SIZE 350
+#define iso1exiElementFrag_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso1exiElementFrag_CHARACTERS_GENERIC_CHARACTERS_SIZE 50 + EXTRA_CHAR
+
+
+/* Global elements of EXI Document */
+struct iso1EXIDocument {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	struct iso1AnonType_V2G_Message V2G_Message ;
+	struct iso1ServiceDiscoveryReqType ServiceDiscoveryReq ;
+	struct iso1ServiceDiscoveryResType ServiceDiscoveryRes ;
+	struct iso1MeteringReceiptReqType MeteringReceiptReq ;
+	struct iso1PaymentDetailsReqType PaymentDetailsReq ;
+	struct iso1MeteringReceiptResType MeteringReceiptRes ;
+	struct iso1PaymentDetailsResType PaymentDetailsRes ;
+	struct iso1SessionSetupReqType SessionSetupReq ;
+	struct iso1SessionSetupResType SessionSetupRes ;
+	struct iso1CableCheckReqType CableCheckReq ;
+	struct iso1CableCheckResType CableCheckRes ;
+	struct iso1CertificateInstallationReqType CertificateInstallationReq ;
+	struct iso1CertificateInstallationResType CertificateInstallationRes ;
+	struct iso1WeldingDetectionReqType WeldingDetectionReq ;
+	struct iso1WeldingDetectionResType WeldingDetectionRes ;
+	struct iso1CertificateUpdateReqType CertificateUpdateReq ;
+	struct iso1CertificateUpdateResType CertificateUpdateRes ;
+	struct iso1PaymentServiceSelectionReqType PaymentServiceSelectionReq ;
+	struct iso1PowerDeliveryReqType PowerDeliveryReq ;
+	struct iso1PaymentServiceSelectionResType PaymentServiceSelectionRes ;
+	struct iso1PowerDeliveryResType PowerDeliveryRes ;
+	struct iso1ChargingStatusReqType ChargingStatusReq ;
+	struct iso1ChargingStatusResType ChargingStatusRes ;
+	struct iso1BodyBaseType BodyElement ;
+	struct iso1CurrentDemandReqType CurrentDemandReq ;
+	struct iso1PreChargeReqType PreChargeReq ;
+	struct iso1CurrentDemandResType CurrentDemandRes ;
+	struct iso1PreChargeResType PreChargeRes ;
+	struct iso1SessionStopReqType SessionStopReq ;
+	struct iso1AuthorizationReqType AuthorizationReq ;
+	struct iso1SessionStopResType SessionStopRes ;
+	struct iso1AuthorizationResType AuthorizationRes ;
+	struct iso1ChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+	struct iso1ChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+	struct iso1ServiceDetailReqType ServiceDetailReq ;
+	struct iso1ServiceDetailResType ServiceDetailRes ;
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	struct iso1RelativeTimeIntervalType RelativeTimeInterval ;
+	struct iso1SalesTariffEntryType SalesTariffEntry ;
+	struct iso1DC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ;
+	struct iso1SASchedulesType SASchedules ;
+	struct iso1AC_EVChargeParameterType AC_EVChargeParameter ;
+	struct iso1SAScheduleListType SAScheduleList ;
+	struct iso1DC_EVStatusType DC_EVStatus ;
+	struct iso1EVStatusType EVStatus ;
+	struct iso1DC_EVChargeParameterType DC_EVChargeParameter ;
+	struct iso1DC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	struct iso1EVSEStatusType EVSEStatus ;
+	struct iso1IntervalType TimeInterval ;
+	struct iso1EVPowerDeliveryParameterType EVPowerDeliveryParameter ;
+	struct iso1EVSEChargeParameterType EVSEChargeParameter ;
+	struct iso1AC_EVSEStatusType AC_EVSEStatus ;
+	struct iso1EntryType Entry ;
+	struct iso1AC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	struct iso1PMaxScheduleEntryType PMaxScheduleEntry ;
+	struct iso1EVChargeParameterType EVChargeParameter ;
+	struct iso1SignaturePropertyType SignatureProperty ;
+	struct iso1DSAKeyValueType DSAKeyValue ;
+	struct iso1SignaturePropertiesType SignatureProperties ;
+	struct iso1KeyValueType KeyValue ;
+	struct iso1TransformsType Transforms ;
+	struct iso1DigestMethodType DigestMethod ;
+	struct iso1SignatureType Signature ;
+	struct iso1RetrievalMethodType RetrievalMethod ;
+	struct iso1ManifestType Manifest ;
+	struct iso1ReferenceType Reference ;
+	struct iso1CanonicalizationMethodType CanonicalizationMethod ;
+	struct iso1RSAKeyValueType RSAKeyValue ;
+	struct iso1TransformType Transform ;
+	struct iso1PGPDataType PGPData ;
+	struct {
+		exi_string_character_t characters[iso1EXIDocument_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct iso1SignatureMethodType SignatureMethod ;
+	struct iso1KeyInfoType KeyInfo ;
+	struct iso1SPKIDataType SPKIData ;
+	struct iso1X509DataType X509Data ;
+	struct iso1SignatureValueType SignatureValue ;
+	struct {
+		exi_string_character_t characters[iso1EXIDocument_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct {
+		uint8_t bytes[iso1EXIDocument_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct iso1SignedInfoType SignedInfo ;
+	struct iso1ObjectType Object ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int V2G_Message_isUsed:1;
+	unsigned int ServiceDiscoveryReq_isUsed:1;
+	unsigned int ServiceDiscoveryRes_isUsed:1;
+	unsigned int MeteringReceiptReq_isUsed:1;
+	unsigned int PaymentDetailsReq_isUsed:1;
+	unsigned int MeteringReceiptRes_isUsed:1;
+	unsigned int PaymentDetailsRes_isUsed:1;
+	unsigned int SessionSetupReq_isUsed:1;
+	unsigned int SessionSetupRes_isUsed:1;
+	unsigned int CableCheckReq_isUsed:1;
+	unsigned int CableCheckRes_isUsed:1;
+	unsigned int CertificateInstallationReq_isUsed:1;
+	unsigned int CertificateInstallationRes_isUsed:1;
+	unsigned int WeldingDetectionReq_isUsed:1;
+	unsigned int WeldingDetectionRes_isUsed:1;
+	unsigned int CertificateUpdateReq_isUsed:1;
+	unsigned int CertificateUpdateRes_isUsed:1;
+	unsigned int PaymentServiceSelectionReq_isUsed:1;
+	unsigned int PowerDeliveryReq_isUsed:1;
+	unsigned int PaymentServiceSelectionRes_isUsed:1;
+	unsigned int PowerDeliveryRes_isUsed:1;
+	unsigned int ChargingStatusReq_isUsed:1;
+	unsigned int ChargingStatusRes_isUsed:1;
+	unsigned int BodyElement_isUsed:1;
+	unsigned int CurrentDemandReq_isUsed:1;
+	unsigned int PreChargeReq_isUsed:1;
+	unsigned int CurrentDemandRes_isUsed:1;
+	unsigned int PreChargeRes_isUsed:1;
+	unsigned int SessionStopReq_isUsed:1;
+	unsigned int AuthorizationReq_isUsed:1;
+	unsigned int SessionStopRes_isUsed:1;
+	unsigned int AuthorizationRes_isUsed:1;
+	unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+	unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+	unsigned int ServiceDetailReq_isUsed:1;
+	unsigned int ServiceDetailRes_isUsed:1;
+	unsigned int DC_EVSEStatus_isUsed:1;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	unsigned int SalesTariffEntry_isUsed:1;
+	unsigned int DC_EVPowerDeliveryParameter_isUsed:1;
+	unsigned int SASchedules_isUsed:1;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	unsigned int SAScheduleList_isUsed:1;
+	unsigned int DC_EVStatus_isUsed:1;
+	unsigned int EVStatus_isUsed:1;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	unsigned int EVSEStatus_isUsed:1;
+	unsigned int TimeInterval_isUsed:1;
+	unsigned int EVPowerDeliveryParameter_isUsed:1;
+	unsigned int EVSEChargeParameter_isUsed:1;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	unsigned int Entry_isUsed:1;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	unsigned int PMaxScheduleEntry_isUsed:1;
+	unsigned int EVChargeParameter_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int Object_isUsed:1;
+
+
+	int _warning_;
+};
+
+
+#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES
+struct iso1EXISchemaInformedElementFragmentGrammar {
+	/* Schema-informed Element Fragment Grammar for START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */
+	/* 4 ATTRIBUTE[STRING]({urn:iso:15118:2:2013:MsgDataTypes}Id) */
+	unsigned int Id_isUsed:1;
+	struct {
+		exi_string_character_t characters[iso1exiElementFrag_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	} Id ;
+	/* 247 START_ELEMENT({urn:iso:15118:2:2013:MsgBody}eMAID) */
+	unsigned int CHARACTERS_GENERIC_isUsed:1;
+	struct {
+		exi_string_character_t characters[iso1exiElementFrag_CHARACTERS_GENERIC_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	} CHARACTERS_GENERIC ;
+
+
+	int _warning_;
+};
+/* Possible elements of EXI Fragment */
+struct iso1EXIFragment {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	int ChargingComplete ;
+	struct iso1PhysicalValueType EVMaxVoltage ;
+	uint16_t ServiceID ;
+	int8_t EVRESSSOC ;
+	uint64_t MeterReading ;
+	struct iso1PhysicalValueType physicalValue ;
+	struct iso1IntervalType TimeInterval ;
+	struct iso1AC_EVSEStatusType AC_EVSEStatus ;
+	struct iso1PhysicalValueType EVMaxCurrent ;
+	uint32_t ChargingProfileEntryStart ;
+	struct iso1PhysicalValueType EVSEMaxCurrent ;
+	iso1costKindType costKind ;
+	struct iso1PhysicalValueType EAmount ;
+	iso1EnergyTransferModeType EnergyTransferMode ;
+	int64_t X509SerialNumber ;
+	uint8_t NumEPriceLevels ;
+	struct iso1RetrievalMethodType RetrievalMethod ;
+	struct iso1PhysicalValueType PMax ;
+	int16_t ParameterSetID ;
+	int8_t BulkSOC ;
+	struct iso1PhysicalValueType EVSEMinimumCurrentLimit ;
+	int EVSEPowerLimitAchieved ;
+	struct iso1SalesTariffEntryType SalesTariffEntry ;
+	struct iso1TransformsType Transforms ;
+	iso1EVSEProcessingType EVSEProcessing ;
+	iso1isolationLevelType EVSEIsolationStatus ;
+	int BulkChargingComplete ;
+	uint8_t SAScheduleTupleID ;
+	iso1faultCodeType FaultCode ;
+	struct iso1X509IssuerSerialType RootCertificateID ;
+	int64_t HMACOutputLength ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+	struct iso1X509IssuerSerialType X509IssuerSerial ;
+	int8_t byteValue ;
+	struct iso1SPKIDataType SPKIData ;
+	struct iso1SAScheduleListType SAScheduleList ;
+	struct iso1PhysicalValueType EVMaximumPowerLimit ;
+	struct iso1DC_EVSEStatusType DC_EVSEStatus ;
+	int16_t RetryCounter ;
+	struct iso1PhysicalValueType EVSEMaximumCurrentLimit ;
+	struct iso1SalesTariffType SalesTariff ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	struct iso1X509DataType X509Data ;
+	struct iso1PhysicalValueType EVSECurrentRegulationTolerance ;
+	struct iso1KeyValueType KeyValue ;
+	struct iso1AnonType_V2G_Message V2G_Message ;
+	struct iso1PhysicalValueType EVSEMinimumVoltageLimit ;
+	iso1responseCodeType ResponseCode ;
+	struct iso1ProfileEntryType ProfileEntry ;
+	uint32_t start ;
+	iso1DC_EVErrorCodeType EVErrorCode ;
+	struct iso1EVChargeParameterType EVChargeParameter ;
+	struct iso1CertificateChainType ContractSignatureCertChain ;
+	struct iso1PhysicalValueType EVSEPresentCurrent ;
+	struct iso1PGPDataType PGPData ;
+	struct iso1PhysicalValueType EVMinCurrent ;
+	int8_t FullSOC ;
+	uint32_t amount ;
+	struct iso1DC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	struct iso1EntryType Entry ;
+	struct iso1SessionStopResType SessionStopRes ;
+	int16_t shortValue ;
+	struct iso1CertificateChainType SAProvisioningCertificateChain ;
+	struct iso1PowerDeliveryReqType PowerDeliveryReq ;
+	struct iso1PowerDeliveryResType PowerDeliveryRes ;
+	struct iso1SessionStopReqType SessionStopReq ;
+	struct iso1SignaturePropertyType SignatureProperty ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	struct iso1MessageHeaderType Header ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	struct iso1RSAKeyValueType RSAKeyValue ;
+	int FreeService ;
+	struct iso1PhysicalValueType EVSENominalVoltage ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_XPath_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  XPath ;
+	struct iso1MeteringReceiptResType MeteringReceiptRes ;
+	struct iso1ServiceDiscoveryReqType ServiceDiscoveryReq ;
+	struct iso1MeteringReceiptReqType MeteringReceiptReq ;
+	struct iso1PreChargeResType PreChargeRes ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_OEMProvisioningCert_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  OEMProvisioningCert ;
+	struct iso1PhysicalValueType EVEnergyCapacity ;
+	struct iso1SignatureType Signature ;
+	struct iso1AC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	struct iso1ServiceDiscoveryResType ServiceDiscoveryRes ;
+	struct iso1PreChargeReqType PreChargeReq ;
+	uint16_t NotificationMaxDelay ;
+	struct iso1CableCheckReqType CableCheckReq ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_SalesTariffDescription_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  SalesTariffDescription ;
+	int EVSEVoltageLimitAchieved ;
+	int boolValue ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_EVCCID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVCCID ;
+	struct iso1DC_EVChargeParameterType DC_EVChargeParameter ;
+	struct iso1ChargingStatusReqType ChargingStatusReq ;
+	struct iso1CableCheckResType CableCheckRes ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct iso1MeterInfoType MeterInfo ;
+	struct iso1PhysicalValueType EVSEEnergyToBeDelivered ;
+	struct iso1EVSEStatusType EVSEStatus ;
+	struct iso1ServiceType Service ;
+	struct iso1ManifestType Manifest ;
+	struct iso1PhysicalValueType EVMaximumVoltageLimit ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_X509SubjectName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509SubjectName ;
+	int32_t intValue ;
+	struct iso1ChargingProfileType ChargingProfile ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_ServiceScope_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceScope ;
+	int ReceiptRequired ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_ServiceName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ServiceName ;
+	int16_t MeterStatus ;
+	struct iso1DC_EVStatusType DC_EVStatus ;
+	struct iso1ChargingStatusResType ChargingStatusRes ;
+	iso1serviceCategoryType ServiceCategory ;
+	struct iso1NotificationType Notification ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_X509CRL_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509CRL ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	struct iso1PhysicalValueType EVSEPresentVoltage ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct iso1PhysicalValueType EVSEMaximumPowerLimit ;
+	int64_t EVSETimeStamp ;
+	struct iso1CostType Cost ;
+	struct iso1PhysicalValueType EVSEPeakCurrentRipple ;
+	struct iso1ConsumptionCostType ConsumptionCost ;
+	struct iso1DigestMethodType DigestMethod ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_SPKISexp_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SPKISexp ;
+	struct iso1SessionSetupResType SessionSetupRes ;
+	int EVSECurrentLimitAchieved ;
+	struct iso1ServiceDetailReqType ServiceDetailReq ;
+	struct iso1PhysicalValueType EVSEMaximumVoltageLimit ;
+	struct iso1ServiceDetailResType ServiceDetailRes ;
+	struct iso1SignaturePropertiesType SignatureProperties ;
+	uint8_t EPriceLevel ;
+	struct iso1PhysicalValueType EVTargetCurrent ;
+	struct iso1PhysicalValueType RemainingTimeToBulkSoC ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_stringValue_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  stringValue ;
+	struct iso1SessionSetupReqType SessionSetupReq ;
+	int8_t Multiplier ;
+	struct iso1CertificateUpdateResType CertificateUpdateRes ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	struct iso1PhysicalValueType EVTargetVoltage ;
+	struct iso1DSAKeyValueType DSAKeyValue ;
+	struct iso1CertificateUpdateReqType CertificateUpdateReq ;
+	struct iso1PhysicalValueType EVMaximumCurrentLimit ;
+	struct iso1CanonicalizationMethodType CanonicalizationMethod ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_X509Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509Certificate ;
+	struct iso1CertificateInstallationReqType CertificateInstallationReq ;
+	struct iso1CertificateInstallationResType CertificateInstallationRes ;
+	struct iso1EVStatusType EVStatus ;
+	struct iso1SupportedEnergyTransferModeType SupportedEnergyTransferMode ;
+	struct iso1SignedInfoType SignedInfo ;
+	/* Schema-informed Element Fragment Grammar for {urn:iso:15118:2:2013:MsgBody}eMAID */
+	struct iso1EXISchemaInformedElementFragmentGrammar eMAID ;
+	uint16_t MaxEntriesSAScheduleTuple ;
+	iso1paymentOptionType PaymentOption ;
+	struct iso1SubCertificatesType SubCertificates ;
+	struct iso1PaymentDetailsReqType PaymentDetailsReq ;
+	struct iso1AuthorizationReqType AuthorizationReq ;
+	struct iso1PaymentDetailsResType PaymentDetailsRes ;
+	struct iso1AuthorizationResType AuthorizationRes ;
+	iso1DC_EVSEStatusCodeType EVSEStatusCode ;
+	struct iso1PaymentOptionListType PaymentOptionList ;
+	struct iso1SelectedServiceListType SelectedServiceList ;
+	struct iso1ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey ;
+	struct iso1WeldingDetectionReqType WeldingDetectionReq ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_FaultMsg_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  FaultMsg ;
+	struct iso1WeldingDetectionResType WeldingDetectionRes ;
+	iso1chargeProgressType ChargeProgress ;
+	iso1paymentOptionType SelectedPaymentOption ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	struct iso1ParameterSetType ParameterSet ;
+	struct iso1EVSEChargeParameterType EVSEChargeParameter ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_SigMeterReading_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SigMeterReading ;
+	struct iso1SignatureValueType SignatureValue ;
+	struct iso1SASchedulesType SASchedules ;
+	uint8_t SalesTariffID ;
+	struct iso1DiffieHellmanPublickeyType DHpublickey ;
+	struct iso1ServiceParameterListType ServiceParameterList ;
+	struct iso1ListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_MeterID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MeterID ;
+	struct iso1ChargeServiceType ChargeService ;
+	int8_t amountMultiplier ;
+	int RCD ;
+	struct iso1PhysicalValueType startValue ;
+	struct iso1CurrentDemandReqType CurrentDemandReq ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct iso1DC_EVPowerDeliveryParameterType DC_EVPowerDeliveryParameter ;
+	struct iso1BodyType Body ;
+	iso1EVSENotificationType EVSENotification ;
+	int16_t Value ;
+	struct iso1KeyInfoType KeyInfo ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_GenChallenge_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  GenChallenge ;
+	struct iso1AC_EVChargeParameterType AC_EVChargeParameter ;
+	struct iso1PMaxScheduleEntryType PMaxScheduleEntry ;
+	struct iso1ParameterType Parameter ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_X509SKI_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509SKI ;
+	struct iso1SelectedServiceType SelectedService ;
+	struct iso1PaymentServiceSelectionReqType PaymentServiceSelectionReq ;
+	struct iso1PaymentServiceSelectionResType PaymentServiceSelectionRes ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Certificate ;
+	struct iso1CurrentDemandResType CurrentDemandRes ;
+	int EVReady ;
+	struct iso1SignatureMethodType SignatureMethod ;
+	struct iso1PMaxScheduleType PMaxSchedule ;
+	iso1unitSymbolType Unit ;
+	struct {
+		exi_string_character_t characters[iso1EXIFragment_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	struct iso1ReferenceType Reference ;
+	int8_t ChargingProfileEntryMaxNumberOfPhasesInUse ;
+	struct iso1EVPowerDeliveryParameterType EVPowerDeliveryParameter ;
+	struct iso1PhysicalValueType ChargingProfileEntryMaxPower ;
+	struct iso1ChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+	uint32_t duration ;
+	int64_t TMeter ;
+	struct iso1ChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+	struct iso1ServiceListType ServiceList ;
+	struct iso1SAScheduleTupleType SAScheduleTuple ;
+	struct iso1BodyBaseType BodyElement ;
+	struct iso1PhysicalValueType RemainingTimeToFullSoC ;
+	struct iso1RelativeTimeIntervalType RelativeTimeInterval ;
+	struct iso1TransformType Transform ;
+	uint32_t DepartureTime ;
+	struct iso1ObjectType Object ;
+	struct iso1PhysicalValueType EVEnergyRequest ;
+	struct {
+		uint8_t bytes[iso1EXIFragment_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	iso1chargingSessionType ChargingSession ;
+	iso1EnergyTransferModeType RequestedEnergyTransferMode ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int ChargingComplete_isUsed:1;
+	unsigned int EVMaxVoltage_isUsed:1;
+	unsigned int ServiceID_isUsed:1;
+	unsigned int EVRESSSOC_isUsed:1;
+	unsigned int MeterReading_isUsed:1;
+	unsigned int physicalValue_isUsed:1;
+	unsigned int TimeInterval_isUsed:1;
+	unsigned int AC_EVSEStatus_isUsed:1;
+	unsigned int EVMaxCurrent_isUsed:1;
+	unsigned int ChargingProfileEntryStart_isUsed:1;
+	unsigned int EVSEMaxCurrent_isUsed:1;
+	unsigned int costKind_isUsed:1;
+	unsigned int EAmount_isUsed:1;
+	unsigned int EnergyTransferMode_isUsed:1;
+	unsigned int X509SerialNumber_isUsed:1;
+	unsigned int NumEPriceLevels_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int PMax_isUsed:1;
+	unsigned int ParameterSetID_isUsed:1;
+	unsigned int BulkSOC_isUsed:1;
+	unsigned int EVSEMinimumCurrentLimit_isUsed:1;
+	unsigned int EVSEPowerLimitAchieved_isUsed:1;
+	unsigned int SalesTariffEntry_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int EVSEProcessing_isUsed:1;
+	unsigned int EVSEIsolationStatus_isUsed:1;
+	unsigned int BulkChargingComplete_isUsed:1;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	unsigned int FaultCode_isUsed:1;
+	unsigned int RootCertificateID_isUsed:1;
+	unsigned int HMACOutputLength_isUsed:1;
+	unsigned int Exponent_isUsed:1;
+	unsigned int X509IssuerSerial_isUsed:1;
+	unsigned int byteValue_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int SAScheduleList_isUsed:1;
+	unsigned int EVMaximumPowerLimit_isUsed:1;
+	unsigned int DC_EVSEStatus_isUsed:1;
+	unsigned int RetryCounter_isUsed:1;
+	unsigned int EVSEMaximumCurrentLimit_isUsed:1;
+	unsigned int SalesTariff_isUsed:1;
+	unsigned int PgenCounter_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int V2G_Message_isUsed:1;
+	unsigned int EVSEMinimumVoltageLimit_isUsed:1;
+	unsigned int ResponseCode_isUsed:1;
+	unsigned int ProfileEntry_isUsed:1;
+	unsigned int start_isUsed:1;
+	unsigned int EVErrorCode_isUsed:1;
+	unsigned int EVChargeParameter_isUsed:1;
+	unsigned int ContractSignatureCertChain_isUsed:1;
+	unsigned int EVSEPresentCurrent_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int EVMinCurrent_isUsed:1;
+	unsigned int FullSOC_isUsed:1;
+	unsigned int amount_isUsed:1;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	unsigned int Entry_isUsed:1;
+	unsigned int SessionStopRes_isUsed:1;
+	unsigned int shortValue_isUsed:1;
+	unsigned int SAProvisioningCertificateChain_isUsed:1;
+	unsigned int PowerDeliveryReq_isUsed:1;
+	unsigned int PowerDeliveryRes_isUsed:1;
+	unsigned int SessionStopReq_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int SessionID_isUsed:1;
+	unsigned int PGPKeyPacket_isUsed:1;
+	unsigned int Header_isUsed:1;
+	unsigned int Seed_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int FreeService_isUsed:1;
+	unsigned int EVSENominalVoltage_isUsed:1;
+	unsigned int XPath_isUsed:1;
+	unsigned int MeteringReceiptRes_isUsed:1;
+	unsigned int ServiceDiscoveryReq_isUsed:1;
+	unsigned int MeteringReceiptReq_isUsed:1;
+	unsigned int PreChargeRes_isUsed:1;
+	unsigned int OEMProvisioningCert_isUsed:1;
+	unsigned int EVEnergyCapacity_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	unsigned int ServiceDiscoveryRes_isUsed:1;
+	unsigned int PreChargeReq_isUsed:1;
+	unsigned int NotificationMaxDelay_isUsed:1;
+	unsigned int CableCheckReq_isUsed:1;
+	unsigned int SalesTariffDescription_isUsed:1;
+	unsigned int EVSEVoltageLimitAchieved_isUsed:1;
+	unsigned int boolValue_isUsed:1;
+	unsigned int EVCCID_isUsed:1;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	unsigned int ChargingStatusReq_isUsed:1;
+	unsigned int CableCheckRes_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int MeterInfo_isUsed:1;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+	unsigned int EVSEStatus_isUsed:1;
+	unsigned int Service_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int EVMaximumVoltageLimit_isUsed:1;
+	unsigned int P_isUsed:1;
+	unsigned int Q_isUsed:1;
+	unsigned int X509SubjectName_isUsed:1;
+	unsigned int intValue_isUsed:1;
+	unsigned int ChargingProfile_isUsed:1;
+	unsigned int G_isUsed:1;
+	unsigned int J_isUsed:1;
+	unsigned int ServiceScope_isUsed:1;
+	unsigned int ReceiptRequired_isUsed:1;
+	unsigned int ServiceName_isUsed:1;
+	unsigned int MeterStatus_isUsed:1;
+	unsigned int DC_EVStatus_isUsed:1;
+	unsigned int ChargingStatusRes_isUsed:1;
+	unsigned int ServiceCategory_isUsed:1;
+	unsigned int Notification_isUsed:1;
+	unsigned int X509CRL_isUsed:1;
+	unsigned int Y_isUsed:1;
+	unsigned int EVSEPresentVoltage_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int EVSEMaximumPowerLimit_isUsed:1;
+	unsigned int EVSETimeStamp_isUsed:1;
+	unsigned int Cost_isUsed:1;
+	unsigned int EVSEPeakCurrentRipple_isUsed:1;
+	unsigned int ConsumptionCost_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int SPKISexp_isUsed:1;
+	unsigned int SessionSetupRes_isUsed:1;
+	unsigned int EVSECurrentLimitAchieved_isUsed:1;
+	unsigned int ServiceDetailReq_isUsed:1;
+	unsigned int EVSEMaximumVoltageLimit_isUsed:1;
+	unsigned int ServiceDetailRes_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int EPriceLevel_isUsed:1;
+	unsigned int EVTargetCurrent_isUsed:1;
+	unsigned int RemainingTimeToBulkSoC_isUsed:1;
+	unsigned int stringValue_isUsed:1;
+	unsigned int SessionSetupReq_isUsed:1;
+	unsigned int Multiplier_isUsed:1;
+	unsigned int CertificateUpdateRes_isUsed:1;
+	unsigned int PGPKeyID_isUsed:1;
+	unsigned int EVTargetVoltage_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int CertificateUpdateReq_isUsed:1;
+	unsigned int EVMaximumCurrentLimit_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int X509Certificate_isUsed:1;
+	unsigned int CertificateInstallationReq_isUsed:1;
+	unsigned int CertificateInstallationRes_isUsed:1;
+	unsigned int EVStatus_isUsed:1;
+	unsigned int SupportedEnergyTransferMode_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int eMAID_isUsed:1;
+	unsigned int MaxEntriesSAScheduleTuple_isUsed:1;
+	unsigned int PaymentOption_isUsed:1;
+	unsigned int SubCertificates_isUsed:1;
+	unsigned int PaymentDetailsReq_isUsed:1;
+	unsigned int AuthorizationReq_isUsed:1;
+	unsigned int PaymentDetailsRes_isUsed:1;
+	unsigned int AuthorizationRes_isUsed:1;
+	unsigned int EVSEStatusCode_isUsed:1;
+	unsigned int PaymentOptionList_isUsed:1;
+	unsigned int SelectedServiceList_isUsed:1;
+	unsigned int ContractSignatureEncryptedPrivateKey_isUsed:1;
+	unsigned int WeldingDetectionReq_isUsed:1;
+	unsigned int FaultMsg_isUsed:1;
+	unsigned int WeldingDetectionRes_isUsed:1;
+	unsigned int ChargeProgress_isUsed:1;
+	unsigned int SelectedPaymentOption_isUsed:1;
+	unsigned int EVSEID_isUsed:1;
+	unsigned int ParameterSet_isUsed:1;
+	unsigned int EVSEChargeParameter_isUsed:1;
+	unsigned int SigMeterReading_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int SASchedules_isUsed:1;
+	unsigned int SalesTariffID_isUsed:1;
+	unsigned int DHpublickey_isUsed:1;
+	unsigned int ServiceParameterList_isUsed:1;
+	unsigned int ListOfRootCertificateIDs_isUsed:1;
+	unsigned int MeterID_isUsed:1;
+	unsigned int ChargeService_isUsed:1;
+	unsigned int amountMultiplier_isUsed:1;
+	unsigned int RCD_isUsed:1;
+	unsigned int startValue_isUsed:1;
+	unsigned int CurrentDemandReq_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int DC_EVPowerDeliveryParameter_isUsed:1;
+	unsigned int Body_isUsed:1;
+	unsigned int EVSENotification_isUsed:1;
+	unsigned int Value_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int GenChallenge_isUsed:1;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	unsigned int PMaxScheduleEntry_isUsed:1;
+	unsigned int Parameter_isUsed:1;
+	unsigned int X509SKI_isUsed:1;
+	unsigned int SelectedService_isUsed:1;
+	unsigned int PaymentServiceSelectionReq_isUsed:1;
+	unsigned int PaymentServiceSelectionRes_isUsed:1;
+	unsigned int Certificate_isUsed:1;
+	unsigned int CurrentDemandRes_isUsed:1;
+	unsigned int EVReady_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int PMaxSchedule_isUsed:1;
+	unsigned int Unit_isUsed:1;
+	unsigned int X509IssuerName_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int ChargingProfileEntryMaxNumberOfPhasesInUse_isUsed:1;
+	unsigned int EVPowerDeliveryParameter_isUsed:1;
+	unsigned int ChargingProfileEntryMaxPower_isUsed:1;
+	unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+	unsigned int duration_isUsed:1;
+	unsigned int TMeter_isUsed:1;
+	unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+	unsigned int ServiceList_isUsed:1;
+	unsigned int SAScheduleTuple_isUsed:1;
+	unsigned int BodyElement_isUsed:1;
+	unsigned int RemainingTimeToFullSoC_isUsed:1;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int DepartureTime_isUsed:1;
+	unsigned int Object_isUsed:1;
+	unsigned int EVEnergyRequest_isUsed:1;
+	unsigned int Modulus_isUsed:1;
+	unsigned int ChargingSession_isUsed:1;
+	unsigned int RequestedEnergyTransferMode_isUsed:1;
+
+
+	int _warning_;
+};
+#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */
+
+
+/* Initialization methods for structs */
+
+void init_iso1EXIDocument(struct iso1EXIDocument* exiDoc);
+#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES
+void init_iso1EXIFragment(struct iso1EXIFragment* exiFrag);
+void init_iso1EXISchemaInformedElementFragmentGrammar(struct iso1EXISchemaInformedElementFragmentGrammar* exiFrag);
+#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */
+void init_iso1MessageHeaderType(struct iso1MessageHeaderType* iso1MessageHeaderType);
+void init_iso1SignatureType(struct iso1SignatureType* iso1SignatureType);
+void init_iso1PowerDeliveryReqType(struct iso1PowerDeliveryReqType* iso1PowerDeliveryReqType);
+void init_iso1ParameterType(struct iso1ParameterType* iso1ParameterType);
+void init_iso1CertificateInstallationReqType(struct iso1CertificateInstallationReqType* iso1CertificateInstallationReqType);
+void init_iso1SessionSetupResType(struct iso1SessionSetupResType* iso1SessionSetupResType);
+void init_iso1EVChargeParameterType(struct iso1EVChargeParameterType* iso1EVChargeParameterType);
+void init_iso1DiffieHellmanPublickeyType(struct iso1DiffieHellmanPublickeyType* iso1DiffieHellmanPublickeyType);
+void init_iso1ServiceDiscoveryResType(struct iso1ServiceDiscoveryResType* iso1ServiceDiscoveryResType);
+void init_iso1ServiceParameterListType(struct iso1ServiceParameterListType* iso1ServiceParameterListType);
+void init_iso1CertificateChainType(struct iso1CertificateChainType* iso1CertificateChainType);
+void init_iso1SASchedulesType(struct iso1SASchedulesType* iso1SASchedulesType);
+void init_iso1DC_EVSEStatusType(struct iso1DC_EVSEStatusType* iso1DC_EVSEStatusType);
+void init_iso1PreChargeResType(struct iso1PreChargeResType* iso1PreChargeResType);
+void init_iso1ParameterSetType(struct iso1ParameterSetType* iso1ParameterSetType);
+void init_iso1ServiceDetailReqType(struct iso1ServiceDetailReqType* iso1ServiceDetailReqType);
+void init_iso1RelativeTimeIntervalType(struct iso1RelativeTimeIntervalType* iso1RelativeTimeIntervalType);
+void init_iso1SignedInfoType(struct iso1SignedInfoType* iso1SignedInfoType);
+void init_iso1EMAIDType(struct iso1EMAIDType* iso1EMAIDType);
+void init_iso1EVStatusType(struct iso1EVStatusType* iso1EVStatusType);
+void init_iso1ServiceListType(struct iso1ServiceListType* iso1ServiceListType);
+void init_iso1EVSEChargeParameterType(struct iso1EVSEChargeParameterType* iso1EVSEChargeParameterType);
+void init_iso1EVPowerDeliveryParameterType(struct iso1EVPowerDeliveryParameterType* iso1EVPowerDeliveryParameterType);
+void init_iso1ProfileEntryType(struct iso1ProfileEntryType* iso1ProfileEntryType);
+void init_iso1AuthorizationReqType(struct iso1AuthorizationReqType* iso1AuthorizationReqType);
+void init_iso1MeterInfoType(struct iso1MeterInfoType* iso1MeterInfoType);
+void init_iso1ManifestType(struct iso1ManifestType* iso1ManifestType);
+void init_iso1ChargeParameterDiscoveryResType(struct iso1ChargeParameterDiscoveryResType* iso1ChargeParameterDiscoveryResType);
+void init_iso1PowerDeliveryResType(struct iso1PowerDeliveryResType* iso1PowerDeliveryResType);
+void init_iso1DC_EVChargeParameterType(struct iso1DC_EVChargeParameterType* iso1DC_EVChargeParameterType);
+void init_iso1ConsumptionCostType(struct iso1ConsumptionCostType* iso1ConsumptionCostType);
+void init_iso1PMaxScheduleType(struct iso1PMaxScheduleType* iso1PMaxScheduleType);
+void init_iso1PaymentOptionListType(struct iso1PaymentOptionListType* iso1PaymentOptionListType);
+void init_iso1ObjectType(struct iso1ObjectType* iso1ObjectType);
+void init_iso1PhysicalValueType(struct iso1PhysicalValueType* iso1PhysicalValueType);
+void init_iso1RSAKeyValueType(struct iso1RSAKeyValueType* iso1RSAKeyValueType);
+void init_iso1SessionStopResType(struct iso1SessionStopResType* iso1SessionStopResType);
+void init_iso1CertificateUpdateReqType(struct iso1CertificateUpdateReqType* iso1CertificateUpdateReqType);
+void init_iso1SignatureValueType(struct iso1SignatureValueType* iso1SignatureValueType);
+void init_iso1PaymentDetailsReqType(struct iso1PaymentDetailsReqType* iso1PaymentDetailsReqType);
+void init_iso1AuthorizationResType(struct iso1AuthorizationResType* iso1AuthorizationResType);
+void init_iso1DC_EVSEChargeParameterType(struct iso1DC_EVSEChargeParameterType* iso1DC_EVSEChargeParameterType);
+void init_iso1SubCertificatesType(struct iso1SubCertificatesType* iso1SubCertificatesType);
+void init_iso1ChargingStatusResType(struct iso1ChargingStatusResType* iso1ChargingStatusResType);
+void init_iso1DSAKeyValueType(struct iso1DSAKeyValueType* iso1DSAKeyValueType);
+void init_iso1ListOfRootCertificateIDsType(struct iso1ListOfRootCertificateIDsType* iso1ListOfRootCertificateIDsType);
+void init_iso1ChargeServiceType(struct iso1ChargeServiceType* iso1ChargeServiceType);
+void init_iso1IntervalType(struct iso1IntervalType* iso1IntervalType);
+void init_iso1MeteringReceiptReqType(struct iso1MeteringReceiptReqType* iso1MeteringReceiptReqType);
+void init_iso1ServiceDetailResType(struct iso1ServiceDetailResType* iso1ServiceDetailResType);
+void init_iso1KeyValueType(struct iso1KeyValueType* iso1KeyValueType);
+void init_iso1SelectedServiceListType(struct iso1SelectedServiceListType* iso1SelectedServiceListType);
+void init_iso1CableCheckResType(struct iso1CableCheckResType* iso1CableCheckResType);
+void init_iso1X509IssuerSerialType(struct iso1X509IssuerSerialType* iso1X509IssuerSerialType);
+void init_iso1KeyInfoType(struct iso1KeyInfoType* iso1KeyInfoType);
+void init_iso1TransformsType(struct iso1TransformsType* iso1TransformsType);
+void init_iso1ChargeParameterDiscoveryReqType(struct iso1ChargeParameterDiscoveryReqType* iso1ChargeParameterDiscoveryReqType);
+void init_iso1PreChargeReqType(struct iso1PreChargeReqType* iso1PreChargeReqType);
+void init_iso1EVSEStatusType(struct iso1EVSEStatusType* iso1EVSEStatusType);
+void init_iso1SignatureMethodType(struct iso1SignatureMethodType* iso1SignatureMethodType);
+void init_iso1X509DataType(struct iso1X509DataType* iso1X509DataType);
+void init_iso1NotificationType(struct iso1NotificationType* iso1NotificationType);
+void init_iso1SAScheduleListType(struct iso1SAScheduleListType* iso1SAScheduleListType);
+void init_iso1BodyType(struct iso1BodyType* iso1BodyType);
+void init_iso1ChargingProfileType(struct iso1ChargingProfileType* iso1ChargingProfileType);
+void init_iso1TransformType(struct iso1TransformType* iso1TransformType);
+void init_iso1SAScheduleTupleType(struct iso1SAScheduleTupleType* iso1SAScheduleTupleType);
+void init_iso1AC_EVChargeParameterType(struct iso1AC_EVChargeParameterType* iso1AC_EVChargeParameterType);
+void init_iso1AnonType_V2G_Message(struct iso1AnonType_V2G_Message* iso1AnonType_V2G_Message);
+void init_iso1PaymentDetailsResType(struct iso1PaymentDetailsResType* iso1PaymentDetailsResType);
+void init_iso1ContractSignatureEncryptedPrivateKeyType(struct iso1ContractSignatureEncryptedPrivateKeyType* iso1ContractSignatureEncryptedPrivateKeyType);
+void init_iso1PMaxScheduleEntryType(struct iso1PMaxScheduleEntryType* iso1PMaxScheduleEntryType);
+void init_iso1SPKIDataType(struct iso1SPKIDataType* iso1SPKIDataType);
+void init_iso1MeteringReceiptResType(struct iso1MeteringReceiptResType* iso1MeteringReceiptResType);
+void init_iso1SessionStopReqType(struct iso1SessionStopReqType* iso1SessionStopReqType);
+void init_iso1WeldingDetectionResType(struct iso1WeldingDetectionResType* iso1WeldingDetectionResType);
+void init_iso1ReferenceType(struct iso1ReferenceType* iso1ReferenceType);
+void init_iso1CurrentDemandReqType(struct iso1CurrentDemandReqType* iso1CurrentDemandReqType);
+void init_iso1SalesTariffEntryType(struct iso1SalesTariffEntryType* iso1SalesTariffEntryType);
+void init_iso1EntryType(struct iso1EntryType* iso1EntryType);
+void init_iso1SessionSetupReqType(struct iso1SessionSetupReqType* iso1SessionSetupReqType);
+void init_iso1CostType(struct iso1CostType* iso1CostType);
+void init_iso1DC_EVPowerDeliveryParameterType(struct iso1DC_EVPowerDeliveryParameterType* iso1DC_EVPowerDeliveryParameterType);
+void init_iso1RetrievalMethodType(struct iso1RetrievalMethodType* iso1RetrievalMethodType);
+void init_iso1CertificateUpdateResType(struct iso1CertificateUpdateResType* iso1CertificateUpdateResType);
+void init_iso1CertificateInstallationResType(struct iso1CertificateInstallationResType* iso1CertificateInstallationResType);
+void init_iso1CanonicalizationMethodType(struct iso1CanonicalizationMethodType* iso1CanonicalizationMethodType);
+void init_iso1WeldingDetectionReqType(struct iso1WeldingDetectionReqType* iso1WeldingDetectionReqType);
+void init_iso1DC_EVStatusType(struct iso1DC_EVStatusType* iso1DC_EVStatusType);
+void init_iso1CurrentDemandResType(struct iso1CurrentDemandResType* iso1CurrentDemandResType);
+void init_iso1ServiceType(struct iso1ServiceType* iso1ServiceType);
+void init_iso1ServiceDiscoveryReqType(struct iso1ServiceDiscoveryReqType* iso1ServiceDiscoveryReqType);
+void init_iso1AC_EVSEChargeParameterType(struct iso1AC_EVSEChargeParameterType* iso1AC_EVSEChargeParameterType);
+void init_iso1CableCheckReqType(struct iso1CableCheckReqType* iso1CableCheckReqType);
+void init_iso1SelectedServiceType(struct iso1SelectedServiceType* iso1SelectedServiceType);
+void init_iso1AC_EVSEStatusType(struct iso1AC_EVSEStatusType* iso1AC_EVSEStatusType);
+void init_iso1SalesTariffType(struct iso1SalesTariffType* iso1SalesTariffType);
+void init_iso1PaymentServiceSelectionReqType(struct iso1PaymentServiceSelectionReqType* iso1PaymentServiceSelectionReqType);
+void init_iso1SignaturePropertiesType(struct iso1SignaturePropertiesType* iso1SignaturePropertiesType);
+void init_iso1BodyBaseType(struct iso1BodyBaseType* iso1BodyBaseType);
+void init_iso1SupportedEnergyTransferModeType(struct iso1SupportedEnergyTransferModeType* iso1SupportedEnergyTransferModeType);
+void init_iso1ChargingStatusReqType(struct iso1ChargingStatusReqType* iso1ChargingStatusReqType);
+void init_iso1PaymentServiceSelectionResType(struct iso1PaymentServiceSelectionResType* iso1PaymentServiceSelectionResType);
+void init_iso1DigestMethodType(struct iso1DigestMethodType* iso1DigestMethodType);
+void init_iso1SignaturePropertyType(struct iso1SignaturePropertyType* iso1SignaturePropertyType);
+void init_iso1PGPDataType(struct iso1PGPDataType* iso1PGPDataType);
+
+
+#endif /* DEPLOY_ISO1_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 9847 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesDecoder.c


+ 65 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesDecoder.h

@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesDecoder.h
+ * \brief 	Decoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_iso1_DATATYPES_DECODER_H
+#define EXI_iso1_DATATYPES_DECODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "iso1EXIDatatypes.h"
+
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+int decode_iso1ExiDocument(bitstream_t* stream, struct iso1EXIDocument* exiDoc);
+
+#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES
+int decode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag);
+#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */
+
+#endif /* DEPLOY_ISO1_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 7011 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesEncoder.c


+ 68 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso1/iso1EXIDatatypesEncoder.h

@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesEncoder.h
+ * \brief 	Encoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_iso1_DATATYPES_ENCODER_H
+#define EXI_iso1_DATATYPES_ENCODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "iso1EXIDatatypes.h"
+
+#if DEPLOY_ISO1_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+int encode_iso1ExiDocument(bitstream_t* stream, struct iso1EXIDocument* exiDoc);
+
+#if DEPLOY_ISO1_CODEC_FRAGMENT == SUPPORT_YES
+int encode_iso1ExiFragment(bitstream_t* stream, struct iso1EXIFragment* exiFrag);
+#endif /* DEPLOY_ISO1_CODEC_FRAGMENT */
+
+
+#endif /* DEPLOY_ISO1_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 1496 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypes.c

@@ -0,0 +1,1496 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include <stdint.h>
+
+#include "iso2EXIDatatypes.h"
+#include "../codec/EXITypes.h"
+
+
+#ifndef EXI_iso2_DATATYPES_C
+#define EXI_iso2_DATATYPES_C
+
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
+
+
+void init_iso2EXIDocument(struct iso2EXIDocument* exiDoc) {
+	exiDoc->V2G_Message_isUsed = 0u;
+	exiDoc->ServiceDiscoveryReq_isUsed = 0u;
+	exiDoc->ServiceDiscoveryRes_isUsed = 0u;
+	exiDoc->FinePositioningReq_isUsed = 0u;
+	exiDoc->FinePositioningRes_isUsed = 0u;
+	exiDoc->DisconnectChargingDeviceReq_isUsed = 0u;
+	exiDoc->DisconnectChargingDeviceRes_isUsed = 0u;
+	exiDoc->PowerDemandReq_isUsed = 0u;
+	exiDoc->MeteringReceiptReq_isUsed = 0u;
+	exiDoc->PaymentDetailsReq_isUsed = 0u;
+	exiDoc->PowerDemandRes_isUsed = 0u;
+	exiDoc->MeteringReceiptRes_isUsed = 0u;
+	exiDoc->PaymentDetailsRes_isUsed = 0u;
+	exiDoc->SessionSetupReq_isUsed = 0u;
+	exiDoc->SessionSetupRes_isUsed = 0u;
+	exiDoc->CableCheckReq_isUsed = 0u;
+	exiDoc->CableCheckRes_isUsed = 0u;
+	exiDoc->CertificateInstallationReq_isUsed = 0u;
+	exiDoc->CertificateInstallationRes_isUsed = 0u;
+	exiDoc->SystemStatusReq_isUsed = 0u;
+	exiDoc->SystemStatusRes_isUsed = 0u;
+	exiDoc->PairingReq_isUsed = 0u;
+	exiDoc->WeldingDetectionReq_isUsed = 0u;
+	exiDoc->ConnectChargingDeviceReq_isUsed = 0u;
+	exiDoc->PairingRes_isUsed = 0u;
+	exiDoc->WeldingDetectionRes_isUsed = 0u;
+	exiDoc->ConnectChargingDeviceRes_isUsed = 0u;
+	exiDoc->CertificateUpdateReq_isUsed = 0u;
+	exiDoc->CertificateUpdateRes_isUsed = 0u;
+	exiDoc->PaymentServiceSelectionReq_isUsed = 0u;
+	exiDoc->PowerDeliveryReq_isUsed = 0u;
+	exiDoc->PaymentServiceSelectionRes_isUsed = 0u;
+	exiDoc->PowerDeliveryRes_isUsed = 0u;
+	exiDoc->ChargingStatusReq_isUsed = 0u;
+	exiDoc->ChargingStatusRes_isUsed = 0u;
+	exiDoc->BodyElement_isUsed = 0u;
+	exiDoc->AC_BidirectionalControlReq_isUsed = 0u;
+	exiDoc->AC_BidirectionalControlRes_isUsed = 0u;
+	exiDoc->VehicleCheckInReq_isUsed = 0u;
+	exiDoc->CurrentDemandReq_isUsed = 0u;
+	exiDoc->VehicleCheckInRes_isUsed = 0u;
+	exiDoc->PreChargeReq_isUsed = 0u;
+	exiDoc->CurrentDemandRes_isUsed = 0u;
+	exiDoc->PreChargeRes_isUsed = 0u;
+	exiDoc->AlignmentCheckReq_isUsed = 0u;
+	exiDoc->V2GRequest_isUsed = 0u;
+	exiDoc->SessionStopReq_isUsed = 0u;
+	exiDoc->AuthorizationReq_isUsed = 0u;
+	exiDoc->AlignmentCheckRes_isUsed = 0u;
+	exiDoc->SessionStopRes_isUsed = 0u;
+	exiDoc->AuthorizationRes_isUsed = 0u;
+	exiDoc->VehicleCheckOutReq_isUsed = 0u;
+	exiDoc->ChargeParameterDiscoveryReq_isUsed = 0u;
+	exiDoc->VehicleCheckOutRes_isUsed = 0u;
+	exiDoc->ChargeParameterDiscoveryRes_isUsed = 0u;
+	exiDoc->V2GResponse_isUsed = 0u;
+	exiDoc->FinePositioningSetupReq_isUsed = 0u;
+	exiDoc->FinePositioningSetupRes_isUsed = 0u;
+	exiDoc->ServiceDetailReq_isUsed = 0u;
+	exiDoc->DC_BidirectionalControlReq_isUsed = 0u;
+	exiDoc->ServiceDetailRes_isUsed = 0u;
+	exiDoc->DC_BidirectionalControlRes_isUsed = 0u;
+	exiDoc->LFA_EVFinePositioningSetupParameters_isUsed = 0u;
+	exiDoc->MV_EVSEFinePositioningParameters_isUsed = 0u;
+	exiDoc->RelativeTimeInterval_isUsed = 0u;
+	exiDoc->SalesTariffEntry_isUsed = 0u;
+	exiDoc->LFA_EVSEFinePositioningSetupParameters_isUsed = 0u;
+	exiDoc->AC_EVChargeParameter_isUsed = 0u;
+	exiDoc->MV_EVSEFinePositioningSetupParameters_isUsed = 0u;
+	exiDoc->EVEnergyTransferParameter_isUsed = 0u;
+	exiDoc->DC_EVSEBidirectionalParameter_isUsed = 0u;
+	exiDoc->SAScheduleList_isUsed = 0u;
+	exiDoc->EVSEFinePositioningSetupParameters_isUsed = 0u;
+	exiDoc->Generic_EVSEFinePositioningParameters_isUsed = 0u;
+	exiDoc->DC_EVChargeParameter_isUsed = 0u;
+	exiDoc->DC_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->LFA_EVFinePositioningParameters_isUsed = 0u;
+	exiDoc->EVFinePositioningSetupParameters_isUsed = 0u;
+	exiDoc->AC_EVSEBidirectionalParameter_isUsed = 0u;
+	exiDoc->EVFinePositioningParameters_isUsed = 0u;
+	exiDoc->WPT_EVChargeParameter_isUsed = 0u;
+	exiDoc->LFA_EVSEFinePositioningParameters_isUsed = 0u;
+	exiDoc->EVSEEnergyTransferParameter_isUsed = 0u;
+	exiDoc->AC_EVBidirectionalParameter_isUsed = 0u;
+	exiDoc->EVSEFinePositioningParameters_isUsed = 0u;
+	exiDoc->WPT_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->AC_EVSEChargeParameter_isUsed = 0u;
+	exiDoc->PMaxScheduleEntry_isUsed = 0u;
+	exiDoc->Generic_EVFinePositioningParameters_isUsed = 0u;
+	exiDoc->DC_EVBidirectionalParameter_isUsed = 0u;
+	exiDoc->SignatureProperty_isUsed = 0u;
+	exiDoc->DSAKeyValue_isUsed = 0u;
+	exiDoc->SignatureProperties_isUsed = 0u;
+	exiDoc->KeyValue_isUsed = 0u;
+	exiDoc->Transforms_isUsed = 0u;
+	exiDoc->DigestMethod_isUsed = 0u;
+	exiDoc->Signature_isUsed = 0u;
+	exiDoc->RetrievalMethod_isUsed = 0u;
+	exiDoc->Manifest_isUsed = 0u;
+	exiDoc->Reference_isUsed = 0u;
+	exiDoc->CanonicalizationMethod_isUsed = 0u;
+	exiDoc->RSAKeyValue_isUsed = 0u;
+	exiDoc->Transform_isUsed = 0u;
+	exiDoc->PGPData_isUsed = 0u;
+	exiDoc->MgmtData_isUsed = 0u;
+	exiDoc->SignatureMethod_isUsed = 0u;
+	exiDoc->KeyInfo_isUsed = 0u;
+	exiDoc->SPKIData_isUsed = 0u;
+	exiDoc->X509Data_isUsed = 0u;
+	exiDoc->SignatureValue_isUsed = 0u;
+	exiDoc->KeyName_isUsed = 0u;
+	exiDoc->DigestValue_isUsed = 0u;
+	exiDoc->SignedInfo_isUsed = 0u;
+	exiDoc->Object_isUsed = 0u;
+}
+
+
+#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES
+void init_iso2EXIFragment(struct iso2EXIFragment* exiFrag) {
+	exiFrag->EVMaximumVoltage_isUsed = 0u;
+	exiFrag->EVMaximumVoltage_isUsed = 0u;
+	exiFrag->FrequencyChannel_isUsed = 0u;
+	exiFrag->FrequencyChannel_isUsed = 0u;
+	exiFrag->EVProcessing_isUsed = 0u;
+	exiFrag->EVProcessing_isUsed = 0u;
+	exiFrag->EVProcessing_isUsed = 0u;
+	exiFrag->BulkChargingComplete_isUsed = 0u;
+	exiFrag->ParkingMethod_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->Distance_isUsed = 0u;
+	exiFrag->ParameterSet_isUsed = 0u;
+	exiFrag->EVMinimumDischargeCurrent_isUsed = 0u;
+	exiFrag->SignalSeparationTime_isUsed = 0u;
+	exiFrag->SignalSeparationTime_isUsed = 0u;
+	exiFrag->EVSEEnergyTransferParameter_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltage_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltage_isUsed = 0u;
+	exiFrag->DC_EVSEBidirectionalParameter_isUsed = 0u;
+	exiFrag->ChargingSession_isUsed = 0u;
+	exiFrag->SubCertificates_isUsed = 0u;
+	exiFrag->RetrievalMethod_isUsed = 0u;
+	exiFrag->MagneticVectorSetupList_isUsed = 0u;
+	exiFrag->PairingParameters_isUsed = 0u;
+	exiFrag->PairingParameters_isUsed = 0u;
+	exiFrag->EVSEMinimumPower_isUsed = 0u;
+	exiFrag->AC_BidirectionalControlReq_isUsed = 0u;
+	exiFrag->Cost_isUsed = 0u;
+	exiFrag->AC_BidirectionalControlRes_isUsed = 0u;
+	exiFrag->BuyBackTariff_isUsed = 0u;
+	exiFrag->XCoordinate_isUsed = 0u;
+	exiFrag->EVSECheckOutStatus_isUsed = 0u;
+	exiFrag->stringValue_isUsed = 0u;
+	exiFrag->RetryCounter_isUsed = 0u;
+	exiFrag->EVSEMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->Sensor_isUsed = 0u;
+	exiFrag->MeterReadingCharged_isUsed = 0u;
+	exiFrag->HMACOutputLength_isUsed = 0u;
+	exiFrag->V2GResponse_isUsed = 0u;
+	exiFrag->EVMinimumVoltage_isUsed = 0u;
+	exiFrag->EVMinimumEnergyRequest_isUsed = 0u;
+	exiFrag->EVMinimumEnergyRequest_isUsed = 0u;
+	exiFrag->EVMinimumEnergyRequest_isUsed = 0u;
+	exiFrag->RelativeTimeInterval_isUsed = 0u;
+	exiFrag->RelativeTimeInterval_isUsed = 0u;
+	exiFrag->WPT_EVChargeParameter_isUsed = 0u;
+	exiFrag->SAScheduleTuple_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->PgenCounter_isUsed = 0u;
+	exiFrag->SalesTariffDescription_isUsed = 0u;
+	exiFrag->AngleGAtoVA_isUsed = 0u;
+	exiFrag->boolValue_isUsed = 0u;
+	exiFrag->EVMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->EVMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->NotificationMaxDelay_isUsed = 0u;
+	exiFrag->EVSEMaximumDischargePower_isUsed = 0u;
+	exiFrag->PGPData_isUsed = 0u;
+	exiFrag->EVSEMaximumChargePower_isUsed = 0u;
+	exiFrag->SessionID_isUsed = 0u;
+	exiFrag->EVSEEnergyToBeDelivered_isUsed = 0u;
+	exiFrag->EVMaximumPower_isUsed = 0u;
+	exiFrag->EVMaximumCurrent_isUsed = 0u;
+	exiFrag->RSAKeyValue_isUsed = 0u;
+	exiFrag->EVSENominalVoltage_isUsed = 0u;
+	exiFrag->MagneticVector_isUsed = 0u;
+	exiFrag->XPath_isUsed = 0u;
+	exiFrag->Signature_isUsed = 0u;
+	exiFrag->EVElectricalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVElectricalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->EVSEProcessing_isUsed = 0u;
+	exiFrag->FODStatus_isUsed = 0u;
+	exiFrag->PowerDeliveryRes_isUsed = 0u;
+	exiFrag->SessionStopRes_isUsed = 0u;
+	exiFrag->WPT_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->ResponseCode_isUsed = 0u;
+	exiFrag->EVTargetEnergyRequest_isUsed = 0u;
+	exiFrag->EVTargetEnergyRequest_isUsed = 0u;
+	exiFrag->EVTargetEnergyRequest_isUsed = 0u;
+	exiFrag->FinePositioningSetupReq_isUsed = 0u;
+	exiFrag->EVSEPresentCurrent_isUsed = 0u;
+	exiFrag->EVSEPresentCurrent_isUsed = 0u;
+	exiFrag->FinePositioningSetupRes_isUsed = 0u;
+	exiFrag->ProfileEntry_isUsed = 0u;
+	exiFrag->MgmtData_isUsed = 0u;
+	exiFrag->SAProvisioningCertificateChain_isUsed = 0u;
+	exiFrag->SAProvisioningCertificateChain_isUsed = 0u;
+	exiFrag->PowerDeliveryReq_isUsed = 0u;
+	exiFrag->SessionStopReq_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ReceiptRequired_isUsed = 0u;
+	exiFrag->ChargingProfile_isUsed = 0u;
+	exiFrag->MaxSupportingPoints_isUsed = 0u;
+	exiFrag->start_isUsed = 0u;
+	exiFrag->EVMinimumChargePower_isUsed = 0u;
+	exiFrag->amount_isUsed = 0u;
+	exiFrag->PreChargeReq_isUsed = 0u;
+	exiFrag->OEMProvisioningCert_isUsed = 0u;
+	exiFrag->PackageIndex_isUsed = 0u;
+	exiFrag->PreChargeRes_isUsed = 0u;
+	exiFrag->P_isUsed = 0u;
+	exiFrag->Q_isUsed = 0u;
+	exiFrag->X509SubjectName_isUsed = 0u;
+	exiFrag->G_isUsed = 0u;
+	exiFrag->J_isUsed = 0u;
+	exiFrag->SessionID_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->ContractSignatureCertChain_isUsed = 0u;
+	exiFrag->MV_EVSEFinePositioningSetupParameters_isUsed = 0u;
+	exiFrag->EVSEMinimumDischargeCurrent_isUsed = 0u;
+	exiFrag->EVMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->EVMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->AlignmentOffset_isUsed = 0u;
+	exiFrag->AlignmentOffset_isUsed = 0u;
+	exiFrag->Y_isUsed = 0u;
+	exiFrag->RemainingTimeToTargetSOC_isUsed = 0u;
+	exiFrag->DigestValue_isUsed = 0u;
+	exiFrag->SensorMeasurements_isUsed = 0u;
+	exiFrag->SalesTariff_isUsed = 0u;
+	exiFrag->EVCCID_isUsed = 0u;
+	exiFrag->EVSEMaximumPower_isUsed = 0u;
+	exiFrag->TargetOffset_isUsed = 0u;
+	exiFrag->PowerDemandParameters_isUsed = 0u;
+	exiFrag->PowerDemandParameters_isUsed = 0u;
+	exiFrag->PGPKeyID_isUsed = 0u;
+	exiFrag->DisconnectChargingDeviceReq_isUsed = 0u;
+	exiFrag->DisconnectChargingDeviceRes_isUsed = 0u;
+	exiFrag->DSAKeyValue_isUsed = 0u;
+	exiFrag->SalesTariffEntry_isUsed = 0u;
+	exiFrag->CertificateInstallationRes_isUsed = 0u;
+	exiFrag->CanonicalizationMethod_isUsed = 0u;
+	exiFrag->Generic_EVFinePositioningParameters_isUsed = 0u;
+	exiFrag->EVSEMinimumVoltage_isUsed = 0u;
+	exiFrag->SystemStatusRes_isUsed = 0u;
+	exiFrag->EVSEOutputPower_isUsed = 0u;
+	exiFrag->SignedInfo_isUsed = 0u;
+	exiFrag->EVMinimumChargeCurrent_isUsed = 0u;
+	exiFrag->EVMinimumChargeCurrent_isUsed = 0u;
+	exiFrag->costKind_isUsed = 0u;
+	exiFrag->SystemStatusReq_isUsed = 0u;
+	exiFrag->CableCheckReq_isUsed = 0u;
+	exiFrag->NumEPriceLevels_isUsed = 0u;
+	exiFrag->EVSEVoltageLimitAchieved_isUsed = 0u;
+	exiFrag->EVSEVoltageLimitAchieved_isUsed = 0u;
+	exiFrag->PackageSeparationTime_isUsed = 0u;
+	exiFrag->PackageSeparationTime_isUsed = 0u;
+	exiFrag->CableCheckRes_isUsed = 0u;
+	exiFrag->EVCheckInStatus_isUsed = 0u;
+	exiFrag->PMaxDischargeSchedule_isUsed = 0u;
+	exiFrag->EVMinimumPower_isUsed = 0u;
+	exiFrag->ChargingPerformance_isUsed = 0u;
+	exiFrag->AlignmentCheckReq_isUsed = 0u;
+	exiFrag->EVMechanicalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVMechanicalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVMechanicalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->VehicleSpace_isUsed = 0u;
+	exiFrag->AlignmentCheckRes_isUsed = 0u;
+	exiFrag->EVMinimumDischargePower_isUsed = 0u;
+	exiFrag->RemainingTimeToMinimumSOC_isUsed = 0u;
+	exiFrag->AuthorizationRes_isUsed = 0u;
+	exiFrag->CertificateInstallationReq_isUsed = 0u;
+	exiFrag->PaymentDetailsReq_isUsed = 0u;
+	exiFrag->PaymentDetailsRes_isUsed = 0u;
+	exiFrag->AuthorizationReq_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->EVTargetCurrent_isUsed = 0u;
+	exiFrag->SessionSetupReq_isUsed = 0u;
+	exiFrag->SessionSetupRes_isUsed = 0u;
+	exiFrag->EVSENominalFrequency_isUsed = 0u;
+	exiFrag->EVSENominalFrequency_isUsed = 0u;
+	exiFrag->Header_isUsed = 0u;
+	exiFrag->NumberOfSensors_isUsed = 0u;
+	exiFrag->NumberOfSensors_isUsed = 0u;
+	exiFrag->EVSETimeStamp_isUsed = 0u;
+	exiFrag->EVSETimeStamp_isUsed = 0u;
+	exiFrag->MeterStatus_isUsed = 0u;
+	exiFrag->EVSEMaximumPower_isUsed = 0u;
+	exiFrag->MV_EVSEFinePositioningParameters_isUsed = 0u;
+	exiFrag->ChargeProgress_isUsed = 0u;
+	exiFrag->KeyName_isUsed = 0u;
+	exiFrag->PMaxSchedule_isUsed = 0u;
+	exiFrag->duration_isUsed = 0u;
+	exiFrag->RemainingTimeToBulkSOC_isUsed = 0u;
+	exiFrag->SensorOrientation_isUsed = 0u;
+	exiFrag->EVSEMinimumVoltage_isUsed = 0u;
+	exiFrag->EVSEMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->LFA_EVSEFinePositioningParameters_isUsed = 0u;
+	exiFrag->VehicleCheckInRes_isUsed = 0u;
+	exiFrag->PMaxScheduleEntry_isUsed = 0u;
+	exiFrag->SAScheduleList_isUsed = 0u;
+	exiFrag->X509SKI_isUsed = 0u;
+	exiFrag->PaymentOptionList_isUsed = 0u;
+	exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u;
+	exiFrag->ContractSignatureEncryptedPrivateKey_isUsed = 0u;
+	exiFrag->VehicleCheckInReq_isUsed = 0u;
+	exiFrag->Certificate_isUsed = 0u;
+	exiFrag->Certificate_isUsed = 0u;
+	exiFrag->CheckOutTime_isUsed = 0u;
+	exiFrag->CurrentSOC_isUsed = 0u;
+	exiFrag->CurrentSOC_isUsed = 0u;
+	exiFrag->ZCoordinate_isUsed = 0u;
+	exiFrag->MeasurementData_isUsed = 0u;
+	exiFrag->PairingRes_isUsed = 0u;
+	exiFrag->EVSEMaximumCurrent_isUsed = 0u;
+	exiFrag->LFA_EVFinePositioningParameters_isUsed = 0u;
+	exiFrag->AlignmentCheckParameters_isUsed = 0u;
+	exiFrag->AlignmentCheckParameters_isUsed = 0u;
+	exiFrag->EffectiveRadiatedPower_isUsed = 0u;
+	exiFrag->PairingReq_isUsed = 0u;
+	exiFrag->EVMinimumChargeCurrent_isUsed = 0u;
+	exiFrag->EVMinimumChargeCurrent_isUsed = 0u;
+	exiFrag->Value_isUsed = 0u;
+	exiFrag->byteValue_isUsed = 0u;
+	exiFrag->EVSEMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->EVSEMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->CurrentDemandReq_isUsed = 0u;
+	exiFrag->Generic_EVSEFinePositioningParameters_isUsed = 0u;
+	exiFrag->CurrentDemandRes_isUsed = 0u;
+	exiFrag->SAScheduleList_isUsed = 0u;
+	exiFrag->AC_EVBidirectionalParameter_isUsed = 0u;
+	exiFrag->Modulus_isUsed = 0u;
+	exiFrag->SelectedEnergyTransferService_isUsed = 0u;
+	exiFrag->startValue_isUsed = 0u;
+	exiFrag->SelectedVASList_isUsed = 0u;
+	exiFrag->EVSEMaximumDischargePower_isUsed = 0u;
+	exiFrag->ChargeParameterDiscoveryReq_isUsed = 0u;
+	exiFrag->ChargeParameterDiscoveryRes_isUsed = 0u;
+	exiFrag->EVMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->EVMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->SigMeterReading_isUsed = 0u;
+	exiFrag->TargetSOC_isUsed = 0u;
+	exiFrag->TargetSOC_isUsed = 0u;
+	exiFrag->EVMaximumPower_isUsed = 0u;
+	exiFrag->EVSEMaximumChargePower_isUsed = 0u;
+	exiFrag->EVSEStatus_isUsed = 0u;
+	exiFrag->EVSEMinimumChargeCurrent_isUsed = 0u;
+	exiFrag->EVSEElectricalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVSEElectricalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->X509SerialNumber_isUsed = 0u;
+	exiFrag->PaymentOption_isUsed = 0u;
+	exiFrag->Transforms_isUsed = 0u;
+	exiFrag->EVSEPeakCurrentRipple_isUsed = 0u;
+	exiFrag->ConsumptionCost_isUsed = 0u;
+	exiFrag->EVTargetEnergyRequest_isUsed = 0u;
+	exiFrag->EVSEFinePositioningSetupParameters_isUsed = 0u;
+	exiFrag->EPriceLevel_isUsed = 0u;
+	exiFrag->Exponent_isUsed = 0u;
+	exiFrag->X509IssuerSerial_isUsed = 0u;
+	exiFrag->SPKIData_isUsed = 0u;
+	exiFrag->MagneticVectorList_isUsed = 0u;
+	exiFrag->EVSEFinePositioningParameters_isUsed = 0u;
+	exiFrag->EVTargetPower_isUsed = 0u;
+	exiFrag->SensorPackageList_isUsed = 0u;
+	exiFrag->SensorPackageList_isUsed = 0u;
+	exiFrag->DepartureTime_isUsed = 0u;
+	exiFrag->InletHot_isUsed = 0u;
+	exiFrag->EVPresentActivePower_isUsed = 0u;
+	exiFrag->X509Data_isUsed = 0u;
+	exiFrag->YCoordinate_isUsed = 0u;
+	exiFrag->KeyValue_isUsed = 0u;
+	exiFrag->DisplayParameters_isUsed = 0u;
+	exiFrag->EVSEPowerLimitAchieved_isUsed = 0u;
+	exiFrag->EVSEPowerLimitAchieved_isUsed = 0u;
+	exiFrag->Body_isUsed = 0u;
+	exiFrag->DC_EVChargeParameter_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->SAScheduleTupleID_isUsed = 0u;
+	exiFrag->Service_isUsed = 0u;
+	exiFrag->EVMinimumDischargeCurrent_isUsed = 0u;
+	exiFrag->EVMinimumDischargeCurrent_isUsed = 0u;
+	exiFrag->SignatureProperty_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->Seed_isUsed = 0u;
+	exiFrag->LFA_EVFinePositioningSetupParameters_isUsed = 0u;
+	exiFrag->MinimumPMaxRequest_isUsed = 0u;
+	exiFrag->FinePositioningReq_isUsed = 0u;
+	exiFrag->EnergyTransferServiceList_isUsed = 0u;
+	exiFrag->FinePositioningRes_isUsed = 0u;
+	exiFrag->AC_EVSEBidirectionalParameter_isUsed = 0u;
+	exiFrag->FreeService_isUsed = 0u;
+	exiFrag->EVMinimumVoltage_isUsed = 0u;
+	exiFrag->AC_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->EVMaximumVoltage_isUsed = 0u;
+	exiFrag->EVMaximumVoltage_isUsed = 0u;
+	exiFrag->SensorID_isUsed = 0u;
+	exiFrag->SensorID_isUsed = 0u;
+	exiFrag->EVMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->EVMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->EVMaximumChargeCurrent_isUsed = 0u;
+	exiFrag->EVSECurrentRegulationTolerance_isUsed = 0u;
+	exiFrag->EVSEMechanicalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVSEMechanicalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->EVSEMechanicalChargingDeviceStatus_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->ServiceID_isUsed = 0u;
+	exiFrag->EVEnergyTransferParameter_isUsed = 0u;
+	exiFrag->SignalPulseDuration_isUsed = 0u;
+	exiFrag->SignalPulseDuration_isUsed = 0u;
+	exiFrag->shortValue_isUsed = 0u;
+	exiFrag->EVSEMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->EVSEMaximumDischargeCurrent_isUsed = 0u;
+	exiFrag->Manifest_isUsed = 0u;
+	exiFrag->DC_EVSEChargeParameter_isUsed = 0u;
+	exiFrag->MeteringReceiptReq_isUsed = 0u;
+	exiFrag->MeterID_isUsed = 0u;
+	exiFrag->MeteringReceiptRes_isUsed = 0u;
+	exiFrag->ServiceDiscoveryReq_isUsed = 0u;
+	exiFrag->SalesTariffID_isUsed = 0u;
+	exiFrag->ServiceDiscoveryRes_isUsed = 0u;
+	exiFrag->X509CRL_isUsed = 0u;
+	exiFrag->MagneticVectorSetup_isUsed = 0u;
+	exiFrag->DigestMethod_isUsed = 0u;
+	exiFrag->SPKISexp_isUsed = 0u;
+	exiFrag->MeterReadingDischarged_isUsed = 0u;
+	exiFrag->MeasurementDataList_isUsed = 0u;
+	exiFrag->SignatureProperties_isUsed = 0u;
+	exiFrag->SensorPosition_isUsed = 0u;
+	exiFrag->SensorPosition_isUsed = 0u;
+	exiFrag->LFA_EVSEFinePositioningSetupParameters_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->eMAID_isUsed = 0u;
+	exiFrag->SensorPackage_isUsed = 0u;
+	exiFrag->EVCheckOutStatus_isUsed = 0u;
+	exiFrag->EVMinimumEnergyRequest_isUsed = 0u;
+	exiFrag->X509Certificate_isUsed = 0u;
+	exiFrag->RootCertificateID_isUsed = 0u;
+	exiFrag->DC_BidirectionalControlReq_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->DC_BidirectionalControlRes_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->VASList_isUsed = 0u;
+	exiFrag->EVSEPresentVoltage_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->MeterInfo_isUsed = 0u;
+	exiFrag->EVSETargetReactivePower_isUsed = 0u;
+	exiFrag->ChargingStatusReq_isUsed = 0u;
+	exiFrag->GenericParameters_isUsed = 0u;
+	exiFrag->GenericParameters_isUsed = 0u;
+	exiFrag->ChargingStatusRes_isUsed = 0u;
+	exiFrag->EVMaximumChargePower_isUsed = 0u;
+	exiFrag->EVMaximumChargePower_isUsed = 0u;
+	exiFrag->BulkSOC_isUsed = 0u;
+	exiFrag->BulkSOC_isUsed = 0u;
+	exiFrag->NumberOfSignalPackages_isUsed = 0u;
+	exiFrag->NumberOfSignalPackages_isUsed = 0u;
+	exiFrag->ParameterSetID_isUsed = 0u;
+	exiFrag->PMax_isUsed = 0u;
+	exiFrag->ParameterSetID_isUsed = 0u;
+	exiFrag->EVMaximumEnergyRequest_isUsed = 0u;
+	exiFrag->EVMaximumEnergyRequest_isUsed = 0u;
+	exiFrag->EVMaximumEnergyRequest_isUsed = 0u;
+	exiFrag->EVOperation_isUsed = 0u;
+	exiFrag->EVOperation_isUsed = 0u;
+	exiFrag->CertificateUpdateRes_isUsed = 0u;
+	exiFrag->ChargingComplete_isUsed = 0u;
+	exiFrag->ListOfRootCertificateIDs_isUsed = 0u;
+	exiFrag->ListOfRootCertificateIDs_isUsed = 0u;
+	exiFrag->RotationVAtoGA_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->EVTargetVoltage_isUsed = 0u;
+	exiFrag->CertificateUpdateReq_isUsed = 0u;
+	exiFrag->ConnectChargingDeviceRes_isUsed = 0u;
+	exiFrag->DHpublickey_isUsed = 0u;
+	exiFrag->DHpublickey_isUsed = 0u;
+	exiFrag->ServiceParameterList_isUsed = 0u;
+	exiFrag->SignatureValue_isUsed = 0u;
+	exiFrag->physicalValue_isUsed = 0u;
+	exiFrag->Exponent_isUsed = 0u;
+	exiFrag->OperationMode_isUsed = 0u;
+	exiFrag->OperationMode_isUsed = 0u;
+	exiFrag->EVSECurrentLimitAchieved_isUsed = 0u;
+	exiFrag->EVSECurrentLimitAchieved_isUsed = 0u;
+	exiFrag->ServiceDetailReq_isUsed = 0u;
+	exiFrag->ServiceDetailRes_isUsed = 0u;
+	exiFrag->EVSEMaximumVoltage_isUsed = 0u;
+	exiFrag->intValue_isUsed = 0u;
+	exiFrag->EVMaximumDischargePower_isUsed = 0u;
+	exiFrag->EVMaximumDischargePower_isUsed = 0u;
+	exiFrag->MinimumSOC_isUsed = 0u;
+	exiFrag->MinimumSOC_isUsed = 0u;
+	exiFrag->SelectedPaymentOption_isUsed = 0u;
+	exiFrag->V2G_Message_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->EVSEID_isUsed = 0u;
+	exiFrag->TMeter_isUsed = 0u;
+	exiFrag->SensorOrder_isUsed = 0u;
+	exiFrag->SensorOrder_isUsed = 0u;
+	exiFrag->SupportedServiceIDs_isUsed = 0u;
+	exiFrag->GenChallenge_isUsed = 0u;
+	exiFrag->GenChallenge_isUsed = 0u;
+	exiFrag->EVFinePositioningParameters_isUsed = 0u;
+	exiFrag->SensorList_isUsed = 0u;
+	exiFrag->SensorList_isUsed = 0u;
+	exiFrag->KeyInfo_isUsed = 0u;
+	exiFrag->ConnectChargingDeviceReq_isUsed = 0u;
+	exiFrag->AC_EVChargeParameter_isUsed = 0u;
+	exiFrag->Parameter_isUsed = 0u;
+	exiFrag->WeldingDetectionRes_isUsed = 0u;
+	exiFrag->GAID_isUsed = 0u;
+	exiFrag->GAID_isUsed = 0u;
+	exiFrag->SignalFrequency_isUsed = 0u;
+	exiFrag->EVSETargetPower_isUsed = 0u;
+	exiFrag->DC_EVBidirectionalParameter_isUsed = 0u;
+	exiFrag->EVSETargetPower_isUsed = 0u;
+	exiFrag->SignatureMethod_isUsed = 0u;
+	exiFrag->WeldingDetectionReq_isUsed = 0u;
+	exiFrag->SelectedService_isUsed = 0u;
+	exiFrag->EVInputPower_isUsed = 0u;
+	exiFrag->VehicleCheckOutReq_isUsed = 0u;
+	exiFrag->EVMaximumDischargePower_isUsed = 0u;
+	exiFrag->EVMaximumDischargePower_isUsed = 0u;
+	exiFrag->PowerDemandReq_isUsed = 0u;
+	exiFrag->VehicleCheckOutRes_isUsed = 0u;
+	exiFrag->CurrentRange_isUsed = 0u;
+	exiFrag->EVPresentReactivePower_isUsed = 0u;
+	exiFrag->X509IssuerName_isUsed = 0u;
+	exiFrag->V2GRequest_isUsed = 0u;
+	exiFrag->Reference_isUsed = 0u;
+	exiFrag->BodyElement_isUsed = 0u;
+	exiFrag->MinimumPMaxScheduleEntry_isUsed = 0u;
+	exiFrag->EVFinePositioningSetupParameters_isUsed = 0u;
+	exiFrag->EVSENotification_isUsed = 0u;
+	exiFrag->PaymentServiceSelectionReq_isUsed = 0u;
+	exiFrag->EVMaximumChargePower_isUsed = 0u;
+	exiFrag->EVMaximumChargePower_isUsed = 0u;
+	exiFrag->EVMaximumChargePower_isUsed = 0u;
+	exiFrag->PaymentServiceSelectionRes_isUsed = 0u;
+	exiFrag->Transform_isUsed = 0u;
+	exiFrag->EVMaximumEnergyRequest_isUsed = 0u;
+	exiFrag->Object_isUsed = 0u;
+	exiFrag->TargetOffsetY_isUsed = 0u;
+	exiFrag->PowerDemandRes_isUsed = 0u;
+	exiFrag->TargetOffsetX_isUsed = 0u;
+}
+#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */
+
+void init_iso2RetrievalMethodType(struct iso2RetrievalMethodType* iso2RetrievalMethodType) {
+	iso2RetrievalMethodType->URI_isUsed = 0u;
+	iso2RetrievalMethodType->Type_isUsed = 0u;
+	iso2RetrievalMethodType->Transforms_isUsed = 0u;
+}
+
+void init_iso2AuthorizationResType(struct iso2AuthorizationResType* iso2AuthorizationResType) {
+	iso2AuthorizationResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2MV_EVSEFinePositioningSetupParametersType(struct iso2MV_EVSEFinePositioningSetupParametersType* iso2MV_EVSEFinePositioningSetupParametersType) {
+	iso2MV_EVSEFinePositioningSetupParametersType->FrequencyChannel_isUsed = 0u;
+	iso2MV_EVSEFinePositioningSetupParametersType->MagneticVectorSetupList_isUsed = 0u;
+}
+
+void init_iso2X509DataType(struct iso2X509DataType* iso2X509DataType) {
+	iso2X509DataType->X509IssuerSerial.arrayLen = 0u;
+	iso2X509DataType->X509SKI.arrayLen = 0u;
+	iso2X509DataType->X509SubjectName.arrayLen = 0u;
+	iso2X509DataType->X509Certificate.arrayLen = 0u;
+	iso2X509DataType->X509CRL.arrayLen = 0u;
+	iso2X509DataType->ANY_isUsed = 0u;
+}
+
+void init_iso2RSAKeyValueType(struct iso2RSAKeyValueType* iso2RSAKeyValueType) {
+	(void)iso2RSAKeyValueType; /* avoid unused warning */
+}
+
+void init_iso2DC_BidirectionalControlResType(struct iso2DC_BidirectionalControlResType* iso2DC_BidirectionalControlResType) {
+	iso2DC_BidirectionalControlResType->EVSEStatus_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->EVSEMaximumChargePower_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->EVSEMaximumDischargePower_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->EVSEMaximumChargeCurrent_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->EVSEMaximumDischargeCurrent_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->EVSEMaximumVoltage_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->EVSEMinimumVoltage_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->SAScheduleTupleID_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->MeterInfo_isUsed = 0u;
+	iso2DC_BidirectionalControlResType->ReceiptRequired_isUsed = 0u;
+}
+
+void init_iso2CostType(struct iso2CostType* iso2CostType) {
+	(void)iso2CostType; /* avoid unused warning */
+}
+
+void init_iso2ChargingStatusResType(struct iso2ChargingStatusResType* iso2ChargingStatusResType) {
+	iso2ChargingStatusResType->EVSEStatus_isUsed = 0u;
+	iso2ChargingStatusResType->SAScheduleTupleID_isUsed = 0u;
+	iso2ChargingStatusResType->MeterInfo_isUsed = 0u;
+	iso2ChargingStatusResType->ReceiptRequired_isUsed = 0u;
+	iso2ChargingStatusResType->EVSETargetPower_isUsed = 0u;
+}
+
+void init_iso2MeterInfoType(struct iso2MeterInfoType* iso2MeterInfoType) {
+	iso2MeterInfoType->MeterReadingCharged_isUsed = 0u;
+	iso2MeterInfoType->MeterReadingDischarged_isUsed = 0u;
+	iso2MeterInfoType->SigMeterReading_isUsed = 0u;
+	iso2MeterInfoType->MeterStatus_isUsed = 0u;
+	iso2MeterInfoType->TMeter_isUsed = 0u;
+}
+
+void init_iso2AC_EVChargeParameterType(struct iso2AC_EVChargeParameterType* iso2AC_EVChargeParameterType) {
+	iso2AC_EVChargeParameterType->EVTargetEnergyRequest_isUsed = 0u;
+	iso2AC_EVChargeParameterType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2AC_EVChargeParameterType->EVMinimumEnergyRequest_isUsed = 0u;
+}
+
+void init_iso2AC_EVSEBidirectionalParameterType(struct iso2AC_EVSEBidirectionalParameterType* iso2AC_EVSEBidirectionalParameterType) {
+	(void)iso2AC_EVSEBidirectionalParameterType; /* avoid unused warning */
+}
+
+void init_iso2VehicleCheckOutResType(struct iso2VehicleCheckOutResType* iso2VehicleCheckOutResType) {
+	iso2VehicleCheckOutResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2MagneticVectorListType(struct iso2MagneticVectorListType* iso2MagneticVectorListType) {
+	iso2MagneticVectorListType->MagneticVector.arrayLen = 0u;
+}
+
+void init_iso2CableCheckResType(struct iso2CableCheckResType* iso2CableCheckResType) {
+	iso2CableCheckResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2ServiceDiscoveryReqType(struct iso2ServiceDiscoveryReqType* iso2ServiceDiscoveryReqType) {
+	iso2ServiceDiscoveryReqType->SupportedServiceIDs_isUsed = 0u;
+}
+
+void init_iso2ServiceType(struct iso2ServiceType* iso2ServiceType) {
+	(void)iso2ServiceType; /* avoid unused warning */
+}
+
+void init_iso2ServiceParameterListType(struct iso2ServiceParameterListType* iso2ServiceParameterListType) {
+	iso2ServiceParameterListType->ParameterSet.arrayLen = 0u;
+}
+
+void init_iso2PMaxScheduleType(struct iso2PMaxScheduleType* iso2PMaxScheduleType) {
+	iso2PMaxScheduleType->PMaxScheduleEntry.arrayLen = 0u;
+}
+
+void init_iso2SignaturePropertiesType(struct iso2SignaturePropertiesType* iso2SignaturePropertiesType) {
+	iso2SignaturePropertiesType->Id_isUsed = 0u;
+	iso2SignaturePropertiesType->SignatureProperty.arrayLen = 0u;
+}
+
+void init_iso2PMaxScheduleEntryType(struct iso2PMaxScheduleEntryType* iso2PMaxScheduleEntryType) {
+	iso2PMaxScheduleEntryType->PMax.arrayLen = 0u;
+}
+
+void init_iso2SignatureType(struct iso2SignatureType* iso2SignatureType) {
+	iso2SignatureType->Id_isUsed = 0u;
+	iso2SignatureType->KeyInfo_isUsed = 0u;
+	iso2SignatureType->Object.arrayLen = 0u;
+}
+
+void init_iso2VehicleCheckInReqType(struct iso2VehicleCheckInReqType* iso2VehicleCheckInReqType) {
+	iso2VehicleCheckInReqType->ParkingMethod_isUsed = 0u;
+}
+
+void init_iso2ConnectChargingDeviceResType(struct iso2ConnectChargingDeviceResType* iso2ConnectChargingDeviceResType) {
+	iso2ConnectChargingDeviceResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2WeldingDetectionResType(struct iso2WeldingDetectionResType* iso2WeldingDetectionResType) {
+	iso2WeldingDetectionResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2SessionStopResType(struct iso2SessionStopResType* iso2SessionStopResType) {
+	iso2SessionStopResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2VehicleCheckInResType(struct iso2VehicleCheckInResType* iso2VehicleCheckInResType) {
+	iso2VehicleCheckInResType->EVSEStatus_isUsed = 0u;
+	iso2VehicleCheckInResType->TargetOffset_isUsed = 0u;
+}
+
+void init_iso2ServiceListType(struct iso2ServiceListType* iso2ServiceListType) {
+	iso2ServiceListType->Service.arrayLen = 0u;
+}
+
+void init_iso2CertificateUpdateResType(struct iso2CertificateUpdateResType* iso2CertificateUpdateResType) {
+	iso2CertificateUpdateResType->EVSEStatus_isUsed = 0u;
+	iso2CertificateUpdateResType->RetryCounter_isUsed = 0u;
+}
+
+void init_iso2FinePositioningSetupResType(struct iso2FinePositioningSetupResType* iso2FinePositioningSetupResType) {
+	iso2FinePositioningSetupResType->EVSEStatus_isUsed = 0u;
+	iso2FinePositioningSetupResType->EVSEFinePositioningSetupParameters_isUsed = 0u;
+	iso2FinePositioningSetupResType->LFA_EVSEFinePositioningSetupParameters_isUsed = 0u;
+	iso2FinePositioningSetupResType->MV_EVSEFinePositioningSetupParameters_isUsed = 0u;
+}
+
+void init_iso2AC_EVBidirectionalParameterType(struct iso2AC_EVBidirectionalParameterType* iso2AC_EVBidirectionalParameterType) {
+	iso2AC_EVBidirectionalParameterType->EVTargetEnergyRequest_isUsed = 0u;
+	iso2AC_EVBidirectionalParameterType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2AC_EVBidirectionalParameterType->EVMinimumEnergyRequest_isUsed = 0u;
+}
+
+void init_iso2DC_BidirectionalControlReqType(struct iso2DC_BidirectionalControlReqType* iso2DC_BidirectionalControlReqType) {
+	iso2DC_BidirectionalControlReqType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2DC_BidirectionalControlReqType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2DC_BidirectionalControlReqType->DisplayParameters_isUsed = 0u;
+	iso2DC_BidirectionalControlReqType->EVMaximumDischargeCurrent_isUsed = 0u;
+	iso2DC_BidirectionalControlReqType->EVMaximumChargePower_isUsed = 0u;
+	iso2DC_BidirectionalControlReqType->EVMaximumDischargePower_isUsed = 0u;
+}
+
+void init_iso2CertificateUpdateReqType(struct iso2CertificateUpdateReqType* iso2CertificateUpdateReqType) {
+	(void)iso2CertificateUpdateReqType; /* avoid unused warning */
+}
+
+void init_iso2ConsumptionCostType(struct iso2ConsumptionCostType* iso2ConsumptionCostType) {
+	iso2ConsumptionCostType->Cost.arrayLen = 0u;
+}
+
+void init_iso2SAScheduleListType(struct iso2SAScheduleListType* iso2SAScheduleListType) {
+	iso2SAScheduleListType->SAScheduleTuple.arrayLen = 0u;
+}
+
+void init_iso2MagneticVectorSetupType(struct iso2MagneticVectorSetupType* iso2MagneticVectorSetupType) {
+	(void)iso2MagneticVectorSetupType; /* avoid unused warning */
+}
+
+void init_iso2LFA_EVSEFinePositioningSetupParametersType(struct iso2LFA_EVSEFinePositioningSetupParametersType* iso2LFA_EVSEFinePositioningSetupParametersType) {
+	(void)iso2LFA_EVSEFinePositioningSetupParametersType; /* avoid unused warning */
+}
+
+void init_iso2PaymentOptionListType(struct iso2PaymentOptionListType* iso2PaymentOptionListType) {
+	iso2PaymentOptionListType->PaymentOption.arrayLen = 0u;
+}
+
+void init_iso2LFA_EVSEFinePositioningParametersType(struct iso2LFA_EVSEFinePositioningParametersType* iso2LFA_EVSEFinePositioningParametersType) {
+	(void)iso2LFA_EVSEFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2RelativeTimeIntervalType(struct iso2RelativeTimeIntervalType* iso2RelativeTimeIntervalType) {
+	iso2RelativeTimeIntervalType->duration_isUsed = 0u;
+}
+
+void init_iso2EVFinePositioningParametersType(struct iso2EVFinePositioningParametersType* iso2EVFinePositioningParametersType) {
+	(void)iso2EVFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2AlignmentCheckReqType(struct iso2AlignmentCheckReqType* iso2AlignmentCheckReqType) {
+	iso2AlignmentCheckReqType->AlignmentCheckParameters_isUsed = 0u;
+}
+
+void init_iso2CertificateInstallationReqType(struct iso2CertificateInstallationReqType* iso2CertificateInstallationReqType) {
+	(void)iso2CertificateInstallationReqType; /* avoid unused warning */
+}
+
+void init_iso2TransformsType(struct iso2TransformsType* iso2TransformsType) {
+	iso2TransformsType->Transform.arrayLen = 0u;
+}
+
+void init_iso2ObjectType(struct iso2ObjectType* iso2ObjectType) {
+	iso2ObjectType->Id_isUsed = 0u;
+	iso2ObjectType->MimeType_isUsed = 0u;
+	iso2ObjectType->Encoding_isUsed = 0u;
+	iso2ObjectType->ANY_isUsed = 0u;
+}
+
+void init_iso2SensorOrderListType(struct iso2SensorOrderListType* iso2SensorOrderListType) {
+	iso2SensorOrderListType->SensorPosition.arrayLen = 0u;
+}
+
+void init_iso2ChargeParameterDiscoveryReqType(struct iso2ChargeParameterDiscoveryReqType* iso2ChargeParameterDiscoveryReqType) {
+	iso2ChargeParameterDiscoveryReqType->MaxSupportingPoints_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->EVEnergyTransferParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->AC_EVChargeParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->AC_EVBidirectionalParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->DC_EVChargeParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->DC_EVBidirectionalParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->WPT_EVChargeParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryReqType->MinimumPMaxRequest_isUsed = 0u;
+}
+
+void init_iso2ParameterType(struct iso2ParameterType* iso2ParameterType) {
+	iso2ParameterType->boolValue_isUsed = 0u;
+	iso2ParameterType->byteValue_isUsed = 0u;
+	iso2ParameterType->shortValue_isUsed = 0u;
+	iso2ParameterType->intValue_isUsed = 0u;
+	iso2ParameterType->physicalValue_isUsed = 0u;
+	iso2ParameterType->stringValue_isUsed = 0u;
+}
+
+void init_iso2SessionStopReqType(struct iso2SessionStopReqType* iso2SessionStopReqType) {
+	(void)iso2SessionStopReqType; /* avoid unused warning */
+}
+
+void init_iso2SensorMeasurementsType(struct iso2SensorMeasurementsType* iso2SensorMeasurementsType) {
+	(void)iso2SensorMeasurementsType; /* avoid unused warning */
+}
+
+void init_iso2DC_EVSEChargeParameterType(struct iso2DC_EVSEChargeParameterType* iso2DC_EVSEChargeParameterType) {
+	iso2DC_EVSEChargeParameterType->EVSECurrentRegulationTolerance_isUsed = 0u;
+	iso2DC_EVSEChargeParameterType->EVSEEnergyToBeDelivered_isUsed = 0u;
+}
+
+void init_iso2SensorPackageListType(struct iso2SensorPackageListType* iso2SensorPackageListType) {
+	iso2SensorPackageListType->SensorPackage.arrayLen = 0u;
+}
+
+void init_iso2MeasurementDataListType(struct iso2MeasurementDataListType* iso2MeasurementDataListType) {
+	iso2MeasurementDataListType->MeasurementData.arrayLen = 0u;
+}
+
+void init_iso2CertificateChainType(struct iso2CertificateChainType* iso2CertificateChainType) {
+	iso2CertificateChainType->Id_isUsed = 0u;
+	iso2CertificateChainType->SubCertificates_isUsed = 0u;
+}
+
+void init_iso2SignaturePropertyType(struct iso2SignaturePropertyType* iso2SignaturePropertyType) {
+	iso2SignaturePropertyType->Id_isUsed = 0u;
+	iso2SignaturePropertyType->ANY_isUsed = 0u;
+}
+
+void init_iso2TransformType(struct iso2TransformType* iso2TransformType) {
+	iso2TransformType->ANY_isUsed = 0u;
+	iso2TransformType->XPath.arrayLen = 0u;
+}
+
+void init_iso2EMAIDType(struct iso2EMAIDType* iso2EMAIDType) {
+	(void)iso2EMAIDType; /* avoid unused warning */
+}
+
+void init_iso2DSAKeyValueType(struct iso2DSAKeyValueType* iso2DSAKeyValueType) {
+	iso2DSAKeyValueType->P_isUsed = 0u;
+	iso2DSAKeyValueType->Q_isUsed = 0u;
+	iso2DSAKeyValueType->G_isUsed = 0u;
+	iso2DSAKeyValueType->J_isUsed = 0u;
+	iso2DSAKeyValueType->Seed_isUsed = 0u;
+	iso2DSAKeyValueType->PgenCounter_isUsed = 0u;
+}
+
+void init_iso2EntryType(struct iso2EntryType* iso2EntryType) {
+	(void)iso2EntryType; /* avoid unused warning */
+}
+
+void init_iso2MessageHeaderType(struct iso2MessageHeaderType* iso2MessageHeaderType) {
+	iso2MessageHeaderType->Signature_isUsed = 0u;
+}
+
+void init_iso2WPT_EVChargeParameterType(struct iso2WPT_EVChargeParameterType* iso2WPT_EVChargeParameterType) {
+	iso2WPT_EVChargeParameterType->EVTargetEnergyRequest_isUsed = 0u;
+	iso2WPT_EVChargeParameterType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2WPT_EVChargeParameterType->EVMinimumEnergyRequest_isUsed = 0u;
+}
+
+void init_iso2DisconnectChargingDeviceReqType(struct iso2DisconnectChargingDeviceReqType* iso2DisconnectChargingDeviceReqType) {
+	(void)iso2DisconnectChargingDeviceReqType; /* avoid unused warning */
+}
+
+void init_iso2ChargeLoopReqType(struct iso2ChargeLoopReqType* iso2ChargeLoopReqType) {
+	iso2ChargeLoopReqType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2ChargeLoopReqType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2ChargeLoopReqType->DisplayParameters_isUsed = 0u;
+}
+
+void init_iso2V2GRequestType(struct iso2V2GRequestType* iso2V2GRequestType) {
+	(void)iso2V2GRequestType; /* avoid unused warning */
+}
+
+void init_iso2MeteringReceiptResType(struct iso2MeteringReceiptResType* iso2MeteringReceiptResType) {
+	iso2MeteringReceiptResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2SessionSetupResType(struct iso2SessionSetupResType* iso2SessionSetupResType) {
+	iso2SessionSetupResType->EVSEStatus_isUsed = 0u;
+	iso2SessionSetupResType->EVSETimeStamp_isUsed = 0u;
+}
+
+void init_iso2AC_BidirectionalControlReqType(struct iso2AC_BidirectionalControlReqType* iso2AC_BidirectionalControlReqType) {
+	iso2AC_BidirectionalControlReqType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2AC_BidirectionalControlReqType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2AC_BidirectionalControlReqType->DisplayParameters_isUsed = 0u;
+	iso2AC_BidirectionalControlReqType->EVOperation_isUsed = 0u;
+	iso2AC_BidirectionalControlReqType->EVMaximumDischargePower_isUsed = 0u;
+	iso2AC_BidirectionalControlReqType->EVMaximumDischargeCurrent_isUsed = 0u;
+	iso2AC_BidirectionalControlReqType->EVMinimumDischargeCurrent_isUsed = 0u;
+}
+
+void init_iso2MV_EVSEFinePositioningParametersType(struct iso2MV_EVSEFinePositioningParametersType* iso2MV_EVSEFinePositioningParametersType) {
+	(void)iso2MV_EVSEFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2ReferenceType(struct iso2ReferenceType* iso2ReferenceType) {
+	iso2ReferenceType->Id_isUsed = 0u;
+	iso2ReferenceType->URI_isUsed = 0u;
+	iso2ReferenceType->Type_isUsed = 0u;
+	iso2ReferenceType->Transforms_isUsed = 0u;
+}
+
+void init_iso2EVSEEnergyTransferParameterType(struct iso2EVSEEnergyTransferParameterType* iso2EVSEEnergyTransferParameterType) {
+	(void)iso2EVSEEnergyTransferParameterType; /* avoid unused warning */
+}
+
+void init_iso2MeteringReceiptReqType(struct iso2MeteringReceiptReqType* iso2MeteringReceiptReqType) {
+	iso2MeteringReceiptReqType->SAScheduleTupleID_isUsed = 0u;
+}
+
+void init_iso2KeyValueType(struct iso2KeyValueType* iso2KeyValueType) {
+	iso2KeyValueType->DSAKeyValue_isUsed = 0u;
+	iso2KeyValueType->RSAKeyValue_isUsed = 0u;
+	iso2KeyValueType->ANY_isUsed = 0u;
+}
+
+void init_iso2SensorListType(struct iso2SensorListType* iso2SensorListType) {
+	iso2SensorListType->Sensor.arrayLen = 0u;
+}
+
+void init_iso2CurrentDemandReqType(struct iso2CurrentDemandReqType* iso2CurrentDemandReqType) {
+	iso2CurrentDemandReqType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2CurrentDemandReqType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2CurrentDemandReqType->DisplayParameters_isUsed = 0u;
+	iso2CurrentDemandReqType->EVMaximumCurrent_isUsed = 0u;
+	iso2CurrentDemandReqType->EVMaximumPower_isUsed = 0u;
+	iso2CurrentDemandReqType->EVMaximumVoltage_isUsed = 0u;
+}
+
+void init_iso2FinePositioningSetupReqType(struct iso2FinePositioningSetupReqType* iso2FinePositioningSetupReqType) {
+	iso2FinePositioningSetupReqType->EVFinePositioningSetupParameters_isUsed = 0u;
+	iso2FinePositioningSetupReqType->LFA_EVFinePositioningSetupParameters_isUsed = 0u;
+}
+
+void init_iso2LFA_EVFinePositioningSetupParametersType(struct iso2LFA_EVFinePositioningSetupParametersType* iso2LFA_EVFinePositioningSetupParametersType) {
+	(void)iso2LFA_EVFinePositioningSetupParametersType; /* avoid unused warning */
+}
+
+void init_iso2SAScheduleTupleType(struct iso2SAScheduleTupleType* iso2SAScheduleTupleType) {
+	iso2SAScheduleTupleType->PMaxDischargeSchedule_isUsed = 0u;
+	iso2SAScheduleTupleType->SalesTariff_isUsed = 0u;
+	iso2SAScheduleTupleType->BuyBackTariff_isUsed = 0u;
+}
+
+void init_iso2WPT_EVSEChargeParameterType(struct iso2WPT_EVSEChargeParameterType* iso2WPT_EVSEChargeParameterType) {
+	(void)iso2WPT_EVSEChargeParameterType; /* avoid unused warning */
+}
+
+void init_iso2FinePositioningResType(struct iso2FinePositioningResType* iso2FinePositioningResType) {
+	iso2FinePositioningResType->EVSEStatus_isUsed = 0u;
+	iso2FinePositioningResType->EVSEFinePositioningParameters_isUsed = 0u;
+	iso2FinePositioningResType->Generic_EVSEFinePositioningParameters_isUsed = 0u;
+	iso2FinePositioningResType->LFA_EVSEFinePositioningParameters_isUsed = 0u;
+	iso2FinePositioningResType->MV_EVSEFinePositioningParameters_isUsed = 0u;
+}
+
+void init_iso2BodyBaseType(struct iso2BodyBaseType* iso2BodyBaseType) {
+	(void)iso2BodyBaseType; /* avoid unused warning */
+}
+
+void init_iso2ServiceDetailResType(struct iso2ServiceDetailResType* iso2ServiceDetailResType) {
+	iso2ServiceDetailResType->EVSEStatus_isUsed = 0u;
+	iso2ServiceDetailResType->ServiceParameterList_isUsed = 0u;
+}
+
+void init_iso2PowerDeliveryReqType(struct iso2PowerDeliveryReqType* iso2PowerDeliveryReqType) {
+	iso2PowerDeliveryReqType->EVOperation_isUsed = 0u;
+	iso2PowerDeliveryReqType->SAScheduleTupleID_isUsed = 0u;
+	iso2PowerDeliveryReqType->ChargingProfile_isUsed = 0u;
+}
+
+void init_iso2PairingResType(struct iso2PairingResType* iso2PairingResType) {
+	iso2PairingResType->EVSEStatus_isUsed = 0u;
+	iso2PairingResType->PairingParameters_isUsed = 0u;
+}
+
+void init_iso2AuthorizationReqType(struct iso2AuthorizationReqType* iso2AuthorizationReqType) {
+	iso2AuthorizationReqType->Id_isUsed = 0u;
+	iso2AuthorizationReqType->GenChallenge_isUsed = 0u;
+}
+
+void init_iso2ParameterSetType(struct iso2ParameterSetType* iso2ParameterSetType) {
+	iso2ParameterSetType->Parameter.arrayLen = 0u;
+}
+
+void init_iso2SPKIDataType(struct iso2SPKIDataType* iso2SPKIDataType) {
+	iso2SPKIDataType->SPKISexp.arrayLen = 0u;
+	iso2SPKIDataType->ANY_isUsed = 0u;
+}
+
+void init_iso2PaymentDetailsResType(struct iso2PaymentDetailsResType* iso2PaymentDetailsResType) {
+	iso2PaymentDetailsResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2SignatureMethodType(struct iso2SignatureMethodType* iso2SignatureMethodType) {
+	iso2SignatureMethodType->HMACOutputLength_isUsed = 0u;
+	iso2SignatureMethodType->ANY_isUsed = 0u;
+}
+
+void init_iso2AC_BidirectionalControlResType(struct iso2AC_BidirectionalControlResType* iso2AC_BidirectionalControlResType) {
+	iso2AC_BidirectionalControlResType->EVSEStatus_isUsed = 0u;
+	iso2AC_BidirectionalControlResType->SAScheduleTupleID_isUsed = 0u;
+	iso2AC_BidirectionalControlResType->MeterInfo_isUsed = 0u;
+	iso2AC_BidirectionalControlResType->ReceiptRequired_isUsed = 0u;
+}
+
+void init_iso2VehicleCheckOutReqType(struct iso2VehicleCheckOutReqType* iso2VehicleCheckOutReqType) {
+	(void)iso2VehicleCheckOutReqType; /* avoid unused warning */
+}
+
+void init_iso2WeldingDetectionReqType(struct iso2WeldingDetectionReqType* iso2WeldingDetectionReqType) {
+	(void)iso2WeldingDetectionReqType; /* avoid unused warning */
+}
+
+void init_iso2AlignmentCheckResType(struct iso2AlignmentCheckResType* iso2AlignmentCheckResType) {
+	iso2AlignmentCheckResType->EVSEStatus_isUsed = 0u;
+	iso2AlignmentCheckResType->AlignmentCheckParameters_isUsed = 0u;
+}
+
+void init_iso2PowerDemandReqType(struct iso2PowerDemandReqType* iso2PowerDemandReqType) {
+	iso2PowerDemandReqType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2PowerDemandReqType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2PowerDemandReqType->DisplayParameters_isUsed = 0u;
+	iso2PowerDemandReqType->PowerDemandParameters_isUsed = 0u;
+}
+
+void init_iso2MinimumPMaxRequestType(struct iso2MinimumPMaxRequestType* iso2MinimumPMaxRequestType) {
+	iso2MinimumPMaxRequestType->MinimumPMaxScheduleEntry.arrayLen = 0u;
+}
+
+void init_iso2DisconnectChargingDeviceResType(struct iso2DisconnectChargingDeviceResType* iso2DisconnectChargingDeviceResType) {
+	iso2DisconnectChargingDeviceResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2SessionSetupReqType(struct iso2SessionSetupReqType* iso2SessionSetupReqType) {
+	(void)iso2SessionSetupReqType; /* avoid unused warning */
+}
+
+void init_iso2PaymentDetailsReqType(struct iso2PaymentDetailsReqType* iso2PaymentDetailsReqType) {
+	(void)iso2PaymentDetailsReqType; /* avoid unused warning */
+}
+
+void init_iso2Generic_EVFinePositioningParametersType(struct iso2Generic_EVFinePositioningParametersType* iso2Generic_EVFinePositioningParametersType) {
+	(void)iso2Generic_EVFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2ConnectChargingDeviceReqType(struct iso2ConnectChargingDeviceReqType* iso2ConnectChargingDeviceReqType) {
+	(void)iso2ConnectChargingDeviceReqType; /* avoid unused warning */
+}
+
+void init_iso2AC_EVSEChargeParameterType(struct iso2AC_EVSEChargeParameterType* iso2AC_EVSEChargeParameterType) {
+	(void)iso2AC_EVSEChargeParameterType; /* avoid unused warning */
+}
+
+void init_iso2SalesTariffEntryType(struct iso2SalesTariffEntryType* iso2SalesTariffEntryType) {
+	iso2SalesTariffEntryType->EPriceLevel_isUsed = 0u;
+	iso2SalesTariffEntryType->ConsumptionCost.arrayLen = 0u;
+}
+
+void init_iso2DC_EVSEBidirectionalParameterType(struct iso2DC_EVSEBidirectionalParameterType* iso2DC_EVSEBidirectionalParameterType) {
+	iso2DC_EVSEBidirectionalParameterType->EVSECurrentRegulationTolerance_isUsed = 0u;
+	iso2DC_EVSEBidirectionalParameterType->EVSEEnergyToBeDelivered_isUsed = 0u;
+}
+
+void init_iso2CanonicalizationMethodType(struct iso2CanonicalizationMethodType* iso2CanonicalizationMethodType) {
+	iso2CanonicalizationMethodType->ANY_isUsed = 0u;
+}
+
+void init_iso2DisplayParametersType(struct iso2DisplayParametersType* iso2DisplayParametersType) {
+	iso2DisplayParametersType->CurrentRange_isUsed = 0u;
+	iso2DisplayParametersType->CurrentSOC_isUsed = 0u;
+	iso2DisplayParametersType->TargetSOC_isUsed = 0u;
+	iso2DisplayParametersType->BulkSOC_isUsed = 0u;
+	iso2DisplayParametersType->MinimumSOC_isUsed = 0u;
+	iso2DisplayParametersType->ChargingPerformance_isUsed = 0u;
+	iso2DisplayParametersType->RemainingTimeToTargetSOC_isUsed = 0u;
+	iso2DisplayParametersType->RemainingTimeToBulkSOC_isUsed = 0u;
+	iso2DisplayParametersType->RemainingTimeToMinimumSOC_isUsed = 0u;
+	iso2DisplayParametersType->ChargingComplete_isUsed = 0u;
+	iso2DisplayParametersType->BulkChargingComplete_isUsed = 0u;
+	iso2DisplayParametersType->InletHot_isUsed = 0u;
+}
+
+void init_iso2DC_EVBidirectionalParameterType(struct iso2DC_EVBidirectionalParameterType* iso2DC_EVBidirectionalParameterType) {
+	iso2DC_EVBidirectionalParameterType->EVMaximumChargePower_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->EVMinimumChargePower_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->EVTargetEnergyRequest_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->CurrentSOC_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->TargetSOC_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->BulkSOC_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->EVMaximumDischargePower_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->EVMinimumDischargePower_isUsed = 0u;
+	iso2DC_EVBidirectionalParameterType->MinimumSOC_isUsed = 0u;
+}
+
+void init_iso2PaymentServiceSelectionReqType(struct iso2PaymentServiceSelectionReqType* iso2PaymentServiceSelectionReqType) {
+	iso2PaymentServiceSelectionReqType->SelectedVASList_isUsed = 0u;
+}
+
+void init_iso2MagneticVectorType(struct iso2MagneticVectorType* iso2MagneticVectorType) {
+	(void)iso2MagneticVectorType; /* avoid unused warning */
+}
+
+void init_iso2PhysicalValueType(struct iso2PhysicalValueType* iso2PhysicalValueType) {
+	(void)iso2PhysicalValueType; /* avoid unused warning */
+}
+
+void init_iso2SystemStatusReqType(struct iso2SystemStatusReqType* iso2SystemStatusReqType) {
+	(void)iso2SystemStatusReqType; /* avoid unused warning */
+}
+
+void init_iso2SystemStatusResType(struct iso2SystemStatusResType* iso2SystemStatusResType) {
+	iso2SystemStatusResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2EVSEFinePositioningSetupParametersType(struct iso2EVSEFinePositioningSetupParametersType* iso2EVSEFinePositioningSetupParametersType) {
+	(void)iso2EVSEFinePositioningSetupParametersType; /* avoid unused warning */
+}
+
+void init_iso2V2GResponseType(struct iso2V2GResponseType* iso2V2GResponseType) {
+	iso2V2GResponseType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2BodyType(struct iso2BodyType* iso2BodyType) {
+	iso2BodyType->BodyElement_isUsed = 0u;
+	iso2BodyType->V2GRequest_isUsed = 0u;
+	iso2BodyType->DisconnectChargingDeviceReq_isUsed = 0u;
+	iso2BodyType->ConnectChargingDeviceReq_isUsed = 0u;
+	iso2BodyType->SystemStatusReq_isUsed = 0u;
+	iso2BodyType->DC_BidirectionalControlReq_isUsed = 0u;
+	iso2BodyType->AC_BidirectionalControlReq_isUsed = 0u;
+	iso2BodyType->VehicleCheckOutReq_isUsed = 0u;
+	iso2BodyType->VehicleCheckInReq_isUsed = 0u;
+	iso2BodyType->PowerDemandReq_isUsed = 0u;
+	iso2BodyType->PairingReq_isUsed = 0u;
+	iso2BodyType->AlignmentCheckReq_isUsed = 0u;
+	iso2BodyType->FinePositioningReq_isUsed = 0u;
+	iso2BodyType->FinePositioningSetupReq_isUsed = 0u;
+	iso2BodyType->WeldingDetectionReq_isUsed = 0u;
+	iso2BodyType->CurrentDemandReq_isUsed = 0u;
+	iso2BodyType->PreChargeReq_isUsed = 0u;
+	iso2BodyType->CableCheckReq_isUsed = 0u;
+	iso2BodyType->ChargingStatusReq_isUsed = 0u;
+	iso2BodyType->CertificateInstallationReq_isUsed = 0u;
+	iso2BodyType->CertificateUpdateReq_isUsed = 0u;
+	iso2BodyType->SessionStopReq_isUsed = 0u;
+	iso2BodyType->MeteringReceiptReq_isUsed = 0u;
+	iso2BodyType->PowerDeliveryReq_isUsed = 0u;
+	iso2BodyType->ChargeParameterDiscoveryReq_isUsed = 0u;
+	iso2BodyType->AuthorizationReq_isUsed = 0u;
+	iso2BodyType->PaymentDetailsReq_isUsed = 0u;
+	iso2BodyType->PaymentServiceSelectionReq_isUsed = 0u;
+	iso2BodyType->ServiceDetailReq_isUsed = 0u;
+	iso2BodyType->ServiceDiscoveryReq_isUsed = 0u;
+	iso2BodyType->SessionSetupReq_isUsed = 0u;
+	iso2BodyType->V2GResponse_isUsed = 0u;
+	iso2BodyType->DisconnectChargingDeviceRes_isUsed = 0u;
+	iso2BodyType->ConnectChargingDeviceRes_isUsed = 0u;
+	iso2BodyType->SystemStatusRes_isUsed = 0u;
+	iso2BodyType->DC_BidirectionalControlRes_isUsed = 0u;
+	iso2BodyType->AC_BidirectionalControlRes_isUsed = 0u;
+	iso2BodyType->VehicleCheckOutRes_isUsed = 0u;
+	iso2BodyType->VehicleCheckInRes_isUsed = 0u;
+	iso2BodyType->PowerDemandRes_isUsed = 0u;
+	iso2BodyType->PairingRes_isUsed = 0u;
+	iso2BodyType->AlignmentCheckRes_isUsed = 0u;
+	iso2BodyType->FinePositioningRes_isUsed = 0u;
+	iso2BodyType->FinePositioningSetupRes_isUsed = 0u;
+	iso2BodyType->WeldingDetectionRes_isUsed = 0u;
+	iso2BodyType->CurrentDemandRes_isUsed = 0u;
+	iso2BodyType->PreChargeRes_isUsed = 0u;
+	iso2BodyType->CableCheckRes_isUsed = 0u;
+	iso2BodyType->ChargingStatusRes_isUsed = 0u;
+	iso2BodyType->CertificateInstallationRes_isUsed = 0u;
+	iso2BodyType->CertificateUpdateRes_isUsed = 0u;
+	iso2BodyType->SessionStopRes_isUsed = 0u;
+	iso2BodyType->MeteringReceiptRes_isUsed = 0u;
+	iso2BodyType->PowerDeliveryRes_isUsed = 0u;
+	iso2BodyType->ChargeParameterDiscoveryRes_isUsed = 0u;
+	iso2BodyType->AuthorizationRes_isUsed = 0u;
+	iso2BodyType->PaymentDetailsRes_isUsed = 0u;
+	iso2BodyType->PaymentServiceSelectionRes_isUsed = 0u;
+	iso2BodyType->ServiceDetailRes_isUsed = 0u;
+	iso2BodyType->ServiceDiscoveryRes_isUsed = 0u;
+	iso2BodyType->SessionSetupRes_isUsed = 0u;
+}
+
+void init_iso2PreChargeResType(struct iso2PreChargeResType* iso2PreChargeResType) {
+	iso2PreChargeResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2EVSEFinePositioningParametersType(struct iso2EVSEFinePositioningParametersType* iso2EVSEFinePositioningParametersType) {
+	(void)iso2EVSEFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2PaymentServiceSelectionResType(struct iso2PaymentServiceSelectionResType* iso2PaymentServiceSelectionResType) {
+	iso2PaymentServiceSelectionResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2DigestMethodType(struct iso2DigestMethodType* iso2DigestMethodType) {
+	iso2DigestMethodType->ANY_isUsed = 0u;
+}
+
+void init_iso2TargetPositionType(struct iso2TargetPositionType* iso2TargetPositionType) {
+	(void)iso2TargetPositionType; /* avoid unused warning */
+}
+
+void init_iso2LFA_EVFinePositioningParametersType(struct iso2LFA_EVFinePositioningParametersType* iso2LFA_EVFinePositioningParametersType) {
+	(void)iso2LFA_EVFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2DC_EVChargeParameterType(struct iso2DC_EVChargeParameterType* iso2DC_EVChargeParameterType) {
+	iso2DC_EVChargeParameterType->EVMaximumChargePower_isUsed = 0u;
+	iso2DC_EVChargeParameterType->EVMinimumChargePower_isUsed = 0u;
+	iso2DC_EVChargeParameterType->EVTargetEnergyRequest_isUsed = 0u;
+	iso2DC_EVChargeParameterType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2DC_EVChargeParameterType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2DC_EVChargeParameterType->CurrentSOC_isUsed = 0u;
+	iso2DC_EVChargeParameterType->TargetSOC_isUsed = 0u;
+	iso2DC_EVChargeParameterType->BulkSOC_isUsed = 0u;
+}
+
+void init_iso2ServiceDetailReqType(struct iso2ServiceDetailReqType* iso2ServiceDetailReqType) {
+	(void)iso2ServiceDetailReqType; /* avoid unused warning */
+}
+
+void init_iso2PreChargeReqType(struct iso2PreChargeReqType* iso2PreChargeReqType) {
+	(void)iso2PreChargeReqType; /* avoid unused warning */
+}
+
+void init_iso2ManifestType(struct iso2ManifestType* iso2ManifestType) {
+	iso2ManifestType->Id_isUsed = 0u;
+	iso2ManifestType->Reference.arrayLen = 0u;
+}
+
+void init_iso2AnonType_V2G_Message(struct iso2AnonType_V2G_Message* iso2AnonType_V2G_Message) {
+	(void)iso2AnonType_V2G_Message; /* avoid unused warning */
+}
+
+void init_iso2SelectedServiceListType(struct iso2SelectedServiceListType* iso2SelectedServiceListType) {
+	iso2SelectedServiceListType->SelectedService.arrayLen = 0u;
+}
+
+void init_iso2Generic_EVSEFinePositioningParametersType(struct iso2Generic_EVSEFinePositioningParametersType* iso2Generic_EVSEFinePositioningParametersType) {
+	(void)iso2Generic_EVSEFinePositioningParametersType; /* avoid unused warning */
+}
+
+void init_iso2CartesianCoordinatesType(struct iso2CartesianCoordinatesType* iso2CartesianCoordinatesType) {
+	(void)iso2CartesianCoordinatesType; /* avoid unused warning */
+}
+
+void init_iso2KeyInfoType(struct iso2KeyInfoType* iso2KeyInfoType) {
+	iso2KeyInfoType->Id_isUsed = 0u;
+	iso2KeyInfoType->KeyName.arrayLen = 0u;
+	iso2KeyInfoType->KeyValue.arrayLen = 0u;
+	iso2KeyInfoType->RetrievalMethod.arrayLen = 0u;
+	iso2KeyInfoType->X509Data.arrayLen = 0u;
+	iso2KeyInfoType->PGPData.arrayLen = 0u;
+	iso2KeyInfoType->SPKIData.arrayLen = 0u;
+	iso2KeyInfoType->MgmtData.arrayLen = 0u;
+	iso2KeyInfoType->ANY_isUsed = 0u;
+}
+
+void init_iso2SubCertificatesType(struct iso2SubCertificatesType* iso2SubCertificatesType) {
+	iso2SubCertificatesType->Certificate.arrayLen = 0u;
+}
+
+void init_iso2ListOfRootCertificateIDsType(struct iso2ListOfRootCertificateIDsType* iso2ListOfRootCertificateIDsType) {
+	iso2ListOfRootCertificateIDsType->RootCertificateID.arrayLen = 0u;
+}
+
+void init_iso2EVEnergyTransferParameterType(struct iso2EVEnergyTransferParameterType* iso2EVEnergyTransferParameterType) {
+	(void)iso2EVEnergyTransferParameterType; /* avoid unused warning */
+}
+
+void init_iso2ContractSignatureEncryptedPrivateKeyType(struct iso2ContractSignatureEncryptedPrivateKeyType* iso2ContractSignatureEncryptedPrivateKeyType) {
+	(void)iso2ContractSignatureEncryptedPrivateKeyType; /* avoid unused warning */
+}
+
+void init_iso2MagneticVectorSetupListType(struct iso2MagneticVectorSetupListType* iso2MagneticVectorSetupListType) {
+	iso2MagneticVectorSetupListType->MagneticVectorSetup.arrayLen = 0u;
+}
+
+void init_iso2PairingReqType(struct iso2PairingReqType* iso2PairingReqType) {
+	iso2PairingReqType->PairingParameters_isUsed = 0u;
+}
+
+void init_iso2CurrentDemandResType(struct iso2CurrentDemandResType* iso2CurrentDemandResType) {
+	iso2CurrentDemandResType->EVSEStatus_isUsed = 0u;
+	iso2CurrentDemandResType->EVSEMaximumPower_isUsed = 0u;
+	iso2CurrentDemandResType->EVSEMaximumCurrent_isUsed = 0u;
+	iso2CurrentDemandResType->EVSEMaximumVoltage_isUsed = 0u;
+	iso2CurrentDemandResType->SAScheduleTupleID_isUsed = 0u;
+	iso2CurrentDemandResType->MeterInfo_isUsed = 0u;
+	iso2CurrentDemandResType->ReceiptRequired_isUsed = 0u;
+}
+
+void init_iso2X509IssuerSerialType(struct iso2X509IssuerSerialType* iso2X509IssuerSerialType) {
+	(void)iso2X509IssuerSerialType; /* avoid unused warning */
+}
+
+void init_iso2ChargingStatusReqType(struct iso2ChargingStatusReqType* iso2ChargingStatusReqType) {
+	iso2ChargingStatusReqType->EVMaximumEnergyRequest_isUsed = 0u;
+	iso2ChargingStatusReqType->EVMinimumEnergyRequest_isUsed = 0u;
+	iso2ChargingStatusReqType->DisplayParameters_isUsed = 0u;
+	iso2ChargingStatusReqType->EVMaximumChargePower_isUsed = 0u;
+	iso2ChargingStatusReqType->EVMaximumChargeCurrent_isUsed = 0u;
+	iso2ChargingStatusReqType->EVMinimumChargeCurrent_isUsed = 0u;
+}
+
+void init_iso2CertificateInstallationResType(struct iso2CertificateInstallationResType* iso2CertificateInstallationResType) {
+	iso2CertificateInstallationResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2SensorPackageType(struct iso2SensorPackageType* iso2SensorPackageType) {
+	iso2SensorPackageType->SensorMeasurements.arrayLen = 0u;
+}
+
+void init_iso2PGPDataType(struct iso2PGPDataType* iso2PGPDataType) {
+	iso2PGPDataType->PGPKeyID_isUsed = 0u;
+	iso2PGPDataType->PGPKeyPacket_isUsed = 0u;
+	iso2PGPDataType->ANY_isUsed = 0u;
+}
+
+void init_iso2ServiceDiscoveryResType(struct iso2ServiceDiscoveryResType* iso2ServiceDiscoveryResType) {
+	iso2ServiceDiscoveryResType->EVSEStatus_isUsed = 0u;
+	iso2ServiceDiscoveryResType->VASList_isUsed = 0u;
+}
+
+void init_iso2ServiceIDListType(struct iso2ServiceIDListType* iso2ServiceIDListType) {
+	iso2ServiceIDListType->ServiceID.arrayLen = 0u;
+}
+
+void init_iso2EVFinePositioningSetupParametersType(struct iso2EVFinePositioningSetupParametersType* iso2EVFinePositioningSetupParametersType) {
+	(void)iso2EVFinePositioningSetupParametersType; /* avoid unused warning */
+}
+
+void init_iso2ChargeParameterDiscoveryResType(struct iso2ChargeParameterDiscoveryResType* iso2ChargeParameterDiscoveryResType) {
+	iso2ChargeParameterDiscoveryResType->EVSEStatus_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->SAScheduleList_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->EVSEEnergyTransferParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->AC_EVSEChargeParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->AC_EVSEBidirectionalParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->DC_EVSEChargeParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->DC_EVSEBidirectionalParameter_isUsed = 0u;
+	iso2ChargeParameterDiscoveryResType->WPT_EVSEChargeParameter_isUsed = 0u;
+}
+
+void init_iso2PowerDemandResType(struct iso2PowerDemandResType* iso2PowerDemandResType) {
+	iso2PowerDemandResType->EVSEStatus_isUsed = 0u;
+	iso2PowerDemandResType->SAScheduleTupleID_isUsed = 0u;
+	iso2PowerDemandResType->MeterInfo_isUsed = 0u;
+	iso2PowerDemandResType->ReceiptRequired_isUsed = 0u;
+	iso2PowerDemandResType->PowerDemandParameters_isUsed = 0u;
+}
+
+void init_iso2ChargingProfileType(struct iso2ChargingProfileType* iso2ChargingProfileType) {
+	iso2ChargingProfileType->ProfileEntry.arrayLen = 0u;
+}
+
+void init_iso2FinePositioningReqType(struct iso2FinePositioningReqType* iso2FinePositioningReqType) {
+	iso2FinePositioningReqType->EVFinePositioningParameters_isUsed = 0u;
+	iso2FinePositioningReqType->Generic_EVFinePositioningParameters_isUsed = 0u;
+	iso2FinePositioningReqType->LFA_EVFinePositioningParameters_isUsed = 0u;
+}
+
+void init_iso2SalesTariffType(struct iso2SalesTariffType* iso2SalesTariffType) {
+	iso2SalesTariffType->SalesTariffDescription_isUsed = 0u;
+	iso2SalesTariffType->NumEPriceLevels_isUsed = 0u;
+	iso2SalesTariffType->SalesTariffEntry.arrayLen = 0u;
+}
+
+void init_iso2SensorType(struct iso2SensorType* iso2SensorType) {
+	(void)iso2SensorType; /* avoid unused warning */
+}
+
+void init_iso2SignatureValueType(struct iso2SignatureValueType* iso2SignatureValueType) {
+	iso2SignatureValueType->Id_isUsed = 0u;
+}
+
+void init_iso2SignedInfoType(struct iso2SignedInfoType* iso2SignedInfoType) {
+	iso2SignedInfoType->Id_isUsed = 0u;
+	iso2SignedInfoType->Reference.arrayLen = 0u;
+}
+
+void init_iso2PowerDeliveryResType(struct iso2PowerDeliveryResType* iso2PowerDeliveryResType) {
+	iso2PowerDeliveryResType->EVSEStatus_isUsed = 0u;
+}
+
+void init_iso2CableCheckReqType(struct iso2CableCheckReqType* iso2CableCheckReqType) {
+	(void)iso2CableCheckReqType; /* avoid unused warning */
+}
+
+void init_iso2SelectedServiceType(struct iso2SelectedServiceType* iso2SelectedServiceType) {
+	(void)iso2SelectedServiceType; /* avoid unused warning */
+}
+
+void init_iso2DiffieHellmanPublickeyType(struct iso2DiffieHellmanPublickeyType* iso2DiffieHellmanPublickeyType) {
+	(void)iso2DiffieHellmanPublickeyType; /* avoid unused warning */
+}
+
+void init_iso2EVSEStatusType(struct iso2EVSEStatusType* iso2EVSEStatusType) {
+	(void)iso2EVSEStatusType; /* avoid unused warning */
+}
+
+
+
+#endif /* DEPLOY_ISO2_CODEC */
+
+#endif
+

+ 4189 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypes.h

@@ -0,0 +1,4189 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypes.h
+ * \brief 	Datatype definitions and structs for given XML Schema definitions and initialization methods
+ *
+ */
+
+#ifndef EXI_iso2_DATATYPES_H
+#define EXI_iso2_DATATYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SUPPORT_YES 1
+#define SUPPORT_NO 2
+#define DEPLOY_ISO2_CODEC SUPPORT_YES
+#define DEPLOY_ISO2_CODEC_FRAGMENT SUPPORT_NO
+
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+/* Datatype definitions and structs for given XML Schema definitions */
+
+#define UNION_YES 1
+#define UNION_NO 2
+#define SAVE_MEMORY_WITH_UNNAMED_UNION UNION_YES
+
+/* Note: Please find below a list of occurrence limits that have been applied */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":SensorPosition from 255 to 5 (see #define iso2SensorOrderListType_SensorPosition_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":MeasurementData from 255 to 5 (see #define iso2MeasurementDataListType_MeasurementData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":XPath from unbounded to 1 (see #define iso2TransformType_XPath_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SPKISexp from unbounded to 1 (see #define iso2SPKIDataType_SPKISexp_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetup from 255 to 5 (see #define iso2MagneticVectorSetupListType_MagneticVectorSetup_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial from unbounded to 1 (see #define iso2X509DataType_X509IssuerSerial_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509SKI from unbounded to 1 (see #define iso2X509DataType_X509SKI_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509SubjectName from unbounded to 1 (see #define iso2X509DataType_X509SubjectName_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509Certificate from unbounded to 1 (see #define iso2X509DataType_X509Certificate_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509CRL from unbounded to 1 (see #define iso2X509DataType_X509CRL_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SignatureProperty from unbounded to 1 (see #define iso2SignaturePropertiesType_SignatureProperty_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Transform from unbounded to 1 (see #define iso2TransformsType_Transform_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":Sensor from 255 to 5 (see #define iso2SensorListType_Sensor_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Reference from unbounded to 1 (see #define iso2ManifestType_Reference_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":SensorMeasurements from 255 to 5 (see #define iso2SensorPackageType_SensorMeasurements_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":ProfileEntry from unbounded to 24 (see #define iso2ChargingProfileType_ProfileEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":SalesTariffEntry from unbounded to 5 (see #define iso2SalesTariffType_SalesTariffEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Reference from unbounded to 1 (see #define iso2SignedInfoType_Reference_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":MagneticVector from 255 to 5 (see #define iso2MagneticVectorListType_MagneticVector_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":ParameterSet from 255 to 5 (see #define iso2ServiceParameterListType_ParameterSet_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":PMaxScheduleEntry from unbounded to 5 (see #define iso2PMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE) */
+/* Limit occurrence of element "urn:iso:15118:2:2016:MsgDataTypes":SensorPackage from 255 to 5 (see #define iso2SensorPackageListType_SensorPackage_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":KeyName from unbounded to 1 (see #define iso2KeyInfoType_KeyName_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":KeyValue from unbounded to 1 (see #define iso2KeyInfoType_KeyValue_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod from unbounded to 1 (see #define iso2KeyInfoType_RetrievalMethod_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":X509Data from unbounded to 1 (see #define iso2KeyInfoType_X509Data_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":PGPData from unbounded to 1 (see #define iso2KeyInfoType_PGPData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":SPKIData from unbounded to 1 (see #define iso2KeyInfoType_SPKIData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":MgmtData from unbounded to 1 (see #define iso2KeyInfoType_MgmtData_ARRAY_SIZE) */
+/* Limit occurrence of element "http://www.w3.org/2000/09/xmldsig#":Object from unbounded to 1 (see #define iso2SignatureType_Object_ARRAY_SIZE) */
+
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+#define iso2RSAKeyValueType_Modulus_BYTES_SIZE 350
+#define iso2RSAKeyValueType_Exponent_BYTES_SIZE 350
+struct iso2RSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Modulus, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2RSAKeyValueType_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Exponent, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2RSAKeyValueType_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso2MeterInfoType_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,meterIDType is 32 */
+#define iso2MeterInfoType_SigMeterReading_BYTES_SIZE 64 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,sigMeterReadingType is 64 */
+struct iso2MeterInfoType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MeterID, urn:iso:15118:2:2016:MsgDataTypes,meterIDType */
+	struct {
+		exi_string_character_t characters[iso2MeterInfoType_MeterID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MeterID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged, http://www.w3.org/2001/XMLSchema,unsignedLong */
+	uint64_t MeterReadingCharged ;
+	unsigned int MeterReadingCharged_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged, http://www.w3.org/2001/XMLSchema,unsignedLong */
+	uint64_t MeterReadingDischarged ;
+	unsigned int MeterReadingDischarged_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading, urn:iso:15118:2:2016:MsgDataTypes,sigMeterReadingType */
+	struct {
+		uint8_t bytes[iso2MeterInfoType_SigMeterReading_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SigMeterReading ;
+	unsigned int SigMeterReading_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MeterStatus, urn:iso:15118:2:2016:MsgDataTypes,meterStatusType */
+	int16_t MeterStatus ;
+	unsigned int MeterStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":TMeter, http://www.w3.org/2001/XMLSchema,long */
+	int64_t TMeter ;
+	unsigned int TMeter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID,"urn:iso:15118:2:2016:MsgDataTypes":FreeService)',  derivedBy='RESTRICTION'.  */
+struct iso2ServiceType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ServiceID, urn:iso:15118:2:2016:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":FreeService, http://www.w3.org/2001/XMLSchema,boolean */
+	int FreeService ;
+};
+
+typedef enum {
+	iso2vehicleSpaceType_AutoParking = 0,
+	iso2vehicleSpaceType_MVGuideManual = 1,
+	iso2vehicleSpaceType_Manual = 2
+} iso2vehicleSpaceType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Service{1-8})',  derivedBy='RESTRICTION'.  */
+#define iso2ServiceListType_Service_ARRAY_SIZE 8
+struct iso2ServiceListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Service, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID,"urn:iso:15118:2:2016:MsgDataTypes":FreeService)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ServiceType array[iso2ServiceListType_Service_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Service;
+};
+
+typedef enum {
+	iso2operationModeType_Ready = 0,
+	iso2operationModeType_NotReady = 1
+} iso2operationModeType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorSetupType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GAID,"urn:iso:15118:2:2016:MsgDataTypes":FrequencyChannel)',  derivedBy='RESTRICTION'.  */
+#define iso2MagneticVectorSetupType_GAID_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2MagneticVectorSetupType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":GAID, http://www.w3.org/2001/XMLSchema,ID */
+	struct {
+		exi_string_character_t characters[iso2MagneticVectorSetupType_GAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  GAID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":FrequencyChannel, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t FrequencyChannel ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,RelativeTimeIntervalType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":start,"urn:iso:15118:2:2016:MsgDataTypes":duration{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso2RelativeTimeIntervalType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":start, urn:iso:15118:2:2016:MsgDataTypes,#AnonType_startRelativeTimeIntervalType */
+	uint32_t start ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":duration, urn:iso:15118:2:2016:MsgDataTypes,#AnonType_durationRelativeTimeIntervalType */
+	uint32_t duration ;
+	unsigned int duration_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVFinePositioningParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2EVFinePositioningParametersType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso2ObjectType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ObjectType_MimeType_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ObjectType_Encoding_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ObjectType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2ObjectType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2ObjectType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: MimeType {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[iso2ObjectType_MimeType_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MimeType ;
+	unsigned int MimeType_isUsed:1;
+	/* attribute: Encoding {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2ObjectType_Encoding_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Encoding ;
+	unsigned int Encoding_isUsed:1;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[iso2ObjectType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorOrderListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorPosition{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2SensorOrderListType_SensorPosition_ARRAY_SIZE 5
+struct iso2SensorOrderListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorPosition, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	struct {
+		uint8_t array[iso2SensorOrderListType_SensorPosition_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SensorPosition;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeasurementDataListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeasurementData{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2MeasurementDataListType_MeasurementData_ARRAY_SIZE 5
+struct iso2MeasurementDataListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MeasurementData, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	struct {
+		uint16_t array[iso2MeasurementDataListType_MeasurementData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MeasurementData;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso2SignaturePropertyType_Target_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SignaturePropertyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SignaturePropertyType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2SignaturePropertyType {
+	/* attribute: Target {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2SignaturePropertyType_Target_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Target ;
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2SignaturePropertyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2SignaturePropertyType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso2TransformType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso2TransformType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2TransformType_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2TransformType_XPath_ARRAY_SIZE 1
+struct iso2TransformType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2TransformType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2TransformType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":XPath, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso2TransformType_XPath_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso2TransformType_XPath_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} XPath;
+};
+
+typedef enum {
+	iso2EVSENotificationType_StopCharging = 0,
+	iso2EVSENotificationType_ReNegotiation = 1
+} iso2EVSENotificationType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EMAIDType',  base type name='eMAIDType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso2EMAIDType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EMAIDType_CONTENT_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2EMAIDType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2EMAIDType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* simple content: urn:iso:15118:2:2016:MsgDataTypes,eMAIDType */
+	struct {
+		exi_string_character_t characters[iso2EMAIDType_CONTENT_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+#define iso2DSAKeyValueType_P_BYTES_SIZE 350
+#define iso2DSAKeyValueType_Q_BYTES_SIZE 350
+#define iso2DSAKeyValueType_G_BYTES_SIZE 350
+#define iso2DSAKeyValueType_Y_BYTES_SIZE 350
+#define iso2DSAKeyValueType_J_BYTES_SIZE 350
+#define iso2DSAKeyValueType_Seed_BYTES_SIZE 350
+#define iso2DSAKeyValueType_PgenCounter_BYTES_SIZE 350
+struct iso2DSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":P, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	unsigned int P_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Q, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	unsigned int Q_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":G, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	unsigned int G_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Y, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":J, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	unsigned int J_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Seed, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	unsigned int Seed_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PgenCounter, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[iso2DSAKeyValueType_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	unsigned int PgenCounter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EntryType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval)',  derivedBy='RESTRICTION'.  */
+struct iso2EntryType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,RelativeTimeIntervalType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":start,"urn:iso:15118:2:2016:MsgDataTypes":duration{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2RelativeTimeIntervalType RelativeTimeInterval ;
+};
+
+typedef enum {
+	iso2valueType_bool = 0,
+	iso2valueType_byte = 1,
+	iso2valueType_short = 2,
+	iso2valueType_int = 3,
+	iso2valueType_physicalValue = 4,
+	iso2valueType_string = 5
+} iso2valueType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,V2GRequestType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2V2GRequestType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEEnergyTransferParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2EVSEEnergyTransferParameterType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,MeteringReceiptReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":SessionID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo)',  derivedBy='EXTENSION'.  */
+#define iso2MeteringReceiptReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2MeteringReceiptReqType_SessionID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,sessionIDType is 8 */
+struct iso2MeteringReceiptReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2MeteringReceiptReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SessionID, urn:iso:15118:2:2016:MsgDataTypes,sessionIDType */
+	struct {
+		uint8_t bytes[iso2MeteringReceiptReqType_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeterInfoType MeterInfo ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+#define iso2KeyValueType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2KeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DSAKeyValueType DSAKeyValue ;
+	unsigned int DSAKeyValue_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+	struct iso2RSAKeyValueType RSAKeyValue ;
+	unsigned int RSAKeyValue_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2KeyValueType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+typedef enum {
+	iso2EVCheckInStatusType_CheckIn = 0,
+	iso2EVCheckInStatusType_Processing = 1,
+	iso2EVCheckInStatusType_Completed = 2
+} iso2EVCheckInStatusType;
+
+typedef enum {
+	iso2mechanicalChargingDeviceStatusType_Home = 0,
+	iso2mechanicalChargingDeviceStatusType_Moving = 1,
+	iso2mechanicalChargingDeviceStatusType_EndPosition = 2
+} iso2mechanicalChargingDeviceStatusType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2BodyBaseType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,AuthorizationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":GenChallenge{0-1})',  derivedBy='EXTENSION'.  */
+#define iso2AuthorizationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2AuthorizationReqType_GenChallenge_BYTES_SIZE 16 /* XML schema facet length for urn:iso:15118:2:2016:MsgDataTypes,genChallengeType is 16 */
+struct iso2AuthorizationReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2AuthorizationReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":GenChallenge, urn:iso:15118:2:2016:MsgDataTypes,genChallengeType */
+	struct {
+		uint8_t bytes[iso2AuthorizationReqType_GenChallenge_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  GenChallenge ;
+	unsigned int GenChallenge_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso2SPKIDataType_SPKISexp_BYTES_SIZE 350
+#define iso2SPKIDataType_SPKISexp_ARRAY_SIZE 1
+#define iso2SPKIDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2SPKIDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKISexp, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso2SPKIDataType_SPKISexp_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso2SPKIDataType_SPKISexp_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKISexp;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2SPKIDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2SignatureMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso2SignatureMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2SignatureMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2SignatureMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":HMACOutputLength, http://www.w3.org/2000/09/xmldsig#,HMACOutputLengthType */
+	int64_t HMACOutputLength ;
+	unsigned int HMACOutputLength_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2SignatureMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,WeldingDetectionReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+struct iso2WeldingDetectionReqType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,SessionSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVCCID)',  derivedBy='EXTENSION'.  */
+#define iso2SessionSetupReqType_EVCCID_BYTES_SIZE 6 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evccIDType is 6 */
+struct iso2SessionSetupReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVCCID, urn:iso:15118:2:2016:MsgDataTypes,evccIDType */
+	struct {
+		uint8_t bytes[iso2SessionSetupReqType_EVCCID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVCCID ;
+};
+
+typedef enum {
+	iso2chargeProgressType_Start = 0,
+	iso2chargeProgressType_Stop = 1,
+	iso2chargeProgressType_Renegotiate = 2
+} iso2chargeProgressType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2CanonicalizationMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso2CanonicalizationMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2CanonicalizationMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2CanonicalizationMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[iso2CanonicalizationMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+struct iso2PhysicalValueType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Exponent, urn:iso:15118:2:2016:MsgDataTypes,exponentType */
+	int8_t Exponent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Value, http://www.w3.org/2001/XMLSchema,short */
+	int16_t Value ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,SystemStatusReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":OperationMode,"urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus)',  derivedBy='EXTENSION'.  */
+struct iso2SystemStatusReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":OperationMode, urn:iso:15118:2:2016:MsgDataTypes,operationModeType */
+	iso2operationModeType OperationMode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,mechanicalChargingDeviceStatusType */
+	iso2mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEFinePositioningSetupParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2EVSEFinePositioningSetupParametersType {
+	int noContent; /* avoid warning */
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEFinePositioningParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2EVSEFinePositioningParametersType {
+	int noContent; /* avoid warning */
+};
+
+typedef enum {
+	iso2FODStatusType_ObjectOnPad = 0,
+	iso2FODStatusType_PadClear = 1,
+	iso2FODStatusType_UnknownError = 2
+} iso2FODStatusType;
+
+typedef enum {
+	iso2costKindType_relativePricePercentage = 0,
+	iso2costKindType_RenewableGenerationPercentage = 1,
+	iso2costKindType_CarbonDioxideEmission = 2
+} iso2costKindType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2DigestMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR
+#define iso2DigestMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2DigestMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2DigestMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2DigestMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,TargetPositionType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":TargetOffsetX,"urn:iso:15118:2:2016:MsgDataTypes":TargetOffsetY)',  derivedBy='RESTRICTION'.  */
+struct iso2TargetPositionType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":TargetOffsetX, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t TargetOffsetX ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":TargetOffsetY, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t TargetOffsetY ;
+};
+
+typedef enum {
+	iso2EVOperationType_Charge = 0,
+	iso2EVOperationType_BPT = 1
+} iso2EVOperationType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVChargeParameterType',  base type name='EVEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2DC_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	unsigned int EVMaximumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargePower ;
+	unsigned int EVMinimumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	unsigned int EVTargetEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t CurrentSOC ;
+	unsigned int CurrentSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":TargetSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t TargetSOC ;
+	unsigned int TargetSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":BulkSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t BulkSOC ;
+	unsigned int BulkSOC_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDetailReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ServiceID)',  derivedBy='EXTENSION'.  */
+struct iso2ServiceDetailReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ServiceID, urn:iso:15118:2:2016:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PreChargeReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2016:MsgBody":EVTargetCurrent)',  derivedBy='EXTENSION'.  */
+struct iso2PreChargeReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetCurrent ;
+};
+
+typedef enum {
+	iso2serviceCategoryType_EVCharging = 0,
+	iso2serviceCategoryType_Internet = 1,
+	iso2serviceCategoryType_ContractCertificate = 2,
+	iso2serviceCategoryType_OtherCustom = 3
+} iso2serviceCategoryType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CartesianCoordinatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":XCoordinate,"urn:iso:15118:2:2016:MsgDataTypes":YCoordinate,"urn:iso:15118:2:2016:MsgDataTypes":ZCoordinate)',  derivedBy='RESTRICTION'.  */
+struct iso2CartesianCoordinatesType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":XCoordinate, http://www.w3.org/2001/XMLSchema,short */
+	int16_t XCoordinate ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":YCoordinate, http://www.w3.org/2001/XMLSchema,short */
+	int16_t YCoordinate ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ZCoordinate, http://www.w3.org/2001/XMLSchema,short */
+	int16_t ZCoordinate ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SubCertificatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate{1-4})',  derivedBy='RESTRICTION'.  */
+#define iso2SubCertificatesType_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,certificateType is 800 */
+#define iso2SubCertificatesType_Certificate_ARRAY_SIZE 4
+struct iso2SubCertificatesType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Certificate, urn:iso:15118:2:2016:MsgDataTypes,certificateType */
+	struct {
+		struct {
+		uint8_t bytes[iso2SubCertificatesType_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  array[iso2SubCertificatesType_Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Certificate;
+};
+
+typedef enum {
+	iso2parkingMethodType_AutoParking = 0,
+	iso2parkingMethodType_MVGuideManual = 1,
+	iso2parkingMethodType_Manual = 2
+} iso2parkingMethodType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVEnergyTransferParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime)',  derivedBy='RESTRICTION'.  */
+struct iso2EVEnergyTransferParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ContractSignatureEncryptedPrivateKeyType',  base type name='encryptedPrivateKeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso2ContractSignatureEncryptedPrivateKeyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ContractSignatureEncryptedPrivateKeyType_CONTENT_BYTES_SIZE 350
+struct iso2ContractSignatureEncryptedPrivateKeyType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2ContractSignatureEncryptedPrivateKeyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* simple content: urn:iso:15118:2:2016:MsgDataTypes,encryptedPrivateKeyType */
+	struct {
+		uint8_t bytes[iso2ContractSignatureEncryptedPrivateKeyType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorSetupListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetup{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2MagneticVectorSetupListType_MagneticVectorSetup_ARRAY_SIZE 5
+struct iso2MagneticVectorSetupListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetup, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorSetupType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GAID,"urn:iso:15118:2:2016:MsgDataTypes":FrequencyChannel)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2MagneticVectorSetupType array[iso2MagneticVectorSetupListType_MagneticVectorSetup_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MagneticVectorSetup;
+};
+
+typedef enum {
+	iso2responseCodeType_OK = 0,
+	iso2responseCodeType_OK_NewSessionEstablished = 1,
+	iso2responseCodeType_OK_OldSessionJoined = 2,
+	iso2responseCodeType_OK_CertificateExpiresSoon = 3,
+	iso2responseCodeType_OK_IsolationValid = 4,
+	iso2responseCodeType_OK_IsolationWarning = 5,
+	iso2responseCodeType_WARNING_CertificateExpired = 6,
+	iso2responseCodeType_WARNING_NoCertificateAvailable = 7,
+	iso2responseCodeType_WARNING_CertValidationError = 8,
+	iso2responseCodeType_WARNING_CertVerificationError = 9,
+	iso2responseCodeType_WARNING_ContractCanceled = 10,
+	iso2responseCodeType_FAILED = 11,
+	iso2responseCodeType_FAILED_SequenceError = 12,
+	iso2responseCodeType_FAILED_ServiceIDInvalid = 13,
+	iso2responseCodeType_FAILED_UnknownSession = 14,
+	iso2responseCodeType_FAILED_ServiceSelectionInvalid = 15,
+	iso2responseCodeType_FAILED_SignatureError = 16,
+	iso2responseCodeType_FAILED_PaymentSelectionInvalid = 17,
+	iso2responseCodeType_FAILED_ChallengeInvalid = 18,
+	iso2responseCodeType_FAILED_WrongChargeParameter = 19,
+	iso2responseCodeType_FAILED_IsolationFault = 20,
+	iso2responseCodeType_FAILED_PowerDeliveryNotApplied = 21,
+	iso2responseCodeType_FAILED_TariffSelectionInvalid = 22,
+	iso2responseCodeType_FAILED_ChargingProfileInvalid = 23,
+	iso2responseCodeType_FAILED_MeteringSignatureNotValid = 24,
+	iso2responseCodeType_FAILED_NoChargeServiceSelected = 25,
+	iso2responseCodeType_FAILED_WrongEnergyTransferMode = 26,
+	iso2responseCodeType_FAILED_ContactorError = 27,
+	iso2responseCodeType_FAILED_CertificateRevoked = 28,
+	iso2responseCodeType_FAILED_CertificateNotYetValid = 29
+} iso2responseCodeType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+#define iso2X509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2X509IssuerSerialType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[iso2X509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SerialNumber, http://www.w3.org/2001/XMLSchema,integer */
+	int64_t X509SerialNumber ;
+};
+
+typedef enum {
+	iso2chargingSessionType_Terminate = 0,
+	iso2chargingSessionType_Pause = 1
+} iso2chargingSessionType;
+
+typedef enum {
+	iso2EVSEProcessingType_Finished = 0,
+	iso2EVSEProcessingType_Ongoing = 1,
+	iso2EVSEProcessingType_Ongoing_WaitingForCustomerInteraction = 2
+} iso2EVSEProcessingType;
+
+typedef enum {
+	iso2paymentOptionType_Contract = 0,
+	iso2paymentOptionType_ExternalPayment = 1
+} iso2paymentOptionType;
+
+typedef enum {
+	iso2EVSECheckOutStatusType_Scheduled = 0,
+	iso2EVSECheckOutStatusType_Completed = 1
+} iso2EVSECheckOutStatusType;
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+#define iso2PGPDataType_PGPKeyID_BYTES_SIZE 350
+#define iso2PGPDataType_PGPKeyPacket_BYTES_SIZE 350
+#define iso2PGPDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2PGPDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyID, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[iso2PGPDataType_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	unsigned int PGPKeyID_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[iso2PGPDataType_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	unsigned int PGPKeyPacket_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2PGPDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceIDListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID{1-10})',  derivedBy='RESTRICTION'.  */
+#define iso2ServiceIDListType_ServiceID_ARRAY_SIZE 10
+struct iso2ServiceIDListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ServiceID, urn:iso:15118:2:2016:MsgDataTypes,serviceIDType */
+	struct {
+		uint16_t array[iso2ServiceIDListType_ServiceID_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ServiceID;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVFinePositioningSetupParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+struct iso2EVFinePositioningSetupParametersType {
+	int noContent; /* avoid warning */
+};
+
+typedef enum {
+	iso2EVCheckOutStatusType_CheckOut = 0,
+	iso2EVCheckOutStatusType_Processing = 1,
+	iso2EVCheckOutStatusType_Completed = 2
+} iso2EVCheckOutStatusType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorID,"urn:iso:15118:2:2016:MsgDataTypes":SensorPosition,"urn:iso:15118:2:2016:MsgDataTypes":SensorOrientation)',  derivedBy='RESTRICTION'.  */
+struct iso2SensorType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorID, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t SensorID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorPosition, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CartesianCoordinatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":XCoordinate,"urn:iso:15118:2:2016:MsgDataTypes":YCoordinate,"urn:iso:15118:2:2016:MsgDataTypes":ZCoordinate)',  derivedBy='RESTRICTION'.  */
+	struct iso2CartesianCoordinatesType SensorPosition ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorOrientation, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CartesianCoordinatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":XCoordinate,"urn:iso:15118:2:2016:MsgDataTypes":YCoordinate,"urn:iso:15118:2:2016:MsgDataTypes":ZCoordinate)',  derivedBy='RESTRICTION'.  */
+	struct iso2CartesianCoordinatesType SensorOrientation ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso2SignatureValueType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SignatureValueType_CONTENT_BYTES_SIZE 350
+struct iso2SignatureValueType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2SignatureValueType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* simple content: http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[iso2SignatureValueType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CableCheckReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+struct iso2CableCheckReqType {
+	int noContent; /* avoid warning */
+};
+
+typedef enum {
+	iso2electricalChargingDeviceStatusType_Connected = 0,
+	iso2electricalChargingDeviceStatusType_Disconnected = 1
+} iso2electricalChargingDeviceStatusType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID,"urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID)',  derivedBy='RESTRICTION'.  */
+struct iso2SelectedServiceType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ServiceID, urn:iso:15118:2:2016:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t ParameterSetID ;
+};
+
+typedef enum {
+	iso2EVSEErrorCodeType_RESSTemperatureInhibit = 0,
+	iso2EVSEErrorCodeType_ChargerConnectorLockFault = 1,
+	iso2EVSEErrorCodeType_ChargingCurrentdifferential = 2,
+	iso2EVSEErrorCodeType_ChargingVoltageOutOfRange = 3,
+	iso2EVSEErrorCodeType_ChargingSystemIncompatibility = 4,
+	iso2EVSEErrorCodeType_Reserved_A = 5,
+	iso2EVSEErrorCodeType_Reserved_B = 6,
+	iso2EVSEErrorCodeType_Reserved_C = 7
+} iso2EVSEErrorCodeType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DiffieHellmanPublickeyType',  base type name='dHpublickeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define iso2DiffieHellmanPublickeyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2DiffieHellmanPublickeyType_CONTENT_BYTES_SIZE 350
+struct iso2DiffieHellmanPublickeyType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2DiffieHellmanPublickeyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* simple content: urn:iso:15118:2:2016:MsgDataTypes,dHpublickeyType */
+	struct {
+		uint8_t bytes[iso2DiffieHellmanPublickeyType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+struct iso2EVSEStatusType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t NotificationMaxDelay ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSENotification, urn:iso:15118:2:2016:MsgDataTypes,EVSENotificationType */
+	iso2EVSENotificationType EVSENotification ;
+};
+
+typedef enum {
+	iso2EVErrorCodeType_RESSTemperatureInhibit = 0,
+	iso2EVErrorCodeType_EVShiftPosition = 1,
+	iso2EVErrorCodeType_ChargerConnectorLockFault = 2,
+	iso2EVErrorCodeType_EVRESSMalfunction = 3,
+	iso2EVErrorCodeType_ChargingCurrentdifferential = 4,
+	iso2EVErrorCodeType_ChargingVoltageOutOfRange = 5,
+	iso2EVErrorCodeType_ChargingSystemIncompatibility = 6,
+	iso2EVErrorCodeType_Reserved_A = 7,
+	iso2EVErrorCodeType_Reserved_B = 8,
+	iso2EVErrorCodeType_Reserved_C = 9
+} iso2EVErrorCodeType;
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,AuthorizationResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing))',  derivedBy='EXTENSION'.  */
+struct iso2AuthorizationResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MV_EVSEFinePositioningSetupParametersType',  base type name='EVSEFinePositioningSetupParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":FrequencyChannel{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetupList{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2MV_EVSEFinePositioningSetupParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":FrequencyChannel, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t FrequencyChannel ;
+	unsigned int FrequencyChannel_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetupList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorSetupListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetup{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2MagneticVectorSetupListType MagneticVectorSetupList ;
+	unsigned int MagneticVectorSetupList_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso2X509DataType_X509IssuerSerial_ARRAY_SIZE 1
+#define iso2X509DataType_X509SKI_BYTES_SIZE 350
+#define iso2X509DataType_X509SKI_ARRAY_SIZE 1
+#define iso2X509DataType_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2X509DataType_X509SubjectName_ARRAY_SIZE 1
+#define iso2X509DataType_X509Certificate_BYTES_SIZE 350
+#define iso2X509DataType_X509Certificate_ARRAY_SIZE 1
+#define iso2X509DataType_X509CRL_BYTES_SIZE 350
+#define iso2X509DataType_X509CRL_ARRAY_SIZE 1
+#define iso2X509DataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2X509DataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2X509IssuerSerialType array[iso2X509DataType_X509IssuerSerial_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509IssuerSerial;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SKI, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso2X509DataType_X509SKI_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso2X509DataType_X509SKI_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SKI;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SubjectName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso2X509DataType_X509SubjectName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso2X509DataType_X509SubjectName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SubjectName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Certificate, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso2X509DataType_X509Certificate_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso2X509DataType_X509Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Certificate;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509CRL, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[iso2X509DataType_X509CRL_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[iso2X509DataType_X509CRL_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509CRL;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2X509DataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,DC_BidirectionalControlResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2016:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumDischargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumChargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumVoltage{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMinimumVoltage{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1}))',  derivedBy='EXTENSION'.  */
+#define iso2DC_BidirectionalControlResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+struct iso2DC_BidirectionalControlResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPresentCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPresentCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPresentVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPowerLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEPowerLimitAchieved ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSECurrentLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSECurrentLimitAchieved ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEVoltageLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEVoltageLimitAchieved ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargePower ;
+	unsigned int EVSEMaximumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumDischargePower ;
+	unsigned int EVSEMaximumDischargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargeCurrent ;
+	unsigned int EVSEMaximumChargeCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumDischargeCurrent ;
+	unsigned int EVSEMaximumDischargeCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumVoltage ;
+	unsigned int EVSEMaximumVoltage_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMinimumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumVoltage ;
+	unsigned int EVSEMinimumVoltage_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEID, urn:iso:15118:2:2016:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso2DC_BidirectionalControlResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":costKind,"urn:iso:15118:2:2016:MsgDataTypes":amount)',  derivedBy='RESTRICTION'.  */
+struct iso2CostType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":costKind, urn:iso:15118:2:2016:MsgDataTypes,costKindType */
+	iso2costKindType costKind ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":amount, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType amount ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ChargingStatusResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1},"urn:iso:15118:2:2016:MsgBody":EVSETargetPower{0-1}))',  derivedBy='EXTENSION'.  */
+#define iso2ChargingStatusResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+struct iso2ChargingStatusResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEID, urn:iso:15118:2:2016:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso2ChargingStatusResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSETargetPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSETargetPower ;
+	unsigned int EVSETargetPower_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVChargeParameterType',  base type name='EVEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage))',  derivedBy='EXTENSION'.  */
+struct iso2AC_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	unsigned int EVTargetEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVSEBidirectionalParameterType',  base type name='AC_EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency),("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency))',  derivedBy='EXTENSION'.  */
+struct iso2AC_EVSEBidirectionalParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSENominalVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSENominalVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSENominalFrequency ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumDischargeCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckOutResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSECheckOutStatus))',  derivedBy='EXTENSION'.  */
+struct iso2VehicleCheckOutResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSECheckOutStatus, urn:iso:15118:2:2016:MsgDataTypes,EVCheckOutStatusType */
+	iso2EVCheckOutStatusType EVSECheckOutStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CableCheckResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing))',  derivedBy='EXTENSION'.  */
+struct iso2CableCheckResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":SupportedServiceIDs{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2ServiceDiscoveryReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":SupportedServiceIDs, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceIDListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID{1-10})',  derivedBy='RESTRICTION'.  */
+	struct iso2ServiceIDListType SupportedServiceIDs ;
+	unsigned int SupportedServiceIDs_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2SignaturePropertiesType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SignaturePropertiesType_SignatureProperty_ARRAY_SIZE 1
+struct iso2SignaturePropertiesType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2SignaturePropertiesType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureProperty, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SignaturePropertyType array[iso2SignaturePropertiesType_SignatureProperty_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SignatureProperty;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval),("urn:iso:15118:2:2016:MsgDataTypes":PMax{1-3}))',  derivedBy='EXTENSION'.  */
+#define iso2PMaxScheduleEntryType_PMax_ARRAY_SIZE 3
+struct iso2PMaxScheduleEntryType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,RelativeTimeIntervalType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":start,"urn:iso:15118:2:2016:MsgDataTypes":duration{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2RelativeTimeIntervalType RelativeTimeInterval ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PMax, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2PhysicalValueType array[iso2PMaxScheduleEntryType_PMax_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PMax;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckInReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVCheckInStatus,"urn:iso:15118:2:2016:MsgBody":ParkingMethod{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2VehicleCheckInReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVCheckInStatus, urn:iso:15118:2:2016:MsgDataTypes,EVCheckInStatusType */
+	iso2EVCheckInStatusType EVCheckInStatus ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ParkingMethod, urn:iso:15118:2:2016:MsgDataTypes,parkingMethodType */
+	iso2parkingMethodType ParkingMethod ;
+	unsigned int ParkingMethod_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ConnectChargingDeviceResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":EVSEElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus))',  derivedBy='EXTENSION'.  */
+struct iso2ConnectChargingDeviceResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEElectricalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,electricalChargingDeviceStatusType */
+	iso2electricalChargingDeviceStatusType EVSEElectricalChargingDeviceStatus ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,mechanicalChargingDeviceStatusType */
+	iso2mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,WeldingDetectionResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage))',  derivedBy='EXTENSION'.  */
+struct iso2WeldingDetectionResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPresentVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,SessionStopResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2SessionStopResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckInResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":VehicleSpace,"urn:iso:15118:2:2016:MsgBody":TargetOffset{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2VehicleCheckInResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":VehicleSpace, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t VehicleSpace ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":TargetOffset, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,TargetPositionType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":TargetOffsetX,"urn:iso:15118:2:2016:MsgDataTypes":TargetOffsetY)',  derivedBy='RESTRICTION'.  */
+	struct iso2TargetPositionType TargetOffset ;
+	unsigned int TargetOffset_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVBidirectionalParameterType',  base type name='AC_EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage)),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargeCurrent))',  derivedBy='EXTENSION'.  */
+struct iso2AC_EVBidirectionalParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	unsigned int EVTargetEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumDischargeCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ConsumptionCostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":startValue,"urn:iso:15118:2:2016:MsgDataTypes":Cost{1-3})',  derivedBy='RESTRICTION'.  */
+#define iso2ConsumptionCostType_Cost_ARRAY_SIZE 3
+struct iso2ConsumptionCostType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":startValue, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType startValue ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Cost, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":costKind,"urn:iso:15118:2:2016:MsgDataTypes":amount)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2CostType array[iso2ConsumptionCostType_Cost_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Cost;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PaymentOptionListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PaymentOption{1-2})',  derivedBy='RESTRICTION'.  */
+#define iso2PaymentOptionListType_PaymentOption_ARRAY_SIZE 2
+struct iso2PaymentOptionListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PaymentOption, urn:iso:15118:2:2016:MsgDataTypes,paymentOptionType */
+	struct {
+		iso2paymentOptionType array[iso2PaymentOptionListType_PaymentOption_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PaymentOption;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2TransformsType_Transform_ARRAY_SIZE 1
+struct iso2TransformsType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transform, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2TransformType array[iso2TransformsType_Transform_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Transform;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":boolValue|"urn:iso:15118:2:2016:MsgDataTypes":byteValue|"urn:iso:15118:2:2016:MsgDataTypes":shortValue|"urn:iso:15118:2:2016:MsgDataTypes":intValue|"urn:iso:15118:2:2016:MsgDataTypes":physicalValue|"urn:iso:15118:2:2016:MsgDataTypes":stringValue)',  derivedBy='RESTRICTION'.  */
+#define iso2ParameterType_Name_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ParameterType_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2ParameterType {
+	/* attribute: Name {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[iso2ParameterType_Name_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Name ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":boolValue, http://www.w3.org/2001/XMLSchema,boolean */
+	int boolValue ;
+	unsigned int boolValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":byteValue, http://www.w3.org/2001/XMLSchema,byte */
+	int8_t byteValue ;
+	unsigned int byteValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":shortValue, http://www.w3.org/2001/XMLSchema,short */
+	int16_t shortValue ;
+	unsigned int shortValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":intValue, http://www.w3.org/2001/XMLSchema,int */
+	int32_t intValue ;
+	unsigned int intValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":physicalValue, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType physicalValue ;
+	unsigned int physicalValue_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":stringValue, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[iso2ParameterType_stringValue_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  stringValue ;
+	unsigned int stringValue_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,SessionStopReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ChargingSession)',  derivedBy='EXTENSION'.  */
+struct iso2SessionStopReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ChargingSession, urn:iso:15118:2:2016:MsgDataTypes,chargingSessionType */
+	iso2chargingSessionType ChargingSession ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorMeasurementsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorID,"urn:iso:15118:2:2016:MsgDataTypes":EffectiveRadiatedPower,"urn:iso:15118:2:2016:MsgDataTypes":MeasurementDataList)',  derivedBy='RESTRICTION'.  */
+struct iso2SensorMeasurementsType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorID, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t SensorID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EffectiveRadiatedPower, http://www.w3.org/2001/XMLSchema,byte */
+	int8_t EffectiveRadiatedPower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MeasurementDataList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeasurementDataListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeasurementData{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeasurementDataListType MeasurementDataList ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVSEChargeParameterType',  base type name='EVSEEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2DC_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSECurrentRegulationTolerance, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSECurrentRegulationTolerance ;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEPeakCurrentRipple, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPeakCurrentRipple ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyToBeDelivered, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEEnergyToBeDelivered ;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso2CertificateChainType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2CertificateChainType_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,certificateType is 800 */
+struct iso2CertificateChainType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2CertificateChainType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Certificate, urn:iso:15118:2:2016:MsgDataTypes,certificateType */
+	struct {
+		uint8_t bytes[iso2CertificateChainType_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Certificate ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SubCertificates, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SubCertificatesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate{1-4})',  derivedBy='RESTRICTION'.  */
+	struct iso2SubCertificatesType SubCertificates ;
+	unsigned int SubCertificates_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,WPT_EVChargeParameterType',  base type name='EVEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumPower,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumPower,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2WPT_EVChargeParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumPower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumPower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	unsigned int EVTargetEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,DisconnectChargingDeviceReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus)',  derivedBy='EXTENSION'.  */
+struct iso2DisconnectChargingDeviceReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVElectricalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,electricalChargingDeviceStatusType */
+	iso2electricalChargingDeviceStatusType EVElectricalChargingDeviceStatus ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,mechanicalChargingDeviceStatusType */
+	iso2mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,MeteringReceiptResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2MeteringReceiptResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,SessionSetupResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":EVSETimeStamp{0-1}))',  derivedBy='EXTENSION'.  */
+#define iso2SessionSetupResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+struct iso2SessionSetupResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEID, urn:iso:15118:2:2016:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso2SessionSetupResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSETimeStamp, http://www.w3.org/2001/XMLSchema,long */
+	int64_t EVSETimeStamp ;
+	unsigned int EVSETimeStamp_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+#define iso2ReferenceType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ReferenceType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ReferenceType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ReferenceType_DigestValue_BYTES_SIZE 350
+struct iso2ReferenceType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2ReferenceType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2ReferenceType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2ReferenceType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2TransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2DigestMethodType DigestMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestValue, http://www.w3.org/2000/09/xmldsig#,DigestValueType */
+	struct {
+		uint8_t bytes[iso2ReferenceType_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Sensor{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2SensorListType_Sensor_ARRAY_SIZE 5
+struct iso2SensorListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Sensor, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorID,"urn:iso:15118:2:2016:MsgDataTypes":SensorPosition,"urn:iso:15118:2:2016:MsgDataTypes":SensorOrientation)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SensorType array[iso2SensorListType_Sensor_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Sensor;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVFinePositioningSetupParametersType',  base type name='EVFinePositioningSetupParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSensors,"urn:iso:15118:2:2016:MsgDataTypes":SensorList,"urn:iso:15118:2:2016:MsgDataTypes":SensorOrder,"urn:iso:15118:2:2016:MsgDataTypes":SignalPulseDuration,"urn:iso:15118:2:2016:MsgDataTypes":SignalSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":PackageSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":AlignmentOffset)',  derivedBy='EXTENSION'.  */
+struct iso2LFA_EVFinePositioningSetupParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":NumberOfSensors, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumberOfSensors ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Sensor{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2SensorListType SensorList ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorOrder, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorOrderListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorPosition{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2SensorOrderListType SensorOrder ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SignalPulseDuration, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t SignalPulseDuration ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SignalSeparationTime, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t SignalSeparationTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PackageSeparationTime, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t PackageSeparationTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AlignmentOffset, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t AlignmentOffset ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,WPT_EVSEChargeParameterType',  base type name='EVSEEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumPower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumPower)',  derivedBy='EXTENSION'.  */
+struct iso2WPT_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumPower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumPower ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+#define iso2ParameterSetType_Parameter_ARRAY_SIZE 16
+struct iso2ParameterSetType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t ParameterSetID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Parameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":boolValue|"urn:iso:15118:2:2016:MsgDataTypes":byteValue|"urn:iso:15118:2:2016:MsgDataTypes":shortValue|"urn:iso:15118:2:2016:MsgDataTypes":intValue|"urn:iso:15118:2:2016:MsgDataTypes":physicalValue|"urn:iso:15118:2:2016:MsgDataTypes":stringValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ParameterType array[iso2ParameterSetType_Parameter_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Parameter;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentDetailsResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":GenChallenge,"urn:iso:15118:2:2016:MsgBody":EVSETimeStamp))',  derivedBy='EXTENSION'.  */
+#define iso2PaymentDetailsResType_GenChallenge_BYTES_SIZE 16 /* XML schema facet length for urn:iso:15118:2:2016:MsgDataTypes,genChallengeType is 16 */
+struct iso2PaymentDetailsResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":GenChallenge, urn:iso:15118:2:2016:MsgDataTypes,genChallengeType */
+	struct {
+		uint8_t bytes[iso2PaymentDetailsResType_GenChallenge_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  GenChallenge ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSETimeStamp, http://www.w3.org/2001/XMLSchema,long */
+	int64_t EVSETimeStamp ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,AC_BidirectionalControlResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":EVSETargetPower,"urn:iso:15118:2:2016:MsgBody":EVSETargetReactivePower,"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1}))',  derivedBy='EXTENSION'.  */
+#define iso2AC_BidirectionalControlResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+struct iso2AC_BidirectionalControlResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSETargetPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSETargetPower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSETargetReactivePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSETargetReactivePower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEID, urn:iso:15118:2:2016:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso2AC_BidirectionalControlResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckOutReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVCheckOutStatus,"urn:iso:15118:2:2016:MsgBody":CheckOutTime)',  derivedBy='EXTENSION'.  */
+struct iso2VehicleCheckOutReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVCheckOutStatus, urn:iso:15118:2:2016:MsgDataTypes,EVCheckOutStatusType */
+	iso2EVCheckOutStatusType EVCheckOutStatus ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":CheckOutTime, http://www.w3.org/2001/XMLSchema,unsignedLong */
+	uint64_t CheckOutTime ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,AlignmentCheckResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":AlignmentCheckParameters{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2AlignmentCheckResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":AlignmentCheckParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType AlignmentCheckParameters ;
+	unsigned int AlignmentCheckParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MinimumPMaxRequestType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MinimumPMaxScheduleEntry{1-3})',  derivedBy='RESTRICTION'.  */
+#define iso2MinimumPMaxRequestType_MinimumPMaxScheduleEntry_ARRAY_SIZE 3
+struct iso2MinimumPMaxRequestType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MinimumPMaxScheduleEntry, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval),("urn:iso:15118:2:2016:MsgDataTypes":PMax{1-3}))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct iso2PMaxScheduleEntryType array[iso2MinimumPMaxRequestType_MinimumPMaxScheduleEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MinimumPMaxScheduleEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,DisconnectChargingDeviceResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":EVSEElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus))',  derivedBy='EXTENSION'.  */
+struct iso2DisconnectChargingDeviceResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEElectricalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,electricalChargingDeviceStatusType */
+	iso2electricalChargingDeviceStatusType EVSEElectricalChargingDeviceStatus ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,mechanicalChargingDeviceStatusType */
+	iso2mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentDetailsReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":eMAID,"urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain)',  derivedBy='EXTENSION'.  */
+#define iso2PaymentDetailsReqType_eMAID_CHARACTERS_SIZE 15 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,eMAIDType is 15 */
+struct iso2PaymentDetailsReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":eMAID, urn:iso:15118:2:2016:MsgDataTypes,eMAIDType */
+	struct {
+		exi_string_character_t characters[iso2PaymentDetailsReqType_eMAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  eMAID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2CertificateChainType ContractSignatureCertChain ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,Generic_EVFinePositioningParametersType',  base type name='EVFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GenericParameters)',  derivedBy='EXTENSION'.  */
+struct iso2Generic_EVFinePositioningParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":GenericParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType GenericParameters ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ConnectChargingDeviceReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus)',  derivedBy='EXTENSION'.  */
+struct iso2ConnectChargingDeviceReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVElectricalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,electricalChargingDeviceStatusType */
+	iso2electricalChargingDeviceStatusType EVElectricalChargingDeviceStatus ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,mechanicalChargingDeviceStatusType */
+	iso2mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVSEChargeParameterType',  base type name='EVSEEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency)',  derivedBy='EXTENSION'.  */
+struct iso2AC_EVSEChargeParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSENominalVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSENominalVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSENominalFrequency ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SalesTariffEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval),("urn:iso:15118:2:2016:MsgDataTypes":EPriceLevel{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ConsumptionCost{0-3}))',  derivedBy='EXTENSION'.  */
+#define iso2SalesTariffEntryType_ConsumptionCost_ARRAY_SIZE 3
+struct iso2SalesTariffEntryType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,RelativeTimeIntervalType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":start,"urn:iso:15118:2:2016:MsgDataTypes":duration{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2RelativeTimeIntervalType RelativeTimeInterval ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EPriceLevel, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t EPriceLevel ;
+	unsigned int EPriceLevel_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ConsumptionCost, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ConsumptionCostType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":startValue,"urn:iso:15118:2:2016:MsgDataTypes":Cost{1-3})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ConsumptionCostType array[iso2SalesTariffEntryType_ConsumptionCost_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ConsumptionCost;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVSEBidirectionalParameterType',  base type name='DC_EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyToBeDelivered{0-1}),("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumDischargeCurrent))',  derivedBy='EXTENSION'.  */
+struct iso2DC_EVSEBidirectionalParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSECurrentRegulationTolerance, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSECurrentRegulationTolerance ;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEPeakCurrentRipple, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPeakCurrentRipple ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyToBeDelivered, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEEnergyToBeDelivered ;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumDischargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumDischargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMinimumDischargeCurrent ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso2DisplayParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":CurrentRange, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t CurrentRange ;
+	unsigned int CurrentRange_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t CurrentSOC ;
+	unsigned int CurrentSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":TargetSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t TargetSOC ;
+	unsigned int TargetSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":BulkSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t BulkSOC ;
+	unsigned int BulkSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t MinimumSOC ;
+	unsigned int MinimumSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType ChargingPerformance ;
+	unsigned int ChargingPerformance_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t RemainingTimeToTargetSOC ;
+	unsigned int RemainingTimeToTargetSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t RemainingTimeToBulkSOC ;
+	unsigned int RemainingTimeToBulkSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t RemainingTimeToMinimumSOC ;
+	unsigned int RemainingTimeToMinimumSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int ChargingComplete ;
+	unsigned int ChargingComplete_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete, http://www.w3.org/2001/XMLSchema,boolean */
+	int BulkChargingComplete ;
+	unsigned int BulkChargingComplete_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":InletHot, http://www.w3.org/2001/XMLSchema,boolean */
+	int InletHot ;
+	unsigned int InletHot_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVBidirectionalParameterType',  base type name='DC_EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1})),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2DC_EVBidirectionalParameterType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DepartureTime, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t DepartureTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	unsigned int EVMaximumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargePower ;
+	unsigned int EVMinimumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	unsigned int EVTargetEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t CurrentSOC ;
+	unsigned int CurrentSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":TargetSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t TargetSOC ;
+	unsigned int TargetSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":BulkSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t BulkSOC ;
+	unsigned int BulkSOC_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargePower ;
+	unsigned int EVMaximumDischargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumDischargePower ;
+	unsigned int EVMinimumDischargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumDischargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVMinimumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC, urn:iso:15118:2:2016:MsgDataTypes,percentValueType */
+	int8_t MinimumSOC ;
+	unsigned int MinimumSOC_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GAID,"urn:iso:15118:2:2016:MsgDataTypes":Distance,"urn:iso:15118:2:2016:MsgDataTypes":AngleGAtoVA,"urn:iso:15118:2:2016:MsgDataTypes":RotationVAtoGA,"urn:iso:15118:2:2016:MsgDataTypes":FODStatus)',  derivedBy='RESTRICTION'.  */
+#define iso2MagneticVectorType_GAID_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2MagneticVectorType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":GAID, http://www.w3.org/2001/XMLSchema,ID */
+	struct {
+		exi_string_character_t characters[iso2MagneticVectorType_GAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  GAID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Distance, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t Distance ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AngleGAtoVA, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType AngleGAtoVA ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RotationVAtoGA, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType RotationVAtoGA ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":FODStatus, urn:iso:15118:2:2016:MsgDataTypes,FODStatusType */
+	iso2FODStatusType FODStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,SystemStatusResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":OperationMode,"urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus))',  derivedBy='EXTENSION'.  */
+struct iso2SystemStatusResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":OperationMode, urn:iso:15118:2:2016:MsgDataTypes,operationModeType */
+	iso2operationModeType OperationMode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus, urn:iso:15118:2:2016:MsgDataTypes,mechanicalChargingDeviceStatusType */
+	iso2mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,V2GResponseType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2V2GResponseType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PreChargeResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage))',  derivedBy='EXTENSION'.  */
+struct iso2PreChargeResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPresentVoltage ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentServiceSelectionResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2PaymentServiceSelectionResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2ManifestType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2ManifestType_Reference_ARRAY_SIZE 1
+struct iso2ManifestType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2ManifestType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ReferenceType array[iso2ManifestType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SelectedServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SelectedService{1-16})',  derivedBy='RESTRICTION'.  */
+#define iso2SelectedServiceListType_SelectedService_ARRAY_SIZE 16
+struct iso2SelectedServiceListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SelectedService, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID,"urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SelectedServiceType array[iso2SelectedServiceListType_SelectedService_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SelectedService;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,Generic_EVSEFinePositioningParametersType',  base type name='EVSEFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GenericParameters)',  derivedBy='EXTENSION'.  */
+struct iso2Generic_EVSEFinePositioningParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":GenericParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType GenericParameters ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":RootCertificateID{1-20})',  derivedBy='RESTRICTION'.  */
+#define iso2ListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE 20
+struct iso2ListOfRootCertificateIDsType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":RootCertificateID, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2X509IssuerSerialType array[iso2ListOfRootCertificateIDsType_RootCertificateID_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RootCertificateID;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PairingReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVProcessing,"urn:iso:15118:2:2016:MsgBody":PairingParameters{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2PairingReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":PairingParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType PairingParameters ;
+	unsigned int PairingParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CurrentDemandResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2016:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEMaximumPower{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumVoltage{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1}))',  derivedBy='EXTENSION'.  */
+#define iso2CurrentDemandResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+struct iso2CurrentDemandResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPresentCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPresentCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEPresentVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEPowerLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEPowerLimitAchieved ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSECurrentLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSECurrentLimitAchieved ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEVoltageLimitAchieved, http://www.w3.org/2001/XMLSchema,boolean */
+	int EVSEVoltageLimitAchieved ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumPower ;
+	unsigned int EVSEMaximumPower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumCurrent ;
+	unsigned int EVSEMaximumCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEMaximumVoltage ;
+	unsigned int EVSEMaximumVoltage_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEID, urn:iso:15118:2:2016:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso2CurrentDemandResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ChargingStatusReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumChargeCurrent{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2ChargingStatusReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DisplayParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DisplayParametersType DisplayParameters ;
+	unsigned int DisplayParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	unsigned int EVMaximumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	unsigned int EVMaximumChargeCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	unsigned int EVMinimumChargeCurrent_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateInstallationResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2016:MsgBody":DHpublickey,"urn:iso:15118:2:2016:MsgBody":eMAID))',  derivedBy='EXTENSION'.  */
+struct iso2CertificateInstallationResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAProvisioningCertificateChain, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2CertificateChainType SAProvisioningCertificateChain ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2CertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ContractSignatureEncryptedPrivateKey, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ContractSignatureEncryptedPrivateKeyType',  base type name='encryptedPrivateKeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DHpublickey, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DiffieHellmanPublickeyType',  base type name='dHpublickeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2DiffieHellmanPublickeyType DHpublickey ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":eMAID, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EMAIDType',  base type name='eMAIDType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2EMAIDType eMAID ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorPackageType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PackageIndex,"urn:iso:15118:2:2016:MsgDataTypes":SensorMeasurements{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2SensorPackageType_SensorMeasurements_ARRAY_SIZE 5
+struct iso2SensorPackageType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PackageIndex, http://www.w3.org/2001/XMLSchema,unsignedInt */
+	uint32_t PackageIndex ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorMeasurements, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorMeasurementsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorID,"urn:iso:15118:2:2016:MsgDataTypes":EffectiveRadiatedPower,"urn:iso:15118:2:2016:MsgDataTypes":MeasurementDataList)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SensorMeasurementsType array[iso2SensorPackageType_SensorMeasurements_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SensorMeasurements;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDiscoveryResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":PaymentOptionList,"urn:iso:15118:2:2016:MsgBody":EnergyTransferServiceList,"urn:iso:15118:2:2016:MsgBody":VASList{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2ServiceDiscoveryResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":PaymentOptionList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PaymentOptionListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PaymentOption{1-2})',  derivedBy='RESTRICTION'.  */
+	struct iso2PaymentOptionListType PaymentOptionList ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EnergyTransferServiceList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Service{1-8})',  derivedBy='RESTRICTION'.  */
+	struct iso2ServiceListType EnergyTransferServiceList ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":VASList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Service{1-8})',  derivedBy='RESTRICTION'.  */
+	struct iso2ServiceListType VASList ;
+	unsigned int VASList_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDemandResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEOutputPower,"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1},"urn:iso:15118:2:2016:MsgBody":PowerDemandParameters{0-1}))',  derivedBy='EXTENSION'.  */
+#define iso2PowerDemandResType_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+struct iso2PowerDemandResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEOutputPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVSEOutputPower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEID, urn:iso:15118:2:2016:MsgDataTypes,evseIDType */
+	struct {
+		exi_string_character_t characters[iso2PowerDemandResType_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MeterInfo, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MeterInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MeterID,"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingCharged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterReadingDischarged{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SigMeterReading{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MeterStatus{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TMeter{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MeterInfoType MeterInfo ;
+	unsigned int MeterInfo_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ReceiptRequired, http://www.w3.org/2001/XMLSchema,boolean */
+	int ReceiptRequired ;
+	unsigned int ReceiptRequired_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":PowerDemandParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType PowerDemandParameters ;
+	unsigned int PowerDemandParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ChargingProfileType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ProfileEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2ChargingProfileType_ProfileEntry_ARRAY_SIZE 24
+struct iso2ChargingProfileType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ProfileEntry, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval),("urn:iso:15118:2:2016:MsgDataTypes":PMax{1-3}))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct iso2PMaxScheduleEntryType array[iso2ChargingProfileType_ProfileEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ProfileEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2016:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2016:MsgDataTypes":NumEPriceLevels{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2SalesTariffType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SalesTariffType_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,tariffDescriptionType is 32 */
+#define iso2SalesTariffType_SalesTariffEntry_ARRAY_SIZE 5
+struct iso2SalesTariffType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2SalesTariffType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SalesTariffID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SalesTariffID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SalesTariffDescription, urn:iso:15118:2:2016:MsgDataTypes,tariffDescriptionType */
+	struct {
+		exi_string_character_t characters[iso2SalesTariffType_SalesTariffDescription_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  SalesTariffDescription ;
+	unsigned int SalesTariffDescription_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":NumEPriceLevels, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumEPriceLevels ;
+	unsigned int NumEPriceLevels_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SalesTariffEntry, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SalesTariffEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval),("urn:iso:15118:2:2016:MsgDataTypes":EPriceLevel{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ConsumptionCost{0-3}))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct iso2SalesTariffEntryType array[iso2SalesTariffType_SalesTariffEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SalesTariffEntry;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2SignedInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SignedInfoType_Reference_ARRAY_SIZE 1
+struct iso2SignedInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2SignedInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2CanonicalizationMethodType CanonicalizationMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2SignatureMethodType SignatureMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ReferenceType array[iso2SignedInfoType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDeliveryResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing))',  derivedBy='EXTENSION'.  */
+struct iso2PowerDeliveryResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso2RetrievalMethodType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2RetrievalMethodType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2RetrievalMethodType {
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2RetrievalMethodType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[iso2RetrievalMethodType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2TransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MagneticVector{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2MagneticVectorListType_MagneticVector_ARRAY_SIZE 5
+struct iso2MagneticVectorListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MagneticVector, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GAID,"urn:iso:15118:2:2016:MsgDataTypes":Distance,"urn:iso:15118:2:2016:MsgDataTypes":AngleGAtoVA,"urn:iso:15118:2:2016:MsgDataTypes":RotationVAtoGA,"urn:iso:15118:2:2016:MsgDataTypes":FODStatus)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2MagneticVectorType array[iso2MagneticVectorListType_MagneticVector_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MagneticVector;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceParameterListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSet{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2ServiceParameterListType_ParameterSet_ARRAY_SIZE 5
+struct iso2ServiceParameterListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":ParameterSet, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ParameterSetType array[iso2ServiceParameterListType_ParameterSet_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} ParameterSet;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2PMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE 5
+struct iso2PMaxScheduleType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PMaxScheduleEntry, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleEntryType',  base type name='EntryType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":RelativeTimeInterval),("urn:iso:15118:2:2016:MsgDataTypes":PMax{1-3}))',  derivedBy='EXTENSION'.  */
+	struct {
+		struct iso2PMaxScheduleEntryType array[iso2PMaxScheduleType_PMaxScheduleEntry_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PMaxScheduleEntry;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateUpdateResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2016:MsgBody":DHpublickey,"urn:iso:15118:2:2016:MsgBody":eMAID,"urn:iso:15118:2:2016:MsgBody":RetryCounter{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2CertificateUpdateResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAProvisioningCertificateChain, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2CertificateChainType SAProvisioningCertificateChain ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2CertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ContractSignatureEncryptedPrivateKey, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ContractSignatureEncryptedPrivateKeyType',  base type name='encryptedPrivateKeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DHpublickey, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DiffieHellmanPublickeyType',  base type name='dHpublickeyType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2DiffieHellmanPublickeyType DHpublickey ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":eMAID, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EMAIDType',  base type name='eMAIDType',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2EMAIDType eMAID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":RetryCounter, http://www.w3.org/2001/XMLSchema,short */
+	int16_t RetryCounter ;
+	unsigned int RetryCounter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,DC_BidirectionalControlReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2016:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2016:MsgBody":EVMaximumVoltage,"urn:iso:15118:2:2016:MsgBody":EVMinimumVoltage,"urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargePower{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2DC_BidirectionalControlReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DisplayParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DisplayParametersType DisplayParameters ;
+	unsigned int DisplayParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargeCurrent ;
+	unsigned int EVMaximumDischargeCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	unsigned int EVMaximumChargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargePower ;
+	unsigned int EVMaximumDischargePower_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateUpdateReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2016:MsgBody":eMAID,"urn:iso:15118:2:2016:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+#define iso2CertificateUpdateReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2CertificateUpdateReqType_eMAID_CHARACTERS_SIZE 15 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,eMAIDType is 15 */
+struct iso2CertificateUpdateReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2CertificateUpdateReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,CertificateChainType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Certificate,"urn:iso:15118:2:2016:MsgDataTypes":SubCertificates{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2CertificateChainType ContractSignatureCertChain ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":eMAID, urn:iso:15118:2:2016:MsgDataTypes,eMAIDType */
+	struct {
+		exi_string_character_t characters[iso2CertificateUpdateReqType_eMAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  eMAID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":RootCertificateID{1-20})',  derivedBy='RESTRICTION'.  */
+	struct iso2ListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVSEFinePositioningSetupParametersType',  base type name='EVSEFinePositioningSetupParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSensors,"urn:iso:15118:2:2016:MsgDataTypes":SensorList,"urn:iso:15118:2:2016:MsgDataTypes":SensorOrder,"urn:iso:15118:2:2016:MsgDataTypes":SignalPulseDuration,"urn:iso:15118:2:2016:MsgDataTypes":SignalSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":PackageSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":AlignmentOffset,"urn:iso:15118:2:2016:MsgDataTypes":SignalFrequency)',  derivedBy='EXTENSION'.  */
+struct iso2LFA_EVSEFinePositioningSetupParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":NumberOfSensors, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumberOfSensors ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Sensor{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2SensorListType SensorList ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorOrder, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorOrderListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorPosition{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2SensorOrderListType SensorOrder ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SignalPulseDuration, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t SignalPulseDuration ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SignalSeparationTime, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t SignalSeparationTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PackageSeparationTime, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t PackageSeparationTime ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AlignmentOffset, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t AlignmentOffset ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SignalFrequency, http://www.w3.org/2001/XMLSchema,unsignedShort */
+	uint16_t SignalFrequency ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,AlignmentCheckReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVProcessing,"urn:iso:15118:2:2016:MsgBody":AlignmentCheckParameters{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2AlignmentCheckReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":AlignmentCheckParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType AlignmentCheckParameters ;
+	unsigned int AlignmentCheckParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateInstallationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2016:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+#define iso2CertificateInstallationReqType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2CertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,certificateType is 800 */
+struct iso2CertificateInstallationReqType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2CertificateInstallationReqType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":OEMProvisioningCert, urn:iso:15118:2:2016:MsgDataTypes,certificateType */
+	struct {
+		uint8_t bytes[iso2CertificateInstallationReqType_OEMProvisioningCert_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  OEMProvisioningCert ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ListOfRootCertificateIDs, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ListOfRootCertificateIDsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":RootCertificateID{1-20})',  derivedBy='RESTRICTION'.  */
+	struct iso2ListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ChargeParameterDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":MaxSupportingPoints{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVEnergyTransferParameter,"urn:iso:15118:2:2016:MsgBody":MinimumPMaxRequest{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2ChargeParameterDiscoveryReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":MaxSupportingPoints, urn:iso:15118:2:2016:MsgDataTypes,maxSupportingPointsSAScheduleTuple */
+	uint16_t MaxSupportingPoints ;
+	unsigned int MaxSupportingPoints_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVEnergyTransferParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVEnergyTransferParameterType',  base type name='anyType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVEnergyTransferParameterType EVEnergyTransferParameter ;
+	unsigned int EVEnergyTransferParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AC_EVChargeParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVChargeParameterType',  base type name='EVEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage))',  derivedBy='EXTENSION'.  */
+	struct iso2AC_EVChargeParameterType AC_EVChargeParameter ;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AC_EVBidirectionalParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVBidirectionalParameterType',  base type name='AC_EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage)),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargeCurrent))',  derivedBy='EXTENSION'.  */
+	struct iso2AC_EVBidirectionalParameterType AC_EVBidirectionalParameter ;
+	unsigned int AC_EVBidirectionalParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DC_EVChargeParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVChargeParameterType',  base type name='EVEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1}))',  derivedBy='EXTENSION'.  */
+	struct iso2DC_EVChargeParameterType DC_EVChargeParameter ;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DC_EVBidirectionalParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVBidirectionalParameterType',  base type name='DC_EVChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1})),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargePower{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1}))',  derivedBy='EXTENSION'.  */
+	struct iso2DC_EVBidirectionalParameterType DC_EVBidirectionalParameter ;
+	unsigned int DC_EVBidirectionalParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":WPT_EVChargeParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,WPT_EVChargeParameterType',  base type name='EVEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":DepartureTime),("urn:iso:15118:2:2016:MsgDataTypes":EVMaximumPower,"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumPower,"urn:iso:15118:2:2016:MsgDataTypes":EVTargetEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVMinimumEnergyRequest{0-1}))',  derivedBy='EXTENSION'.  */
+	struct iso2WPT_EVChargeParameterType WPT_EVChargeParameter ;
+	unsigned int WPT_EVChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":MinimumPMaxRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MinimumPMaxRequestType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MinimumPMaxScheduleEntry{1-3})',  derivedBy='RESTRICTION'.  */
+	struct iso2MinimumPMaxRequestType MinimumPMaxRequest ;
+	unsigned int MinimumPMaxRequest_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorPackageListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorPackage{1-255})',  derivedBy='RESTRICTION'.  */
+#define iso2SensorPackageListType_SensorPackage_ARRAY_SIZE 5
+struct iso2SensorPackageListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorPackage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorPackageType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PackageIndex,"urn:iso:15118:2:2016:MsgDataTypes":SensorMeasurements{1-255})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SensorPackageType array[iso2SensorPackageListType_SensorPackage_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SensorPackage;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ChargeLoopReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2ChargeLoopReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DisplayParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DisplayParametersType DisplayParameters ;
+	unsigned int DisplayParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,AC_BidirectionalControlReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVOperation{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower,"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgBody":EVMinimumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVPresentActivePower,"urn:iso:15118:2:2016:MsgBody":EVPresentReactivePower))',  derivedBy='EXTENSION'.  */
+struct iso2AC_BidirectionalControlReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DisplayParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DisplayParametersType DisplayParameters ;
+	unsigned int DisplayParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVOperation, urn:iso:15118:2:2016:MsgDataTypes,EVOperationType */
+	iso2EVOperationType EVOperation ;
+	unsigned int EVOperation_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumDischargePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargePower ;
+	unsigned int EVMaximumDischargePower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumDischargeCurrent ;
+	unsigned int EVMaximumDischargeCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumChargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumDischargeCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumDischargeCurrent ;
+	unsigned int EVMinimumDischargeCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVPresentActivePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVPresentActivePower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVPresentReactivePower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVPresentReactivePower ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MV_EVSEFinePositioningParametersType',  base type name='EVSEFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorList)',  derivedBy='EXTENSION'.  */
+struct iso2MV_EVSEFinePositioningParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MagneticVectorListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MagneticVector{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2MagneticVectorListType MagneticVectorList ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,CurrentDemandReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2016:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2016:MsgBody":EVMaximumCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumPower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumVoltage{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2CurrentDemandReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DisplayParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DisplayParametersType DisplayParameters ;
+	unsigned int DisplayParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetCurrent ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetVoltage ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumCurrent, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumCurrent ;
+	unsigned int EVMaximumCurrent_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumPower ;
+	unsigned int EVMaximumPower_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumVoltage, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+	unsigned int EVMaximumVoltage_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVFinePositioningSetupParameters{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2FinePositioningSetupReqType {
+	/* substitutionGroup */
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVFinePositioningSetupParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVFinePositioningSetupParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct iso2EVFinePositioningSetupParametersType EVFinePositioningSetupParameters ;
+		/* element: "urn:iso:15118:2:2016:MsgDataTypes":LFA_EVFinePositioningSetupParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVFinePositioningSetupParametersType',  base type name='EVFinePositioningSetupParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSensors,"urn:iso:15118:2:2016:MsgDataTypes":SensorList,"urn:iso:15118:2:2016:MsgDataTypes":SensorOrder,"urn:iso:15118:2:2016:MsgDataTypes":SignalPulseDuration,"urn:iso:15118:2:2016:MsgDataTypes":SignalSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":PackageSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":AlignmentOffset)',  derivedBy='EXTENSION'.  */
+		struct iso2LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		unsigned int EVFinePositioningSetupParameters_isUsed:1;
+		unsigned int LFA_EVFinePositioningSetupParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SAScheduleTupleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2016:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2016:MsgDataTypes":PMaxDischargeSchedule{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SalesTariff{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BuyBackTariff{0-1})',  derivedBy='RESTRICTION'.  */
+struct iso2SAScheduleTupleType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PMaxSchedule, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2PMaxScheduleType PMaxSchedule ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":PMaxDischargeSchedule, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PMaxScheduleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":PMaxScheduleEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2PMaxScheduleType PMaxDischargeSchedule ;
+	unsigned int PMaxDischargeSchedule_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SalesTariff, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2016:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2016:MsgDataTypes":NumEPriceLevels{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2SalesTariffType SalesTariff ;
+	unsigned int SalesTariff_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":BuyBackTariff, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SalesTariffType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SalesTariffID,"urn:iso:15118:2:2016:MsgDataTypes":SalesTariffDescription{0-1},"urn:iso:15118:2:2016:MsgDataTypes":NumEPriceLevels{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SalesTariffEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2SalesTariffType BuyBackTariff ;
+	unsigned int BuyBackTariff_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDetailResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":ServiceID,"urn:iso:15118:2:2016:MsgBody":ServiceParameterList{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2ServiceDetailResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ServiceID, urn:iso:15118:2:2016:MsgDataTypes,serviceIDType */
+	uint16_t ServiceID ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ServiceParameterList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ServiceParameterListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSet{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2ServiceParameterListType ServiceParameterList ;
+	unsigned int ServiceParameterList_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDeliveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ChargeProgress,"urn:iso:15118:2:2016:MsgBody":EVOperation{0-1},"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":ChargingProfile{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2PowerDeliveryReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ChargeProgress, urn:iso:15118:2:2016:MsgDataTypes,chargeProgressType */
+	iso2chargeProgressType ChargeProgress ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVOperation, urn:iso:15118:2:2016:MsgDataTypes,EVOperationType */
+	iso2EVOperationType EVOperation ;
+	unsigned int EVOperation_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID, urn:iso:15118:2:2016:MsgDataTypes,SAIDType */
+	uint8_t SAScheduleTupleID ;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":ChargingProfile, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ChargingProfileType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ProfileEntry{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2ChargingProfileType ChargingProfile ;
+	unsigned int ChargingProfile_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PairingResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":PairingParameters{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2PairingResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":PairingParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType PairingParameters ;
+	unsigned int PairingParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDemandReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVTargetPower,"urn:iso:15118:2:2016:MsgBody":EVInputPower,"urn:iso:15118:2:2016:MsgBody":PowerDemandParameters{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2PowerDemandReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":DisplayParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DisplayParametersType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":CurrentRange{0-1},"urn:iso:15118:2:2016:MsgDataTypes":CurrentSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":TargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingPerformance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToTargetSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToBulkSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":RemainingTimeToMinimumSOC{0-1},"urn:iso:15118:2:2016:MsgDataTypes":ChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BulkChargingComplete{0-1},"urn:iso:15118:2:2016:MsgDataTypes":InletHot{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2DisplayParametersType DisplayParameters ;
+	unsigned int DisplayParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVTargetPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVTargetPower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVInputPower, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,PhysicalValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":Exponent,"urn:iso:15118:2:2016:MsgDataTypes":Value)',  derivedBy='RESTRICTION'.  */
+	struct iso2PhysicalValueType EVInputPower ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":PowerDemandParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,ParameterSetType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID,"urn:iso:15118:2:2016:MsgDataTypes":Parameter{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2ParameterSetType PowerDemandParameters ;
+	unsigned int PowerDemandParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentServiceSelectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2016:MsgBody":SelectedEnergyTransferService,"urn:iso:15118:2:2016:MsgBody":SelectedVASList{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2PaymentServiceSelectionReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":SelectedPaymentOption, urn:iso:15118:2:2016:MsgDataTypes,paymentOptionType */
+	iso2paymentOptionType SelectedPaymentOption ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SelectedEnergyTransferService, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SelectedServiceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":ServiceID,"urn:iso:15118:2:2016:MsgDataTypes":ParameterSetID)',  derivedBy='RESTRICTION'.  */
+	struct iso2SelectedServiceType SelectedEnergyTransferService ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SelectedVASList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SelectedServiceListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SelectedService{1-16})',  derivedBy='RESTRICTION'.  */
+	struct iso2SelectedServiceListType SelectedVASList ;
+	unsigned int SelectedVASList_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVFinePositioningParametersType',  base type name='EVFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSignalPackages,"urn:iso:15118:2:2016:MsgDataTypes":SensorPackageList)',  derivedBy='EXTENSION'.  */
+struct iso2LFA_EVFinePositioningParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":NumberOfSignalPackages, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumberOfSignalPackages ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorPackageList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorPackageListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorPackage{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2SensorPackageListType SensorPackageList ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define iso2KeyInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2KeyInfoType_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2KeyInfoType_KeyName_ARRAY_SIZE 1
+#define iso2KeyInfoType_KeyValue_ARRAY_SIZE 1
+#define iso2KeyInfoType_RetrievalMethod_ARRAY_SIZE 1
+#define iso2KeyInfoType_X509Data_ARRAY_SIZE 1
+#define iso2KeyInfoType_PGPData_ARRAY_SIZE 1
+#define iso2KeyInfoType_SPKIData_ARRAY_SIZE 1
+#define iso2KeyInfoType_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2KeyInfoType_MgmtData_ARRAY_SIZE 1
+#define iso2KeyInfoType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR
+struct iso2KeyInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2KeyInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso2KeyInfoType_KeyName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso2KeyInfoType_KeyName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2KeyValueType array[iso2KeyInfoType_KeyValue_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyValue;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2RetrievalMethodType array[iso2KeyInfoType_RetrievalMethod_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RetrievalMethod;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Data, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2X509DataType array[iso2KeyInfoType_X509Data_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Data;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPData, Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2PGPDataType array[iso2KeyInfoType_PGPData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PGPData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKIData, Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SPKIDataType array[iso2KeyInfoType_SPKIData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKIData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":MgmtData, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[iso2KeyInfoType_MgmtData_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[iso2KeyInfoType_MgmtData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MgmtData;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[iso2KeyInfoType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVProcessing,"urn:iso:15118:2:2016:MsgDataTypes":EVFinePositioningParameters{0-1})',  derivedBy='EXTENSION'.  */
+struct iso2FinePositioningReqType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVFinePositioningParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso2EVFinePositioningParametersType EVFinePositioningParameters ;
+	unsigned int EVFinePositioningParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Generic_EVFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,Generic_EVFinePositioningParametersType',  base type name='EVFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GenericParameters)',  derivedBy='EXTENSION'.  */
+	struct iso2Generic_EVFinePositioningParametersType Generic_EVFinePositioningParameters ;
+	unsigned int Generic_EVFinePositioningParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":LFA_EVFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVFinePositioningParametersType',  base type name='EVFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSignalPackages,"urn:iso:15118:2:2016:MsgDataTypes":SensorPackageList)',  derivedBy='EXTENSION'.  */
+	struct iso2LFA_EVFinePositioningParametersType LFA_EVFinePositioningParameters ;
+	unsigned int LFA_EVFinePositioningParameters_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define iso2SignatureType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2SignatureType_Object_ARRAY_SIZE 1
+struct iso2SignatureType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[iso2SignatureType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignedInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2SignedInfoType SignedInfo ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct iso2SignatureValueType SignatureValue ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct iso2KeyInfoType KeyInfo ;
+	unsigned int KeyInfo_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Object, Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2ObjectType array[iso2SignatureType_Object_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Object;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningSetupResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgDataTypes":EVSEFinePositioningSetupParameters{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2FinePositioningSetupResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEFinePositioningSetupParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEFinePositioningSetupParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEFinePositioningSetupParametersType EVSEFinePositioningSetupParameters ;
+	unsigned int EVSEFinePositioningSetupParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":LFA_EVSEFinePositioningSetupParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVSEFinePositioningSetupParametersType',  base type name='EVSEFinePositioningSetupParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSensors,"urn:iso:15118:2:2016:MsgDataTypes":SensorList,"urn:iso:15118:2:2016:MsgDataTypes":SensorOrder,"urn:iso:15118:2:2016:MsgDataTypes":SignalPulseDuration,"urn:iso:15118:2:2016:MsgDataTypes":SignalSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":PackageSeparationTime,"urn:iso:15118:2:2016:MsgDataTypes":AlignmentOffset,"urn:iso:15118:2:2016:MsgDataTypes":SignalFrequency)',  derivedBy='EXTENSION'.  */
+	struct iso2LFA_EVSEFinePositioningSetupParametersType LFA_EVSEFinePositioningSetupParameters ;
+	unsigned int LFA_EVSEFinePositioningSetupParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MV_EVSEFinePositioningSetupParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MV_EVSEFinePositioningSetupParametersType',  base type name='EVSEFinePositioningSetupParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":FrequencyChannel{0-1},"urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorSetupList{0-1})',  derivedBy='EXTENSION'.  */
+	struct iso2MV_EVSEFinePositioningSetupParametersType MV_EVSEFinePositioningSetupParameters ;
+	unsigned int MV_EVSEFinePositioningSetupParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SAScheduleListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SAScheduleTuple{1-3})',  derivedBy='RESTRICTION'.  */
+#define iso2SAScheduleListType_SAScheduleTuple_ARRAY_SIZE 3
+struct iso2SAScheduleListType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SAScheduleTuple, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SAScheduleTupleType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SAScheduleTupleID,"urn:iso:15118:2:2016:MsgDataTypes":PMaxSchedule,"urn:iso:15118:2:2016:MsgDataTypes":PMaxDischargeSchedule{0-1},"urn:iso:15118:2:2016:MsgDataTypes":SalesTariff{0-1},"urn:iso:15118:2:2016:MsgDataTypes":BuyBackTariff{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct iso2SAScheduleTupleType array[iso2SAScheduleListType_SAScheduleTuple_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SAScheduleTuple;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVSEFinePositioningParametersType',  base type name='EVSEFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSignalPackages,"urn:iso:15118:2:2016:MsgDataTypes":SensorPackageList)',  derivedBy='EXTENSION'.  */
+struct iso2LFA_EVSEFinePositioningParametersType {
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":NumberOfSignalPackages, http://www.w3.org/2001/XMLSchema,unsignedByte */
+	uint8_t NumberOfSignalPackages ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":SensorPackageList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SensorPackageListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SensorPackage{1-255})',  derivedBy='RESTRICTION'.  */
+	struct iso2SensorPackageListType SensorPackageList ;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgHeader,MessageHeaderType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgHeader":SessionID,"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})',  derivedBy='RESTRICTION'.  */
+#define iso2MessageHeaderType_SessionID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,sessionIDType is 8 */
+struct iso2MessageHeaderType {
+	/* element: "urn:iso:15118:2:2016:MsgHeader":SessionID, urn:iso:15118:2:2016:MsgDataTypes,sessionIDType */
+	struct {
+		uint8_t bytes[iso2MessageHeaderType_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Signature, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct iso2SignatureType Signature ;
+	unsigned int Signature_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgDataTypes":EVSEFinePositioningParameters{0-1}))',  derivedBy='EXTENSION'.  */
+struct iso2FinePositioningResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEFinePositioningParametersType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEFinePositioningParametersType EVSEFinePositioningParameters ;
+	unsigned int EVSEFinePositioningParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":Generic_EVSEFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,Generic_EVSEFinePositioningParametersType',  base type name='EVSEFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":GenericParameters)',  derivedBy='EXTENSION'.  */
+	struct iso2Generic_EVSEFinePositioningParametersType Generic_EVSEFinePositioningParameters ;
+	unsigned int Generic_EVSEFinePositioningParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":LFA_EVSEFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,LFA_EVSEFinePositioningParametersType',  base type name='EVSEFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NumberOfSignalPackages,"urn:iso:15118:2:2016:MsgDataTypes":SensorPackageList)',  derivedBy='EXTENSION'.  */
+	struct iso2LFA_EVSEFinePositioningParametersType LFA_EVSEFinePositioningParameters ;
+	unsigned int LFA_EVSEFinePositioningParameters_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":MV_EVSEFinePositioningParameters, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,MV_EVSEFinePositioningParametersType',  base type name='EVSEFinePositioningParametersType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":MagneticVectorList)',  derivedBy='EXTENSION'.  */
+	struct iso2MV_EVSEFinePositioningParametersType MV_EVSEFinePositioningParameters ;
+	unsigned int MV_EVSEFinePositioningParameters_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,ChargeParameterDiscoveryResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":SAScheduleList{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyTransferParameter))',  derivedBy='EXTENSION'.  */
+struct iso2ChargeParameterDiscoveryResType {
+	/* element: "urn:iso:15118:2:2016:MsgBody":ResponseCode, urn:iso:15118:2:2016:MsgDataTypes,responseCodeType */
+	iso2responseCodeType ResponseCode ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEStatus, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEStatusType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":NotificationMaxDelay,"urn:iso:15118:2:2016:MsgDataTypes":EVSENotification)',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEStatusType EVSEStatus ;
+	unsigned int EVSEStatus_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgBody":EVSEProcessing, urn:iso:15118:2:2016:MsgDataTypes,EVSEProcessingType */
+	iso2EVSEProcessingType EVSEProcessing ;
+	/* element: "urn:iso:15118:2:2016:MsgBody":SAScheduleList, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,SAScheduleListType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":SAScheduleTuple{1-3})',  derivedBy='RESTRICTION'.  */
+	struct iso2SAScheduleListType SAScheduleList ;
+	unsigned int SAScheduleList_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyTransferParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,EVSEEnergyTransferParameterType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+	struct iso2EVSEEnergyTransferParameterType EVSEEnergyTransferParameter ;
+	unsigned int EVSEEnergyTransferParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AC_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVSEChargeParameterType',  base type name='EVSEEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency)',  derivedBy='EXTENSION'.  */
+	struct iso2AC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":AC_EVSEBidirectionalParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,AC_EVSEBidirectionalParameterType',  base type name='AC_EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency),("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSENominalFrequency))',  derivedBy='EXTENSION'.  */
+	struct iso2AC_EVSEBidirectionalParameterType AC_EVSEBidirectionalParameter ;
+	unsigned int AC_EVSEBidirectionalParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DC_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVSEChargeParameterType',  base type name='EVSEEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyToBeDelivered{0-1})',  derivedBy='EXTENSION'.  */
+	struct iso2DC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":DC_EVSEBidirectionalParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,DC_EVSEBidirectionalParameterType',  base type name='DC_EVSEChargeParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumVoltage,"urn:iso:15118:2:2016:MsgDataTypes":EVSECurrentRegulationTolerance{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVSEPeakCurrentRipple,"urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyToBeDelivered{0-1}),("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargePower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumDischargeCurrent,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumDischargeCurrent))',  derivedBy='EXTENSION'.  */
+	struct iso2DC_EVSEBidirectionalParameterType DC_EVSEBidirectionalParameter ;
+	unsigned int DC_EVSEBidirectionalParameter_isUsed:1;
+	/* element: "urn:iso:15118:2:2016:MsgDataTypes":WPT_EVSEChargeParameter, Complex type name='urn:iso:15118:2:2016:MsgDataTypes,WPT_EVSEChargeParameterType',  base type name='EVSEEnergyTransferParameterType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVSEMaximumPower,"urn:iso:15118:2:2016:MsgDataTypes":EVSEMinimumPower)',  derivedBy='EXTENSION'.  */
+	struct iso2WPT_EVSEChargeParameterType WPT_EVSEChargeParameter ;
+	unsigned int WPT_EVSEChargeParameter_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgBody,BodyType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":BodyElement)',  derivedBy='RESTRICTION'.  */
+struct iso2BodyType {
+	/* substitutionGroup */
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		/* element: "urn:iso:15118:2:2016:MsgBody":BodyElement, Complex type name='urn:iso:15118:2:2016:MsgBody,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct iso2BodyBaseType BodyElement ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":V2GRequest, Complex type name='urn:iso:15118:2:2016:MsgBody,BodyBaseType',  base type name='anyType',  content type='EMPTY',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  derivedBy='RESTRICTION'.  */
+		struct iso2BodyBaseType V2GRequest ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":DisconnectChargingDeviceReq, Complex type name='urn:iso:15118:2:2016:MsgBody,DisconnectChargingDeviceReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus)',  derivedBy='EXTENSION'.  */
+		struct iso2DisconnectChargingDeviceReqType DisconnectChargingDeviceReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ConnectChargingDeviceReq, Complex type name='urn:iso:15118:2:2016:MsgBody,ConnectChargingDeviceReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus)',  derivedBy='EXTENSION'.  */
+		struct iso2ConnectChargingDeviceReqType ConnectChargingDeviceReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":SystemStatusReq, Complex type name='urn:iso:15118:2:2016:MsgBody,SystemStatusReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":OperationMode,"urn:iso:15118:2:2016:MsgBody":EVMechanicalChargingDeviceStatus)',  derivedBy='EXTENSION'.  */
+		struct iso2SystemStatusReqType SystemStatusReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":DC_BidirectionalControlReq, Complex type name='urn:iso:15118:2:2016:MsgBody,DC_BidirectionalControlReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2016:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2016:MsgBody":EVMaximumVoltage,"urn:iso:15118:2:2016:MsgBody":EVMinimumVoltage,"urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargePower{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2DC_BidirectionalControlReqType DC_BidirectionalControlReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":AC_BidirectionalControlReq, Complex type name='urn:iso:15118:2:2016:MsgBody,AC_BidirectionalControlReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVOperation{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower,"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent,"urn:iso:15118:2:2016:MsgBody":EVMaximumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumChargeCurrent,"urn:iso:15118:2:2016:MsgBody":EVMinimumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVPresentActivePower,"urn:iso:15118:2:2016:MsgBody":EVPresentReactivePower))',  derivedBy='EXTENSION'.  */
+		struct iso2AC_BidirectionalControlReqType AC_BidirectionalControlReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":VehicleCheckOutReq, Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckOutReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVCheckOutStatus,"urn:iso:15118:2:2016:MsgBody":CheckOutTime)',  derivedBy='EXTENSION'.  */
+		struct iso2VehicleCheckOutReqType VehicleCheckOutReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":VehicleCheckInReq, Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckInReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVCheckInStatus,"urn:iso:15118:2:2016:MsgBody":ParkingMethod{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2VehicleCheckInReqType VehicleCheckInReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PowerDemandReq, Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDemandReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVTargetPower,"urn:iso:15118:2:2016:MsgBody":EVInputPower,"urn:iso:15118:2:2016:MsgBody":PowerDemandParameters{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2PowerDemandReqType PowerDemandReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PairingReq, Complex type name='urn:iso:15118:2:2016:MsgBody,PairingReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVProcessing,"urn:iso:15118:2:2016:MsgBody":PairingParameters{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2PairingReqType PairingReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":AlignmentCheckReq, Complex type name='urn:iso:15118:2:2016:MsgBody,AlignmentCheckReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVProcessing,"urn:iso:15118:2:2016:MsgBody":AlignmentCheckParameters{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2AlignmentCheckReqType AlignmentCheckReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":FinePositioningReq, Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVProcessing,"urn:iso:15118:2:2016:MsgDataTypes":EVFinePositioningParameters{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2FinePositioningReqType FinePositioningReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":FinePositioningSetupReq, Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDataTypes":EVFinePositioningSetupParameters{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2FinePositioningSetupReqType FinePositioningSetupReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":WeldingDetectionReq, Complex type name='urn:iso:15118:2:2016:MsgBody,WeldingDetectionReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+		struct iso2WeldingDetectionReqType WeldingDetectionReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CurrentDemandReq, Complex type name='urn:iso:15118:2:2016:MsgBody,CurrentDemandReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVTargetCurrent,"urn:iso:15118:2:2016:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2016:MsgBody":EVMaximumCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumPower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumVoltage{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2CurrentDemandReqType CurrentDemandReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PreChargeReq, Complex type name='urn:iso:15118:2:2016:MsgBody,PreChargeReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVTargetVoltage,"urn:iso:15118:2:2016:MsgBody":EVTargetCurrent)',  derivedBy='EXTENSION'.  */
+		struct iso2PreChargeReqType PreChargeReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CableCheckReq, Complex type name='urn:iso:15118:2:2016:MsgBody,CableCheckReqType',  base type name='BodyBaseType',  content type='EMPTY',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+		struct iso2CableCheckReqType CableCheckReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ChargingStatusReq, Complex type name='urn:iso:15118:2:2016:MsgBody,ChargingStatusReqType',  base type name='ChargeLoopReqType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":EVTargetEnergyRequest,"urn:iso:15118:2:2016:MsgBody":EVMaximumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumEnergyRequest{0-1},"urn:iso:15118:2:2016:MsgBody":DisplayParameters{0-1}),("urn:iso:15118:2:2016:MsgBody":EVMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVMaximumChargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVMinimumChargeCurrent{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2ChargingStatusReqType ChargingStatusReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CertificateInstallationReq, Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateInstallationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":OEMProvisioningCert,"urn:iso:15118:2:2016:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+		struct iso2CertificateInstallationReqType CertificateInstallationReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CertificateUpdateReq, Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateUpdateReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2016:MsgBody":eMAID,"urn:iso:15118:2:2016:MsgBody":ListOfRootCertificateIDs)',  derivedBy='EXTENSION'.  */
+		struct iso2CertificateUpdateReqType CertificateUpdateReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":SessionStopReq, Complex type name='urn:iso:15118:2:2016:MsgBody,SessionStopReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ChargingSession)',  derivedBy='EXTENSION'.  */
+		struct iso2SessionStopReqType SessionStopReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":MeteringReceiptReq, Complex type name='urn:iso:15118:2:2016:MsgBody,MeteringReceiptReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":SessionID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo)',  derivedBy='EXTENSION'.  */
+		struct iso2MeteringReceiptReqType MeteringReceiptReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PowerDeliveryReq, Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDeliveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ChargeProgress,"urn:iso:15118:2:2016:MsgBody":EVOperation{0-1},"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":ChargingProfile{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2PowerDeliveryReqType PowerDeliveryReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ChargeParameterDiscoveryReq, Complex type name='urn:iso:15118:2:2016:MsgBody,ChargeParameterDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":MaxSupportingPoints{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVEnergyTransferParameter,"urn:iso:15118:2:2016:MsgBody":MinimumPMaxRequest{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2ChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":AuthorizationReq, Complex type name='urn:iso:15118:2:2016:MsgBody,AuthorizationReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":GenChallenge{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2AuthorizationReqType AuthorizationReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PaymentDetailsReq, Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentDetailsReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":eMAID,"urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain)',  derivedBy='EXTENSION'.  */
+		struct iso2PaymentDetailsReqType PaymentDetailsReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PaymentServiceSelectionReq, Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentServiceSelectionReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":SelectedPaymentOption,"urn:iso:15118:2:2016:MsgBody":SelectedEnergyTransferService,"urn:iso:15118:2:2016:MsgBody":SelectedVASList{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2PaymentServiceSelectionReqType PaymentServiceSelectionReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ServiceDetailReq, Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDetailReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ServiceID)',  derivedBy='EXTENSION'.  */
+		struct iso2ServiceDetailReqType ServiceDetailReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ServiceDiscoveryReq, Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDiscoveryReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":SupportedServiceIDs{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2ServiceDiscoveryReqType ServiceDiscoveryReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":SessionSetupReq, Complex type name='urn:iso:15118:2:2016:MsgBody,SessionSetupReqType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":EVCCID)',  derivedBy='EXTENSION'.  */
+		struct iso2SessionSetupReqType SessionSetupReq ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":V2GResponse, Complex type name='urn:iso:15118:2:2016:MsgBody,V2GResponseType',  base type name='BodyBaseType',  content type='ELEMENT',  isAbstract='true',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2V2GResponseType V2GResponse ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":DisconnectChargingDeviceRes, Complex type name='urn:iso:15118:2:2016:MsgBody,DisconnectChargingDeviceResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":EVSEElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus))',  derivedBy='EXTENSION'.  */
+		struct iso2DisconnectChargingDeviceResType DisconnectChargingDeviceRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ConnectChargingDeviceRes, Complex type name='urn:iso:15118:2:2016:MsgBody,ConnectChargingDeviceResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":EVSEElectricalChargingDeviceStatus,"urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus))',  derivedBy='EXTENSION'.  */
+		struct iso2ConnectChargingDeviceResType ConnectChargingDeviceRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":SystemStatusRes, Complex type name='urn:iso:15118:2:2016:MsgBody,SystemStatusResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":OperationMode,"urn:iso:15118:2:2016:MsgBody":EVSEMechanicalChargingDeviceStatus))',  derivedBy='EXTENSION'.  */
+		struct iso2SystemStatusResType SystemStatusRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":DC_BidirectionalControlRes, Complex type name='urn:iso:15118:2:2016:MsgBody,DC_BidirectionalControlResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2016:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEMaximumChargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumDischargePower{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumChargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumDischargeCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumVoltage{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMinimumVoltage{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2DC_BidirectionalControlResType DC_BidirectionalControlRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":AC_BidirectionalControlRes, Complex type name='urn:iso:15118:2:2016:MsgBody,AC_BidirectionalControlResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":EVSETargetPower,"urn:iso:15118:2:2016:MsgBody":EVSETargetReactivePower,"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2AC_BidirectionalControlResType AC_BidirectionalControlRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":VehicleCheckOutRes, Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckOutResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSECheckOutStatus))',  derivedBy='EXTENSION'.  */
+		struct iso2VehicleCheckOutResType VehicleCheckOutRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":VehicleCheckInRes, Complex type name='urn:iso:15118:2:2016:MsgBody,VehicleCheckInResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":VehicleSpace,"urn:iso:15118:2:2016:MsgBody":TargetOffset{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2VehicleCheckInResType VehicleCheckInRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PowerDemandRes, Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDemandResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEOutputPower,"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1},"urn:iso:15118:2:2016:MsgBody":PowerDemandParameters{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2PowerDemandResType PowerDemandRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PairingRes, Complex type name='urn:iso:15118:2:2016:MsgBody,PairingResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":PairingParameters{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2PairingResType PairingRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":AlignmentCheckRes, Complex type name='urn:iso:15118:2:2016:MsgBody,AlignmentCheckResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":AlignmentCheckParameters{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2AlignmentCheckResType AlignmentCheckRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":FinePositioningRes, Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgDataTypes":EVSEFinePositioningParameters{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2FinePositioningResType FinePositioningRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":FinePositioningSetupRes, Complex type name='urn:iso:15118:2:2016:MsgBody,FinePositioningSetupResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgDataTypes":EVSEFinePositioningSetupParameters{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2FinePositioningSetupResType FinePositioningSetupRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":WeldingDetectionRes, Complex type name='urn:iso:15118:2:2016:MsgBody,WeldingDetectionResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage))',  derivedBy='EXTENSION'.  */
+		struct iso2WeldingDetectionResType WeldingDetectionRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CurrentDemandRes, Complex type name='urn:iso:15118:2:2016:MsgBody,CurrentDemandResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentCurrent,"urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage,"urn:iso:15118:2:2016:MsgBody":EVSEPowerLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSECurrentLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEVoltageLimitAchieved,"urn:iso:15118:2:2016:MsgBody":EVSEMaximumPower{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumCurrent{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEMaximumVoltage{0-1},"urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2CurrentDemandResType CurrentDemandRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PreChargeRes, Complex type name='urn:iso:15118:2:2016:MsgBody,PreChargeResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEPresentVoltage))',  derivedBy='EXTENSION'.  */
+		struct iso2PreChargeResType PreChargeRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CableCheckRes, Complex type name='urn:iso:15118:2:2016:MsgBody,CableCheckResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing))',  derivedBy='EXTENSION'.  */
+		struct iso2CableCheckResType CableCheckRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ChargingStatusRes, Complex type name='urn:iso:15118:2:2016:MsgBody,ChargingStatusResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":SAScheduleTupleID{0-1},"urn:iso:15118:2:2016:MsgBody":MeterInfo{0-1},"urn:iso:15118:2:2016:MsgBody":ReceiptRequired{0-1},"urn:iso:15118:2:2016:MsgBody":EVSETargetPower{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2ChargingStatusResType ChargingStatusRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CertificateInstallationRes, Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateInstallationResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2016:MsgBody":DHpublickey,"urn:iso:15118:2:2016:MsgBody":eMAID))',  derivedBy='EXTENSION'.  */
+		struct iso2CertificateInstallationResType CertificateInstallationRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":CertificateUpdateRes, Complex type name='urn:iso:15118:2:2016:MsgBody,CertificateUpdateResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":SAProvisioningCertificateChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureCertChain,"urn:iso:15118:2:2016:MsgBody":ContractSignatureEncryptedPrivateKey,"urn:iso:15118:2:2016:MsgBody":DHpublickey,"urn:iso:15118:2:2016:MsgBody":eMAID,"urn:iso:15118:2:2016:MsgBody":RetryCounter{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2CertificateUpdateResType CertificateUpdateRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":SessionStopRes, Complex type name='urn:iso:15118:2:2016:MsgBody,SessionStopResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2SessionStopResType SessionStopRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":MeteringReceiptRes, Complex type name='urn:iso:15118:2:2016:MsgBody,MeteringReceiptResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2MeteringReceiptResType MeteringReceiptRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PowerDeliveryRes, Complex type name='urn:iso:15118:2:2016:MsgBody,PowerDeliveryResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing))',  derivedBy='EXTENSION'.  */
+		struct iso2PowerDeliveryResType PowerDeliveryRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ChargeParameterDiscoveryRes, Complex type name='urn:iso:15118:2:2016:MsgBody,ChargeParameterDiscoveryResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing,"urn:iso:15118:2:2016:MsgBody":SAScheduleList{0-1},"urn:iso:15118:2:2016:MsgDataTypes":EVSEEnergyTransferParameter))',  derivedBy='EXTENSION'.  */
+		struct iso2ChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":AuthorizationRes, Complex type name='urn:iso:15118:2:2016:MsgBody,AuthorizationResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEProcessing))',  derivedBy='EXTENSION'.  */
+		struct iso2AuthorizationResType AuthorizationRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PaymentDetailsRes, Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentDetailsResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":GenChallenge,"urn:iso:15118:2:2016:MsgBody":EVSETimeStamp))',  derivedBy='EXTENSION'.  */
+		struct iso2PaymentDetailsResType PaymentDetailsRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":PaymentServiceSelectionRes, Complex type name='urn:iso:15118:2:2016:MsgBody,PaymentServiceSelectionResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1})',  derivedBy='EXTENSION'.  */
+		struct iso2PaymentServiceSelectionResType PaymentServiceSelectionRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ServiceDetailRes, Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDetailResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":ServiceID,"urn:iso:15118:2:2016:MsgBody":ServiceParameterList{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2ServiceDetailResType ServiceDetailRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":ServiceDiscoveryRes, Complex type name='urn:iso:15118:2:2016:MsgBody,ServiceDiscoveryResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":PaymentOptionList,"urn:iso:15118:2:2016:MsgBody":EnergyTransferServiceList,"urn:iso:15118:2:2016:MsgBody":VASList{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2ServiceDiscoveryResType ServiceDiscoveryRes ;
+		/* element: "urn:iso:15118:2:2016:MsgBody":SessionSetupRes, Complex type name='urn:iso:15118:2:2016:MsgBody,SessionSetupResType',  base type name='V2GResponseType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("urn:iso:15118:2:2016:MsgBody":ResponseCode,"urn:iso:15118:2:2016:MsgBody":EVSEStatus{0-1}),("urn:iso:15118:2:2016:MsgBody":EVSEID,"urn:iso:15118:2:2016:MsgBody":EVSETimeStamp{0-1}))',  derivedBy='EXTENSION'.  */
+		struct iso2SessionSetupResType SessionSetupRes ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+		unsigned int BodyElement_isUsed:1;
+		unsigned int V2GRequest_isUsed:1;
+		unsigned int DisconnectChargingDeviceReq_isUsed:1;
+		unsigned int ConnectChargingDeviceReq_isUsed:1;
+		unsigned int SystemStatusReq_isUsed:1;
+		unsigned int DC_BidirectionalControlReq_isUsed:1;
+		unsigned int AC_BidirectionalControlReq_isUsed:1;
+		unsigned int VehicleCheckOutReq_isUsed:1;
+		unsigned int VehicleCheckInReq_isUsed:1;
+		unsigned int PowerDemandReq_isUsed:1;
+		unsigned int PairingReq_isUsed:1;
+		unsigned int AlignmentCheckReq_isUsed:1;
+		unsigned int FinePositioningReq_isUsed:1;
+		unsigned int FinePositioningSetupReq_isUsed:1;
+		unsigned int WeldingDetectionReq_isUsed:1;
+		unsigned int CurrentDemandReq_isUsed:1;
+		unsigned int PreChargeReq_isUsed:1;
+		unsigned int CableCheckReq_isUsed:1;
+		unsigned int ChargingStatusReq_isUsed:1;
+		unsigned int CertificateInstallationReq_isUsed:1;
+		unsigned int CertificateUpdateReq_isUsed:1;
+		unsigned int SessionStopReq_isUsed:1;
+		unsigned int MeteringReceiptReq_isUsed:1;
+		unsigned int PowerDeliveryReq_isUsed:1;
+		unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+		unsigned int AuthorizationReq_isUsed:1;
+		unsigned int PaymentDetailsReq_isUsed:1;
+		unsigned int PaymentServiceSelectionReq_isUsed:1;
+		unsigned int ServiceDetailReq_isUsed:1;
+		unsigned int ServiceDiscoveryReq_isUsed:1;
+		unsigned int SessionSetupReq_isUsed:1;
+		unsigned int V2GResponse_isUsed:1;
+		unsigned int DisconnectChargingDeviceRes_isUsed:1;
+		unsigned int ConnectChargingDeviceRes_isUsed:1;
+		unsigned int SystemStatusRes_isUsed:1;
+		unsigned int DC_BidirectionalControlRes_isUsed:1;
+		unsigned int AC_BidirectionalControlRes_isUsed:1;
+		unsigned int VehicleCheckOutRes_isUsed:1;
+		unsigned int VehicleCheckInRes_isUsed:1;
+		unsigned int PowerDemandRes_isUsed:1;
+		unsigned int PairingRes_isUsed:1;
+		unsigned int AlignmentCheckRes_isUsed:1;
+		unsigned int FinePositioningRes_isUsed:1;
+		unsigned int FinePositioningSetupRes_isUsed:1;
+		unsigned int WeldingDetectionRes_isUsed:1;
+		unsigned int CurrentDemandRes_isUsed:1;
+		unsigned int PreChargeRes_isUsed:1;
+		unsigned int CableCheckRes_isUsed:1;
+		unsigned int ChargingStatusRes_isUsed:1;
+		unsigned int CertificateInstallationRes_isUsed:1;
+		unsigned int CertificateUpdateRes_isUsed:1;
+		unsigned int SessionStopRes_isUsed:1;
+		unsigned int MeteringReceiptRes_isUsed:1;
+		unsigned int PowerDeliveryRes_isUsed:1;
+		unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+		unsigned int AuthorizationRes_isUsed:1;
+		unsigned int PaymentDetailsRes_isUsed:1;
+		unsigned int PaymentServiceSelectionRes_isUsed:1;
+		unsigned int ServiceDetailRes_isUsed:1;
+		unsigned int ServiceDiscoveryRes_isUsed:1;
+		unsigned int SessionSetupRes_isUsed:1;
+};
+
+/* Complex type name='urn:iso:15118:2:2016:MsgDef,#AnonType_V2G_Message',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgDef":Header,"urn:iso:15118:2:2016:MsgDef":Body)',  derivedBy='RESTRICTION'.  */
+struct iso2AnonType_V2G_Message {
+	/* element: "urn:iso:15118:2:2016:MsgDef":Header, Complex type name='urn:iso:15118:2:2016:MsgHeader,MessageHeaderType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgHeader":SessionID,"http://www.w3.org/2000/09/xmldsig#":Signature{0-1})',  derivedBy='RESTRICTION'.  */
+	struct iso2MessageHeaderType Header ;
+	/* element: "urn:iso:15118:2:2016:MsgDef":Body, Complex type name='urn:iso:15118:2:2016:MsgBody,BodyType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("urn:iso:15118:2:2016:MsgBody":BodyElement)',  derivedBy='RESTRICTION'.  */
+	struct iso2BodyType Body ;
+};
+
+
+
+#define iso2EXIDocument_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIDocument_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIDocument_DigestValue_BYTES_SIZE 350
+#define iso2EXIFragment_stringValue_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIFragment_PgenCounter_BYTES_SIZE 350
+#define iso2EXIFragment_SalesTariffDescription_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,tariffDescriptionType is 32 */
+#define iso2EXIFragment_SessionID_BYTES_SIZE 8 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,sessionIDType is 8 */
+#define iso2EXIFragment_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIFragment_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIFragment_OEMProvisioningCert_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,certificateType is 800 */
+#define iso2EXIFragment_P_BYTES_SIZE 350
+#define iso2EXIFragment_Q_BYTES_SIZE 350
+#define iso2EXIFragment_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIFragment_G_BYTES_SIZE 350
+#define iso2EXIFragment_J_BYTES_SIZE 350
+#define iso2EXIFragment_Y_BYTES_SIZE 350
+#define iso2EXIFragment_DigestValue_BYTES_SIZE 350
+#define iso2EXIFragment_EVCCID_BYTES_SIZE 6 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evccIDType is 6 */
+#define iso2EXIFragment_PGPKeyID_BYTES_SIZE 350
+#define iso2EXIFragment_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIFragment_X509SKI_BYTES_SIZE 350
+#define iso2EXIFragment_Certificate_BYTES_SIZE 800 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,certificateType is 800 */
+#define iso2EXIFragment_Modulus_BYTES_SIZE 350
+#define iso2EXIFragment_SigMeterReading_BYTES_SIZE 64 /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,sigMeterReadingType is 64 */
+#define iso2EXIFragment_Exponent_BYTES_SIZE 350
+#define iso2EXIFragment_PGPKeyPacket_BYTES_SIZE 350
+#define iso2EXIFragment_Seed_BYTES_SIZE 350
+#define iso2EXIFragment_MeterID_CHARACTERS_SIZE 32 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,meterIDType is 32 */
+#define iso2EXIFragment_X509CRL_BYTES_SIZE 350
+#define iso2EXIFragment_SPKISexp_BYTES_SIZE 350
+#define iso2EXIFragment_X509Certificate_BYTES_SIZE 350
+#define iso2EXIFragment_EVSEID_CHARACTERS_SIZE 37 + EXTRA_CHAR /* XML schema facet maxLength for urn:iso:15118:2:2016:MsgDataTypes,evseIDType is 37 */
+#define iso2EXIFragment_GenChallenge_BYTES_SIZE 16 /* XML schema facet length for urn:iso:15118:2:2016:MsgDataTypes,genChallengeType is 16 */
+#define iso2EXIFragment_GAID_CHARACTERS_SIZE 50 + EXTRA_CHAR
+#define iso2EXIFragment_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR
+
+
+/* Global elements of EXI Document */
+struct iso2EXIDocument {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	struct iso2AnonType_V2G_Message V2G_Message ;
+	struct iso2ServiceDiscoveryReqType ServiceDiscoveryReq ;
+	struct iso2ServiceDiscoveryResType ServiceDiscoveryRes ;
+	struct iso2FinePositioningReqType FinePositioningReq ;
+	struct iso2FinePositioningResType FinePositioningRes ;
+	struct iso2DisconnectChargingDeviceReqType DisconnectChargingDeviceReq ;
+	struct iso2DisconnectChargingDeviceResType DisconnectChargingDeviceRes ;
+	struct iso2PowerDemandReqType PowerDemandReq ;
+	struct iso2MeteringReceiptReqType MeteringReceiptReq ;
+	struct iso2PaymentDetailsReqType PaymentDetailsReq ;
+	struct iso2PowerDemandResType PowerDemandRes ;
+	struct iso2MeteringReceiptResType MeteringReceiptRes ;
+	struct iso2PaymentDetailsResType PaymentDetailsRes ;
+	struct iso2SessionSetupReqType SessionSetupReq ;
+	struct iso2SessionSetupResType SessionSetupRes ;
+	struct iso2CableCheckReqType CableCheckReq ;
+	struct iso2CableCheckResType CableCheckRes ;
+	struct iso2CertificateInstallationReqType CertificateInstallationReq ;
+	struct iso2CertificateInstallationResType CertificateInstallationRes ;
+	struct iso2SystemStatusReqType SystemStatusReq ;
+	struct iso2SystemStatusResType SystemStatusRes ;
+	struct iso2PairingReqType PairingReq ;
+	struct iso2WeldingDetectionReqType WeldingDetectionReq ;
+	struct iso2ConnectChargingDeviceReqType ConnectChargingDeviceReq ;
+	struct iso2PairingResType PairingRes ;
+	struct iso2WeldingDetectionResType WeldingDetectionRes ;
+	struct iso2ConnectChargingDeviceResType ConnectChargingDeviceRes ;
+	struct iso2CertificateUpdateReqType CertificateUpdateReq ;
+	struct iso2CertificateUpdateResType CertificateUpdateRes ;
+	struct iso2PaymentServiceSelectionReqType PaymentServiceSelectionReq ;
+	struct iso2PowerDeliveryReqType PowerDeliveryReq ;
+	struct iso2PaymentServiceSelectionResType PaymentServiceSelectionRes ;
+	struct iso2PowerDeliveryResType PowerDeliveryRes ;
+	struct iso2ChargingStatusReqType ChargingStatusReq ;
+	struct iso2ChargingStatusResType ChargingStatusRes ;
+	struct iso2BodyBaseType BodyElement ;
+	struct iso2AC_BidirectionalControlReqType AC_BidirectionalControlReq ;
+	struct iso2AC_BidirectionalControlResType AC_BidirectionalControlRes ;
+	struct iso2VehicleCheckInReqType VehicleCheckInReq ;
+	struct iso2CurrentDemandReqType CurrentDemandReq ;
+	struct iso2VehicleCheckInResType VehicleCheckInRes ;
+	struct iso2PreChargeReqType PreChargeReq ;
+	struct iso2CurrentDemandResType CurrentDemandRes ;
+	struct iso2PreChargeResType PreChargeRes ;
+	struct iso2AlignmentCheckReqType AlignmentCheckReq ;
+	struct iso2BodyBaseType V2GRequest ;
+	struct iso2SessionStopReqType SessionStopReq ;
+	struct iso2AuthorizationReqType AuthorizationReq ;
+	struct iso2AlignmentCheckResType AlignmentCheckRes ;
+	struct iso2SessionStopResType SessionStopRes ;
+	struct iso2AuthorizationResType AuthorizationRes ;
+	struct iso2VehicleCheckOutReqType VehicleCheckOutReq ;
+	struct iso2ChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+	struct iso2VehicleCheckOutResType VehicleCheckOutRes ;
+	struct iso2ChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+	struct iso2V2GResponseType V2GResponse ;
+	struct iso2FinePositioningSetupReqType FinePositioningSetupReq ;
+	struct iso2FinePositioningSetupResType FinePositioningSetupRes ;
+	struct iso2ServiceDetailReqType ServiceDetailReq ;
+	struct iso2DC_BidirectionalControlReqType DC_BidirectionalControlReq ;
+	struct iso2ServiceDetailResType ServiceDetailRes ;
+	struct iso2DC_BidirectionalControlResType DC_BidirectionalControlRes ;
+	struct iso2LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters ;
+	struct iso2MV_EVSEFinePositioningParametersType MV_EVSEFinePositioningParameters ;
+	struct iso2RelativeTimeIntervalType RelativeTimeInterval ;
+	struct iso2SalesTariffEntryType SalesTariffEntry ;
+	struct iso2LFA_EVSEFinePositioningSetupParametersType LFA_EVSEFinePositioningSetupParameters ;
+	struct iso2AC_EVChargeParameterType AC_EVChargeParameter ;
+	struct iso2MV_EVSEFinePositioningSetupParametersType MV_EVSEFinePositioningSetupParameters ;
+	struct iso2EVEnergyTransferParameterType EVEnergyTransferParameter ;
+	struct iso2DC_EVSEBidirectionalParameterType DC_EVSEBidirectionalParameter ;
+	struct iso2SAScheduleListType SAScheduleList ;
+	struct iso2EVSEFinePositioningSetupParametersType EVSEFinePositioningSetupParameters ;
+	struct iso2Generic_EVSEFinePositioningParametersType Generic_EVSEFinePositioningParameters ;
+	struct iso2DC_EVChargeParameterType DC_EVChargeParameter ;
+	struct iso2DC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	struct iso2LFA_EVFinePositioningParametersType LFA_EVFinePositioningParameters ;
+	struct iso2EVFinePositioningSetupParametersType EVFinePositioningSetupParameters ;
+	struct iso2AC_EVSEBidirectionalParameterType AC_EVSEBidirectionalParameter ;
+	struct iso2EVFinePositioningParametersType EVFinePositioningParameters ;
+	struct iso2WPT_EVChargeParameterType WPT_EVChargeParameter ;
+	struct iso2LFA_EVSEFinePositioningParametersType LFA_EVSEFinePositioningParameters ;
+	struct iso2EVSEEnergyTransferParameterType EVSEEnergyTransferParameter ;
+	struct iso2AC_EVBidirectionalParameterType AC_EVBidirectionalParameter ;
+	struct iso2EVSEFinePositioningParametersType EVSEFinePositioningParameters ;
+	struct iso2WPT_EVSEChargeParameterType WPT_EVSEChargeParameter ;
+	struct iso2AC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	struct iso2PMaxScheduleEntryType PMaxScheduleEntry ;
+	struct iso2Generic_EVFinePositioningParametersType Generic_EVFinePositioningParameters ;
+	struct iso2DC_EVBidirectionalParameterType DC_EVBidirectionalParameter ;
+	struct iso2SignaturePropertyType SignatureProperty ;
+	struct iso2DSAKeyValueType DSAKeyValue ;
+	struct iso2SignaturePropertiesType SignatureProperties ;
+	struct iso2KeyValueType KeyValue ;
+	struct iso2TransformsType Transforms ;
+	struct iso2DigestMethodType DigestMethod ;
+	struct iso2SignatureType Signature ;
+	struct iso2RetrievalMethodType RetrievalMethod ;
+	struct iso2ManifestType Manifest ;
+	struct iso2ReferenceType Reference ;
+	struct iso2CanonicalizationMethodType CanonicalizationMethod ;
+	struct iso2RSAKeyValueType RSAKeyValue ;
+	struct iso2TransformType Transform ;
+	struct iso2PGPDataType PGPData ;
+	struct {
+		exi_string_character_t characters[iso2EXIDocument_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct iso2SignatureMethodType SignatureMethod ;
+	struct iso2KeyInfoType KeyInfo ;
+	struct iso2SPKIDataType SPKIData ;
+	struct iso2X509DataType X509Data ;
+	struct iso2SignatureValueType SignatureValue ;
+	struct {
+		exi_string_character_t characters[iso2EXIDocument_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct {
+		uint8_t bytes[iso2EXIDocument_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct iso2SignedInfoType SignedInfo ;
+	struct iso2ObjectType Object ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int V2G_Message_isUsed:1;
+	unsigned int ServiceDiscoveryReq_isUsed:1;
+	unsigned int ServiceDiscoveryRes_isUsed:1;
+	unsigned int FinePositioningReq_isUsed:1;
+	unsigned int FinePositioningRes_isUsed:1;
+	unsigned int DisconnectChargingDeviceReq_isUsed:1;
+	unsigned int DisconnectChargingDeviceRes_isUsed:1;
+	unsigned int PowerDemandReq_isUsed:1;
+	unsigned int MeteringReceiptReq_isUsed:1;
+	unsigned int PaymentDetailsReq_isUsed:1;
+	unsigned int PowerDemandRes_isUsed:1;
+	unsigned int MeteringReceiptRes_isUsed:1;
+	unsigned int PaymentDetailsRes_isUsed:1;
+	unsigned int SessionSetupReq_isUsed:1;
+	unsigned int SessionSetupRes_isUsed:1;
+	unsigned int CableCheckReq_isUsed:1;
+	unsigned int CableCheckRes_isUsed:1;
+	unsigned int CertificateInstallationReq_isUsed:1;
+	unsigned int CertificateInstallationRes_isUsed:1;
+	unsigned int SystemStatusReq_isUsed:1;
+	unsigned int SystemStatusRes_isUsed:1;
+	unsigned int PairingReq_isUsed:1;
+	unsigned int WeldingDetectionReq_isUsed:1;
+	unsigned int ConnectChargingDeviceReq_isUsed:1;
+	unsigned int PairingRes_isUsed:1;
+	unsigned int WeldingDetectionRes_isUsed:1;
+	unsigned int ConnectChargingDeviceRes_isUsed:1;
+	unsigned int CertificateUpdateReq_isUsed:1;
+	unsigned int CertificateUpdateRes_isUsed:1;
+	unsigned int PaymentServiceSelectionReq_isUsed:1;
+	unsigned int PowerDeliveryReq_isUsed:1;
+	unsigned int PaymentServiceSelectionRes_isUsed:1;
+	unsigned int PowerDeliveryRes_isUsed:1;
+	unsigned int ChargingStatusReq_isUsed:1;
+	unsigned int ChargingStatusRes_isUsed:1;
+	unsigned int BodyElement_isUsed:1;
+	unsigned int AC_BidirectionalControlReq_isUsed:1;
+	unsigned int AC_BidirectionalControlRes_isUsed:1;
+	unsigned int VehicleCheckInReq_isUsed:1;
+	unsigned int CurrentDemandReq_isUsed:1;
+	unsigned int VehicleCheckInRes_isUsed:1;
+	unsigned int PreChargeReq_isUsed:1;
+	unsigned int CurrentDemandRes_isUsed:1;
+	unsigned int PreChargeRes_isUsed:1;
+	unsigned int AlignmentCheckReq_isUsed:1;
+	unsigned int V2GRequest_isUsed:1;
+	unsigned int SessionStopReq_isUsed:1;
+	unsigned int AuthorizationReq_isUsed:1;
+	unsigned int AlignmentCheckRes_isUsed:1;
+	unsigned int SessionStopRes_isUsed:1;
+	unsigned int AuthorizationRes_isUsed:1;
+	unsigned int VehicleCheckOutReq_isUsed:1;
+	unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+	unsigned int VehicleCheckOutRes_isUsed:1;
+	unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+	unsigned int V2GResponse_isUsed:1;
+	unsigned int FinePositioningSetupReq_isUsed:1;
+	unsigned int FinePositioningSetupRes_isUsed:1;
+	unsigned int ServiceDetailReq_isUsed:1;
+	unsigned int DC_BidirectionalControlReq_isUsed:1;
+	unsigned int ServiceDetailRes_isUsed:1;
+	unsigned int DC_BidirectionalControlRes_isUsed:1;
+	unsigned int LFA_EVFinePositioningSetupParameters_isUsed:1;
+	unsigned int MV_EVSEFinePositioningParameters_isUsed:1;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	unsigned int SalesTariffEntry_isUsed:1;
+	unsigned int LFA_EVSEFinePositioningSetupParameters_isUsed:1;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	unsigned int MV_EVSEFinePositioningSetupParameters_isUsed:1;
+	unsigned int EVEnergyTransferParameter_isUsed:1;
+	unsigned int DC_EVSEBidirectionalParameter_isUsed:1;
+	unsigned int SAScheduleList_isUsed:1;
+	unsigned int EVSEFinePositioningSetupParameters_isUsed:1;
+	unsigned int Generic_EVSEFinePositioningParameters_isUsed:1;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	unsigned int LFA_EVFinePositioningParameters_isUsed:1;
+	unsigned int EVFinePositioningSetupParameters_isUsed:1;
+	unsigned int AC_EVSEBidirectionalParameter_isUsed:1;
+	unsigned int EVFinePositioningParameters_isUsed:1;
+	unsigned int WPT_EVChargeParameter_isUsed:1;
+	unsigned int LFA_EVSEFinePositioningParameters_isUsed:1;
+	unsigned int EVSEEnergyTransferParameter_isUsed:1;
+	unsigned int AC_EVBidirectionalParameter_isUsed:1;
+	unsigned int EVSEFinePositioningParameters_isUsed:1;
+	unsigned int WPT_EVSEChargeParameter_isUsed:1;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	unsigned int PMaxScheduleEntry_isUsed:1;
+	unsigned int Generic_EVFinePositioningParameters_isUsed:1;
+	unsigned int DC_EVBidirectionalParameter_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int Object_isUsed:1;
+
+
+	int _warning_;
+};
+
+
+#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES
+/* Possible elements of EXI Fragment */
+struct iso2EXIFragment {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	struct iso2PhysicalValueType EVMaximumVoltage ;
+	uint32_t FrequencyChannel ;
+	iso2EVSEProcessingType EVProcessing ;
+	int BulkChargingComplete ;
+	iso2parkingMethodType ParkingMethod ;
+	uint8_t SAScheduleTupleID ;
+	uint16_t Distance ;
+	struct iso2ParameterSetType ParameterSet ;
+	struct iso2PhysicalValueType EVMinimumDischargeCurrent ;
+	uint8_t SignalSeparationTime ;
+	struct iso2EVSEEnergyTransferParameterType EVSEEnergyTransferParameter ;
+	struct iso2PhysicalValueType EVSEMaximumVoltage ;
+	struct iso2DC_EVSEBidirectionalParameterType DC_EVSEBidirectionalParameter ;
+	iso2chargingSessionType ChargingSession ;
+	struct iso2SubCertificatesType SubCertificates ;
+	struct iso2RetrievalMethodType RetrievalMethod ;
+	struct iso2MagneticVectorSetupListType MagneticVectorSetupList ;
+	struct iso2ParameterSetType PairingParameters ;
+	struct iso2PhysicalValueType EVSEMinimumPower ;
+	struct iso2AC_BidirectionalControlReqType AC_BidirectionalControlReq ;
+	struct iso2CostType Cost ;
+	struct iso2AC_BidirectionalControlResType AC_BidirectionalControlRes ;
+	struct iso2SalesTariffType BuyBackTariff ;
+	int16_t XCoordinate ;
+	iso2EVCheckOutStatusType EVSECheckOutStatus ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_stringValue_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  stringValue ;
+	int16_t RetryCounter ;
+	struct iso2PhysicalValueType EVSEMaximumDischargeCurrent ;
+	struct iso2SensorType Sensor ;
+	uint64_t MeterReadingCharged ;
+	int64_t HMACOutputLength ;
+	struct iso2V2GResponseType V2GResponse ;
+	struct iso2PhysicalValueType EVMinimumVoltage ;
+	struct iso2PhysicalValueType EVMinimumEnergyRequest ;
+	struct iso2RelativeTimeIntervalType RelativeTimeInterval ;
+	struct iso2WPT_EVChargeParameterType WPT_EVChargeParameter ;
+	struct iso2SAScheduleTupleType SAScheduleTuple ;
+	uint16_t ServiceID ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_SalesTariffDescription_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  SalesTariffDescription ;
+	struct iso2PhysicalValueType AngleGAtoVA ;
+	int boolValue ;
+	struct iso2PhysicalValueType EVMaximumDischargeCurrent ;
+	uint16_t NotificationMaxDelay ;
+	struct iso2PhysicalValueType EVSEMaximumDischargePower ;
+	struct iso2PGPDataType PGPData ;
+	struct iso2PhysicalValueType EVSEMaximumChargePower ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_SessionID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SessionID ;
+	struct iso2PhysicalValueType EVSEEnergyToBeDelivered ;
+	struct iso2PhysicalValueType EVMaximumPower ;
+	struct iso2PhysicalValueType EVMaximumCurrent ;
+	struct iso2RSAKeyValueType RSAKeyValue ;
+	struct iso2PhysicalValueType EVSENominalVoltage ;
+	struct iso2MagneticVectorType MagneticVector ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_XPath_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  XPath ;
+	struct iso2SignatureType Signature ;
+	iso2electricalChargingDeviceStatusType EVElectricalChargingDeviceStatus ;
+	iso2EVSEProcessingType EVSEProcessing ;
+	iso2FODStatusType FODStatus ;
+	struct iso2PowerDeliveryResType PowerDeliveryRes ;
+	struct iso2SessionStopResType SessionStopRes ;
+	struct iso2WPT_EVSEChargeParameterType WPT_EVSEChargeParameter ;
+	iso2responseCodeType ResponseCode ;
+	struct iso2PhysicalValueType EVTargetEnergyRequest ;
+	struct iso2FinePositioningSetupReqType FinePositioningSetupReq ;
+	struct iso2PhysicalValueType EVSEPresentCurrent ;
+	struct iso2FinePositioningSetupResType FinePositioningSetupRes ;
+	struct iso2PMaxScheduleEntryType ProfileEntry ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct iso2CertificateChainType SAProvisioningCertificateChain ;
+	struct iso2PowerDeliveryReqType PowerDeliveryReq ;
+	struct iso2SessionStopReqType SessionStopReq ;
+	int ReceiptRequired ;
+	struct iso2ChargingProfileType ChargingProfile ;
+	uint16_t MaxSupportingPoints ;
+	uint32_t start ;
+	struct iso2PhysicalValueType EVMinimumChargePower ;
+	struct iso2PhysicalValueType amount ;
+	struct iso2PreChargeReqType PreChargeReq ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_OEMProvisioningCert_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  OEMProvisioningCert ;
+	uint32_t PackageIndex ;
+	struct iso2PreChargeResType PreChargeRes ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_X509SubjectName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509SubjectName ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	struct iso2CertificateChainType ContractSignatureCertChain ;
+	struct iso2MV_EVSEFinePositioningSetupParametersType MV_EVSEFinePositioningSetupParameters ;
+	struct iso2PhysicalValueType EVSEMinimumDischargeCurrent ;
+	struct iso2PhysicalValueType EVMaximumChargeCurrent ;
+	uint16_t AlignmentOffset ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	int8_t RemainingTimeToTargetSOC ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct iso2SensorMeasurementsType SensorMeasurements ;
+	struct iso2SalesTariffType SalesTariff ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_EVCCID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  EVCCID ;
+	struct iso2PhysicalValueType EVSEMaximumPower ;
+	struct iso2TargetPositionType TargetOffset ;
+	struct iso2ParameterSetType PowerDemandParameters ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	struct iso2DisconnectChargingDeviceReqType DisconnectChargingDeviceReq ;
+	struct iso2DisconnectChargingDeviceResType DisconnectChargingDeviceRes ;
+	struct iso2DSAKeyValueType DSAKeyValue ;
+	struct iso2SalesTariffEntryType SalesTariffEntry ;
+	struct iso2CertificateInstallationResType CertificateInstallationRes ;
+	struct iso2CanonicalizationMethodType CanonicalizationMethod ;
+	struct iso2Generic_EVFinePositioningParametersType Generic_EVFinePositioningParameters ;
+	struct iso2PhysicalValueType EVSEMinimumVoltage ;
+	struct iso2SystemStatusResType SystemStatusRes ;
+	struct iso2PhysicalValueType EVSEOutputPower ;
+	struct iso2SignedInfoType SignedInfo ;
+	struct iso2PhysicalValueType EVMinimumChargeCurrent ;
+	iso2costKindType costKind ;
+	struct iso2SystemStatusReqType SystemStatusReq ;
+	struct iso2CableCheckReqType CableCheckReq ;
+	uint8_t NumEPriceLevels ;
+	int EVSEVoltageLimitAchieved ;
+	uint8_t PackageSeparationTime ;
+	struct iso2CableCheckResType CableCheckRes ;
+	iso2EVCheckInStatusType EVCheckInStatus ;
+	struct iso2PMaxScheduleType PMaxDischargeSchedule ;
+	struct iso2PhysicalValueType EVMinimumPower ;
+	struct iso2PhysicalValueType ChargingPerformance ;
+	struct iso2AlignmentCheckReqType AlignmentCheckReq ;
+	iso2mechanicalChargingDeviceStatusType EVMechanicalChargingDeviceStatus ;
+	uint16_t VehicleSpace ;
+	struct iso2AlignmentCheckResType AlignmentCheckRes ;
+	struct iso2PhysicalValueType EVMinimumDischargePower ;
+	int8_t RemainingTimeToMinimumSOC ;
+	struct iso2AuthorizationResType AuthorizationRes ;
+	struct iso2CertificateInstallationReqType CertificateInstallationReq ;
+	struct iso2PaymentDetailsReqType PaymentDetailsReq ;
+	struct iso2PaymentDetailsResType PaymentDetailsRes ;
+	struct iso2AuthorizationReqType AuthorizationReq ;
+	struct iso2PhysicalValueType EVTargetCurrent ;
+	struct iso2SessionSetupReqType SessionSetupReq ;
+	struct iso2SessionSetupResType SessionSetupRes ;
+	struct iso2PhysicalValueType EVSENominalFrequency ;
+	struct iso2MessageHeaderType Header ;
+	uint8_t NumberOfSensors ;
+	int64_t EVSETimeStamp ;
+	int16_t MeterStatus ;
+	struct iso2MV_EVSEFinePositioningParametersType MV_EVSEFinePositioningParameters ;
+	iso2chargeProgressType ChargeProgress ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct iso2PMaxScheduleType PMaxSchedule ;
+	uint32_t duration ;
+	int8_t RemainingTimeToBulkSOC ;
+	struct iso2CartesianCoordinatesType SensorOrientation ;
+	struct iso2PhysicalValueType EVSEMaximumChargeCurrent ;
+	struct iso2LFA_EVSEFinePositioningParametersType LFA_EVSEFinePositioningParameters ;
+	struct iso2VehicleCheckInResType VehicleCheckInRes ;
+	struct iso2PMaxScheduleEntryType PMaxScheduleEntry ;
+	struct iso2SAScheduleListType SAScheduleList ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_X509SKI_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509SKI ;
+	struct iso2PaymentOptionListType PaymentOptionList ;
+	struct iso2ContractSignatureEncryptedPrivateKeyType ContractSignatureEncryptedPrivateKey ;
+	struct iso2VehicleCheckInReqType VehicleCheckInReq ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Certificate ;
+	uint64_t CheckOutTime ;
+	int8_t CurrentSOC ;
+	int16_t ZCoordinate ;
+	uint16_t MeasurementData ;
+	struct iso2PairingResType PairingRes ;
+	struct iso2PhysicalValueType EVSEMaximumCurrent ;
+	struct iso2LFA_EVFinePositioningParametersType LFA_EVFinePositioningParameters ;
+	struct iso2ParameterSetType AlignmentCheckParameters ;
+	int8_t EffectiveRadiatedPower ;
+	struct iso2PairingReqType PairingReq ;
+	int16_t Value ;
+	int8_t byteValue ;
+	struct iso2CurrentDemandReqType CurrentDemandReq ;
+	struct iso2Generic_EVSEFinePositioningParametersType Generic_EVSEFinePositioningParameters ;
+	struct iso2CurrentDemandResType CurrentDemandRes ;
+	struct iso2AC_EVBidirectionalParameterType AC_EVBidirectionalParameter ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	struct iso2SelectedServiceType SelectedEnergyTransferService ;
+	struct iso2PhysicalValueType startValue ;
+	struct iso2SelectedServiceListType SelectedVASList ;
+	struct iso2ChargeParameterDiscoveryReqType ChargeParameterDiscoveryReq ;
+	struct iso2ChargeParameterDiscoveryResType ChargeParameterDiscoveryRes ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_SigMeterReading_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SigMeterReading ;
+	int8_t TargetSOC ;
+	struct iso2EVSEStatusType EVSEStatus ;
+	struct iso2PhysicalValueType EVSEMinimumChargeCurrent ;
+	iso2electricalChargingDeviceStatusType EVSEElectricalChargingDeviceStatus ;
+	int64_t X509SerialNumber ;
+	iso2paymentOptionType PaymentOption ;
+	struct iso2TransformsType Transforms ;
+	struct iso2PhysicalValueType EVSEPeakCurrentRipple ;
+	struct iso2ConsumptionCostType ConsumptionCost ;
+	struct iso2EVSEFinePositioningSetupParametersType EVSEFinePositioningSetupParameters ;
+	uint8_t EPriceLevel ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+	struct iso2X509IssuerSerialType X509IssuerSerial ;
+	struct iso2SPKIDataType SPKIData ;
+	struct iso2MagneticVectorListType MagneticVectorList ;
+	struct iso2EVSEFinePositioningParametersType EVSEFinePositioningParameters ;
+	struct iso2PhysicalValueType EVTargetPower ;
+	struct iso2SensorPackageListType SensorPackageList ;
+	uint32_t DepartureTime ;
+	int InletHot ;
+	struct iso2PhysicalValueType EVPresentActivePower ;
+	struct iso2X509DataType X509Data ;
+	int16_t YCoordinate ;
+	struct iso2KeyValueType KeyValue ;
+	struct iso2DisplayParametersType DisplayParameters ;
+	int EVSEPowerLimitAchieved ;
+	struct iso2BodyType Body ;
+	struct iso2DC_EVChargeParameterType DC_EVChargeParameter ;
+	struct iso2ServiceType Service ;
+	struct iso2SignaturePropertyType SignatureProperty ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	struct iso2LFA_EVFinePositioningSetupParametersType LFA_EVFinePositioningSetupParameters ;
+	struct iso2MinimumPMaxRequestType MinimumPMaxRequest ;
+	struct iso2FinePositioningReqType FinePositioningReq ;
+	struct iso2ServiceListType EnergyTransferServiceList ;
+	struct iso2FinePositioningResType FinePositioningRes ;
+	struct iso2AC_EVSEBidirectionalParameterType AC_EVSEBidirectionalParameter ;
+	int FreeService ;
+	struct iso2AC_EVSEChargeParameterType AC_EVSEChargeParameter ;
+	uint8_t SensorID ;
+	struct iso2PhysicalValueType EVSECurrentRegulationTolerance ;
+	iso2mechanicalChargingDeviceStatusType EVSEMechanicalChargingDeviceStatus ;
+	struct iso2EVEnergyTransferParameterType EVEnergyTransferParameter ;
+	uint8_t SignalPulseDuration ;
+	int16_t shortValue ;
+	struct iso2ManifestType Manifest ;
+	struct iso2DC_EVSEChargeParameterType DC_EVSEChargeParameter ;
+	struct iso2MeteringReceiptReqType MeteringReceiptReq ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_MeterID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MeterID ;
+	struct iso2MeteringReceiptResType MeteringReceiptRes ;
+	struct iso2ServiceDiscoveryReqType ServiceDiscoveryReq ;
+	uint8_t SalesTariffID ;
+	struct iso2ServiceDiscoveryResType ServiceDiscoveryRes ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_X509CRL_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509CRL ;
+	struct iso2MagneticVectorSetupType MagneticVectorSetup ;
+	struct iso2DigestMethodType DigestMethod ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_SPKISexp_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SPKISexp ;
+	uint64_t MeterReadingDischarged ;
+	struct iso2MeasurementDataListType MeasurementDataList ;
+	struct iso2SignaturePropertiesType SignatureProperties ;
+	struct iso2CartesianCoordinatesType SensorPosition ;
+	struct iso2LFA_EVSEFinePositioningSetupParametersType LFA_EVSEFinePositioningSetupParameters ;
+	struct iso2EMAIDType eMAID ;
+	struct iso2SensorPackageType SensorPackage ;
+	iso2EVCheckOutStatusType EVCheckOutStatus ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_X509Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509Certificate ;
+	struct iso2X509IssuerSerialType RootCertificateID ;
+	struct iso2DC_BidirectionalControlReqType DC_BidirectionalControlReq ;
+	struct iso2PhysicalValueType EVSEPresentVoltage ;
+	struct iso2DC_BidirectionalControlResType DC_BidirectionalControlRes ;
+	struct iso2ServiceListType VASList ;
+	struct iso2MeterInfoType MeterInfo ;
+	struct iso2PhysicalValueType EVSETargetReactivePower ;
+	struct iso2ChargingStatusReqType ChargingStatusReq ;
+	struct iso2ParameterSetType GenericParameters ;
+	struct iso2ChargingStatusResType ChargingStatusRes ;
+	struct iso2PhysicalValueType EVMaximumChargePower ;
+	int8_t BulkSOC ;
+	uint8_t NumberOfSignalPackages ;
+	uint16_t ParameterSetID ;
+	struct iso2PhysicalValueType PMax ;
+	struct iso2PhysicalValueType EVMaximumEnergyRequest ;
+	iso2EVOperationType EVOperation ;
+	struct iso2CertificateUpdateResType CertificateUpdateRes ;
+	int ChargingComplete ;
+	struct iso2ListOfRootCertificateIDsType ListOfRootCertificateIDs ;
+	struct iso2PhysicalValueType RotationVAtoGA ;
+	struct iso2PhysicalValueType EVTargetVoltage ;
+	struct iso2CertificateUpdateReqType CertificateUpdateReq ;
+	struct iso2ConnectChargingDeviceResType ConnectChargingDeviceRes ;
+	struct iso2DiffieHellmanPublickeyType DHpublickey ;
+	struct iso2ServiceParameterListType ServiceParameterList ;
+	struct iso2SignatureValueType SignatureValue ;
+	struct iso2PhysicalValueType physicalValue ;
+	iso2operationModeType OperationMode ;
+	int EVSECurrentLimitAchieved ;
+	struct iso2ServiceDetailReqType ServiceDetailReq ;
+	struct iso2ServiceDetailResType ServiceDetailRes ;
+	int32_t intValue ;
+	struct iso2PhysicalValueType EVMaximumDischargePower ;
+	int8_t MinimumSOC ;
+	iso2paymentOptionType SelectedPaymentOption ;
+	struct iso2AnonType_V2G_Message V2G_Message ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_EVSEID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  EVSEID ;
+	int64_t TMeter ;
+	struct iso2SensorOrderListType SensorOrder ;
+	struct iso2ServiceIDListType SupportedServiceIDs ;
+	struct {
+		uint8_t bytes[iso2EXIFragment_GenChallenge_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  GenChallenge ;
+	struct iso2EVFinePositioningParametersType EVFinePositioningParameters ;
+	struct iso2SensorListType SensorList ;
+	struct iso2KeyInfoType KeyInfo ;
+	struct iso2ConnectChargingDeviceReqType ConnectChargingDeviceReq ;
+	struct iso2AC_EVChargeParameterType AC_EVChargeParameter ;
+	struct iso2ParameterType Parameter ;
+	struct iso2WeldingDetectionResType WeldingDetectionRes ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_GAID_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  GAID ;
+	uint16_t SignalFrequency ;
+	struct iso2PhysicalValueType EVSETargetPower ;
+	struct iso2DC_EVBidirectionalParameterType DC_EVBidirectionalParameter ;
+	struct iso2SignatureMethodType SignatureMethod ;
+	struct iso2WeldingDetectionReqType WeldingDetectionReq ;
+	struct iso2SelectedServiceType SelectedService ;
+	struct iso2PhysicalValueType EVInputPower ;
+	struct iso2VehicleCheckOutReqType VehicleCheckOutReq ;
+	struct iso2PowerDemandReqType PowerDemandReq ;
+	struct iso2VehicleCheckOutResType VehicleCheckOutRes ;
+	uint16_t CurrentRange ;
+	struct iso2PhysicalValueType EVPresentReactivePower ;
+	struct {
+		exi_string_character_t characters[iso2EXIFragment_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	struct iso2BodyBaseType V2GRequest ;
+	struct iso2ReferenceType Reference ;
+	struct iso2BodyBaseType BodyElement ;
+	struct iso2PMaxScheduleEntryType MinimumPMaxScheduleEntry ;
+	struct iso2EVFinePositioningSetupParametersType EVFinePositioningSetupParameters ;
+	iso2EVSENotificationType EVSENotification ;
+	struct iso2PaymentServiceSelectionReqType PaymentServiceSelectionReq ;
+	struct iso2PaymentServiceSelectionResType PaymentServiceSelectionRes ;
+	struct iso2TransformType Transform ;
+	struct iso2ObjectType Object ;
+	uint16_t TargetOffsetY ;
+	struct iso2PowerDemandResType PowerDemandRes ;
+	uint16_t TargetOffsetX ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */
+	unsigned int EVMaximumVoltage_isUsed:1;
+	unsigned int FrequencyChannel_isUsed:1;
+	unsigned int EVProcessing_isUsed:1;
+	unsigned int BulkChargingComplete_isUsed:1;
+	unsigned int ParkingMethod_isUsed:1;
+	unsigned int SAScheduleTupleID_isUsed:1;
+	unsigned int Distance_isUsed:1;
+	unsigned int ParameterSet_isUsed:1;
+	unsigned int EVMinimumDischargeCurrent_isUsed:1;
+	unsigned int SignalSeparationTime_isUsed:1;
+	unsigned int EVSEEnergyTransferParameter_isUsed:1;
+	unsigned int EVSEMaximumVoltage_isUsed:1;
+	unsigned int DC_EVSEBidirectionalParameter_isUsed:1;
+	unsigned int ChargingSession_isUsed:1;
+	unsigned int SubCertificates_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int MagneticVectorSetupList_isUsed:1;
+	unsigned int PairingParameters_isUsed:1;
+	unsigned int EVSEMinimumPower_isUsed:1;
+	unsigned int AC_BidirectionalControlReq_isUsed:1;
+	unsigned int Cost_isUsed:1;
+	unsigned int AC_BidirectionalControlRes_isUsed:1;
+	unsigned int BuyBackTariff_isUsed:1;
+	unsigned int XCoordinate_isUsed:1;
+	unsigned int EVSECheckOutStatus_isUsed:1;
+	unsigned int stringValue_isUsed:1;
+	unsigned int RetryCounter_isUsed:1;
+	unsigned int EVSEMaximumDischargeCurrent_isUsed:1;
+	unsigned int Sensor_isUsed:1;
+	unsigned int MeterReadingCharged_isUsed:1;
+	unsigned int HMACOutputLength_isUsed:1;
+	unsigned int V2GResponse_isUsed:1;
+	unsigned int EVMinimumVoltage_isUsed:1;
+	unsigned int EVMinimumEnergyRequest_isUsed:1;
+	unsigned int RelativeTimeInterval_isUsed:1;
+	unsigned int WPT_EVChargeParameter_isUsed:1;
+	unsigned int SAScheduleTuple_isUsed:1;
+	unsigned int ServiceID_isUsed:1;
+	unsigned int PgenCounter_isUsed:1;
+	unsigned int SalesTariffDescription_isUsed:1;
+	unsigned int AngleGAtoVA_isUsed:1;
+	unsigned int boolValue_isUsed:1;
+	unsigned int EVMaximumDischargeCurrent_isUsed:1;
+	unsigned int NotificationMaxDelay_isUsed:1;
+	unsigned int EVSEMaximumDischargePower_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int EVSEMaximumChargePower_isUsed:1;
+	unsigned int SessionID_isUsed:1;
+	unsigned int EVSEEnergyToBeDelivered_isUsed:1;
+	unsigned int EVMaximumPower_isUsed:1;
+	unsigned int EVMaximumCurrent_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int EVSENominalVoltage_isUsed:1;
+	unsigned int MagneticVector_isUsed:1;
+	unsigned int XPath_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int EVElectricalChargingDeviceStatus_isUsed:1;
+	unsigned int EVSEProcessing_isUsed:1;
+	unsigned int FODStatus_isUsed:1;
+	unsigned int PowerDeliveryRes_isUsed:1;
+	unsigned int SessionStopRes_isUsed:1;
+	unsigned int WPT_EVSEChargeParameter_isUsed:1;
+	unsigned int ResponseCode_isUsed:1;
+	unsigned int EVTargetEnergyRequest_isUsed:1;
+	unsigned int FinePositioningSetupReq_isUsed:1;
+	unsigned int EVSEPresentCurrent_isUsed:1;
+	unsigned int FinePositioningSetupRes_isUsed:1;
+	unsigned int ProfileEntry_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int SAProvisioningCertificateChain_isUsed:1;
+	unsigned int PowerDeliveryReq_isUsed:1;
+	unsigned int SessionStopReq_isUsed:1;
+	unsigned int ReceiptRequired_isUsed:1;
+	unsigned int ChargingProfile_isUsed:1;
+	unsigned int MaxSupportingPoints_isUsed:1;
+	unsigned int start_isUsed:1;
+	unsigned int EVMinimumChargePower_isUsed:1;
+	unsigned int amount_isUsed:1;
+	unsigned int PreChargeReq_isUsed:1;
+	unsigned int OEMProvisioningCert_isUsed:1;
+	unsigned int PackageIndex_isUsed:1;
+	unsigned int PreChargeRes_isUsed:1;
+	unsigned int P_isUsed:1;
+	unsigned int Q_isUsed:1;
+	unsigned int X509SubjectName_isUsed:1;
+	unsigned int G_isUsed:1;
+	unsigned int J_isUsed:1;
+	unsigned int ContractSignatureCertChain_isUsed:1;
+	unsigned int MV_EVSEFinePositioningSetupParameters_isUsed:1;
+	unsigned int EVSEMinimumDischargeCurrent_isUsed:1;
+	unsigned int EVMaximumChargeCurrent_isUsed:1;
+	unsigned int AlignmentOffset_isUsed:1;
+	unsigned int Y_isUsed:1;
+	unsigned int RemainingTimeToTargetSOC_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int SensorMeasurements_isUsed:1;
+	unsigned int SalesTariff_isUsed:1;
+	unsigned int EVCCID_isUsed:1;
+	unsigned int EVSEMaximumPower_isUsed:1;
+	unsigned int TargetOffset_isUsed:1;
+	unsigned int PowerDemandParameters_isUsed:1;
+	unsigned int PGPKeyID_isUsed:1;
+	unsigned int DisconnectChargingDeviceReq_isUsed:1;
+	unsigned int DisconnectChargingDeviceRes_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int SalesTariffEntry_isUsed:1;
+	unsigned int CertificateInstallationRes_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int Generic_EVFinePositioningParameters_isUsed:1;
+	unsigned int EVSEMinimumVoltage_isUsed:1;
+	unsigned int SystemStatusRes_isUsed:1;
+	unsigned int EVSEOutputPower_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int EVMinimumChargeCurrent_isUsed:1;
+	unsigned int costKind_isUsed:1;
+	unsigned int SystemStatusReq_isUsed:1;
+	unsigned int CableCheckReq_isUsed:1;
+	unsigned int NumEPriceLevels_isUsed:1;
+	unsigned int EVSEVoltageLimitAchieved_isUsed:1;
+	unsigned int PackageSeparationTime_isUsed:1;
+	unsigned int CableCheckRes_isUsed:1;
+	unsigned int EVCheckInStatus_isUsed:1;
+	unsigned int PMaxDischargeSchedule_isUsed:1;
+	unsigned int EVMinimumPower_isUsed:1;
+	unsigned int ChargingPerformance_isUsed:1;
+	unsigned int AlignmentCheckReq_isUsed:1;
+	unsigned int EVMechanicalChargingDeviceStatus_isUsed:1;
+	unsigned int VehicleSpace_isUsed:1;
+	unsigned int AlignmentCheckRes_isUsed:1;
+	unsigned int EVMinimumDischargePower_isUsed:1;
+	unsigned int RemainingTimeToMinimumSOC_isUsed:1;
+	unsigned int AuthorizationRes_isUsed:1;
+	unsigned int CertificateInstallationReq_isUsed:1;
+	unsigned int PaymentDetailsReq_isUsed:1;
+	unsigned int PaymentDetailsRes_isUsed:1;
+	unsigned int AuthorizationReq_isUsed:1;
+	unsigned int EVTargetCurrent_isUsed:1;
+	unsigned int SessionSetupReq_isUsed:1;
+	unsigned int SessionSetupRes_isUsed:1;
+	unsigned int EVSENominalFrequency_isUsed:1;
+	unsigned int Header_isUsed:1;
+	unsigned int NumberOfSensors_isUsed:1;
+	unsigned int EVSETimeStamp_isUsed:1;
+	unsigned int MeterStatus_isUsed:1;
+	unsigned int MV_EVSEFinePositioningParameters_isUsed:1;
+	unsigned int ChargeProgress_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int PMaxSchedule_isUsed:1;
+	unsigned int duration_isUsed:1;
+	unsigned int RemainingTimeToBulkSOC_isUsed:1;
+	unsigned int SensorOrientation_isUsed:1;
+	unsigned int EVSEMaximumChargeCurrent_isUsed:1;
+	unsigned int LFA_EVSEFinePositioningParameters_isUsed:1;
+	unsigned int VehicleCheckInRes_isUsed:1;
+	unsigned int PMaxScheduleEntry_isUsed:1;
+	unsigned int SAScheduleList_isUsed:1;
+	unsigned int X509SKI_isUsed:1;
+	unsigned int PaymentOptionList_isUsed:1;
+	unsigned int ContractSignatureEncryptedPrivateKey_isUsed:1;
+	unsigned int VehicleCheckInReq_isUsed:1;
+	unsigned int Certificate_isUsed:1;
+	unsigned int CheckOutTime_isUsed:1;
+	unsigned int CurrentSOC_isUsed:1;
+	unsigned int ZCoordinate_isUsed:1;
+	unsigned int MeasurementData_isUsed:1;
+	unsigned int PairingRes_isUsed:1;
+	unsigned int EVSEMaximumCurrent_isUsed:1;
+	unsigned int LFA_EVFinePositioningParameters_isUsed:1;
+	unsigned int AlignmentCheckParameters_isUsed:1;
+	unsigned int EffectiveRadiatedPower_isUsed:1;
+	unsigned int PairingReq_isUsed:1;
+	unsigned int Value_isUsed:1;
+	unsigned int byteValue_isUsed:1;
+	unsigned int CurrentDemandReq_isUsed:1;
+	unsigned int Generic_EVSEFinePositioningParameters_isUsed:1;
+	unsigned int CurrentDemandRes_isUsed:1;
+	unsigned int AC_EVBidirectionalParameter_isUsed:1;
+	unsigned int Modulus_isUsed:1;
+	unsigned int SelectedEnergyTransferService_isUsed:1;
+	unsigned int startValue_isUsed:1;
+	unsigned int SelectedVASList_isUsed:1;
+	unsigned int ChargeParameterDiscoveryReq_isUsed:1;
+	unsigned int ChargeParameterDiscoveryRes_isUsed:1;
+	unsigned int SigMeterReading_isUsed:1;
+	unsigned int TargetSOC_isUsed:1;
+	unsigned int EVSEStatus_isUsed:1;
+	unsigned int EVSEMinimumChargeCurrent_isUsed:1;
+	unsigned int EVSEElectricalChargingDeviceStatus_isUsed:1;
+	unsigned int X509SerialNumber_isUsed:1;
+	unsigned int PaymentOption_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int EVSEPeakCurrentRipple_isUsed:1;
+	unsigned int ConsumptionCost_isUsed:1;
+	unsigned int EVSEFinePositioningSetupParameters_isUsed:1;
+	unsigned int EPriceLevel_isUsed:1;
+	unsigned int Exponent_isUsed:1;
+	unsigned int X509IssuerSerial_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int MagneticVectorList_isUsed:1;
+	unsigned int EVSEFinePositioningParameters_isUsed:1;
+	unsigned int EVTargetPower_isUsed:1;
+	unsigned int SensorPackageList_isUsed:1;
+	unsigned int DepartureTime_isUsed:1;
+	unsigned int InletHot_isUsed:1;
+	unsigned int EVPresentActivePower_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int YCoordinate_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int DisplayParameters_isUsed:1;
+	unsigned int EVSEPowerLimitAchieved_isUsed:1;
+	unsigned int Body_isUsed:1;
+	unsigned int DC_EVChargeParameter_isUsed:1;
+	unsigned int Service_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int PGPKeyPacket_isUsed:1;
+	unsigned int Seed_isUsed:1;
+	unsigned int LFA_EVFinePositioningSetupParameters_isUsed:1;
+	unsigned int MinimumPMaxRequest_isUsed:1;
+	unsigned int FinePositioningReq_isUsed:1;
+	unsigned int EnergyTransferServiceList_isUsed:1;
+	unsigned int FinePositioningRes_isUsed:1;
+	unsigned int AC_EVSEBidirectionalParameter_isUsed:1;
+	unsigned int FreeService_isUsed:1;
+	unsigned int AC_EVSEChargeParameter_isUsed:1;
+	unsigned int SensorID_isUsed:1;
+	unsigned int EVSECurrentRegulationTolerance_isUsed:1;
+	unsigned int EVSEMechanicalChargingDeviceStatus_isUsed:1;
+	unsigned int EVEnergyTransferParameter_isUsed:1;
+	unsigned int SignalPulseDuration_isUsed:1;
+	unsigned int shortValue_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int DC_EVSEChargeParameter_isUsed:1;
+	unsigned int MeteringReceiptReq_isUsed:1;
+	unsigned int MeterID_isUsed:1;
+	unsigned int MeteringReceiptRes_isUsed:1;
+	unsigned int ServiceDiscoveryReq_isUsed:1;
+	unsigned int SalesTariffID_isUsed:1;
+	unsigned int ServiceDiscoveryRes_isUsed:1;
+	unsigned int X509CRL_isUsed:1;
+	unsigned int MagneticVectorSetup_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int SPKISexp_isUsed:1;
+	unsigned int MeterReadingDischarged_isUsed:1;
+	unsigned int MeasurementDataList_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int SensorPosition_isUsed:1;
+	unsigned int LFA_EVSEFinePositioningSetupParameters_isUsed:1;
+	unsigned int eMAID_isUsed:1;
+	unsigned int SensorPackage_isUsed:1;
+	unsigned int EVCheckOutStatus_isUsed:1;
+	unsigned int X509Certificate_isUsed:1;
+	unsigned int RootCertificateID_isUsed:1;
+	unsigned int DC_BidirectionalControlReq_isUsed:1;
+	unsigned int EVSEPresentVoltage_isUsed:1;
+	unsigned int DC_BidirectionalControlRes_isUsed:1;
+	unsigned int VASList_isUsed:1;
+	unsigned int MeterInfo_isUsed:1;
+	unsigned int EVSETargetReactivePower_isUsed:1;
+	unsigned int ChargingStatusReq_isUsed:1;
+	unsigned int GenericParameters_isUsed:1;
+	unsigned int ChargingStatusRes_isUsed:1;
+	unsigned int EVMaximumChargePower_isUsed:1;
+	unsigned int BulkSOC_isUsed:1;
+	unsigned int NumberOfSignalPackages_isUsed:1;
+	unsigned int ParameterSetID_isUsed:1;
+	unsigned int PMax_isUsed:1;
+	unsigned int EVMaximumEnergyRequest_isUsed:1;
+	unsigned int EVOperation_isUsed:1;
+	unsigned int CertificateUpdateRes_isUsed:1;
+	unsigned int ChargingComplete_isUsed:1;
+	unsigned int ListOfRootCertificateIDs_isUsed:1;
+	unsigned int RotationVAtoGA_isUsed:1;
+	unsigned int EVTargetVoltage_isUsed:1;
+	unsigned int CertificateUpdateReq_isUsed:1;
+	unsigned int ConnectChargingDeviceRes_isUsed:1;
+	unsigned int DHpublickey_isUsed:1;
+	unsigned int ServiceParameterList_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int physicalValue_isUsed:1;
+	unsigned int OperationMode_isUsed:1;
+	unsigned int EVSECurrentLimitAchieved_isUsed:1;
+	unsigned int ServiceDetailReq_isUsed:1;
+	unsigned int ServiceDetailRes_isUsed:1;
+	unsigned int intValue_isUsed:1;
+	unsigned int EVMaximumDischargePower_isUsed:1;
+	unsigned int MinimumSOC_isUsed:1;
+	unsigned int SelectedPaymentOption_isUsed:1;
+	unsigned int V2G_Message_isUsed:1;
+	unsigned int EVSEID_isUsed:1;
+	unsigned int TMeter_isUsed:1;
+	unsigned int SensorOrder_isUsed:1;
+	unsigned int SupportedServiceIDs_isUsed:1;
+	unsigned int GenChallenge_isUsed:1;
+	unsigned int EVFinePositioningParameters_isUsed:1;
+	unsigned int SensorList_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int ConnectChargingDeviceReq_isUsed:1;
+	unsigned int AC_EVChargeParameter_isUsed:1;
+	unsigned int Parameter_isUsed:1;
+	unsigned int WeldingDetectionRes_isUsed:1;
+	unsigned int GAID_isUsed:1;
+	unsigned int SignalFrequency_isUsed:1;
+	unsigned int EVSETargetPower_isUsed:1;
+	unsigned int DC_EVBidirectionalParameter_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int WeldingDetectionReq_isUsed:1;
+	unsigned int SelectedService_isUsed:1;
+	unsigned int EVInputPower_isUsed:1;
+	unsigned int VehicleCheckOutReq_isUsed:1;
+	unsigned int PowerDemandReq_isUsed:1;
+	unsigned int VehicleCheckOutRes_isUsed:1;
+	unsigned int CurrentRange_isUsed:1;
+	unsigned int EVPresentReactivePower_isUsed:1;
+	unsigned int X509IssuerName_isUsed:1;
+	unsigned int V2GRequest_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int BodyElement_isUsed:1;
+	unsigned int MinimumPMaxScheduleEntry_isUsed:1;
+	unsigned int EVFinePositioningSetupParameters_isUsed:1;
+	unsigned int EVSENotification_isUsed:1;
+	unsigned int PaymentServiceSelectionReq_isUsed:1;
+	unsigned int PaymentServiceSelectionRes_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int Object_isUsed:1;
+	unsigned int TargetOffsetY_isUsed:1;
+	unsigned int PowerDemandRes_isUsed:1;
+	unsigned int TargetOffsetX_isUsed:1;
+
+
+	int _warning_;
+};
+#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */
+
+
+/* Initialization methods for structs */
+
+void init_iso2EXIDocument(struct iso2EXIDocument* exiDoc);
+#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES
+void init_iso2EXIFragment(struct iso2EXIFragment* exiFrag);
+#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */
+void init_iso2RetrievalMethodType(struct iso2RetrievalMethodType* iso2RetrievalMethodType);
+void init_iso2AuthorizationResType(struct iso2AuthorizationResType* iso2AuthorizationResType);
+void init_iso2MV_EVSEFinePositioningSetupParametersType(struct iso2MV_EVSEFinePositioningSetupParametersType* iso2MV_EVSEFinePositioningSetupParametersType);
+void init_iso2X509DataType(struct iso2X509DataType* iso2X509DataType);
+void init_iso2RSAKeyValueType(struct iso2RSAKeyValueType* iso2RSAKeyValueType);
+void init_iso2DC_BidirectionalControlResType(struct iso2DC_BidirectionalControlResType* iso2DC_BidirectionalControlResType);
+void init_iso2CostType(struct iso2CostType* iso2CostType);
+void init_iso2ChargingStatusResType(struct iso2ChargingStatusResType* iso2ChargingStatusResType);
+void init_iso2MeterInfoType(struct iso2MeterInfoType* iso2MeterInfoType);
+void init_iso2AC_EVChargeParameterType(struct iso2AC_EVChargeParameterType* iso2AC_EVChargeParameterType);
+void init_iso2AC_EVSEBidirectionalParameterType(struct iso2AC_EVSEBidirectionalParameterType* iso2AC_EVSEBidirectionalParameterType);
+void init_iso2VehicleCheckOutResType(struct iso2VehicleCheckOutResType* iso2VehicleCheckOutResType);
+void init_iso2MagneticVectorListType(struct iso2MagneticVectorListType* iso2MagneticVectorListType);
+void init_iso2CableCheckResType(struct iso2CableCheckResType* iso2CableCheckResType);
+void init_iso2ServiceDiscoveryReqType(struct iso2ServiceDiscoveryReqType* iso2ServiceDiscoveryReqType);
+void init_iso2ServiceType(struct iso2ServiceType* iso2ServiceType);
+void init_iso2ServiceParameterListType(struct iso2ServiceParameterListType* iso2ServiceParameterListType);
+void init_iso2PMaxScheduleType(struct iso2PMaxScheduleType* iso2PMaxScheduleType);
+void init_iso2SignaturePropertiesType(struct iso2SignaturePropertiesType* iso2SignaturePropertiesType);
+void init_iso2PMaxScheduleEntryType(struct iso2PMaxScheduleEntryType* iso2PMaxScheduleEntryType);
+void init_iso2SignatureType(struct iso2SignatureType* iso2SignatureType);
+void init_iso2VehicleCheckInReqType(struct iso2VehicleCheckInReqType* iso2VehicleCheckInReqType);
+void init_iso2ConnectChargingDeviceResType(struct iso2ConnectChargingDeviceResType* iso2ConnectChargingDeviceResType);
+void init_iso2WeldingDetectionResType(struct iso2WeldingDetectionResType* iso2WeldingDetectionResType);
+void init_iso2SessionStopResType(struct iso2SessionStopResType* iso2SessionStopResType);
+void init_iso2VehicleCheckInResType(struct iso2VehicleCheckInResType* iso2VehicleCheckInResType);
+void init_iso2ServiceListType(struct iso2ServiceListType* iso2ServiceListType);
+void init_iso2CertificateUpdateResType(struct iso2CertificateUpdateResType* iso2CertificateUpdateResType);
+void init_iso2FinePositioningSetupResType(struct iso2FinePositioningSetupResType* iso2FinePositioningSetupResType);
+void init_iso2AC_EVBidirectionalParameterType(struct iso2AC_EVBidirectionalParameterType* iso2AC_EVBidirectionalParameterType);
+void init_iso2DC_BidirectionalControlReqType(struct iso2DC_BidirectionalControlReqType* iso2DC_BidirectionalControlReqType);
+void init_iso2CertificateUpdateReqType(struct iso2CertificateUpdateReqType* iso2CertificateUpdateReqType);
+void init_iso2ConsumptionCostType(struct iso2ConsumptionCostType* iso2ConsumptionCostType);
+void init_iso2SAScheduleListType(struct iso2SAScheduleListType* iso2SAScheduleListType);
+void init_iso2MagneticVectorSetupType(struct iso2MagneticVectorSetupType* iso2MagneticVectorSetupType);
+void init_iso2LFA_EVSEFinePositioningSetupParametersType(struct iso2LFA_EVSEFinePositioningSetupParametersType* iso2LFA_EVSEFinePositioningSetupParametersType);
+void init_iso2PaymentOptionListType(struct iso2PaymentOptionListType* iso2PaymentOptionListType);
+void init_iso2LFA_EVSEFinePositioningParametersType(struct iso2LFA_EVSEFinePositioningParametersType* iso2LFA_EVSEFinePositioningParametersType);
+void init_iso2RelativeTimeIntervalType(struct iso2RelativeTimeIntervalType* iso2RelativeTimeIntervalType);
+void init_iso2EVFinePositioningParametersType(struct iso2EVFinePositioningParametersType* iso2EVFinePositioningParametersType);
+void init_iso2AlignmentCheckReqType(struct iso2AlignmentCheckReqType* iso2AlignmentCheckReqType);
+void init_iso2CertificateInstallationReqType(struct iso2CertificateInstallationReqType* iso2CertificateInstallationReqType);
+void init_iso2TransformsType(struct iso2TransformsType* iso2TransformsType);
+void init_iso2ObjectType(struct iso2ObjectType* iso2ObjectType);
+void init_iso2SensorOrderListType(struct iso2SensorOrderListType* iso2SensorOrderListType);
+void init_iso2ChargeParameterDiscoveryReqType(struct iso2ChargeParameterDiscoveryReqType* iso2ChargeParameterDiscoveryReqType);
+void init_iso2ParameterType(struct iso2ParameterType* iso2ParameterType);
+void init_iso2SessionStopReqType(struct iso2SessionStopReqType* iso2SessionStopReqType);
+void init_iso2SensorMeasurementsType(struct iso2SensorMeasurementsType* iso2SensorMeasurementsType);
+void init_iso2DC_EVSEChargeParameterType(struct iso2DC_EVSEChargeParameterType* iso2DC_EVSEChargeParameterType);
+void init_iso2SensorPackageListType(struct iso2SensorPackageListType* iso2SensorPackageListType);
+void init_iso2MeasurementDataListType(struct iso2MeasurementDataListType* iso2MeasurementDataListType);
+void init_iso2CertificateChainType(struct iso2CertificateChainType* iso2CertificateChainType);
+void init_iso2SignaturePropertyType(struct iso2SignaturePropertyType* iso2SignaturePropertyType);
+void init_iso2TransformType(struct iso2TransformType* iso2TransformType);
+void init_iso2EMAIDType(struct iso2EMAIDType* iso2EMAIDType);
+void init_iso2DSAKeyValueType(struct iso2DSAKeyValueType* iso2DSAKeyValueType);
+void init_iso2EntryType(struct iso2EntryType* iso2EntryType);
+void init_iso2MessageHeaderType(struct iso2MessageHeaderType* iso2MessageHeaderType);
+void init_iso2WPT_EVChargeParameterType(struct iso2WPT_EVChargeParameterType* iso2WPT_EVChargeParameterType);
+void init_iso2DisconnectChargingDeviceReqType(struct iso2DisconnectChargingDeviceReqType* iso2DisconnectChargingDeviceReqType);
+void init_iso2ChargeLoopReqType(struct iso2ChargeLoopReqType* iso2ChargeLoopReqType);
+void init_iso2V2GRequestType(struct iso2V2GRequestType* iso2V2GRequestType);
+void init_iso2MeteringReceiptResType(struct iso2MeteringReceiptResType* iso2MeteringReceiptResType);
+void init_iso2SessionSetupResType(struct iso2SessionSetupResType* iso2SessionSetupResType);
+void init_iso2AC_BidirectionalControlReqType(struct iso2AC_BidirectionalControlReqType* iso2AC_BidirectionalControlReqType);
+void init_iso2MV_EVSEFinePositioningParametersType(struct iso2MV_EVSEFinePositioningParametersType* iso2MV_EVSEFinePositioningParametersType);
+void init_iso2ReferenceType(struct iso2ReferenceType* iso2ReferenceType);
+void init_iso2EVSEEnergyTransferParameterType(struct iso2EVSEEnergyTransferParameterType* iso2EVSEEnergyTransferParameterType);
+void init_iso2MeteringReceiptReqType(struct iso2MeteringReceiptReqType* iso2MeteringReceiptReqType);
+void init_iso2KeyValueType(struct iso2KeyValueType* iso2KeyValueType);
+void init_iso2SensorListType(struct iso2SensorListType* iso2SensorListType);
+void init_iso2CurrentDemandReqType(struct iso2CurrentDemandReqType* iso2CurrentDemandReqType);
+void init_iso2FinePositioningSetupReqType(struct iso2FinePositioningSetupReqType* iso2FinePositioningSetupReqType);
+void init_iso2LFA_EVFinePositioningSetupParametersType(struct iso2LFA_EVFinePositioningSetupParametersType* iso2LFA_EVFinePositioningSetupParametersType);
+void init_iso2SAScheduleTupleType(struct iso2SAScheduleTupleType* iso2SAScheduleTupleType);
+void init_iso2WPT_EVSEChargeParameterType(struct iso2WPT_EVSEChargeParameterType* iso2WPT_EVSEChargeParameterType);
+void init_iso2FinePositioningResType(struct iso2FinePositioningResType* iso2FinePositioningResType);
+void init_iso2BodyBaseType(struct iso2BodyBaseType* iso2BodyBaseType);
+void init_iso2ServiceDetailResType(struct iso2ServiceDetailResType* iso2ServiceDetailResType);
+void init_iso2PowerDeliveryReqType(struct iso2PowerDeliveryReqType* iso2PowerDeliveryReqType);
+void init_iso2PairingResType(struct iso2PairingResType* iso2PairingResType);
+void init_iso2AuthorizationReqType(struct iso2AuthorizationReqType* iso2AuthorizationReqType);
+void init_iso2ParameterSetType(struct iso2ParameterSetType* iso2ParameterSetType);
+void init_iso2SPKIDataType(struct iso2SPKIDataType* iso2SPKIDataType);
+void init_iso2PaymentDetailsResType(struct iso2PaymentDetailsResType* iso2PaymentDetailsResType);
+void init_iso2SignatureMethodType(struct iso2SignatureMethodType* iso2SignatureMethodType);
+void init_iso2AC_BidirectionalControlResType(struct iso2AC_BidirectionalControlResType* iso2AC_BidirectionalControlResType);
+void init_iso2VehicleCheckOutReqType(struct iso2VehicleCheckOutReqType* iso2VehicleCheckOutReqType);
+void init_iso2WeldingDetectionReqType(struct iso2WeldingDetectionReqType* iso2WeldingDetectionReqType);
+void init_iso2AlignmentCheckResType(struct iso2AlignmentCheckResType* iso2AlignmentCheckResType);
+void init_iso2PowerDemandReqType(struct iso2PowerDemandReqType* iso2PowerDemandReqType);
+void init_iso2MinimumPMaxRequestType(struct iso2MinimumPMaxRequestType* iso2MinimumPMaxRequestType);
+void init_iso2DisconnectChargingDeviceResType(struct iso2DisconnectChargingDeviceResType* iso2DisconnectChargingDeviceResType);
+void init_iso2SessionSetupReqType(struct iso2SessionSetupReqType* iso2SessionSetupReqType);
+void init_iso2PaymentDetailsReqType(struct iso2PaymentDetailsReqType* iso2PaymentDetailsReqType);
+void init_iso2Generic_EVFinePositioningParametersType(struct iso2Generic_EVFinePositioningParametersType* iso2Generic_EVFinePositioningParametersType);
+void init_iso2ConnectChargingDeviceReqType(struct iso2ConnectChargingDeviceReqType* iso2ConnectChargingDeviceReqType);
+void init_iso2AC_EVSEChargeParameterType(struct iso2AC_EVSEChargeParameterType* iso2AC_EVSEChargeParameterType);
+void init_iso2SalesTariffEntryType(struct iso2SalesTariffEntryType* iso2SalesTariffEntryType);
+void init_iso2DC_EVSEBidirectionalParameterType(struct iso2DC_EVSEBidirectionalParameterType* iso2DC_EVSEBidirectionalParameterType);
+void init_iso2CanonicalizationMethodType(struct iso2CanonicalizationMethodType* iso2CanonicalizationMethodType);
+void init_iso2DisplayParametersType(struct iso2DisplayParametersType* iso2DisplayParametersType);
+void init_iso2DC_EVBidirectionalParameterType(struct iso2DC_EVBidirectionalParameterType* iso2DC_EVBidirectionalParameterType);
+void init_iso2PaymentServiceSelectionReqType(struct iso2PaymentServiceSelectionReqType* iso2PaymentServiceSelectionReqType);
+void init_iso2MagneticVectorType(struct iso2MagneticVectorType* iso2MagneticVectorType);
+void init_iso2PhysicalValueType(struct iso2PhysicalValueType* iso2PhysicalValueType);
+void init_iso2SystemStatusReqType(struct iso2SystemStatusReqType* iso2SystemStatusReqType);
+void init_iso2SystemStatusResType(struct iso2SystemStatusResType* iso2SystemStatusResType);
+void init_iso2EVSEFinePositioningSetupParametersType(struct iso2EVSEFinePositioningSetupParametersType* iso2EVSEFinePositioningSetupParametersType);
+void init_iso2V2GResponseType(struct iso2V2GResponseType* iso2V2GResponseType);
+void init_iso2BodyType(struct iso2BodyType* iso2BodyType);
+void init_iso2PreChargeResType(struct iso2PreChargeResType* iso2PreChargeResType);
+void init_iso2EVSEFinePositioningParametersType(struct iso2EVSEFinePositioningParametersType* iso2EVSEFinePositioningParametersType);
+void init_iso2PaymentServiceSelectionResType(struct iso2PaymentServiceSelectionResType* iso2PaymentServiceSelectionResType);
+void init_iso2DigestMethodType(struct iso2DigestMethodType* iso2DigestMethodType);
+void init_iso2TargetPositionType(struct iso2TargetPositionType* iso2TargetPositionType);
+void init_iso2LFA_EVFinePositioningParametersType(struct iso2LFA_EVFinePositioningParametersType* iso2LFA_EVFinePositioningParametersType);
+void init_iso2DC_EVChargeParameterType(struct iso2DC_EVChargeParameterType* iso2DC_EVChargeParameterType);
+void init_iso2ServiceDetailReqType(struct iso2ServiceDetailReqType* iso2ServiceDetailReqType);
+void init_iso2PreChargeReqType(struct iso2PreChargeReqType* iso2PreChargeReqType);
+void init_iso2ManifestType(struct iso2ManifestType* iso2ManifestType);
+void init_iso2AnonType_V2G_Message(struct iso2AnonType_V2G_Message* iso2AnonType_V2G_Message);
+void init_iso2SelectedServiceListType(struct iso2SelectedServiceListType* iso2SelectedServiceListType);
+void init_iso2Generic_EVSEFinePositioningParametersType(struct iso2Generic_EVSEFinePositioningParametersType* iso2Generic_EVSEFinePositioningParametersType);
+void init_iso2CartesianCoordinatesType(struct iso2CartesianCoordinatesType* iso2CartesianCoordinatesType);
+void init_iso2KeyInfoType(struct iso2KeyInfoType* iso2KeyInfoType);
+void init_iso2SubCertificatesType(struct iso2SubCertificatesType* iso2SubCertificatesType);
+void init_iso2ListOfRootCertificateIDsType(struct iso2ListOfRootCertificateIDsType* iso2ListOfRootCertificateIDsType);
+void init_iso2EVEnergyTransferParameterType(struct iso2EVEnergyTransferParameterType* iso2EVEnergyTransferParameterType);
+void init_iso2ContractSignatureEncryptedPrivateKeyType(struct iso2ContractSignatureEncryptedPrivateKeyType* iso2ContractSignatureEncryptedPrivateKeyType);
+void init_iso2MagneticVectorSetupListType(struct iso2MagneticVectorSetupListType* iso2MagneticVectorSetupListType);
+void init_iso2PairingReqType(struct iso2PairingReqType* iso2PairingReqType);
+void init_iso2CurrentDemandResType(struct iso2CurrentDemandResType* iso2CurrentDemandResType);
+void init_iso2X509IssuerSerialType(struct iso2X509IssuerSerialType* iso2X509IssuerSerialType);
+void init_iso2ChargingStatusReqType(struct iso2ChargingStatusReqType* iso2ChargingStatusReqType);
+void init_iso2CertificateInstallationResType(struct iso2CertificateInstallationResType* iso2CertificateInstallationResType);
+void init_iso2SensorPackageType(struct iso2SensorPackageType* iso2SensorPackageType);
+void init_iso2PGPDataType(struct iso2PGPDataType* iso2PGPDataType);
+void init_iso2ServiceDiscoveryResType(struct iso2ServiceDiscoveryResType* iso2ServiceDiscoveryResType);
+void init_iso2ServiceIDListType(struct iso2ServiceIDListType* iso2ServiceIDListType);
+void init_iso2EVFinePositioningSetupParametersType(struct iso2EVFinePositioningSetupParametersType* iso2EVFinePositioningSetupParametersType);
+void init_iso2ChargeParameterDiscoveryResType(struct iso2ChargeParameterDiscoveryResType* iso2ChargeParameterDiscoveryResType);
+void init_iso2PowerDemandResType(struct iso2PowerDemandResType* iso2PowerDemandResType);
+void init_iso2ChargingProfileType(struct iso2ChargingProfileType* iso2ChargingProfileType);
+void init_iso2FinePositioningReqType(struct iso2FinePositioningReqType* iso2FinePositioningReqType);
+void init_iso2SalesTariffType(struct iso2SalesTariffType* iso2SalesTariffType);
+void init_iso2SensorType(struct iso2SensorType* iso2SensorType);
+void init_iso2SignatureValueType(struct iso2SignatureValueType* iso2SignatureValueType);
+void init_iso2SignedInfoType(struct iso2SignedInfoType* iso2SignedInfoType);
+void init_iso2PowerDeliveryResType(struct iso2PowerDeliveryResType* iso2PowerDeliveryResType);
+void init_iso2CableCheckReqType(struct iso2CableCheckReqType* iso2CableCheckReqType);
+void init_iso2SelectedServiceType(struct iso2SelectedServiceType* iso2SelectedServiceType);
+void init_iso2DiffieHellmanPublickeyType(struct iso2DiffieHellmanPublickeyType* iso2DiffieHellmanPublickeyType);
+void init_iso2EVSEStatusType(struct iso2EVSEStatusType* iso2EVSEStatusType);
+
+
+#endif /* DEPLOY_ISO2_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 63551 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesDecoder.c


+ 65 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesDecoder.h

@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesDecoder.h
+ * \brief 	Decoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_iso2_DATATYPES_DECODER_H
+#define EXI_iso2_DATATYPES_DECODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "iso2EXIDatatypes.h"
+
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+int decode_iso2ExiDocument(bitstream_t* stream, struct iso2EXIDocument* exiDoc);
+
+#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES
+int decode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag);
+#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */
+
+#endif /* DEPLOY_ISO2_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 44215 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesEncoder.c


+ 68 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/iso2/iso2EXIDatatypesEncoder.h

@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: V2G_CI_MsgDef.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesEncoder.h
+ * \brief 	Encoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_iso2_DATATYPES_ENCODER_H
+#define EXI_iso2_DATATYPES_ENCODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "iso2EXIDatatypes.h"
+
+#if DEPLOY_ISO2_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "../codec/EXITypes.h"
+
+
+int encode_iso2ExiDocument(bitstream_t* stream, struct iso2EXIDocument* exiDoc);
+
+#if DEPLOY_ISO2_CODEC_FRAGMENT == SUPPORT_YES
+int encode_iso2ExiFragment(bitstream_t* stream, struct iso2EXIFragment* exiFrag);
+#endif /* DEPLOY_ISO2_CODEC_FRAGMENT */
+
+
+#endif /* DEPLOY_ISO2_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 92 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/transport/v2gtp.c

@@ -0,0 +1,92 @@
+
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch@siemens.com
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ ********************************************************************/
+
+/*
+ * This file implements the v2gtp header writer and reader.
+ *
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+
+#include "v2gtp.h"
+
+
+int write_v2gtpHeader(uint8_t* outStream, uint32_t outStreamLength, uint16_t payloadType)
+{
+
+	/* write v2gtp version number 1=byte */
+	outStream[0]=V2GTP_VERSION;
+
+	/* write inverse v2gtp version */
+	outStream[1]=V2GTP_VERSION_INV;
+
+
+	/* write payload type */
+	outStream[3] = (uint8_t)(payloadType & 0xFF);
+	outStream[2] = (uint8_t)(payloadType >> 8 & 0xFF);
+
+	/* write payload length */
+	outStream[7] = (uint8_t)(outStreamLength & 0xFF);
+	outStream[6] = (uint8_t)(outStreamLength>>8 & 0xFF);
+	outStream[5] = (uint8_t)(outStreamLength>>16 & 0xFF);
+	outStream[4] = (uint8_t)(outStreamLength>>24 & 0xFF);
+
+	return 0;
+}
+
+int read_v2gtpHeader(uint8_t* inStream, uint32_t* payloadLength)
+{
+	uint16_t payloadType=0;
+
+
+	/* check, if we support this v2gtp version */
+	if(inStream[0]!=V2GTP_VERSION || inStream[1]!=V2GTP_VERSION_INV)
+		return -1;
+
+
+	/* check, if we support this payload type*/
+	payloadType = inStream[2];
+	payloadType = (payloadType << 8 | inStream[3]);
+
+	if(payloadType != V2GTP_EXI_TYPE)
+		return -1;
+
+
+	/* determine payload length*/
+	*payloadLength = inStream[4];
+	*payloadLength = (*payloadLength << 8 | inStream[5]);
+	*payloadLength = (*payloadLength << 8 | inStream[6]);
+	*payloadLength = (*payloadLength << 8 | inStream[7]);
+
+	return 0;
+}
+

+ 55 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/transport/v2gtp.h

@@ -0,0 +1,55 @@
+
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Sebastian.Kaebisch@siemens.com
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ ********************************************************************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef V2GTP_H_
+#define V2GTP_H_
+
+#include <stdint.h>
+
+/* generic V2GTP header length */
+#define V2GTP_HEADER_LENGTH 8
+
+/* define V2GTP Version */
+#define V2GTP_VERSION 0x01
+#define V2GTP_VERSION_INV 0xFE
+
+/* define V2GTP payload types*/
+#define V2GTP_EXI_TYPE 0x8001
+
+int write_v2gtpHeader(uint8_t* outStream, uint32_t outStreamLength, uint16_t payloadType);
+
+int read_v2gtpHeader(uint8_t* inStream, uint32_t* payloadLength);
+
+#endif /* V2GTP_H_ */
+
+#ifdef __cplusplus
+}
+#endif

+ 255 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypes.c

@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: xmldsig-core-schema.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+#include <stdint.h>
+
+#include "xmldsigEXIDatatypes.h"
+#include "../codec/EXITypes.h"
+
+
+#ifndef EXI_xmldsig_DATATYPES_C
+#define EXI_xmldsig_DATATYPES_C
+
+#if DEPLOY_XMLDSIG_CODEC == SUPPORT_YES
+
+
+void init_xmldsigEXIDocument(struct xmldsigEXIDocument* exiDoc) {
+	exiDoc->SignatureProperty_isUsed = 0u;
+	exiDoc->DSAKeyValue_isUsed = 0u;
+	exiDoc->SignatureProperties_isUsed = 0u;
+	exiDoc->KeyValue_isUsed = 0u;
+	exiDoc->Transforms_isUsed = 0u;
+	exiDoc->DigestMethod_isUsed = 0u;
+	exiDoc->Signature_isUsed = 0u;
+	exiDoc->RetrievalMethod_isUsed = 0u;
+	exiDoc->Manifest_isUsed = 0u;
+	exiDoc->Reference_isUsed = 0u;
+	exiDoc->CanonicalizationMethod_isUsed = 0u;
+	exiDoc->RSAKeyValue_isUsed = 0u;
+	exiDoc->Transform_isUsed = 0u;
+	exiDoc->PGPData_isUsed = 0u;
+	exiDoc->MgmtData_isUsed = 0u;
+	exiDoc->SignatureMethod_isUsed = 0u;
+	exiDoc->KeyInfo_isUsed = 0u;
+	exiDoc->SPKIData_isUsed = 0u;
+	exiDoc->X509Data_isUsed = 0u;
+	exiDoc->SignatureValue_isUsed = 0u;
+	exiDoc->KeyName_isUsed = 0u;
+	exiDoc->DigestValue_isUsed = 0u;
+	exiDoc->SignedInfo_isUsed = 0u;
+	exiDoc->Object_isUsed = 0u;
+}
+
+
+#if DEPLOY_XMLDSIG_CODEC_FRAGMENT == SUPPORT_YES
+void init_xmldsigEXIFragment(struct xmldsigEXIFragment* exiFrag) {
+	exiFrag->DigestValue_isUsed = 0u;
+	exiFrag->X509Data_isUsed = 0u;
+	exiFrag->KeyValue_isUsed = 0u;
+	exiFrag->DigestMethod_isUsed = 0u;
+	exiFrag->SPKISexp_isUsed = 0u;
+	exiFrag->Transforms_isUsed = 0u;
+	exiFrag->KeyName_isUsed = 0u;
+	exiFrag->X509IssuerName_isUsed = 0u;
+	exiFrag->MgmtData_isUsed = 0u;
+	exiFrag->Reference_isUsed = 0u;
+	exiFrag->SignatureProperties_isUsed = 0u;
+	exiFrag->PGPKeyID_isUsed = 0u;
+	exiFrag->PGPData_isUsed = 0u;
+	exiFrag->DSAKeyValue_isUsed = 0u;
+	exiFrag->SignatureValue_isUsed = 0u;
+	exiFrag->KeyInfo_isUsed = 0u;
+	exiFrag->SignatureProperty_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->PGPKeyPacket_isUsed = 0u;
+	exiFrag->HMACOutputLength_isUsed = 0u;
+	exiFrag->Exponent_isUsed = 0u;
+	exiFrag->Manifest_isUsed = 0u;
+	exiFrag->P_isUsed = 0u;
+	exiFrag->CanonicalizationMethod_isUsed = 0u;
+	exiFrag->Q_isUsed = 0u;
+	exiFrag->Seed_isUsed = 0u;
+	exiFrag->X509SubjectName_isUsed = 0u;
+	exiFrag->X509Certificate_isUsed = 0u;
+	exiFrag->RSAKeyValue_isUsed = 0u;
+	exiFrag->X509IssuerSerial_isUsed = 0u;
+	exiFrag->SPKIData_isUsed = 0u;
+	exiFrag->G_isUsed = 0u;
+	exiFrag->J_isUsed = 0u;
+	exiFrag->SignedInfo_isUsed = 0u;
+	exiFrag->X509SKI_isUsed = 0u;
+	exiFrag->Transform_isUsed = 0u;
+	exiFrag->XPath_isUsed = 0u;
+	exiFrag->Object_isUsed = 0u;
+	exiFrag->X509SerialNumber_isUsed = 0u;
+	exiFrag->RetrievalMethod_isUsed = 0u;
+	exiFrag->Modulus_isUsed = 0u;
+	exiFrag->X509CRL_isUsed = 0u;
+	exiFrag->Signature_isUsed = 0u;
+	exiFrag->Y_isUsed = 0u;
+	exiFrag->SignatureMethod_isUsed = 0u;
+	exiFrag->PgenCounter_isUsed = 0u;
+}
+#endif /* DEPLOY_XMLDSIG_CODEC_FRAGMENT */
+
+void init_xmldsigCanonicalizationMethodType(struct xmldsigCanonicalizationMethodType* xmldsigCanonicalizationMethodType) {
+	xmldsigCanonicalizationMethodType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigManifestType(struct xmldsigManifestType* xmldsigManifestType) {
+	xmldsigManifestType->Id_isUsed = 0u;
+	xmldsigManifestType->Reference.arrayLen = 0u;
+}
+
+void init_xmldsigObjectType(struct xmldsigObjectType* xmldsigObjectType) {
+	xmldsigObjectType->Id_isUsed = 0u;
+	xmldsigObjectType->MimeType_isUsed = 0u;
+	xmldsigObjectType->Encoding_isUsed = 0u;
+	xmldsigObjectType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigTransformType(struct xmldsigTransformType* xmldsigTransformType) {
+	xmldsigTransformType->ANY_isUsed = 0u;
+	xmldsigTransformType->XPath.arrayLen = 0u;
+}
+
+void init_xmldsigSignatureMethodType(struct xmldsigSignatureMethodType* xmldsigSignatureMethodType) {
+	xmldsigSignatureMethodType->HMACOutputLength_isUsed = 0u;
+	xmldsigSignatureMethodType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigDigestMethodType(struct xmldsigDigestMethodType* xmldsigDigestMethodType) {
+	xmldsigDigestMethodType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigRetrievalMethodType(struct xmldsigRetrievalMethodType* xmldsigRetrievalMethodType) {
+	xmldsigRetrievalMethodType->URI_isUsed = 0u;
+	xmldsigRetrievalMethodType->Type_isUsed = 0u;
+	xmldsigRetrievalMethodType->Transforms_isUsed = 0u;
+}
+
+void init_xmldsigSignatureValueType(struct xmldsigSignatureValueType* xmldsigSignatureValueType) {
+	xmldsigSignatureValueType->Id_isUsed = 0u;
+}
+
+void init_xmldsigX509IssuerSerialType(struct xmldsigX509IssuerSerialType* xmldsigX509IssuerSerialType) {
+	(void)xmldsigX509IssuerSerialType; /* avoid unused warning */
+}
+
+void init_xmldsigSignedInfoType(struct xmldsigSignedInfoType* xmldsigSignedInfoType) {
+	xmldsigSignedInfoType->Id_isUsed = 0u;
+	xmldsigSignedInfoType->Reference.arrayLen = 0u;
+}
+
+void init_xmldsigSignaturePropertiesType(struct xmldsigSignaturePropertiesType* xmldsigSignaturePropertiesType) {
+	xmldsigSignaturePropertiesType->Id_isUsed = 0u;
+	xmldsigSignaturePropertiesType->SignatureProperty.arrayLen = 0u;
+}
+
+void init_xmldsigSignaturePropertyType(struct xmldsigSignaturePropertyType* xmldsigSignaturePropertyType) {
+	xmldsigSignaturePropertyType->Id_isUsed = 0u;
+	xmldsigSignaturePropertyType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigKeyValueType(struct xmldsigKeyValueType* xmldsigKeyValueType) {
+	xmldsigKeyValueType->DSAKeyValue_isUsed = 0u;
+	xmldsigKeyValueType->RSAKeyValue_isUsed = 0u;
+	xmldsigKeyValueType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigRSAKeyValueType(struct xmldsigRSAKeyValueType* xmldsigRSAKeyValueType) {
+	(void)xmldsigRSAKeyValueType; /* avoid unused warning */
+}
+
+void init_xmldsigPGPDataType(struct xmldsigPGPDataType* xmldsigPGPDataType) {
+	xmldsigPGPDataType->PGPKeyID_isUsed = 0u;
+	xmldsigPGPDataType->PGPKeyPacket_isUsed = 0u;
+	xmldsigPGPDataType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigTransformsType(struct xmldsigTransformsType* xmldsigTransformsType) {
+	xmldsigTransformsType->Transform.arrayLen = 0u;
+}
+
+void init_xmldsigX509DataType(struct xmldsigX509DataType* xmldsigX509DataType) {
+	xmldsigX509DataType->X509IssuerSerial.arrayLen = 0u;
+	xmldsigX509DataType->X509SKI.arrayLen = 0u;
+	xmldsigX509DataType->X509SubjectName.arrayLen = 0u;
+	xmldsigX509DataType->X509Certificate.arrayLen = 0u;
+	xmldsigX509DataType->X509CRL.arrayLen = 0u;
+	xmldsigX509DataType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigSignatureType(struct xmldsigSignatureType* xmldsigSignatureType) {
+	xmldsigSignatureType->Id_isUsed = 0u;
+	xmldsigSignatureType->KeyInfo_isUsed = 0u;
+	xmldsigSignatureType->Object.arrayLen = 0u;
+}
+
+void init_xmldsigDSAKeyValueType(struct xmldsigDSAKeyValueType* xmldsigDSAKeyValueType) {
+	xmldsigDSAKeyValueType->P_isUsed = 0u;
+	xmldsigDSAKeyValueType->Q_isUsed = 0u;
+	xmldsigDSAKeyValueType->G_isUsed = 0u;
+	xmldsigDSAKeyValueType->J_isUsed = 0u;
+	xmldsigDSAKeyValueType->Seed_isUsed = 0u;
+	xmldsigDSAKeyValueType->PgenCounter_isUsed = 0u;
+}
+
+void init_xmldsigReferenceType(struct xmldsigReferenceType* xmldsigReferenceType) {
+	xmldsigReferenceType->Id_isUsed = 0u;
+	xmldsigReferenceType->URI_isUsed = 0u;
+	xmldsigReferenceType->Type_isUsed = 0u;
+	xmldsigReferenceType->Transforms_isUsed = 0u;
+}
+
+void init_xmldsigSPKIDataType(struct xmldsigSPKIDataType* xmldsigSPKIDataType) {
+	xmldsigSPKIDataType->SPKISexp.arrayLen = 0u;
+	xmldsigSPKIDataType->ANY_isUsed = 0u;
+}
+
+void init_xmldsigKeyInfoType(struct xmldsigKeyInfoType* xmldsigKeyInfoType) {
+	xmldsigKeyInfoType->Id_isUsed = 0u;
+	xmldsigKeyInfoType->KeyName.arrayLen = 0u;
+	xmldsigKeyInfoType->KeyValue.arrayLen = 0u;
+	xmldsigKeyInfoType->RetrievalMethod.arrayLen = 0u;
+	xmldsigKeyInfoType->X509Data.arrayLen = 0u;
+	xmldsigKeyInfoType->PGPData.arrayLen = 0u;
+	xmldsigKeyInfoType->SPKIData.arrayLen = 0u;
+	xmldsigKeyInfoType->MgmtData.arrayLen = 0u;
+	xmldsigKeyInfoType->ANY_isUsed = 0u;
+}
+
+
+
+#endif /* DEPLOY_XMLDSIG_CODEC */
+
+#endif
+

+ 935 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypes.h

@@ -0,0 +1,935 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: xmldsig-core-schema.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypes.h
+ * \brief 	Datatype definitions and structs for given XML Schema definitions and initialization methods
+ *
+ */
+
+#ifndef EXI_xmldsig_DATATYPES_H
+#define EXI_xmldsig_DATATYPES_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SUPPORT_YES 1
+#define SUPPORT_NO 2
+#define DEPLOY_XMLDSIG_CODEC SUPPORT_NO
+#define DEPLOY_XMLDSIG_CODEC_FRAGMENT SUPPORT_NO
+
+#if DEPLOY_XMLDSIG_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "EXITypes.h"
+
+
+/* Datatype definitions and structs for given XML Schema definitions */
+
+#define UNION_YES 1
+#define UNION_NO 2
+#define SAVE_MEMORY_WITH_UNNAMED_UNION UNION_YES
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR 
+#define xmldsigCanonicalizationMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigCanonicalizationMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigCanonicalizationMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[xmldsigCanonicalizationMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define xmldsigObjectType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigObjectType_MimeType_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigObjectType_Encoding_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigObjectType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigObjectType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigObjectType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: MimeType {http://www.w3.org/2001/XMLSchema,string} */
+	struct {
+		exi_string_character_t characters[xmldsigObjectType_MimeType_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MimeType ;
+	unsigned int MimeType_isUsed:1;
+	/* attribute: Encoding {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigObjectType_Encoding_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Encoding ;
+	unsigned int Encoding_isUsed:1;
+	/* element: WC[##any] */
+	struct {
+		exi_string_character_t characters[xmldsigObjectType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define xmldsigTransformType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR 
+#define xmldsigTransformType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigTransformType_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigTransformType_XPath_ARRAY_SIZE 1
+struct xmldsigTransformType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigTransformType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigTransformType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":XPath, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[xmldsigTransformType_XPath_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[xmldsigTransformType_XPath_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} XPath;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigSignatureMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR 
+#define xmldsigSignatureMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigSignatureMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigSignatureMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":HMACOutputLength, http://www.w3.org/2000/09/xmldsig#,HMACOutputLengthType */
+	int64_t HMACOutputLength ;
+	unsigned int HMACOutputLength_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigSignatureMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigDigestMethodType_Algorithm_CHARACTERS_SIZE 65 + EXTRA_CHAR 
+#define xmldsigDigestMethodType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigDigestMethodType {
+	/* attribute: Algorithm {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigDigestMethodType_Algorithm_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Algorithm ;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigDigestMethodType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+#define xmldsigSignatureValueType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigSignatureValueType_CONTENT_BYTES_SIZE 350
+struct xmldsigSignatureValueType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigSignatureValueType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* simple content: http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[xmldsigSignatureValueType_CONTENT_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  CONTENT ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+#define xmldsigX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigX509IssuerSerialType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		exi_string_character_t characters[xmldsigX509IssuerSerialType_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SerialNumber, http://www.w3.org/2001/XMLSchema,integer */
+	int64_t X509SerialNumber ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define xmldsigSignaturePropertyType_Target_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigSignaturePropertyType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigSignaturePropertyType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigSignaturePropertyType {
+	/* attribute: Target {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigSignaturePropertyType_Target_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Target ;
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigSignaturePropertyType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigSignaturePropertyType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+#define xmldsigRSAKeyValueType_Modulus_BYTES_SIZE 350 
+#define xmldsigRSAKeyValueType_Exponent_BYTES_SIZE 350 
+struct xmldsigRSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Modulus, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigRSAKeyValueType_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Exponent, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigRSAKeyValueType_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+#define xmldsigPGPDataType_PGPKeyID_BYTES_SIZE 350 
+#define xmldsigPGPDataType_PGPKeyPacket_BYTES_SIZE 350 
+#define xmldsigPGPDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigPGPDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyID, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[xmldsigPGPDataType_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	unsigned int PGPKeyID_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		uint8_t bytes[xmldsigPGPDataType_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	unsigned int PGPKeyPacket_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigPGPDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigTransformsType_Transform_ARRAY_SIZE 1
+struct xmldsigTransformsType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transform, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])|"http://www.w3.org/2000/09/xmldsig#":XPath){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigTransformType array[xmldsigTransformsType_Transform_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Transform;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define xmldsigX509DataType_X509IssuerSerial_ARRAY_SIZE 1
+#define xmldsigX509DataType_X509SKI_BYTES_SIZE 350 
+#define xmldsigX509DataType_X509SKI_ARRAY_SIZE 1
+#define xmldsigX509DataType_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigX509DataType_X509SubjectName_ARRAY_SIZE 1
+#define xmldsigX509DataType_X509Certificate_BYTES_SIZE 350 
+#define xmldsigX509DataType_X509Certificate_ARRAY_SIZE 1
+#define xmldsigX509DataType_X509CRL_BYTES_SIZE 350 
+#define xmldsigX509DataType_X509CRL_ARRAY_SIZE 1
+#define xmldsigX509DataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigX509DataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509IssuerSerialType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":X509IssuerName,"http://www.w3.org/2000/09/xmldsig#":X509SerialNumber)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigX509IssuerSerialType array[xmldsigX509DataType_X509IssuerSerial_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509IssuerSerial;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SKI, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[xmldsigX509DataType_X509SKI_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[xmldsigX509DataType_X509SKI_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SKI;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509SubjectName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[xmldsigX509DataType_X509SubjectName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[xmldsigX509DataType_X509SubjectName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509SubjectName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Certificate, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[xmldsigX509DataType_X509Certificate_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[xmldsigX509DataType_X509Certificate_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Certificate;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509CRL, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[xmldsigX509DataType_X509CRL_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[xmldsigX509DataType_X509CRL_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509CRL;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigX509DataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+#define xmldsigDSAKeyValueType_P_BYTES_SIZE 350 
+#define xmldsigDSAKeyValueType_Q_BYTES_SIZE 350 
+#define xmldsigDSAKeyValueType_G_BYTES_SIZE 350 
+#define xmldsigDSAKeyValueType_Y_BYTES_SIZE 350 
+#define xmldsigDSAKeyValueType_J_BYTES_SIZE 350 
+#define xmldsigDSAKeyValueType_Seed_BYTES_SIZE 350 
+#define xmldsigDSAKeyValueType_PgenCounter_BYTES_SIZE 350 
+struct xmldsigDSAKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":P, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	unsigned int P_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Q, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	unsigned int Q_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":G, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	unsigned int G_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Y, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":J, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	unsigned int J_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Seed, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	unsigned int Seed_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PgenCounter, http://www.w3.org/2000/09/xmldsig#,CryptoBinary */
+	struct {
+		uint8_t bytes[xmldsigDSAKeyValueType_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+	unsigned int PgenCounter_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+#define xmldsigReferenceType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigReferenceType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigReferenceType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigReferenceType_DigestValue_BYTES_SIZE 350 
+struct xmldsigReferenceType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigReferenceType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigReferenceType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigReferenceType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigTransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,DigestMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigDigestMethodType DigestMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DigestValue, http://www.w3.org/2000/09/xmldsig#,DigestValueType */
+	struct {
+		uint8_t bytes[xmldsigReferenceType_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define xmldsigSPKIDataType_SPKISexp_BYTES_SIZE 350 
+#define xmldsigSPKIDataType_SPKISexp_ARRAY_SIZE 1
+#define xmldsigSPKIDataType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigSPKIDataType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKISexp, http://www.w3.org/2001/XMLSchema,base64Binary */
+	struct {
+		struct {
+			uint8_t bytes[xmldsigSPKIDataType_SPKISexp_BYTES_SIZE];
+			uint16_t bytesLen;
+		}  array[xmldsigSPKIDataType_SPKISexp_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKISexp;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigSPKIDataType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,ManifestType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigManifestType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigManifestType_Reference_ARRAY_SIZE 1
+struct xmldsigManifestType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigManifestType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigReferenceType array[xmldsigManifestType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+#define xmldsigRetrievalMethodType_URI_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigRetrievalMethodType_Type_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigRetrievalMethodType {
+	/* attribute: URI {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigRetrievalMethodType_URI_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  URI ;
+	unsigned int URI_isUsed:1;
+	/* attribute: Type {http://www.w3.org/2001/XMLSchema,anyURI} */
+	struct {
+		exi_string_character_t characters[xmldsigRetrievalMethodType_Type_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Type ;
+	unsigned int Type_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Transforms, Complex type name='http://www.w3.org/2000/09/xmldsig#,TransformsType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transform{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigTransformsType Transforms ;
+	unsigned int Transforms_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigSignedInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigSignedInfoType_Reference_ARRAY_SIZE 1
+struct xmldsigSignedInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigSignedInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,CanonicalizationMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigCanonicalizationMethodType CanonicalizationMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureMethodType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":HMACOutputLength{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigSignatureMethodType SignatureMethod ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Reference, Complex type name='http://www.w3.org/2000/09/xmldsig#,ReferenceType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1},"http://www.w3.org/2000/09/xmldsig#":DigestMethod,"http://www.w3.org/2000/09/xmldsig#":DigestValue)',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigReferenceType array[xmldsigSignedInfoType_Reference_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Reference;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertiesType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignatureProperty{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigSignaturePropertiesType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigSignaturePropertiesType_SignatureProperty_ARRAY_SIZE 1
+struct xmldsigSignaturePropertiesType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigSignaturePropertiesType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureProperty, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignaturePropertyType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigSignaturePropertyType array[xmldsigSignaturePropertiesType_SignatureProperty_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SignatureProperty;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+#define xmldsigKeyValueType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigKeyValueType {
+	/* element: "http://www.w3.org/2000/09/xmldsig#":DSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,DSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":P,"http://www.w3.org/2000/09/xmldsig#":Q){0-1},"http://www.w3.org/2000/09/xmldsig#":G{0-1},"http://www.w3.org/2000/09/xmldsig#":Y,"http://www.w3.org/2000/09/xmldsig#":J{0-1},("http://www.w3.org/2000/09/xmldsig#":Seed,"http://www.w3.org/2000/09/xmldsig#":PgenCounter){0-1})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigDSAKeyValueType DSAKeyValue ;
+	unsigned int DSAKeyValue_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RSAKeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,RSAKeyValueType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Modulus,"http://www.w3.org/2000/09/xmldsig#":Exponent)',  derivedBy='RESTRICTION'.  */
+	struct xmldsigRSAKeyValueType RSAKeyValue ;
+	unsigned int RSAKeyValue_isUsed:1;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigKeyValueType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+#define xmldsigKeyInfoType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigKeyInfoType_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigKeyInfoType_KeyName_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_KeyValue_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_RetrievalMethod_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_X509Data_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_PGPData_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_SPKIData_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigKeyInfoType_MgmtData_ARRAY_SIZE 1
+#define xmldsigKeyInfoType_ANY_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+struct xmldsigKeyInfoType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigKeyInfoType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyName, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[xmldsigKeyInfoType_KeyName_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[xmldsigKeyInfoType_KeyName_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyName;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyValueType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":DSAKeyValue|"http://www.w3.org/2000/09/xmldsig#":RSAKeyValue|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigKeyValueType array[xmldsigKeyInfoType_KeyValue_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} KeyValue;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":RetrievalMethod, Complex type name='http://www.w3.org/2000/09/xmldsig#,RetrievalMethodType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":Transforms{0-1})',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigRetrievalMethodType array[xmldsigKeyInfoType_RetrievalMethod_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} RetrievalMethod;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":X509Data, Complex type name='http://www.w3.org/2000/09/xmldsig#,X509DataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":X509IssuerSerial|"http://www.w3.org/2000/09/xmldsig#":X509SKI|"http://www.w3.org/2000/09/xmldsig#":X509SubjectName|"http://www.w3.org/2000/09/xmldsig#":X509Certificate|"http://www.w3.org/2000/09/xmldsig#":X509CRL|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]))){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigX509DataType array[xmldsigKeyInfoType_X509Data_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} X509Data;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":PGPData, Complex type name='http://www.w3.org/2000/09/xmldsig#,PGPDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='(("http://www.w3.org/2000/09/xmldsig#":PGPKeyID,"http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket{0-1},(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED})|("http://www.w3.org/2000/09/xmldsig#":PGPKeyPacket,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-UNBOUNDED}))',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigPGPDataType array[xmldsigKeyInfoType_PGPData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} PGPData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SPKIData, Complex type name='http://www.w3.org/2000/09/xmldsig#,SPKIDataType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SPKISexp,(WC[##other:"http://www.w3.org/2000/09/xmldsig#"]){0-1}){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigSPKIDataType array[xmldsigKeyInfoType_SPKIData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} SPKIData;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":MgmtData, http://www.w3.org/2001/XMLSchema,string */
+	struct {
+		struct {
+			exi_string_character_t characters[xmldsigKeyInfoType_MgmtData_CHARACTERS_SIZE];
+			uint16_t charactersLen;
+		}  array[xmldsigKeyInfoType_MgmtData_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} MgmtData;
+	/* element: WC[##other:"http://www.w3.org/2000/09/xmldsig#"] */
+	struct {
+		exi_string_character_t characters[xmldsigKeyInfoType_ANY_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  ANY ;
+	unsigned int ANY_isUsed:1;
+};
+
+/* Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":SignedInfo,"http://www.w3.org/2000/09/xmldsig#":SignatureValue,"http://www.w3.org/2000/09/xmldsig#":KeyInfo{0-1},"http://www.w3.org/2000/09/xmldsig#":Object{0-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+#define xmldsigSignatureType_Id_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define xmldsigSignatureType_Object_ARRAY_SIZE 1
+struct xmldsigSignatureType {
+	/* attribute: Id {http://www.w3.org/2001/XMLSchema,ID} */
+	struct {
+		exi_string_character_t characters[xmldsigSignatureType_Id_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  Id ;
+	unsigned int Id_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignedInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignedInfoType',  base type name='anyType',  content type='ELEMENT',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":CanonicalizationMethod,"http://www.w3.org/2000/09/xmldsig#":SignatureMethod,"http://www.w3.org/2000/09/xmldsig#":Reference{1-UNBOUNDED})',  derivedBy='RESTRICTION'.  */
+	struct xmldsigSignedInfoType SignedInfo ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":SignatureValue, Complex type name='http://www.w3.org/2000/09/xmldsig#,SignatureValueType',  base type name='base64Binary',  content type='SIMPLE',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  derivedBy='EXTENSION'.  */
+	struct xmldsigSignatureValueType SignatureValue ;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":KeyInfo, Complex type name='http://www.w3.org/2000/09/xmldsig#,KeyInfoType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='("http://www.w3.org/2000/09/xmldsig#":KeyName|"http://www.w3.org/2000/09/xmldsig#":KeyValue|"http://www.w3.org/2000/09/xmldsig#":RetrievalMethod|"http://www.w3.org/2000/09/xmldsig#":X509Data|"http://www.w3.org/2000/09/xmldsig#":PGPData|"http://www.w3.org/2000/09/xmldsig#":SPKIData|"http://www.w3.org/2000/09/xmldsig#":MgmtData|(WC[##other:"http://www.w3.org/2000/09/xmldsig#"])){1-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct xmldsigKeyInfoType KeyInfo ;
+	unsigned int KeyInfo_isUsed:1;
+	/* element: "http://www.w3.org/2000/09/xmldsig#":Object, Complex type name='http://www.w3.org/2000/09/xmldsig#,ObjectType',  base type name='anyType',  content type='MIXED',  isAbstract='false',  hasTypeId='false',  final='0',  block='0',  particle='((WC[##any])){0-UNBOUNDED}',  derivedBy='RESTRICTION'.  */
+	struct {
+		struct xmldsigObjectType array[xmldsigSignatureType_Object_ARRAY_SIZE];
+		uint16_t arrayLen;
+	} Object;
+};
+
+
+
+#define EXIDocument_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIDocument_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIDocument_DigestValue_BYTES_SIZE 350 
+#define EXIFragment_DigestValue_BYTES_SIZE 350 
+#define EXIFragment_SPKISexp_BYTES_SIZE 350 
+#define EXIFragment_KeyName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIFragment_X509IssuerName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIFragment_MgmtData_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIFragment_PGPKeyID_BYTES_SIZE 350 
+#define EXIFragment_PGPKeyPacket_BYTES_SIZE 350 
+#define EXIFragment_Exponent_BYTES_SIZE 350 
+#define EXIFragment_P_BYTES_SIZE 350 
+#define EXIFragment_Q_BYTES_SIZE 350 
+#define EXIFragment_Seed_BYTES_SIZE 350 
+#define EXIFragment_X509SubjectName_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIFragment_X509Certificate_BYTES_SIZE 350 
+#define EXIFragment_G_BYTES_SIZE 350 
+#define EXIFragment_J_BYTES_SIZE 350 
+#define EXIFragment_X509SKI_BYTES_SIZE 350 
+#define EXIFragment_XPath_CHARACTERS_SIZE 50 + EXTRA_CHAR 
+#define EXIFragment_Modulus_BYTES_SIZE 350 
+#define EXIFragment_X509CRL_BYTES_SIZE 350 
+#define EXIFragment_Y_BYTES_SIZE 350 
+#define EXIFragment_PgenCounter_BYTES_SIZE 350 
+
+
+/* Global elements of EXI Document */
+struct xmldsigEXIDocument {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */ 
+	struct xmldsigSignaturePropertyType SignatureProperty ;
+	struct xmldsigDSAKeyValueType DSAKeyValue ;
+	struct xmldsigSignaturePropertiesType SignatureProperties ;
+	struct xmldsigKeyValueType KeyValue ;
+	struct xmldsigTransformsType Transforms ;
+	struct xmldsigDigestMethodType DigestMethod ;
+	struct xmldsigSignatureType Signature ;
+	struct xmldsigRetrievalMethodType RetrievalMethod ;
+	struct xmldsigManifestType Manifest ;
+	struct xmldsigReferenceType Reference ;
+	struct xmldsigCanonicalizationMethodType CanonicalizationMethod ;
+	struct xmldsigRSAKeyValueType RSAKeyValue ;
+	struct xmldsigTransformType Transform ;
+	struct xmldsigPGPDataType PGPData ;
+	struct {
+		exi_string_character_t characters[EXIDocument_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct xmldsigSignatureMethodType SignatureMethod ;
+	struct xmldsigKeyInfoType KeyInfo ;
+	struct xmldsigSPKIDataType SPKIData ;
+	struct xmldsigX509DataType X509Data ;
+	struct xmldsigSignatureValueType SignatureValue ;
+	struct {
+		exi_string_character_t characters[EXIDocument_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct {
+		uint8_t bytes[EXIDocument_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct xmldsigSignedInfoType SignedInfo ;
+	struct xmldsigObjectType Object ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */ 
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int DigestValue_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int Object_isUsed:1;
+
+
+	int _warning_;
+};
+
+
+#if DEPLOY_XMLDSIG_CODEC_FRAGMENT == SUPPORT_YES
+/* Possible elements of EXI Fragment */
+struct xmldsigEXIFragment {
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	union {
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */ 
+	struct {
+		uint8_t bytes[EXIFragment_DigestValue_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  DigestValue ;
+	struct xmldsigX509DataType X509Data ;
+	struct xmldsigKeyValueType KeyValue ;
+	struct xmldsigDigestMethodType DigestMethod ;
+	struct {
+		uint8_t bytes[EXIFragment_SPKISexp_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  SPKISexp ;
+	struct xmldsigTransformsType Transforms ;
+	struct {
+		exi_string_character_t characters[EXIFragment_KeyName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  KeyName ;
+	struct {
+		exi_string_character_t characters[EXIFragment_X509IssuerName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509IssuerName ;
+	struct {
+		exi_string_character_t characters[EXIFragment_MgmtData_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  MgmtData ;
+	struct xmldsigReferenceType Reference ;
+	struct xmldsigSignaturePropertiesType SignatureProperties ;
+	struct {
+		uint8_t bytes[EXIFragment_PGPKeyID_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyID ;
+	struct xmldsigPGPDataType PGPData ;
+	struct xmldsigDSAKeyValueType DSAKeyValue ;
+	struct xmldsigSignatureValueType SignatureValue ;
+	struct xmldsigKeyInfoType KeyInfo ;
+	struct xmldsigSignaturePropertyType SignatureProperty ;
+	struct {
+		uint8_t bytes[EXIFragment_PGPKeyPacket_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PGPKeyPacket ;
+	int64_t HMACOutputLength ;
+	struct {
+		uint8_t bytes[EXIFragment_Exponent_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Exponent ;
+	struct xmldsigManifestType Manifest ;
+	struct {
+		uint8_t bytes[EXIFragment_P_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  P ;
+	struct xmldsigCanonicalizationMethodType CanonicalizationMethod ;
+	struct {
+		uint8_t bytes[EXIFragment_Q_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Q ;
+	struct {
+		uint8_t bytes[EXIFragment_Seed_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Seed ;
+	struct {
+		exi_string_character_t characters[EXIFragment_X509SubjectName_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  X509SubjectName ;
+	struct {
+		uint8_t bytes[EXIFragment_X509Certificate_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509Certificate ;
+	struct xmldsigRSAKeyValueType RSAKeyValue ;
+	struct xmldsigX509IssuerSerialType X509IssuerSerial ;
+	struct xmldsigSPKIDataType SPKIData ;
+	struct {
+		uint8_t bytes[EXIFragment_G_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  G ;
+	struct {
+		uint8_t bytes[EXIFragment_J_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  J ;
+	struct xmldsigSignedInfoType SignedInfo ;
+	struct {
+		uint8_t bytes[EXIFragment_X509SKI_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509SKI ;
+	struct xmldsigTransformType Transform ;
+	struct {
+		exi_string_character_t characters[EXIFragment_XPath_CHARACTERS_SIZE];
+		uint16_t charactersLen;
+	}  XPath ;
+	struct xmldsigObjectType Object ;
+	int64_t X509SerialNumber ;
+	struct xmldsigRetrievalMethodType RetrievalMethod ;
+	struct {
+		uint8_t bytes[EXIFragment_Modulus_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Modulus ;
+	struct {
+		uint8_t bytes[EXIFragment_X509CRL_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  X509CRL ;
+	struct xmldsigSignatureType Signature ;
+	struct {
+		uint8_t bytes[EXIFragment_Y_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  Y ;
+	struct xmldsigSignatureMethodType SignatureMethod ;
+	struct {
+		uint8_t bytes[EXIFragment_PgenCounter_BYTES_SIZE];
+		uint16_t bytesLen;
+	}  PgenCounter ;
+#if SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES
+	};
+#endif /* SAVE_MEMORY_WITH_UNNAMED_UNION == UNION_YES */ 
+	unsigned int DigestValue_isUsed:1;
+	unsigned int X509Data_isUsed:1;
+	unsigned int KeyValue_isUsed:1;
+	unsigned int DigestMethod_isUsed:1;
+	unsigned int SPKISexp_isUsed:1;
+	unsigned int Transforms_isUsed:1;
+	unsigned int KeyName_isUsed:1;
+	unsigned int X509IssuerName_isUsed:1;
+	unsigned int MgmtData_isUsed:1;
+	unsigned int Reference_isUsed:1;
+	unsigned int SignatureProperties_isUsed:1;
+	unsigned int PGPKeyID_isUsed:1;
+	unsigned int PGPData_isUsed:1;
+	unsigned int DSAKeyValue_isUsed:1;
+	unsigned int SignatureValue_isUsed:1;
+	unsigned int KeyInfo_isUsed:1;
+	unsigned int SignatureProperty_isUsed:1;
+	unsigned int PGPKeyPacket_isUsed:1;
+	unsigned int HMACOutputLength_isUsed:1;
+	unsigned int Exponent_isUsed:1;
+	unsigned int Manifest_isUsed:1;
+	unsigned int P_isUsed:1;
+	unsigned int CanonicalizationMethod_isUsed:1;
+	unsigned int Q_isUsed:1;
+	unsigned int Seed_isUsed:1;
+	unsigned int X509SubjectName_isUsed:1;
+	unsigned int X509Certificate_isUsed:1;
+	unsigned int RSAKeyValue_isUsed:1;
+	unsigned int X509IssuerSerial_isUsed:1;
+	unsigned int SPKIData_isUsed:1;
+	unsigned int G_isUsed:1;
+	unsigned int J_isUsed:1;
+	unsigned int SignedInfo_isUsed:1;
+	unsigned int X509SKI_isUsed:1;
+	unsigned int Transform_isUsed:1;
+	unsigned int XPath_isUsed:1;
+	unsigned int Object_isUsed:1;
+	unsigned int X509SerialNumber_isUsed:1;
+	unsigned int RetrievalMethod_isUsed:1;
+	unsigned int Modulus_isUsed:1;
+	unsigned int X509CRL_isUsed:1;
+	unsigned int Signature_isUsed:1;
+	unsigned int Y_isUsed:1;
+	unsigned int SignatureMethod_isUsed:1;
+	unsigned int PgenCounter_isUsed:1;
+
+
+	int _warning_;
+};
+#endif /* DEPLOY_XMLDSIG_CODEC_FRAGMENT */
+
+
+/* Initialization methods for structs */
+
+void init_xmldsigEXIDocument(struct xmldsigEXIDocument* exiDoc);
+#if DEPLOY_XMLDSIG_CODEC_FRAGMENT == SUPPORT_YES
+void init_xmldsigEXIFragment(struct xmldsigEXIFragment* exiFrag);
+#endif /* DEPLOY_XMLDSIG_CODEC_FRAGMENT */
+void init_xmldsigCanonicalizationMethodType(struct xmldsigCanonicalizationMethodType* xmldsigCanonicalizationMethodType);
+void init_xmldsigManifestType(struct xmldsigManifestType* xmldsigManifestType);
+void init_xmldsigObjectType(struct xmldsigObjectType* xmldsigObjectType);
+void init_xmldsigTransformType(struct xmldsigTransformType* xmldsigTransformType);
+void init_xmldsigSignatureMethodType(struct xmldsigSignatureMethodType* xmldsigSignatureMethodType);
+void init_xmldsigDigestMethodType(struct xmldsigDigestMethodType* xmldsigDigestMethodType);
+void init_xmldsigRetrievalMethodType(struct xmldsigRetrievalMethodType* xmldsigRetrievalMethodType);
+void init_xmldsigSignatureValueType(struct xmldsigSignatureValueType* xmldsigSignatureValueType);
+void init_xmldsigX509IssuerSerialType(struct xmldsigX509IssuerSerialType* xmldsigX509IssuerSerialType);
+void init_xmldsigSignedInfoType(struct xmldsigSignedInfoType* xmldsigSignedInfoType);
+void init_xmldsigSignaturePropertiesType(struct xmldsigSignaturePropertiesType* xmldsigSignaturePropertiesType);
+void init_xmldsigSignaturePropertyType(struct xmldsigSignaturePropertyType* xmldsigSignaturePropertyType);
+void init_xmldsigKeyValueType(struct xmldsigKeyValueType* xmldsigKeyValueType);
+void init_xmldsigRSAKeyValueType(struct xmldsigRSAKeyValueType* xmldsigRSAKeyValueType);
+void init_xmldsigPGPDataType(struct xmldsigPGPDataType* xmldsigPGPDataType);
+void init_xmldsigTransformsType(struct xmldsigTransformsType* xmldsigTransformsType);
+void init_xmldsigX509DataType(struct xmldsigX509DataType* xmldsigX509DataType);
+void init_xmldsigSignatureType(struct xmldsigSignatureType* xmldsigSignatureType);
+void init_xmldsigDSAKeyValueType(struct xmldsigDSAKeyValueType* xmldsigDSAKeyValueType);
+void init_xmldsigReferenceType(struct xmldsigReferenceType* xmldsigReferenceType);
+void init_xmldsigSPKIDataType(struct xmldsigSPKIDataType* xmldsigSPKIDataType);
+void init_xmldsigKeyInfoType(struct xmldsigKeyInfoType* xmldsigKeyInfoType);
+
+
+#endif /* DEPLOY_XMLDSIG_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 4331 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesDecoder.c


+ 65 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesDecoder.h

@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: xmldsig-core-schema.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesDecoder.h
+ * \brief 	Decoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_xmldsig_DATATYPES_DECODER_H
+#define EXI_xmldsig_DATATYPES_DECODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "xmldsigEXIDatatypes.h"
+
+#if DEPLOY_XMLDSIG_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "EXITypes.h"
+
+int decode_xmldsigExiDocument(bitstream_t* stream, struct xmldsigEXIDocument* exiDoc);
+
+#if DEPLOY_XMLDSIG_CODEC_FRAGMENT == SUPPORT_YES
+int decode_xmldsigExiFragment(bitstream_t* stream, struct xmldsigEXIFragment* exiFrag);
+#endif /* DEPLOY_XMLDSIG_CODEC_FRAGMENT */
+
+#endif /* DEPLOY_XMLDSIG_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

文件差異過大導致無法顯示
+ 3100 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesEncoder.c


+ 66 - 0
EVSE/Projects/AW-CCS/Apps/CCS/v2g/xmldsig/xmldsigEXIDatatypesEncoder.h

@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2007-2018 Siemens AG
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*******************************************************************
+ *
+ * @author Daniel.Peintner.EXT@siemens.com
+ * @version 0.9.4 
+ * @contact Richard.Kuntschke@siemens.com
+ *
+ * <p>Code generated by EXIdizer</p>
+ * <p>Schema: xmldsig-core-schema.xsd</p>
+ *
+ *
+ ********************************************************************/
+
+
+
+/**
+ * \file 	EXIDatatypesEncoder.h
+ * \brief 	Encoder for datatype definitions
+ *
+ */
+
+#ifndef EXI_xmldsig_DATATYPES_ENCODER_H
+#define EXI_xmldsig_DATATYPES_ENCODER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "xmldsigEXIDatatypes.h"
+
+#if DEPLOY_XMLDSIG_CODEC == SUPPORT_YES
+
+#include <stdint.h>
+
+#include "EXITypes.h"
+
+int encode_xmldsigExiDocument(bitstream_t* stream, struct xmldsigEXIDocument* exiDoc);
+
+#if DEPLOY_XMLDSIG_CODEC_FRAGMENT == SUPPORT_YES
+int encode_xmldsigExiFragment(bitstream_t* stream, struct xmldsigEXIFragment* exiFrag);
+#endif /* DEPLOY_XMLDSIG_CODEC_FRAGMENT */
+
+
+#endif /* DEPLOY_XMLDSIG_CODEC */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

+ 38 - 3
EVSE/Projects/AW-CCS/Apps/Makefile

@@ -6,9 +6,37 @@ Lib_Module_RFID = "-L../../../Modularization" -lModule_RFID
 Lib_Module_Upgrade = "-L../../../Modularization" -lModule_Upgrade
 Lib_SQLite3 = "-L../../../Modularization/ocppfiles" -lsqlite3
 
-all: CopyFile apps
-apps: Module_InternalComm_Task Module_FactoryConfig_Task Module_AlarmDetect_Task Module_CSU_Task Module_Speaker_Task
+EXI_ENGINE= CCS/v2g/api/api.c \
+	    CCS/v2g/appHandshake/appHandEXIDatatypes.c \
+	    CCS/v2g/appHandshake/appHandEXIDatatypesDecoder.c \
+	    CCS/v2g/appHandshake/appHandEXIDatatypesEncoder.c \
+	    CCS/v2g/codec/BitInputStream.c \
+	    CCS/v2g/codec/BitOutputStream.c \
+	    CCS/v2g/codec/ByteStream.c \
+	    CCS/v2g/codec/DecoderChannel.c \
+	    CCS/v2g/codec/EncoderChannel.c \
+	    CCS/v2g/codec/EXIHeaderDecoder.c \
+	    CCS/v2g/codec/EXIHeaderEncoder.c \
+	    CCS/v2g/codec/MethodsBag.c \
+	    CCS/v2g/din/dinEXIDatatypes.c \
+	    CCS/v2g/din/dinEXIDatatypesDecoder.c \
+	    CCS/v2g/din/dinEXIDatatypesEncoder.c \
+	    CCS/v2g/iso1/iso1EXIDatatypes.c \
+	    CCS/v2g/iso1/iso1EXIDatatypesDecoder.c \
+	    CCS/v2g/iso1/iso1EXIDatatypesEncoder.c \
+	    CCS/v2g/iso2/iso2EXIDatatypes.c \
+	    CCS/v2g/iso2/iso2EXIDatatypesDecoder.c \
+	    CCS/v2g/iso2/iso2EXIDatatypesEncoder.c \
+	    CCS/v2g/transport/v2gtp.c \
+	    CCS/v2g/xmldsig/xmldsigEXIDatatypes.c \
+	    CCS/v2g/xmldsig/xmldsigEXIDatatypesDecoder.c \
+	    CCS/v2g/xmldsig/xmldsigEXIDatatypesEncoder.c \
+	    CCS/NidNmk.c \
+	    CCS/SystemLogMessage.c \
+	    CCS/Module_CCS.c
 
+all: CopyFile apps
+apps: Module_InternalComm_Task Module_FactoryConfig_Task Module_AlarmDetect_Task Module_CSU_Task Module_Speaker_Task Module_CCS_Task
 
 Module_InternalComm_Task:
 	@echo "===== Module_InternalComm_Task ==================================="
@@ -61,7 +89,7 @@ Module_CSU_Task:
 	@echo \
 
 Module_Speaker_Task:
-	@echo "===== Module_Speaker_Task ===================================="
+	@echo "===== Module_Speaker_Task ======================================="
 	rm -f Module_Speaker
 	$(CC) -D $(Project) "-I../../"  -O0 -g3 -Wall -c -fmessage-length=0 -o Module_Speaker.o  "./Module_Speaker.c"
 	$(CC) -o Module_Speaker Module_Speaker.o 
@@ -69,6 +97,13 @@ Module_Speaker_Task:
 	mv -f Module_Speaker ../Images/root	
 	@echo \ 
 
+Module_CCS_Task:
+	@echo "===== Module_CCS_Task =========================================="
+	rm -f Module_CCS
+	$(CC) -D $(Project) "-I../../../Modularization/ocppfiles/" "-ICCS/v2g/api" "-ICCS/v2g/appHandshake" "-ICCS/v2g/codec" "-ICCS/v2g/din" "-ICCS/v2g/iso1" "-ICCS/v2g/iso2" "-ICCS/v2g/transport" "-ICCS/v2g/xmldsig" "-ICCS/" "-I./" -O0 -g3 -Wall -fmessage-length=0 -lm  ${EXI_ENGINE} -o Module_CCS
+	rm -f *.o
+	mv -f Module_CCS ../Images/root
+
 CopyFile: 
 	rm -rfv ../Images/root
 	mkdir -p ../Images/root

+ 2 - 1
EVSE/Projects/AW-CCS/Apps/main.c

@@ -1347,7 +1347,7 @@ void get_firmware_version(unsigned char gun_index)
 	strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
 
 	// Get CSU root file system version
-	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.32.00.0000.00");
+	sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.33.00.0000.00");
 
 	// Get AC connector type from model name
 	for(uint8_t idx=0;idx<3;idx++)
@@ -2742,6 +2742,7 @@ int main(void)
 						ftime(&startTime[gun_index][TMR_IDX_HANDSHAKING]);
 						setLedMotion(gun_index,LED_ACTION_AUTHED);
 						ShmCharger->gun_info[gun_index].ccsHandshakeState = HANDSHAKE_DUTY_5;	
+						system("/root/Module_CCS");
 					}
 					
 					// If control pilot detect Bx, skip watch dog time out.

部分文件因文件數量過多而無法顯示