Files
V2GDecoderC/docs/v2g_message_support_analysis.md
gram 64e445e21e docs: Add comprehensive V2G message implementation analysis
- Complete analysis of original C program message format support
- VC2022 and dotnet version implementation status comparison
- Clean output implementation documentation
- Message priority recommendations for ISO 15118-2 compliance

Analysis shows:
 CurrentDemandReq/Res fully implemented in all versions
📋 17 additional message types have structures but need XML parsing logic
🎯 8 core messages identified as high priority for DC charging compliance

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-11 23:49:58 +09:00

92 lines
3.7 KiB
Markdown

# V2G EXI Decoder - 메시지 타입 지원 현황 분석
## 오리지널 C 프로그램이 지원하는 메시지 타입 (우선순위 순)
### 1. 세션 관리 메시지 (Session Management)
1. **SessionSetupReq/Res** - 충전 세션 설정
2. **SessionStopReq/Res** - 충전 세션 종료
### 2. 서비스 검색 및 선택 (Service Discovery & Selection)
3. **ServiceDiscoveryReq/Res** - 사용 가능한 충전 서비스 검색
4. **ServiceDetailReq/Res** - 특정 서비스 상세 정보 요청
5. **PaymentServiceSelectionReq/Res** - 결제 방식 및 서비스 선택
### 3. 인증 및 권한 (Authentication & Authorization)
6. **AuthorizationReq/Res** - 충전 권한 확인
7. **PaymentDetailsReq/Res** - 결제 정보 교환
### 4. 충전 매개변수 검색 (Charge Parameter Discovery)
8. **ChargeParameterDiscoveryReq/Res** - 충전 매개변수 교환
### 5. DC 충전 특화 메시지 (DC Charging Specific) - 핵심 구현 필요
9. **CableCheckReq/Res** ❌ - 케이블 연결 상태 확인 (미구현)
10. **PreChargeReq/Res** ❌ - 사전 충전 (미구현)
11. **CurrentDemandReq/Res** ✅ - 전류 요구사항 (구현됨)
12. **WeldingDetectionReq/Res** ❌ - 용접 검출 (미구현)
### 6. AC 충전 특화 메시지 (AC Charging Specific)
13. **ChargingStatusReq/Res** ❌ - AC 충전 상태 (미구현)
### 7. 전력 전달 제어 (Power Delivery Control)
14. **PowerDeliveryReq/Res** ❌ - 전력 전달 제어 (미구현)
### 8. 계량 및 수납 (Metering & Billing)
15. **MeteringReceiptReq/Res** ❌ - 계량 영수증 (미구현)
### 9. 인증서 관리 (Certificate Management)
16. **CertificateUpdateReq/Res** ❌ - 인증서 업데이트 (미구현)
17. **CertificateInstallationReq/Res** ❌ - 인증서 설치 (미구현)
## 현재 구현 상태 요약
### ✅ 구현된 메시지 (오리지널 C)
- **CurrentDemandReq** - 완전 구현 (XML 파싱/생성, EXI 인코딩/디코딩)
- **CurrentDemandRes** - 완전 구현 (XML 파싱/생성, EXI 인코딩/디코딩)
### ❌ 미구현 메시지 (필수 DC 충전 메시지들)
1. **CableCheckReq/Res** - DC 충전 시작 전 케이블 절연 상태 확인
2. **PreChargeReq/Res** - DC 충전 시작 전 사전충전으로 전압 매칭
3. **WeldingDetectionReq/Res** - DC 충전 종료 후 용접 상태 확인
4. **PowerDeliveryReq/Res** - 충전 시작/중지 명령
## 권장 구현 순서 (C → VC → dotnet)
### Phase 1: DC 충전 핵심 메시지 (높은 우선순위)
1. **CableCheckReq/Res** - ISO 15118-2 DC 충전 필수 메시지
2. **PreChargeReq/Res** - ISO 15118-2 DC 충전 필수 메시지
3. **WeldingDetectionReq/Res** - ISO 15118-2 DC 충전 필수 메시지
### Phase 2: 전력 제어 메시지 (중간 우선순위)
4. **PowerDeliveryReq/Res** - 충전 흐름 제어를 위한 필수 메시지
### Phase 3: 세션 관리 메시지 (중간 우선순위)
5. **SessionSetupReq/Res** - 세션 시작
6. **SessionStopReq/Res** - 세션 종료
### Phase 4: 서비스 검색 메시지 (낮은 우선순위)
7. **ServiceDiscoveryReq/Res**
8. **ChargeParameterDiscoveryReq/Res**
## 기술적 고려사항
### XML 패턴 인식
- 각 메시지 타입별로 XML 태그 패턴 인식 로직 필요
- 네임스페이스 처리 (`<ns3:CableCheckReq>` 형식)
### EXI 인코딩/디코딩
- ISO1 EXI 구조체 매핑
- 비트스트림 정확한 처리
### 구조체 초기화
- 각 메시지별 `init_iso1*Type()` 함수 활용
- `_isUsed` 플래그 올바른 설정
### VC2022 포팅 고려사항
- DEBUG_PRINTF 매크로 일관성 유지
- 기존 코드 스타일 준수
- Windows 특화 빌드 설정
### dotnet 포팅 고려사항
- C# 클래스 구조체 변환
- 메모리 관리 차이점 고려
- .NET Core 호환성