- Fix critical EXI encoding error -109 (EXI_ERROR_UNKOWN_EVENT) by adding proper structure initialization
* Added init_iso1BodyType() call before setting message type flags in XML parsing
* Prevents garbage values in unused message type flags that caused wrong grammar paths
- Rename enhanced_exi_viewer to V2GDecoder for consistency
* Updated build.bat to build V2GDecoder instead of enhanced_exi_viewer
* Maintains all existing functionality with improved reliability
- Add comprehensive structure debugging capabilities
* Created structure dump functions to output complete document state
* Added struct_exi.txt and struct_xml.txt for comparing parsed vs original structures
- Enhance output formatting for encoding operations
* Clean hex-only output for encoding mode (similar to XML decode mode)
* Removed debug clutter for production use while preserving debugging code
- Add test infrastructure with minimal_test.xml for focused testing
* Validates CurrentDemandReq message encoding with minimal required fields
- Improve encoder debugging with position tracking in iso1EXIDatatypesEncoder.c
* Added debug points to track exact failure locations during encoding
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit adds comprehensive C# ports of the OpenV2G EXI codec
to support both modern .NET and legacy .NET Framework environments.
## .NET 8.0 Version (csharp/dotnet/)
- Full-featured port with complete EXI codec implementation
- Modern C# features (nullable types, switch expressions, using declarations)
- Comprehensive roundtrip testing functionality
- Successfully processes all test files (test1.exi - test5.exi)
- Supports decode/encode/analyze/test commands
## .NET Framework 4.8 Version (csharp/dotnetfx/)
- Simplified but functional port for legacy environments
- C# 7.3 compatible codebase
- Core V2GTP protocol parsing and analysis
- Roundtrip demonstration functionality
- Successfully processes all test files
## Validation Results
Both versions successfully tested with all available test files:
- test1.exi (131 bytes) → XML → EXI roundtrip ✓
- test2.exi (51 bytes) → XML → EXI roundtrip ✓
- test3.exi (43 bytes) → XML → EXI roundtrip ✓
- test4.exi (43 bytes) → XML → EXI roundtrip ✓
- test5.exi (43 bytes) → XML → EXI roundtrip ✓
## Technical Implementation
- Proper V2GTP header parsing and EXI body extraction
- XML generation with valid structure for testing
- Binary EXI encoding for roundtrip validation
- Cross-platform compatibility maintained
- Build systems: dotnet CLI (.NET 8.0) and MSBuild (.NET FX 4.8)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- Add CurrentDemandRes parsing support to parse_xml_to_iso1()
- Fix namespace-aware XML parsing using find_tag_content_ns()
- Set EVSEIsolationStatus_isUsed flag for proper EXI encoding
- Complete round-trip XML↔EXI conversion with 100% accuracy
- Support both CurrentDemandReq and CurrentDemandRes message types
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Major improvements to XML parsing for perfect round-trip EXI encoding:
- **Namespace-aware XML parsing**: Handle ns1:, ns2:, ns3:, ns4: prefixed tags
- **Enhanced find_tag_content()**: Auto-detect namespaced and regular tags
- **Improved find_tag_in_section()**: Process PhysicalValue tags with namespaces
- **SessionID namespace support**: Parse both <SessionID> and <ns2:SessionID>
- **Perfect round-trip encoding**: XML → EXI → XML with 100% binary accuracy
Test results:
✅ test3.exi: 43 bytes - perfect decode/encode
✅ test4.xml: Perfect XML→EXI→XML round-trip
✅ test5.exi: 43 bytes - identical binary reconstruction
✅ All Unit values preserved as numbers (3=A, 4=V, 5=W, 2=s)
✅ EVErrorCode preserved as numbers (0 instead of NO_ERROR)
The enhanced_exi_viewer now supports complete bidirectional
EXI ↔ XML conversion with namespace-aware parsing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove get_unit_string() and get_error_string() helper functions
- Output Unit values as numbers (3=A, 4=V, 5=W, 2=s) instead of letters
- Output EVErrorCode as numbers (0) instead of strings (NO_ERROR)
- Maintain compatibility with Wireshark XML format structure
- Add build.bat for easy compilation
- Improve SessionID parsing for namespaced XML tags
This ensures decoded EXI outputs preserve original numeric values
rather than converting them to human-readable strings.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused XML output modes (ISO1, ISO2), keep only Wireshark-style output
- Integrate encoding functionality from enhanced_exi_viewer_simple
- Single executable now supports both encoding and decoding:
* -decode: Convert EXI to Wireshark-style XML with ns1-4 prefixes
* -encode: Convert XML to EXI format
* default: Detailed EXI analysis mode
- Support for both standard XML tags and namespaced (ns3:) tags in encoding
- String conversion for units (A, V, W, s) and error codes (NO_ERROR)
- Compact XML output matching Wireshark format exactly
- Clean up old test files and separate tools
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement complete CurrentDemandReq/CurrentDemandRes parsing (24 total fields)
- Add enhanced_exi_viewer.c with detailed message analysis
- Support -decode option for clean XML output (file-ready format)
- Enable ISO1, ISO2, DIN codec support in build configuration
- Fix C99 compatibility issues in makefiles (change -ansi to -std=c99)
- Create test utilities for hex string to EXI conversion
- Generate test files: test3.exi (CurrentDemandRes), test4.exi (CurrentDemandReq)
Features:
* Dual output modes: detailed analysis (default) vs XML (-decode)
* Complete V2G message type detection and parsing
* Session ID display in hex and ASCII formats
* Voltage/current/power readings with proper units
* All optional fields and status flags supported
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>