|
@@ -5668,8 +5668,13 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // Try to get EVCCID if plug first
|
|
|
- if(ShmCharger->isCcsEnable && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_B))
|
|
|
+ /*
|
|
|
+ * TODO:
|
|
|
+ * 1. Try to get EVCCID if plug first
|
|
|
+ */
|
|
|
+ if(ShmSysConfigAndInfo->SysConfig.isAuthrizeByEVCCID &&
|
|
|
+ ShmCharger->isCcsEnable &&
|
|
|
+ (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_B))
|
|
|
{
|
|
|
if(!getRequest(gun_index))
|
|
|
{
|
|
@@ -5681,12 +5686,26 @@ int main(void)
|
|
|
{
|
|
|
if((16 < ShmCharger->gun_info[gun_index].acCcsInfo.PresentMsgFlowStatus) && (ShmCharger->gun_info[gun_index].acCcsInfo.PresentMsgFlowStatus < 254))
|
|
|
{
|
|
|
- sprintf((char*)ShmSysConfigAndInfo->SysConfig.UserId, "%02X%02X%02X%02X%02X%02X", ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[0],
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[1],
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[2],
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[3],
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[4],
|
|
|
- ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[5]);
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ {
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysConfig.UserId, "%s%02X%02X%02X%02X%02X%02X", ShmOCPP16Data->ConfigurationTable.CoreProfile[EVCCID_PREFIX].ItemData,
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[0],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[1],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[2],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[3],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[4],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[5]);
|
|
|
+ }
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ {
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysConfig.UserId, "%02X%02X%02X%02X%02X%02X", ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[0],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[1],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[2],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[3],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[4],
|
|
|
+ ShmCharger->gun_info[gun_index].acCcsInfo.EVCCID[5]);
|
|
|
+ }
|
|
|
+
|
|
|
//sprintf((char*)ShmSysConfigAndInfo->SysConfig.UserId, "F5902677");
|
|
|
ShmCharger->gun_info[gun_index].isGetEvCCID = ON;
|
|
|
|