|
@@ -15579,6 +15579,7 @@ int handleSetChargingProfileRequest(char *uuid, char *payload)
|
|
|
uint8_t isPeriodOverMax = FALSE;
|
|
|
uint8_t isProfileOverMax = FALSE;
|
|
|
uint8_t isConnectorMismatch = FALSE;
|
|
|
+ uint8_t isTransactiodIdMismatch = FALSE;
|
|
|
uint8_t existProfileQuantity = 0;
|
|
|
uint8_t filename[128]={0};
|
|
|
uint8_t dataLine[4096]={0};
|
|
@@ -15727,6 +15728,9 @@ int handleSetChargingProfileRequest(char *uuid, char *payload)
|
|
|
}
|
|
|
}
|
|
|
fclose(filePtr);
|
|
|
+
|
|
|
+ if(SetProfileReq.chargingProfile.transactionId != ShmOCPP20Data->TransactionEvent[SetProfileReq.evseId-1].transactionInfo.transactionId)
|
|
|
+ isTransactiodIdMismatch = TRUE;
|
|
|
}
|
|
|
}
|
|
|
else if(strstr(json_object_get_string(json_object_object_get(json_object_object_get(SetChargingProfile, "chargingProfile"), "chargingProfilePurpose")), ChargingProfilePurposeEnumTypeStr[ChargingProfilePurposeEnumType_ChargingStationExternalConstraints]) != NULL)
|
|
@@ -15744,7 +15748,7 @@ int handleSetChargingProfileRequest(char *uuid, char *payload)
|
|
|
}
|
|
|
|
|
|
// Profile replace or add info
|
|
|
- if(!isLostConnectorId && !isPeriodOverMax && !isProfileOverMax && !isConnectorMismatch)
|
|
|
+ if(!isLostConnectorId && !isPeriodOverMax && !isProfileOverMax && !isConnectorMismatch && !isTransactiodIdMismatch)
|
|
|
{
|
|
|
FILE *infile;
|
|
|
FILE *outfile;
|
|
@@ -15875,6 +15879,9 @@ int handleSetChargingProfileRequest(char *uuid, char *payload)
|
|
|
if(isProfileOverMax)
|
|
|
DEBUG_WARN("Profile quantity is over spec.\n");
|
|
|
|
|
|
+ if(isTransactiodIdMismatch)
|
|
|
+ DEBUG_WARN("Transaction id is mismatch.\n");
|
|
|
+
|
|
|
sprintf((char*)ShmOCPP20Data->SetChargingProfile[(SetProfileReq.evseId==0?SetProfileReq.evseId:SetProfileReq.evseId-1)].Response_status, "%s", ChargingProfileStatusEnumTypeStr[ChargingProfileStatusEnumType_Rejected] );
|
|
|
}
|
|
|
}
|