- Port core EXI encoding/decoding functionality to C# - Implement V2G protocol parsing and analysis - Add simplified decoder/encoder for roundtrip testing - Create comprehensive error handling with EXI exceptions - Support both byte array and file stream operations - Include packet structure analysis for V2GTP data - Successfully builds and runs basic functionality tests 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.8 KiB
1.8 KiB
V2GDecoderC C# Porting Task List
📋 Execution Plan
Phase 1: Setup & Analysis ✅
- Create REPORT.md with comprehensive C code analysis
- Create TODO.md with execution plan
Phase 2: .NET Core/6+ Implementation
- Create
csharpfolder structure - Create
csharp\dotnetsubfolder - Port core EXI codec to .NET
- Port V2G protocol implementations (ISO1, ISO2, DIN)
- Create test harness for .NET version
- Test with test1.exi → test1.xml → test1.exi roundtrip
- Validate roundtrip integrity (original vs final)
- Git commit .NET version
Phase 3: .NET Framework 4.8 Implementation
- Create
csharp\dotnetfxsubfolder - Port .NET version to .NET Framework 4.8
- Adjust for Framework-specific differences
- Create test harness for .NET FX version
- Test with test1.exi → test1.xml → test1.exi roundtrip
- Validate roundtrip integrity (original vs final)
- Git commit .NET Framework version
Testing Strategy
Original: test1.exi
Step 1: Decode test1.exi → test1.xml
Step 2: Encode test1.xml → test1_new.exi
Step 3: Binary compare test1.exi ≟ test1_new.exi
Result: PASS/FAIL validation
Key Porting Considerations
- Memory Management: C static allocation → C# managed memory
- Error Handling: C return codes → C# exceptions
- String Handling: C char arrays → C# string/byte[]
- Buffer Operations: C memcpy → C# Array.Copy/Buffer.BlockCopy
- Platform Differences: Endianness, type sizes
- Security: Address C vulnerabilities in C# implementation
Success Criteria
- ✅ Functional parity with C version
- ✅ Test roundtrip validation passes
- ✅ Clean separation of .NET/.NET FX versions
- ✅ Git commits for each major milestone
- ✅ Improved memory safety vs C version