Add V2G Transfer Protocol decoder/encoder

Implements C# console application for decoding ISO 15118-2, DIN SPEC 70121, and SAP protocol messages from binary data. Features include:
- V2G Transfer Protocol header parsing
- EXI, DIN, and SAP message type support
- Network packet analysis (Ethernet/IPv6/TCP)
- Hex dump utilities
- Raw data parsing from hex files
- Sample raw data for testing

Successfully tested with sample V2G EXI message data.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Arin(asus)
2025-09-07 13:29:01 +09:00
commit 8a718f5d4f
6 changed files with 562 additions and 0 deletions

7
Data/632 Raw Data.txt Normal file
View File

@@ -0,0 +1,7 @@
0000 10 22 33 44 55 66 80 34 28 2e 23 dd 86 dd 60 00 ."3DUf.4(.#...`.
0010 00 00 00 33 06 ff fe 80 00 00 00 00 00 00 82 34 ...3...........4
0020 28 ff fe 2e 23 dd fe 80 00 00 00 00 00 00 12 22 (...#.........."
0030 33 ff fe 44 55 66 d1 21 c3 65 2c c5 61 f8 00 63 3..DUf.!.e,.a..c
0040 ae c9 50 18 08 a8 72 51 00 00 01 fe 80 01 00 00 ..P...rQ........
0050 00 17 80 98 02 10 50 90 8c 0c 0c 0e 0c 51 80 00 ......P......Q..
0060 00 00 20 40 c4 08 a0 30 00 .. @...0.

52
Data/Xml.txt Normal file
View File

@@ -0,0 +1,52 @@
80 98 02 10 50 90 8c 0c 0c 0e 0c 51 80 00 00 00 20 40 c4 08 a0 30 00
0000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 <?xml version="1
0010 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 .0" encoding="UT
0020 46 2d 38 22 3f 3e 3c 6e 73 31 3a 56 32 47 5f 4d F-8"?><ns1:V2G_M
0030 65 73 73 61 67 65 20 78 6d 6c 6e 73 3a 6e 73 31 essage xmlns:ns1
0040 3d 22 75 72 6e 3a 69 73 6f 3a 31 35 31 31 38 3a ="urn:iso:15118:
0050 32 3a 32 30 31 33 3a 4d 73 67 44 65 66 22 20 78 2:2013:MsgDef" x
0060 6d 6c 6e 73 3a 6e 73 32 3d 22 75 72 6e 3a 69 73 mlns:ns2="urn:is
0070 6f 3a 31 35 31 31 38 3a 32 3a 32 30 31 33 3a 4d o:15118:2:2013:M
0080 73 67 48 65 61 64 65 72 22 20 78 6d 6c 6e 73 3a sgHeader" xmlns:
0090 6e 73 33 3d 22 75 72 6e 3a 69 73 6f 3a 31 35 31 ns3="urn:iso:151
00a0 31 38 3a 32 3a 32 30 31 33 3a 4d 73 67 42 6f 64 18:2:2013:MsgBod
00b0 79 22 20 78 6d 6c 6e 73 3a 6e 73 34 3d 22 75 72 y" xmlns:ns4="ur
00c0 6e 3a 69 73 6f 3a 31 35 31 31 38 3a 32 3a 32 30 n:iso:15118:2:20
00d0 31 33 3a 4d 73 67 44 61 74 61 54 79 70 65 73 22 13:MsgDataTypes"
00e0 3e 3c 6e 73 31 3a 48 65 61 64 65 72 3e 3c 6e 73 ><ns1:Header><ns
00f0 32 3a 53 65 73 73 69 6f 6e 49 44 3e 34 31 34 32 2:SessionID>4142
0100 34 32 33 30 33 30 33 30 33 38 33 31 3c 2f 6e 73 423030303831</ns
0110 32 3a 53 65 73 73 69 6f 6e 49 44 3e 3c 2f 6e 73 2:SessionID></ns
0120 31 3a 48 65 61 64 65 72 3e 3c 6e 73 31 3a 42 6f 1:Header><ns1:Bo
0130 64 79 3e 3c 6e 73 33 3a 50 72 65 43 68 61 72 67 dy><ns3:PreCharg
0140 65 52 65 73 3e 3c 6e 73 33 3a 52 65 73 70 6f 6e eRes><ns3:Respon
0150 73 65 43 6f 64 65 3e 4f 4b 3c 2f 6e 73 33 3a 52 seCode>OK</ns3:R
0160 65 73 70 6f 6e 73 65 43 6f 64 65 3e 3c 6e 73 33 esponseCode><ns3
0170 3a 44 43 5f 45 56 53 45 53 74 61 74 75 73 3e 3c :DC_EVSEStatus><
0180 6e 73 34 3a 4e 6f 74 69 66 69 63 61 74 69 6f 6e ns4:Notification
0190 4d 61 78 44 65 6c 61 79 3e 30 3c 2f 6e 73 34 3a MaxDelay>0</ns4:
01a0 4e 6f 74 69 66 69 63 61 74 69 6f 6e 4d 61 78 44 NotificationMaxD
01b0 65 6c 61 79 3e 3c 6e 73 34 3a 45 56 53 45 4e 6f elay><ns4:EVSENo
01c0 74 69 66 69 63 61 74 69 6f 6e 3e 4e 6f 6e 65 3c tification>None<
01d0 2f 6e 73 34 3a 45 56 53 45 4e 6f 74 69 66 69 63 /ns4:EVSENotific
01e0 61 74 69 6f 6e 3e 3c 6e 73 34 3a 45 56 53 45 49 ation><ns4:EVSEI
01f0 73 6f 6c 61 74 69 6f 6e 53 74 61 74 75 73 3e 56 solationStatus>V
0200 61 6c 69 64 3c 2f 6e 73 34 3a 45 56 53 45 49 73 alid</ns4:EVSEIs
0210 6f 6c 61 74 69 6f 6e 53 74 61 74 75 73 3e 3c 6e olationStatus><n
0220 73 34 3a 45 56 53 45 53 74 61 74 75 73 43 6f 64 s4:EVSEStatusCod
0230 65 3e 45 56 53 45 5f 52 65 61 64 79 3c 2f 6e 73 e>EVSE_Ready</ns
0240 34 3a 45 56 53 45 53 74 61 74 75 73 43 6f 64 65 4:EVSEStatusCode
0250 3e 3c 2f 6e 73 33 3a 44 43 5f 45 56 53 45 53 74 ></ns3:DC_EVSESt
0260 61 74 75 73 3e 3c 6e 73 33 3a 45 56 53 45 50 72 atus><ns3:EVSEPr
0270 65 73 65 6e 74 56 6f 6c 74 61 67 65 3e 3c 6e 73 esentVoltage><ns
0280 34 3a 4d 75 6c 74 69 70 6c 69 65 72 3e 30 3c 2f 4:Multiplier>0</
0290 6e 73 34 3a 4d 75 6c 74 69 70 6c 69 65 72 3e 3c ns4:Multiplier><
02a0 6e 73 34 3a 55 6e 69 74 3e 56 3c 2f 6e 73 34 3a ns4:Unit>V</ns4:
02b0 55 6e 69 74 3e 3c 6e 73 34 3a 56 61 6c 75 65 3e Unit><ns4:Value>
02c0 33 39 34 3c 2f 6e 73 34 3a 56 61 6c 75 65 3e 3c 394</ns4:Value><
02d0 2f 6e 73 33 3a 45 56 53 45 50 72 65 73 65 6e 74 /ns3:EVSEPresent
02e0 56 6f 6c 74 61 67 65 3e 3c 2f 6e 73 33 3a 50 72 Voltage></ns3:Pr
02f0 65 43 68 61 72 67 65 52 65 73 3e 3c 2f 6e 73 31 eChargeRes></ns1
0300 3a 42 6f 64 79 3e 3c 2f 6e 73 31 3a 56 32 47 5f :Body></ns1:V2G_
0310 4d 65 73 73 61 67 65 3e Message>