|
@@ -246,7 +246,7 @@ unsigned int isKernelSupportNAT()
|
|
|
if(fgets(buf, sizeof(buf), fp) != NULL)
|
|
|
{
|
|
|
sscanf(buf, "#%d", &version);
|
|
|
- DEBUG_INFO("Kernel version: %d\n", version);
|
|
|
+ //DEBUG_INFO("Kernel version: %d\n", version);
|
|
|
|
|
|
if(version >= 30)
|
|
|
result = YES;
|
|
@@ -261,9 +261,9 @@ unsigned int isKernelSupportNAT()
|
|
|
//======================================================
|
|
|
void ocpp_process_start()
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
system("/root/OcppBackend &");
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
system("/root/OcppBackend20 &");
|
|
|
}
|
|
|
|
|
@@ -271,11 +271,11 @@ uint8_t ocpp_get_connection_status()
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->OcppConnStatus;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->OcppConnStatus;
|
|
|
}
|
|
@@ -287,14 +287,14 @@ uint16_t ocpp_get_connection_timeout()
|
|
|
{
|
|
|
uint16_t result = (TIMEOUT_SPEC_HANDSHAKING/1000);
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(strcmp((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData,"") != 0)
|
|
|
{
|
|
|
result = atoi((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[ConnectionTimeOut].ItemData);
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(strcmp((char *)ShmOCPP20Data->ControllerComponentVariable[TxCtrlr_EVConnectionTimeOut].variableAttribute[0].value,"") != 0)
|
|
|
{
|
|
@@ -309,11 +309,11 @@ uint8_t ocpp_get_update_firmware_req()
|
|
|
{
|
|
|
uint8_t result = NO;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->MsMsg.bits.UpdateFirmwareReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->MsMsg.bits.UpdateFirmwareReq;
|
|
|
}
|
|
@@ -325,11 +325,11 @@ uint8_t ocpp_get_reset_req()
|
|
|
{
|
|
|
uint8_t result = NO;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->MsMsg.bits.ResetReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->MsMsg.bits.ResetReq;
|
|
|
}
|
|
@@ -339,7 +339,7 @@ uint8_t ocpp_get_reset_req()
|
|
|
|
|
|
void ocpp_boot_info_sync()
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
memcpy((char*)ShmOCPP16Data->OcppServerURL, (char*)ShmSysConfigAndInfo->SysConfig.OcppServerURL, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.OcppServerURL));
|
|
|
memcpy((char*)ShmOCPP16Data->ChargeBoxId, (char*)ShmSysConfigAndInfo->SysConfig.ChargeBoxId, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.ChargeBoxId));
|
|
@@ -351,7 +351,7 @@ void ocpp_boot_info_sync()
|
|
|
DEBUG_INFO("CpMeterSerialNumber: %s\n",ShmOCPP16Data->BootNotification.CpMeterSerialNumber);
|
|
|
DEBUG_INFO("CpMeterType: %s\n",ShmOCPP16Data->BootNotification.CpMeterType);
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
memcpy((char*)ShmOCPP20Data->OcppServerURL, (char*)ShmSysConfigAndInfo->SysConfig.OcppServerURL, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.OcppServerURL));
|
|
|
memcpy((char*)ShmOCPP20Data->ChargeBoxId, (char*)ShmSysConfigAndInfo->SysConfig.ChargeBoxId, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.ChargeBoxId));
|
|
@@ -361,12 +361,12 @@ void ocpp_boot_info_sync()
|
|
|
|
|
|
void ocpp_set_remotestart(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStartTransactionReq != status)
|
|
|
ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStartTransactionReq = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CsMsg.bits[gun_index].RequestStartTransactionReq != status)
|
|
|
ShmOCPP20Data->CsMsg.bits[gun_index].RequestStartTransactionReq = status;
|
|
@@ -375,12 +375,12 @@ void ocpp_set_remotestart(uint8_t gun_index, uint8_t status)
|
|
|
|
|
|
void ocpp_set_remotestop(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStopTransactionReq != status)
|
|
|
ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStopTransactionReq = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CsMsg.bits[gun_index].RequestStopTransactionReq != status)
|
|
|
ShmOCPP20Data->CsMsg.bits[gun_index].RequestStopTransactionReq = status;
|
|
@@ -391,11 +391,11 @@ uint8_t ocpp_get_remotestart(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStartTransactionReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->CsMsg.bits[gun_index].RequestStartTransactionReq;
|
|
|
}
|
|
@@ -405,11 +405,11 @@ uint8_t ocpp_get_remotestart(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_copy_userid_from_remotestart(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
memcpy(ShmSysConfigAndInfo->SysConfig.UserId, ShmOCPP16Data->RemoteStartTransaction[gun_index].IdTag, ARRAY_SIZE(ShmOCPP16Data->RemoteStartTransaction[gun_index].IdTag));
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
memcpy(ShmSysConfigAndInfo->SysConfig.UserId, ShmOCPP20Data->RequestStartTransaction[gun_index].idToken.idToken, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId));
|
|
|
}
|
|
@@ -419,11 +419,11 @@ uint8_t ocpp_get_remotestop(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->CsMsg.bits[gun_index].RemoteStopTransactionReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->CsMsg.bits[gun_index].RequestStopTransactionReq;
|
|
|
}
|
|
@@ -433,7 +433,7 @@ uint8_t ocpp_get_remotestop(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_set_auth_req(uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->SpMsg.bits.AuthorizeReq != status)
|
|
|
{
|
|
@@ -443,7 +443,7 @@ void ocpp_set_auth_req(uint8_t status)
|
|
|
ShmOCPP16Data->SpMsg.bits.AuthorizeReq = status;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->SpMsg.bits.AuthorizeReq != status)
|
|
|
{
|
|
@@ -459,11 +459,11 @@ uint8_t ocpp_get_auth_req()
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->SpMsg.bits.AuthorizeReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->SpMsg.bits.AuthorizeReq;
|
|
|
}
|
|
@@ -473,12 +473,12 @@ uint8_t ocpp_get_auth_req()
|
|
|
|
|
|
void ocpp_set_auth_conf(uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->SpMsg.bits.AuthorizeConf != status)
|
|
|
ShmOCPP16Data->SpMsg.bits.AuthorizeConf = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->SpMsg.bits.AuthorizeConf != status)
|
|
|
ShmOCPP20Data->SpMsg.bits.AuthorizeConf = status;
|
|
@@ -489,11 +489,11 @@ uint8_t ocpp_get_auth_conf()
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->SpMsg.bits.AuthorizeConf;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->SpMsg.bits.AuthorizeConf;
|
|
|
}
|
|
@@ -505,12 +505,12 @@ uint8_t ocpp_get_auth_result()
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if((strcmp((char*)ShmOCPP16Data->Authorize.ResponseIdTagInfo.Status, "Accepted")==0))
|
|
|
result = PASS;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if((strcmp((char*)ShmOCPP20Data->Authorize.Response_idTokenInfo.status, "Accepted")==0))
|
|
|
result = PASS;
|
|
@@ -523,11 +523,11 @@ uint8_t ocpp_get_unlocker_req(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmCharger->gun_info[ShmOCPP16Data->UnlockConnector[gun_index].ConnectorId-1].isUnlockerConnetor;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmCharger->gun_info[ShmOCPP20Data->UnlockConnector[gun_index].connectorId-1].isUnlockerConnetor;
|
|
|
}
|
|
@@ -537,12 +537,12 @@ uint8_t ocpp_get_unlocker_req(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_set_unlocker_req(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmCharger->gun_info[ShmOCPP16Data->UnlockConnector[gun_index].ConnectorId-1].isUnlockerConnetor != status)
|
|
|
ShmCharger->gun_info[ShmOCPP16Data->UnlockConnector[gun_index].ConnectorId-1].isUnlockerConnetor = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmCharger->gun_info[ShmOCPP20Data->UnlockConnector[gun_index].connectorId-1].isUnlockerConnetor != status)
|
|
|
ShmCharger->gun_info[ShmOCPP20Data->UnlockConnector[gun_index].connectorId-1].isUnlockerConnetor = status;
|
|
@@ -551,12 +551,12 @@ void ocpp_set_unlocker_req(uint8_t gun_index, uint8_t status)
|
|
|
|
|
|
void ocpp_set_starttransaction_req(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CpMsg.bits[gun_index].StartTransactionReq != status)
|
|
|
ShmOCPP16Data->CpMsg.bits[gun_index].StartTransactionReq = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventReq != status)
|
|
|
ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventReq = status;
|
|
@@ -565,12 +565,12 @@ void ocpp_set_starttransaction_req(uint8_t gun_index, uint8_t status)
|
|
|
|
|
|
void ocpp_set_starttransaction_conf(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CpMsg.bits[gun_index].StartTransactionConf != status)
|
|
|
ShmOCPP16Data->CpMsg.bits[gun_index].StartTransactionConf = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventConf != status)
|
|
|
ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventConf = status;
|
|
@@ -579,12 +579,12 @@ void ocpp_set_starttransaction_conf(uint8_t gun_index, uint8_t status)
|
|
|
|
|
|
void ocpp_set_stoptransaction_req(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CpMsg.bits[gun_index].StopTransactionReq != status)
|
|
|
ShmOCPP16Data->CpMsg.bits[gun_index].StopTransactionReq = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventReq != status)
|
|
|
ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventReq = status;
|
|
@@ -593,14 +593,14 @@ void ocpp_set_stoptransaction_req(uint8_t gun_index, uint8_t status)
|
|
|
|
|
|
void ocpp_set_stoptransaction_conf(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CpMsg.bits[gun_index].StopTransactionConf != status)
|
|
|
{
|
|
|
ShmOCPP16Data->CpMsg.bits[gun_index].StopTransactionConf = status;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventConf != status)
|
|
|
{
|
|
@@ -611,11 +611,11 @@ void ocpp_set_stoptransaction_conf(uint8_t gun_index, uint8_t status)
|
|
|
|
|
|
void ocpp_copy_userid_to_starttransaction(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
memcpy((char*)ShmOCPP16Data->StartTransaction[gun_index].IdTag, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmOCPP16Data->StartTransaction[gun_index].IdTag));
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
memcpy((char*)ShmOCPP20Data->TransactionEvent[gun_index].idToken.idToken, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId));
|
|
|
}
|
|
@@ -625,11 +625,11 @@ uint8_t ocpp_get_smartcharging_profileId(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = 0;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingProfileId;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->SmartChargingProfile[gun_index].id;
|
|
|
}
|
|
@@ -639,11 +639,11 @@ uint8_t ocpp_get_smartcharging_profileId(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_reset_smartcharging_profileId(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingProfileId = 0;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
ShmOCPP20Data->SmartChargingProfile[gun_index].id = 0;
|
|
|
}
|
|
@@ -653,11 +653,11 @@ uint8_t ocpp_get_profile_req(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->CSUMsg.bits[gun_index].ChargingProfileReq;
|
|
|
}
|
|
@@ -667,12 +667,12 @@ uint8_t ocpp_get_profile_req(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_set_profile_req(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileReq != status)
|
|
|
ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileReq = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CSUMsg.bits[gun_index].ChargingProfileReq != status)
|
|
|
ShmOCPP20Data->CSUMsg.bits[gun_index].ChargingProfileReq = status;
|
|
@@ -683,11 +683,11 @@ uint8_t ocpp_get_profile_conf(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileConf;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->CSUMsg.bits[gun_index].ChargingProfileConf;
|
|
|
}
|
|
@@ -697,12 +697,12 @@ uint8_t ocpp_get_profile_conf(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_set_profile_conf(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileConf != status)
|
|
|
ShmOCPP16Data->CSUMsg.bits[gun_index].ChargingProfileConf = status;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CSUMsg.bits[gun_index].ChargingProfileConf != status)
|
|
|
ShmOCPP20Data->CSUMsg.bits[gun_index].ChargingProfileConf = status;
|
|
@@ -713,12 +713,12 @@ uint8_t ocpp_get_StopTransactionOnEVSideDisconnect()
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(strcmp((char *)ShmOCPP16Data->ConfigurationTable.CoreProfile[StopTransactionOnEVSideDisconnect].ItemData, "TRUE") == 0)
|
|
|
result = ON;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(strcmp((char *)ShmOCPP20Data->ControllerComponentVariable[TxCtrlr_StopTxOnEVSideDisconnect].variableAttribute[0].value, "TRUE") == 0)
|
|
|
result = ON;
|
|
@@ -731,11 +731,11 @@ uint8_t ocpp_get_cancelreservation_req(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
result = ShmOCPP16Data->CsMsg.bits[gun_index].CancelReservationReq;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
result = ShmOCPP20Data->CsMsg.bits[gun_index].CancelReservationReq;
|
|
|
}
|
|
@@ -745,7 +745,7 @@ uint8_t ocpp_get_cancelreservation_req(uint8_t gun_index)
|
|
|
|
|
|
void ocpp_set_cancelreservation_req(uint8_t gun_index, uint8_t status)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].CancelReservationReq != status)
|
|
|
ShmOCPP16Data->CsMsg.bits[gun_index].CancelReservationReq = status;
|
|
@@ -753,7 +753,7 @@ void ocpp_set_cancelreservation_req(uint8_t gun_index, uint8_t status)
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].CancelReservationReq == OFF)
|
|
|
ShmOCPP16Data->CsMsg.bits[gun_index].CancelReservationConf = ON;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CsMsg.bits[gun_index].CancelReservationReq != status)
|
|
|
ShmOCPP20Data->CsMsg.bits[gun_index].CancelReservationReq = status;
|
|
@@ -767,12 +767,12 @@ uint8_t ocpp_compare_reserve_id_with_user(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(strcmp((char*)ShmSysConfigAndInfo->SysConfig.UserId, (char*)ShmOCPP16Data->ReserveNow[gun_index].IdTag) == 0)
|
|
|
result = ON;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(strcmp((char*)ShmSysConfigAndInfo->SysConfig.UserId, (char*)ShmOCPP20Data->ReserveNow[gun_index].idToken.idToken) == 0)
|
|
|
result = ON;
|
|
@@ -785,7 +785,7 @@ uint8_t ocpp_compare_reserve_id_with_remote_user(uint8_t gun_index)
|
|
|
{
|
|
|
uint8_t result = OFF;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(strcmp((char*)ShmOCPP16Data->RemoteStartTransaction[gun_index].IdTag, (char*)ShmOCPP16Data->ReserveNow[gun_index].IdTag) == 0)
|
|
|
{
|
|
@@ -793,7 +793,7 @@ uint8_t ocpp_compare_reserve_id_with_remote_user(uint8_t gun_index)
|
|
|
memcpy(ShmSysConfigAndInfo->SysConfig.UserId, ShmOCPP16Data->RemoteStartTransaction[gun_index].IdTag, ARRAY_SIZE(ShmOCPP16Data->RemoteStartTransaction[gun_index].IdTag));
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(strcmp((char*)ShmOCPP20Data->RequestStartTransaction[gun_index].idToken.idToken, (char*)ShmOCPP20Data->ReserveNow[gun_index].idToken.idToken) == 0)
|
|
|
{
|
|
@@ -1027,6 +1027,7 @@ int CreatShareMemory()
|
|
|
}
|
|
|
memset(ShmCharger,0,sizeof(struct Charger));
|
|
|
|
|
|
+ ShmSysConfigAndInfo->SysInfo.InternetConn = OFF;
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -1582,6 +1583,7 @@ void InitEthernet()
|
|
|
system(tmpbuf);
|
|
|
system("ifconfig lo up &");
|
|
|
system("/sbin/ifconfig eth0:1 192.168.201.201 netmask 255.255.255.248 up &");
|
|
|
+ system("/sbin/ethtool -s eth0 speed 10 duplex full autoneg off");
|
|
|
|
|
|
//Run DHCP client if enabled
|
|
|
system("killall udhcpc");
|
|
@@ -2009,7 +2011,7 @@ void get_firmware_version(unsigned char gun_index)
|
|
|
strcpy((char*)ShmSysConfigAndInfo->SysInfo.CsuPrimFwRev, ShmCharger->gun_info[gun_index].ver.Version_FW);
|
|
|
|
|
|
// Get CSU root file system version
|
|
|
- sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.44.00.0000.00");
|
|
|
+ sprintf((char*)ShmSysConfigAndInfo->SysInfo.CsuRootFsFwRev, "D0.45.00.0000.00");
|
|
|
|
|
|
// Get AC connector type from model name
|
|
|
for(uint8_t idx=0;idx<3;idx++)
|
|
@@ -2504,10 +2506,9 @@ int isReachableInternet()
|
|
|
char buf[512];
|
|
|
char tmp[512];
|
|
|
|
|
|
-
|
|
|
+ // Get ip address & net mask
|
|
|
strcpy(cmd, "ifconfig eth0");
|
|
|
fp = popen(cmd, "r");
|
|
|
-
|
|
|
if (fp != NULL)
|
|
|
{
|
|
|
while(fgets(buf, sizeof(buf), fp) != NULL)
|
|
@@ -2516,17 +2517,45 @@ int isReachableInternet()
|
|
|
{
|
|
|
sscanf(buf, "%*s%s", tmp);
|
|
|
substr(tmp, tmp, strspn(tmp, "addr:"), strlen(buf)-strspn(tmp, "addr:"));
|
|
|
-
|
|
|
if (strcmp(tmp, (char *)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress) != 0)
|
|
|
{
|
|
|
strcpy((char *) ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress, tmp);
|
|
|
}
|
|
|
+
|
|
|
+ sscanf(buf, "%*s%*s%*s%s", tmp);
|
|
|
+ substr(tmp, tmp, strspn(tmp, "Mask:"), strlen(buf)-strspn(tmp, "Mask:"));
|
|
|
+ if (strcmp(tmp, (char *)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress) != 0)
|
|
|
+ {
|
|
|
+ strcpy((char *) ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress, tmp);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
pclose(fp);
|
|
|
memset(buf, 0x00, sizeof(buf));
|
|
|
|
|
|
+ // Get gateway
|
|
|
+ fp = popen("ip route", "r");
|
|
|
+ if(fp == NULL)
|
|
|
+ result = FAIL;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ while(fgets(buf, sizeof(buf), fp) != NULL)
|
|
|
+ {
|
|
|
+ if((strstr(buf, "default") != NULL) && (strstr(buf, "eth0") != NULL))
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(strstr(buf, "default") != NULL)
|
|
|
+ {
|
|
|
+ sscanf(buf, "%*s%*s%s", tmp);
|
|
|
+ substr((char*)ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress, tmp, 0, strlen(tmp));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ pclose(fp);
|
|
|
+ memset(buf, 0x00, sizeof(buf));
|
|
|
+
|
|
|
+
|
|
|
for(int idx=0;idx<ARRAY_SIZE(valid_Internet);idx++)
|
|
|
{
|
|
|
sprintf(cmd, "ping -c 1 -w 3 -I eth0 %s", valid_Internet[idx]);
|
|
@@ -2588,7 +2617,7 @@ int isReservationExpired(unsigned char gun_index)
|
|
|
struct tm expiredDate;
|
|
|
struct timeb expiredTime;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(sscanf((char*)ShmOCPP16Data->ReserveNow[gun_index].ExpiryDate, "%4d-%2d-%2dT%2d:%2d:%2d", &expiredDate.tm_year, &expiredDate.tm_mon, &expiredDate.tm_mday, &expiredDate.tm_hour, &expiredDate.tm_min, &expiredDate.tm_sec) == 6)
|
|
|
{
|
|
@@ -2608,7 +2637,7 @@ int isReservationExpired(unsigned char gun_index)
|
|
|
result = YES;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(sscanf((char*)ShmOCPP20Data->ReserveNow[gun_index].expiryDateTime, "%4d-%2d-%2dT%2d:%2d:%2d", &expiredDate.tm_year, &expiredDate.tm_mon, &expiredDate.tm_mday, &expiredDate.tm_hour, &expiredDate.tm_min, &expiredDate.tm_sec) == 6)
|
|
|
{
|
|
@@ -2641,7 +2670,7 @@ int isProfileValid(uint8_t gun_index)
|
|
|
struct tm tmFrom, tmTo;
|
|
|
struct timeb tbFrom, tbTo;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if((sscanf((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ValidFrom, "%4d-%2d-%2dT%2d:%2d:%2d", &tmFrom.tm_year, &tmFrom.tm_mon, &tmFrom.tm_mday, &tmFrom.tm_hour, &tmFrom.tm_min, &tmFrom.tm_sec) == 6) &&
|
|
|
(sscanf((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ValidTo, "%4d-%2d-%2dT%2d:%2d:%2d", &tmTo.tm_year, &tmTo.tm_mon, &tmTo.tm_mday, &tmTo.tm_hour, &tmTo.tm_min, &tmTo.tm_sec) == 6))
|
|
@@ -2666,7 +2695,7 @@ int isProfileValid(uint8_t gun_index)
|
|
|
DEBUG_WARN("ValidFrom or ValidTo date parsing error.\n");
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if((sscanf((char*)ShmOCPP20Data->SmartChargingProfile[gun_index].validFrom, "%4d-%2d-%2dT%2d:%2d:%2d", &tmFrom.tm_year, &tmFrom.tm_mon, &tmFrom.tm_mday, &tmFrom.tm_hour, &tmFrom.tm_min, &tmFrom.tm_sec) == 6) &&
|
|
|
(sscanf((char*)ShmOCPP20Data->SmartChargingProfile[gun_index].validTo, "%4d-%2d-%2dT%2d:%2d:%2d", &tmTo.tm_year, &tmTo.tm_mon, &tmTo.tm_mday, &tmTo.tm_hour, &tmTo.tm_min, &tmTo.tm_sec) == 6))
|
|
@@ -2701,7 +2730,7 @@ int getScheduleStart(int gun_index)
|
|
|
struct tm tmScheduleStart;;
|
|
|
struct timeb tbScheduleStart;
|
|
|
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if((sscanf((char*)ShmOCPP16Data->SmartChargingProfile[gun_index].ChargingSchedule.StartSchedule, "%4d-%2d-%2dT%2d:%2d:%2d", &tmScheduleStart.tm_year, &tmScheduleStart.tm_mon, &tmScheduleStart.tm_mday, &tmScheduleStart.tm_hour, &tmScheduleStart.tm_min, &tmScheduleStart.tm_sec) == 6))
|
|
|
{
|
|
@@ -2718,7 +2747,7 @@ int getScheduleStart(int gun_index)
|
|
|
DEBUG_WARN("Schedule start date parsing error.\n");
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if((sscanf((char*)ShmOCPP20Data->SmartChargingProfile[gun_index].chargingSchedule[0].startSchedule, "%4d-%2d-%2dT%2d:%2d:%2d", &tmScheduleStart.tm_year, &tmScheduleStart.tm_mon, &tmScheduleStart.tm_mday, &tmScheduleStart.tm_hour, &tmScheduleStart.tm_min, &tmScheduleStart.tm_sec) == 6))
|
|
|
{
|
|
@@ -2867,7 +2896,7 @@ void checkTask()
|
|
|
|
|
|
if(strcmp((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,"") != 0)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(system("pidof -s OcppBackend > /dev/null") != 0)
|
|
|
{
|
|
@@ -2875,7 +2904,7 @@ void checkTask()
|
|
|
ocpp_process_start();
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(system("pidof -s OcppBackend20 > /dev/null") != 0)
|
|
|
{
|
|
@@ -2942,7 +2971,7 @@ void checkConnectionTimeout()
|
|
|
|
|
|
void checkReset()
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->MsMsg.bits.ResetReq)
|
|
|
{
|
|
@@ -2970,7 +2999,7 @@ void checkReset()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->MsMsg.bits.ResetReq)
|
|
|
{
|
|
@@ -2981,7 +3010,7 @@ void checkReset()
|
|
|
sprintf((char*)ShmOCPP16Data->Reset.ResponseStatus, "Accepted");
|
|
|
ShmOCPP20Data->MsMsg.bits.ResetConf = ON;
|
|
|
|
|
|
- if(strcmp((char*)ShmOCPP20Data->Reset.type, "Hard") == 0)
|
|
|
+ if(strcmp((char*)ShmOCPP20Data->Reset.type, "Immediate") == 0)
|
|
|
{
|
|
|
system("sync");
|
|
|
sleep(5);
|
|
@@ -3002,7 +3031,7 @@ void checkReset()
|
|
|
|
|
|
void checkReservation(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].ReserveNowReq)
|
|
|
{
|
|
@@ -3016,7 +3045,7 @@ void checkReservation(uint8_t gun_index)
|
|
|
ShmOCPP16Data->CsMsg.bits[gun_index].ReserveNowConf = ON;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CsMsg.bits[gun_index].ReserveNowReq)
|
|
|
{
|
|
@@ -3034,7 +3063,7 @@ void checkReservation(uint8_t gun_index)
|
|
|
|
|
|
void checkUnlocker(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].UnlockConnectorReq == ON)
|
|
|
{
|
|
@@ -3046,7 +3075,7 @@ void checkUnlocker(uint8_t gun_index)
|
|
|
ShmCharger->gun_info[ShmOCPP16Data->UnlockConnector[gun_index].ConnectorId-1].isUnlockerConnetor = ON;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CsMsg.bits[gun_index].UnlockConnectorReq == ON)
|
|
|
{
|
|
@@ -3062,7 +3091,7 @@ void checkUnlocker(uint8_t gun_index)
|
|
|
|
|
|
void checkAvailability(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->CsMsg.bits[gun_index].ChangeAvailabilityReq)
|
|
|
{
|
|
@@ -3080,7 +3109,7 @@ void checkAvailability(uint8_t gun_index)
|
|
|
ShmOCPP16Data->CsMsg.bits[gun_index].ChangeAvailabilityReq = OFF;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->CsMsg.bits[gun_index].ChangeAvailabilityReq)
|
|
|
{
|
|
@@ -3102,7 +3131,7 @@ void checkAvailability(uint8_t gun_index)
|
|
|
|
|
|
void checkChargingProfileLimit(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if((ocpp_get_smartcharging_profileId(gun_index) > 0) &&
|
|
|
(ocpp_get_profile_req(gun_index) != ON) &&
|
|
@@ -3151,7 +3180,7 @@ void checkChargingProfileLimit(uint8_t gun_index)
|
|
|
ShmCharger->gun_info[gun_index].targetCurrent = ShmCharger->gun_info[gun_index].primaryMcuState.rating_current;
|
|
|
}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if((ocpp_get_smartcharging_profileId(gun_index) > 0) &&
|
|
|
(ocpp_get_profile_req(gun_index) != ON) &&
|
|
@@ -3204,7 +3233,7 @@ void checkChargingProfileLimit(uint8_t gun_index)
|
|
|
|
|
|
void checkStopReason(uint8_t gun_index)
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(ShmOCPP16Data->MsMsg.bits.ResetReq)
|
|
|
{
|
|
@@ -3236,10 +3265,10 @@ void checkStopReason(uint8_t gun_index)
|
|
|
DEBUG_INFO("Gun-%d : StopReason [ %s ]...\n.",gun_index,ShmOCPP16Data->StopTransaction[gun_index].StopReason);
|
|
|
|
|
|
memcpy((char*)ShmOCPP16Data->StopTransaction[gun_index].IdTag, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmOCPP16Data->StopTransaction[gun_index].IdTag));
|
|
|
- ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100.0);
|
|
|
ShmOCPP16Data->CpMsg.bits[gun_index].StopTransactionReq = ON;
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(ShmOCPP20Data->MsMsg.bits.ResetReq)
|
|
|
{
|
|
@@ -3271,14 +3300,14 @@ void checkStopReason(uint8_t gun_index)
|
|
|
DEBUG_INFO("Gun-%d : StopReason [ %s ]...\n.", gun_index, ShmOCPP20Data->TransactionEvent[gun_index].transactionInfo.stoppedReason);
|
|
|
|
|
|
memcpy((char*)ShmOCPP20Data->TransactionEvent[gun_index].idToken.idToken, (char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ARRAY_SIZE(ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId));
|
|
|
- ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100.0);
|
|
|
ShmOCPP20Data->CpMsg.bits[gun_index].TransactionEventReq = ON;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
void checkRemoteUpgradeStatus()
|
|
|
{
|
|
|
- if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_16)
|
|
|
{
|
|
|
if(strcmp((char*)ShmOCPP16Data->FirmwareStatusNotification.Status, "DownloadFailed")==0)
|
|
|
{
|
|
@@ -3315,7 +3344,7 @@ void checkRemoteUpgradeStatus()
|
|
|
else
|
|
|
{}
|
|
|
}
|
|
|
- else if(ShmSysConfigAndInfo->SysConfig.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
+ else if(ShmSysConfigAndInfo->SysInfo.OcppRunningVer == OCPP_RUNNING_VERSION_20)
|
|
|
{
|
|
|
if(strcmp((char*)ShmOCPP20Data->FirmwareStatusNotification.status, "DownloadFailed")==0)
|
|
|
{
|
|
@@ -4033,12 +4062,12 @@ int main(void)
|
|
|
ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption_at_start = ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption;
|
|
|
ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption_at_start = ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption;
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount==1)
|
|
|
- ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100.0);
|
|
|
else
|
|
|
{
|
|
|
- //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[0] = (ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption/100);
|
|
|
- //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[1] = (ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption/100);
|
|
|
- //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[2] = (ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption/100);
|
|
|
+ //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[0] = (ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption/100.0);
|
|
|
+ //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[1] = (ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption/100.0);
|
|
|
+ //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[2] = (ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption/100.0);
|
|
|
}
|
|
|
|
|
|
memcpy((char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StartUserId, ShmSysConfigAndInfo->SysConfig.UserId, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.UserId));
|
|
@@ -4133,7 +4162,7 @@ int main(void)
|
|
|
ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption_at_start = ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption;
|
|
|
ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption_at_start = ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption;
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount==1)
|
|
|
- ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100.0);
|
|
|
else
|
|
|
{
|
|
|
//ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[0] = (ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption/100);
|
|
@@ -4430,7 +4459,7 @@ int main(void)
|
|
|
{
|
|
|
setLedMotion(gun_index,LED_ACTION_CHARGING);
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount==1)
|
|
|
- ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption = (ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption/100.0);
|
|
|
else
|
|
|
{
|
|
|
//ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PowerConsumption[0] = (ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption/100);
|
|
@@ -4441,12 +4470,12 @@ int main(void)
|
|
|
ftime(&endChargingTime[gun_index]);
|
|
|
ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedDuration = DiffTimeb(startChargingTime[gun_index], endChargingTime[gun_index])/1000;
|
|
|
if(ShmSysConfigAndInfo->SysConfig.AcPhaseCount==1)
|
|
|
- ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy = ((float)(ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption - ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption_at_start))/100;
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy = ((float)(ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption - ShmCharger->gun_info[gun_index].powerConsumptionTotal.power_consumption_at_start))/100.0;
|
|
|
else
|
|
|
{
|
|
|
- //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy[0] = ((float)(ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption_at_start))/100;
|
|
|
- //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy[1] = ((float)(ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption_at_start))/100;
|
|
|
- //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy[2] = ((float)(ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption_at_start))/100;
|
|
|
+ //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy[0] = ((float)(ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[0].power_consumption_at_start))/100.0;
|
|
|
+ //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy[1] = ((float)(ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[1].power_consumption_at_start))/100.0;
|
|
|
+ //ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PresentChargedEnergy[2] = ((float)(ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption - ShmCharger->gun_info[gun_index].powerConsumption[2].power_consumption_at_start))/100.0;
|
|
|
}
|
|
|
|
|
|
// Response StartTransactionConf
|
|
@@ -4850,7 +4879,7 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if((((ShmCharger->gun_info[gun_index].chargingMode != CHARGING_MODE_SOCKETE) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_C)) || ((ShmCharger->gun_info[gun_index].chargingMode != CHARGING_MODE_SOCKETE) && ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn)) &&
|
|
|
+ if((((ShmCharger->gun_info[gun_index].chargingMode != CHARGING_MODE_SOCKETE) && (ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].PilotState == CP_STATE_C)) || ((ShmCharger->gun_info[gun_index].chargingMode == CHARGING_MODE_SOCKETE) && ShmCharger->gun_info[gun_index].primaryMcuState.socket_e.isSocketEPinOn)) &&
|
|
|
(ShmCharger->gun_info[gun_index].rfidReq != ON) &&
|
|
|
(ShmCharger->gun_info[gun_index].bleConfigData.isRequestStop != ON) &&
|
|
|
!ocpp_get_remotestop(gun_index) &&
|