Add .NET 8.0 C# port of OpenV2G EXI codec
- 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>
This commit is contained in:
50
TODO.md
Normal file
50
TODO.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# V2GDecoderC C# Porting Task List
|
||||
|
||||
## 📋 Execution Plan
|
||||
|
||||
### Phase 1: Setup & Analysis ✅
|
||||
- [x] Create REPORT.md with comprehensive C code analysis
|
||||
- [x] Create TODO.md with execution plan
|
||||
|
||||
### Phase 2: .NET Core/6+ Implementation
|
||||
- [ ] Create `csharp` folder structure
|
||||
- [ ] Create `csharp\dotnet` subfolder
|
||||
- [ ] 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\dotnetfx` subfolder
|
||||
- [ ] 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
|
||||
1. ✅ Functional parity with C version
|
||||
2. ✅ Test roundtrip validation passes
|
||||
3. ✅ Clean separation of .NET/.NET FX versions
|
||||
4. ✅ Git commits for each major milestone
|
||||
5. ✅ Improved memory safety vs C version
|
||||
Reference in New Issue
Block a user