|
@@ -41,6 +41,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
#define PASS 1
|
|
|
#define FAIL -1
|
|
|
|
|
@@ -1262,6 +1263,10 @@ void CheckSystemValue(void)
|
|
|
ShmOCPP16Data->OcppConnStatus = 0; // ocpp offline
|
|
|
server_sign = FALSE;
|
|
|
}
|
|
|
+ else if((server_sign == FALSE) &&(strcmp((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalAuthorizeOffline].ItemData, "TRUE") == 0)&&(strcmp((const char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemData, "TRUE") == 0)&&(ShmOCPP16Data->OcppConnStatus == 0)&& (ShmOCPP16Data->SpMsg.bits.AuthorizeReq == 1))
|
|
|
+ {
|
|
|
+ sendAuthorizeRequest(0);
|
|
|
+ }
|
|
|
|
|
|
//===============================
|
|
|
// CSU Trigger Smart Charging Profilw
|
|
@@ -1585,12 +1590,12 @@ int sendAuthorizeRequest(int gun_index)
|
|
|
DEBUG_INFO("sendAuthorizeRequest \n");
|
|
|
|
|
|
//Local Authorize
|
|
|
- if((strcmp((const char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemData, "TRUE") == 0)&&(ShmOCPP16Data->OcppConnStatus == 0))
|
|
|
+ if((strcmp((const char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[LocalAuthorizeOffline].ItemData, "TRUE") == 0)&&(strcmp((const char *)ShmOCPP16Data->ConfigurationTable.LocalAuthListManagementProfile[LocalAuthListEnabled].ItemData, "TRUE") == 0)&&(ShmOCPP16Data->OcppConnStatus == 0))
|
|
|
{
|
|
|
OCPP_getIdTag((char *)ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
if((strcmp(idTagQuery.idTagstr,"") == 0) || (strcmp(idTagQuery.idTagstatus,"Accepted") != 0) )
|
|
|
{
|
|
|
- DEBUG_INFO("Local Authorization Fail !!!!\n");
|
|
|
+ DEBUG_INFO("offline Local Authorization Fail !!!!\n");
|
|
|
strcpy((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ExpiryDate, "");
|
|
|
strcpy((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ParentIdTag, (const char *)ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
strcpy((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status, "Invalid");
|
|
@@ -1601,7 +1606,7 @@ int sendAuthorizeRequest(int gun_index)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DEBUG_INFO("Local Authorization Pass !!!!\n");
|
|
|
+ DEBUG_INFO("offline Local Authorization Pass !!!!\n");
|
|
|
strcpy((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ExpiryDate, idTagQuery.expiryDate);
|
|
|
strcpy((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.ParentIdTag, (const char *)ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
strcpy((char *)ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status, idTagQuery.idTagstatus);
|
|
@@ -1728,10 +1733,6 @@ int sendBootNotificationRequest(void)
|
|
|
strcpy(queuedata,message);
|
|
|
|
|
|
HeartBeatCount = 0;
|
|
|
- //#ifdef SystemLogMessage
|
|
|
- //DEBUG_INFO(">>>>>BootNotification request\n");
|
|
|
- //DEBUG_INFO("Message: %s\n", SendBuffer);
|
|
|
- //#endif
|
|
|
|
|
|
return result;
|
|
|
}
|