Commit Graph

10 Commits

Author SHA1 Message Date
ccd80a9ec6 feat: Complete Phase 3 Extended Features in .NET - Payment, Charging Status, Session Stop
- Add XML parsing detection for all 6 Phase 3 message types:
  - PaymentServiceSelectionReq/Res: Payment method selection
  - ChargingStatusReq/Res: AC charging status monitoring
  - SessionStopReq/Res: Session termination control
- Implement comprehensive Parse*Analysis methods with emoji indicators:
  - ParsePaymentServiceSelectionReqAnalysis/ResAnalysis: Payment option parsing
  - ParseChargingStatusReqAnalysis/ResAnalysis: AC status with meter info
  - ParseSessionStopReqAnalysis/ResAnalysis: Session termination handling
- Add detailed XML element parsing for:
  - Payment options (Contract vs External)
  - Service list enumeration and parameter sets
  - EVSE charging status and meter readings
  - Session control with ChargingSession enum
- Maintain .NET coding style with LINQ and modern C# patterns
- All 18 V2G message types now fully implemented across C, VC2022, and .NET
- Complete multi-platform V2G decoder achievement! 🎉

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 08:32:12 +09:00
fac366be0d feat: Port Phase 3 Extended Features to VC2022 - Payment, Charging Status, Session Stop
- Add function declarations for all 6 Phase 3 message handlers in VC2022 style
- Add message detection logic without emoji indicators (VC2022 convention):
  - PaymentServiceSelectionReq/Res: Payment method selection
  - ChargingStatusReq/Res: AC charging status monitoring
  - SessionStopReq/Res: Session termination control
- Implement comprehensive helper functions with traditional formatting:
  - Payment option analysis (Contract vs External payment)
  - Service list parsing and enumeration
  - AC charging status with detailed meter information
  - Session termination with ChargingSession enum handling
- Maintain VC2022 coding style: no emojis, traditional printf formatting
- All Phase 3 messages now implemented in both C and VC2022
- Ready for final .NET implementation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 07:36:32 +09:00
14dfe964b4 feat: Complete Phase 2 .NET implementation - Session & Service Management
- Add comprehensive XML parsing analysis methods for all 8 Phase 2 messages
- ParseSessionSetupReqAnalysis/ParseSessionSetupResAnalysis: Session initialization
- ParseServiceDiscoveryReqAnalysis/ParseServiceDiscoveryResAnalysis: Service discovery
- ParseAuthorizationReqAnalysis/ParseAuthorizationResAnalysis: Authentication
- ParseChargeParameterDiscoveryReqAnalysis/ParseChargeParameterDiscoveryResAnalysis: Parameter exchange
- Add GetUnitString helper for physical value unit conversion
- Include emoji indicators for better readability and debugging
- All Phase 2 messages now fully implemented across C, VC2022, and .NET platforms

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 07:31:47 +09:00
f6250d762a feat: Port Phase 2 Session & Service Management to VC2022
Ported all Phase 2 message types from C implementation to VC2022:
- SessionSetupReq/Res with EVCCID and EVSEID handling
- ServiceDiscoveryReq/Res with payment options and services
- AuthorizationReq/Res with ID and challenge processing
- ChargeParameterDiscoveryReq/Res with DC parameters

Maintains VC2022 coding style (no emoji indicators) while providing
comprehensive parameter parsing and display for all message types
including complex nested structures and optional fields.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-12 07:27:40 +09:00
gram
342ac4c8fb feat: Clean output mode for VC2022 -decode and -encode options
- Replace direct printf/fprintf calls with DEBUG_PRINTF macros
- Clean XML-only output for -decode mode (no debug messages)
- Clean hex-only output for -encode mode (no debug messages)
- Standardize usage message format to match dotnet version
- Add contact information to usage display
- Conditional debug output only when EXI_DEBUG_MODE is enabled
- All sample files (test1-5.exi) tested with clean output

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 23:44:48 +09:00
gram
383706b236 feat: Clean -decode/-encode output and remove banner
 Clean Output Implementation:
- -decode: Pure XML output only (debug output suppressed)
- -encode: Hex for console, binary for redirection
- Removed DisplayBanner function completely as requested

🔧 Key Changes:
- Console output redirection in XML decode mode
- Console.IsOutputRedirected logic for encode output format
- Eliminated all banner/display functions

 Verified Compatibility:
- dotnet -decode: Clean XML output 
- dotnet -encode: Proper hex/binary switching 
- 100% binary compatibility maintained with VC2022
- All 43-byte EXI outputs identical across implementations

🚀 Ready for next phase: Additional V2G message types

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 23:24:57 +09:00
gram
bfd5fc6fe1 feat: Complete V2G EXI encoder-decoder 100% VC2022 compatibility
🔧 Grammar 279 Critical Fix:
- Fixed Grammar 279 from 2-bit to 1-bit choice for ChargingComplete
- Achieved 100% binary compatibility with VC2022 C++ implementation
- All EXI roundtrip tests now pass with identical byte output

 ANSI Banner & UI Enhancements:
- Added beautiful ANSI art banner for usage display
- Cleaned up usage messages, removed debug options from public view
- Added contact email: tindevil82@gmail.com

🛠️ Technical Improvements:
- Standardized encodeNBitUnsignedInteger naming across all Grammar states
- Added comprehensive debug logging for bit-level operations
- Enhanced binary output handling for Windows console redirection
- Improved error reporting for encoding failures

📊 Verification Results:
- test5.exi: 100% binary match between C, dotnet, and VC2022
- All 43 bytes identical: 80 98 02 10 50 90 8c 0c 0c 0e 0c 50 d1 00 32 01 86 00 20 18
- Grammar state machine now perfectly aligned with OpenV2G C implementation

🚀 Ready for expansion to additional V2G message types

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 23:17:25 +09:00
ChiKyun Kim
fce7f41d00 .. 2025-09-11 17:27:25 +09:00
ChiKyun Kim
008eff1e6b feat: Comprehensive V2G EXI roundtrip testing and encoding improvements
Major improvements and testing additions:
- Complete roundtrip testing of test1~test5.exi files (VC2022 vs dotnet)
- Fixed BulkChargingComplete=false handling to match VC2022 behavior
- Added comprehensive debug logging for Grammar state transitions
- Implemented ROUNDTRIP.md documentation with detailed analysis
- Enhanced XML parser to ignore BulkChargingComplete when value is false
- Achieved Grammar flow matching: 275→276→277→278 with correct choice selections
- Identified remaining 1-byte encoding difference for further debugging

Key fixes:
- BulkChargingComplete_isUsed now correctly set to false when value is false
- Grammar 278 now properly selects choice 1 (ChargingComplete) when BulkChargingComplete not used
- Added detailed Grammar state logging for debugging

Test results:
- VC2022: 100% perfect roundtrip for test3,test4,test5 (43 bytes identical)
- dotnet: 99.7% compatibility (42 bytes, consistent 1-byte difference)
- All decoding: 100% perfect compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 17:23:56 +09:00
d5263abab0 feat: Perfect C# structure alignment with VC2022 for exact debugging
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>
2025-09-10 22:01:08 +09:00