Major architectural refactoring to achieve 1:1 structural compatibility: 🏗️ **VC2022 Structure Replication** - Iso1EXIDocument: 1:1 replica of VC2022 iso1EXIDocument struct - DinEXIDocument: 1:1 replica of VC2022 dinEXIDocument struct - Iso2EXIDocument: 1:1 replica of VC2022 iso2EXIDocument struct - All _isUsed flags and Initialize() methods exactly matching VC2022 🔄 **VC2022 Function Porting** - ParseXmlToIso1(): Exact port of VC2022 parse_xml_to_iso1() - EncodeIso1ExiDocument(): Exact port of VC2022 encode_iso1ExiDocument() - Choice 76 (V2G_Message) encoding with identical logic - BulkChargingComplete ignore behavior preserved ⚡ **Call Sequence Alignment** - Old: EncodeV2GMessage() → direct EXI encoding - New: EncodeV2GMessage() → Iso1EXIDocument → EncodeIso1ExiDocument() - Exact VC2022 call chain: init → parse → encode → finish 🔍 **1:1 Debug Comparison Ready** - C# exiDoc.V2G_Message_isUsed ↔ VC2022 exiDoc->V2G_Message_isUsed - Identical structure enables line-by-line debugging comparison - Ready for precise 1-byte difference investigation (41 vs 42 bytes) 📁 **Project Reorganization** - Moved from csharp/ to Port/ for cleaner structure - Port/dotnet/ and Port/vc2022/ for parallel development - Complete build system and documentation updates 🎯 **Achievement**: 97.6% binary compatibility (41/42 bytes) Next: 1:1 debug session to identify exact byte difference location 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
1.9 KiB
XML
63 lines
1.9 KiB
XML
File: test1.exi (131 bytes)\nRaw hex data: 10 22 33 44 55 66 80 34 28 2E 23 DD 86 DD 60 00 00 00 00 4D 06 FF FE 80 00 00 00 00 00 00 82 34 ...\n\n=== Data Structure Analysis ===
|
|
Total size: 131 bytes
|
|
Layer 2: Ethernet Frame
|
|
Destination MAC: 10:22:33:44:55:66
|
|
Source MAC: 80:34:28:2e:23:dd
|
|
EtherType: 0x86dd (IPv6)
|
|
Layer 3: IPv6 Header
|
|
Version: 6
|
|
Payload Length: 77
|
|
Next Header: 6 (TCP)
|
|
Hop Limit: 255
|
|
Source Address: fe80:0000:0000:0000:8234:28ff:fe2e:23dd
|
|
Destination Address: fe80:0000:0000:0000:1222:33ff:fe44:5566
|
|
Layer 4: TCP Header
|
|
Source Port: 53537
|
|
Destination Port: 50021
|
|
Sequence Number: 752996677
|
|
TCP Header Length: 20 bytes
|
|
Layer 7: V2G Transfer Protocol
|
|
Protocol Version: 0x01
|
|
Inverse Protocol Version: 0xfe
|
|
Payload Type: 0x8001 (ISO 15118-2/DIN/SAP)
|
|
Payload Length: 49
|
|
EXI body starts at offset: 82
|
|
✓ Payload length matches actual data (49 bytes)
|
|
EXI start pattern (0x8098) found at offset: 82
|
|
EXI payload size: 49 bytes
|
|
|
|
EXI body extracted: 49 bytes (was 131 bytes)\nEXI hex data: 80 98 02 10 50 90 8C 0C 0C 0E 0C 50 E0 00 00 00 20 40 C4 0C 20 30 30 C0 14 00 00 31 03 D0 0C 06 ...\n\nTrying ISO1 decoder...\n✓ Successfully decoded as ISO1\n\n=== ISO 15118-2 V2G Message Analysis ===
|
|
Message Type: ISO1 (2013)
|
|
V2G_Message_isUsed: true
|
|
|
|
--- Header ---
|
|
SessionID: 4142423030303831 (ABB00081)
|
|
|
|
--- Body ---
|
|
Message Type: CurrentDemandRes
|
|
ResponseCode: 0
|
|
|
|
DC_EVSEStatus:
|
|
EVSEIsolationStatus: 1
|
|
EVSEStatusCode: 1
|
|
|
|
EVSEPresentVoltage:
|
|
Multiplier: 0
|
|
Unit: 4
|
|
Value: 450
|
|
|
|
EVSEPresentCurrent:
|
|
Multiplier: 0
|
|
Unit: 3
|
|
Value: 5
|
|
|
|
Limit Status:
|
|
CurrentLimitAchieved: false
|
|
VoltageLimitAchieved: false
|
|
PowerLimitAchieved: false
|
|
|
|
EVSEID: Z
|
|
SAScheduleTupleID: 1
|
|
|
|
\n=== Original EXI Structure Debug ===\nV2G_Message_isUsed: true\nSessionID length: 8\nCurrentDemandReq_isUsed: false\n✓ Structure dump saved to struct_exi.txt
|