|
@@ -3473,28 +3473,19 @@ void checkConnectionTimeout()
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if(strcmp((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData,"") != 0)
|
|
|
- {
|
|
|
- ShmCharger->timeoutSpec.Setting_Timeout_Spec = atoi((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
|
|
|
- if(ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 0)
|
|
|
- {
|
|
|
- ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
|
|
|
- //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Value can't be zero or less than zero.\n.");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShmCharger->timeoutSpec.Present_Timeout_Spec = (ShmCharger->timeoutSpec.Setting_Timeout_Spec*1000);
|
|
|
- //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Pass...\n.");
|
|
|
- }
|
|
|
- //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : %s s \n.",ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
|
|
|
+ ShmCharger->timeoutSpec.Setting_Timeout_Spec = ocpp_get_connection_timeout();
|
|
|
+ if(ShmCharger->timeoutSpec.Setting_Timeout_Spec <= 0)
|
|
|
+ {
|
|
|
+ ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
|
|
|
+ //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Value can't be zero or less than zero.\n.");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShmCharger->timeoutSpec.Present_Timeout_Spec = (ShmCharger->timeoutSpec.Setting_Timeout_Spec*1000);
|
|
|
+ //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Pass...\n.");
|
|
|
+ }
|
|
|
+ //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : %s s \n.",ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
|
|
|
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShmCharger->timeoutSpec.Present_Timeout_Spec = TIMEOUT_SPEC_HANDSHAKING;
|
|
|
- //DEBUG_INFO("Handshaking timeout specification follow by OCPP Configuration : Fail. Table is blank...\n.");
|
|
|
- }
|
|
|
- //DEBUG_INFO("Present timeout spec : %d \n", ShmCharger->timeoutSpec.Present_Timeout_Spec);
|
|
|
}
|
|
|
}
|
|
|
|