docs: Update TODO.md with comprehensive V2G message implementation roadmap
- Remove completed/obsolete tasks from previous C# porting plan - Add detailed roadmap for implementing 11 core V2G message types - Prioritize DC charging essential messages (Phase 1: CableCheck, PreCharge, WeldingDetection, PowerDelivery) - Define implementation order: C → VC2022 → dotnet for consistency - Include infrastructure improvements and success metrics - Focus on XML parsing/generation as primary gap Next immediate step: CableCheckReq/Res implementation in C 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
160
TODO.md
160
TODO.md
@@ -1,50 +1,124 @@
|
|||||||
# V2GDecoderC C# Porting Task List
|
# V2G EXI Decoder - Development Roadmap
|
||||||
|
|
||||||
## 📋 Execution Plan
|
## 📋 Current Status & Next Steps
|
||||||
|
|
||||||
### Phase 1: Setup & Analysis ✅
|
### ✅ Completed Tasks
|
||||||
- [x] Create REPORT.md with comprehensive C code analysis
|
- [x] Clean output implementation for VC2022 -decode/-encode options
|
||||||
- [x] Create TODO.md with execution plan
|
- [x] Usage message standardization across versions
|
||||||
|
- [x] DEBUG_PRINTF macro implementation for conditional debug output
|
||||||
|
- [x] Comprehensive message implementation status analysis
|
||||||
|
- [x] Documentation of current capabilities and gaps
|
||||||
|
- [x] Multi-platform build verification (C, VC2022, dotnet)
|
||||||
|
|
||||||
### Phase 2: .NET Core/6+ Implementation
|
### 🎯 Next Priority: V2G Message 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
|
#### Phase 1: DC Charging Core Messages (Highest Priority)
|
||||||
- [ ] Create `csharp\dotnetfx` subfolder
|
Implementation order: C → VC2022 → dotnet
|
||||||
- [ ] 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
|
1. **CableCheckReq/Res** - Cable insulation state verification
|
||||||
```
|
- [ ] C: XML parsing/generation logic
|
||||||
Original: test1.exi
|
- [ ] C: EXI encoding/decoding integration
|
||||||
Step 1: Decode test1.exi → test1.xml
|
- [ ] VC2022: Port from C implementation
|
||||||
Step 2: Encode test1.xml → test1_new.exi
|
- [ ] dotnet: Port from C implementation
|
||||||
Step 3: Binary compare test1.exi ≟ test1_new.exi
|
- [ ] Test with sample EXI files
|
||||||
Result: PASS/FAIL validation
|
|
||||||
```
|
|
||||||
|
|
||||||
### Key Porting Considerations
|
2. **PreChargeReq/Res** - Pre-charging voltage matching
|
||||||
- **Memory Management**: C static allocation → C# managed memory
|
- [ ] C: XML parsing/generation logic
|
||||||
- **Error Handling**: C return codes → C# exceptions
|
- [ ] C: EXI encoding/decoding integration
|
||||||
- **String Handling**: C char arrays → C# string/byte[]
|
- [ ] VC2022: Port from C implementation
|
||||||
- **Buffer Operations**: C memcpy → C# Array.Copy/Buffer.BlockCopy
|
- [ ] dotnet: Port from C implementation
|
||||||
- **Platform Differences**: Endianness, type sizes
|
- [ ] Test with sample EXI files
|
||||||
- **Security**: Address C vulnerabilities in C# implementation
|
|
||||||
|
|
||||||
### Success Criteria
|
3. **WeldingDetectionReq/Res** - Post-charging welding detection
|
||||||
1. ✅ Functional parity with C version
|
- [ ] C: XML parsing/generation logic
|
||||||
2. ✅ Test roundtrip validation passes
|
- [ ] C: EXI encoding/decoding integration
|
||||||
3. ✅ Clean separation of .NET/.NET FX versions
|
- [ ] VC2022: Port from C implementation
|
||||||
4. ✅ Git commits for each major milestone
|
- [ ] dotnet: Port from C implementation
|
||||||
5. ✅ Improved memory safety vs C version
|
- [ ] Test with sample EXI files
|
||||||
|
|
||||||
|
4. **PowerDeliveryReq/Res** - Charging start/stop control
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] C: EXI encoding/decoding integration
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
- [ ] Test with sample EXI files
|
||||||
|
|
||||||
|
#### Phase 2: Session & Service Management (High Priority)
|
||||||
|
|
||||||
|
5. **SessionSetupReq/Res** - Charging session initialization
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
6. **ServiceDiscoveryReq/Res** - Available charging services discovery
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
7. **AuthorizationReq/Res** - Charging authorization verification
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
8. **ChargeParameterDiscoveryReq/Res** - Charging parameter exchange
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
#### Phase 3: Extended Features (Medium Priority)
|
||||||
|
|
||||||
|
9. **PaymentServiceSelectionReq/Res** - Payment method selection
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
10. **ChargingStatusReq/Res** - AC charging status (for AC support)
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
11. **SessionStopReq/Res** - Charging session termination
|
||||||
|
- [ ] C: XML parsing/generation logic
|
||||||
|
- [ ] VC2022: Port from C implementation
|
||||||
|
- [ ] dotnet: Port from C implementation
|
||||||
|
|
||||||
|
### 🔧 Infrastructure Improvements
|
||||||
|
|
||||||
|
#### Code Quality & Testing
|
||||||
|
- [ ] Implement comprehensive test suite for all message types
|
||||||
|
- [ ] Create sample EXI files for each message type
|
||||||
|
- [ ] Add roundtrip testing (EXI → XML → EXI validation)
|
||||||
|
- [ ] Performance benchmarking across versions
|
||||||
|
|
||||||
|
#### Build & Deployment
|
||||||
|
- [ ] Automate build process for all platforms
|
||||||
|
- [ ] Create release packaging scripts
|
||||||
|
- [ ] Add continuous integration pipeline
|
||||||
|
|
||||||
|
#### Documentation
|
||||||
|
- [ ] Create API documentation for each version
|
||||||
|
- [ ] Write usage examples for each message type
|
||||||
|
- [ ] Document ISO 15118-2 compliance status
|
||||||
|
|
||||||
|
### 📊 Success Metrics
|
||||||
|
|
||||||
|
#### Functional Requirements
|
||||||
|
- [ ] Support all 8 core DC charging messages
|
||||||
|
- [ ] Pass ISO 15118-2 compliance validation
|
||||||
|
- [ ] Maintain backward compatibility with existing CurrentDemand implementation
|
||||||
|
- [ ] Clean output for production use (no debug messages)
|
||||||
|
|
||||||
|
#### Quality Requirements
|
||||||
|
- [ ] 100% roundtrip accuracy (EXI → XML → EXI)
|
||||||
|
- [ ] Memory safety (no buffer overflows)
|
||||||
|
- [ ] Performance parity with original C implementation
|
||||||
|
- [ ] Consistent behavior across C/VC2022/dotnet versions
|
||||||
|
|
||||||
|
### 🎯 Current Focus
|
||||||
|
**Immediate Next Step**: Implement CableCheckReq/Res in original C version as foundation for other platform ports.
|
||||||
|
|
||||||
|
### 📝 Notes
|
||||||
|
- All message structures already exist in VC2022 and dotnet versions
|
||||||
|
- Focus on XML parsing/generation logic implementation
|
||||||
|
- Maintain DEBUG_PRINTF pattern for consistent debugging
|
||||||
|
- Test each message with real V2G communication scenarios
|
||||||
Reference in New Issue
Block a user