|
@@ -609,8 +609,10 @@ int main(int argc, char *argv[]) {
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,OcppServerURL);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId,ChargeBoxId);
|
|
|
}
|
|
|
+ struct SysConfigData SysConfig;
|
|
|
+ memcpy(&SysConfig, &ShmSysConfigAndInfo->SysConfig, sizeof(struct SysConfigData));
|
|
|
|
|
|
- int result = StoreUsrConfigData(&ShmSysConfigAndInfo->SysConfig);
|
|
|
+ int result = StoreUsrConfigData(&SysConfig);
|
|
|
if(result != 1){
|
|
|
#ifdef SystemLogMessage
|
|
|
StoreLogMsg("[WebService]StoreUsrConfigData: normal NG");
|
|
@@ -749,7 +751,9 @@ int main(int argc, char *argv[]) {
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId,"");
|
|
|
|
|
|
ShmSysConfigAndInfo->SysInfo.FirmwareUpdate=0;
|
|
|
- StoreUsrConfigData(&ShmSysConfigAndInfo->SysConfig);
|
|
|
+ struct SysConfigData SysConfig;
|
|
|
+ memcpy(&SysConfig, &ShmSysConfigAndInfo->SysConfig, sizeof(struct SysConfigData));
|
|
|
+ StoreUsrConfigData(&SysConfig);
|
|
|
|
|
|
#ifdef SystemLogMessage
|
|
|
DEBUG_INFO("WebService initial OK");
|
|
@@ -942,16 +946,6 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *OcppServerURL;
|
|
|
struct json_object *ChargeBoxId;
|
|
|
|
|
|
- /* log for debug charginginfodata start*/
|
|
|
-// #ifdef SystemLogMessage
|
|
|
- WriteLogMsg("ModelName:%s",(char *)&ShmSysConfigAndInfo->SysConfig.ModelName);
|
|
|
- WriteLogMsg("connectorType1:%d",connectorType1);
|
|
|
- WriteLogMsg("connectorType2:%d",connectorType2);
|
|
|
- WriteLogMsg("connectorType3:%d",connectorType3);
|
|
|
-// #endif
|
|
|
- /* log for debug charginginfodata end*/
|
|
|
-
|
|
|
-
|
|
|
// array_obj = json_object_new_array();
|
|
|
jobj1=json_object_new_object();
|
|
|
jobj2=json_object_new_object();
|
|
@@ -1099,30 +1093,6 @@ int main(int argc, char *argv[]) {
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 4){//AC
|
|
|
- /* log for debug charginginfodata start*/
|
|
|
-// #ifdef SystemLogMessage
|
|
|
- WriteLogMsg("PresentChargingVoltage[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
|
|
|
- WriteLogMsg("PresentChargingCurrent[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
|
|
|
- WriteLogMsg("PresentChargingPower[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
|
|
|
- WriteLogMsg("PresentChargedEnergy[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy);
|
|
|
- WriteLogMsg("PresentChargedDuration[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedDuration);
|
|
|
- WriteLogMsg("RemainChargingDuration[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].RemainChargingDuration);
|
|
|
- WriteLogMsg("EvBatteryMaxVoltage[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
|
|
|
- WriteLogMsg("EvBatterytargetVoltage[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
|
|
|
- WriteLogMsg("EvBatterySoc[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
|
|
|
- WriteLogMsg("SystemStatus[0]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
|
|
|
- WriteLogMsg("Index[0]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
|
|
|
- WriteLogMsg("Type[0]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
|
|
|
- WriteLogMsg("type_index[0]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
|
|
|
- WriteLogMsg("EvBatterytargetCurrent[0]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
|
|
|
- WriteLogMsg("CardNumber[0]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
|
|
|
- WriteLogMsg("StartUserId[0]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
- WriteLogMsg("StartDateTime[0]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
|
- WriteLogMsg("StopDateTime[0]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
|
- WriteLogMsg("StartMethod[0]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
- WriteLogMsg("ConnectorTemp[0]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
-// #endif
|
|
|
- /* log for debug charginginfodata end*/
|
|
|
PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
|
|
|
PresentChargingCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
|
|
|
PresentChargingPower[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
|
|
@@ -1217,30 +1187,6 @@ int main(int argc, char *argv[]) {
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 4){//AC
|
|
|
- /* log for debug charginginfodata start*/
|
|
|
-// #ifdef SystemLogMessage
|
|
|
- WriteLogMsg("PresentChargingVoltage[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
|
|
|
- WriteLogMsg("PresentChargingCurrent[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
|
|
|
- WriteLogMsg("PresentChargingPower[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
|
|
|
- WriteLogMsg("PresentChargedEnergy[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy);
|
|
|
- WriteLogMsg("PresentChargedDuration[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedDuration);
|
|
|
- WriteLogMsg("RemainChargingDuration[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].RemainChargingDuration);
|
|
|
- WriteLogMsg("EvBatteryMaxVoltage[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
|
|
|
- WriteLogMsg("EvBatterytargetVoltage[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
|
|
|
- WriteLogMsg("EvBatterySoc[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
|
|
|
- WriteLogMsg("SystemStatus[1]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
|
|
|
- WriteLogMsg("Index[1]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
|
|
|
- WriteLogMsg("Type[1]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
|
|
|
- WriteLogMsg("type_index[1]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
|
|
|
- WriteLogMsg("EvBatterytargetCurrent[1]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
|
|
|
- WriteLogMsg("CardNumber[1]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
|
|
|
- WriteLogMsg("StartUserId[1]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
- WriteLogMsg("StartDateTime[1]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
|
- WriteLogMsg("StopDateTime[1]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
|
- WriteLogMsg("StartMethod[1]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
- WriteLogMsg("ConnectorTemp[1]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
-// #endif
|
|
|
- /* log for debug charginginfodata end*/
|
|
|
PresentChargingVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
|
|
|
PresentChargingCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
|
|
|
PresentChargingPower[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
|
|
@@ -1335,30 +1281,6 @@ int main(int argc, char *argv[]) {
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 4){//AC
|
|
|
- /* log for debug charginginfodata start*/
|
|
|
-// #ifdef SystemLogMessage
|
|
|
- WriteLogMsg("PresentChargingVoltage[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
|
|
|
- WriteLogMsg("PresentChargingCurrent[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
|
|
|
- WriteLogMsg("PresentChargingPower[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
|
|
|
- WriteLogMsg("PresentChargedEnergy[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedEnergy);
|
|
|
- WriteLogMsg("PresentChargedDuration[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargedDuration);
|
|
|
- WriteLogMsg("RemainChargingDuration[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].RemainChargingDuration);
|
|
|
- WriteLogMsg("EvBatteryMaxVoltage[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
|
|
|
- WriteLogMsg("EvBatterytargetVoltage[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
|
|
|
- WriteLogMsg("EvBatterySoc[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
|
|
|
- WriteLogMsg("SystemStatus[2]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
|
|
|
- WriteLogMsg("Index[2]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
|
|
|
- WriteLogMsg("Type[2]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
|
|
|
- WriteLogMsg("type_index[2]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
|
|
|
- WriteLogMsg("EvBatterytargetCurrent[2]:%f",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
|
|
|
- WriteLogMsg("CardNumber[2]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
|
|
|
- WriteLogMsg("StartUserId[2]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
- WriteLogMsg("StartDateTime[2]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
|
- WriteLogMsg("StopDateTime[2]:%s",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
|
- WriteLogMsg("StartMethod[2]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
- WriteLogMsg("ConnectorTemp[2]:%d",ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
-// #endif
|
|
|
- /* log for debug charginginfodata end*/
|
|
|
PresentChargingVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingVoltage);
|
|
|
PresentChargingCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingCurrent);
|
|
|
PresentChargingPower[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].PresentChargingPower);
|
|
@@ -1413,7 +1335,7 @@ int main(int argc, char *argv[]) {
|
|
|
TelcomChapPapPwd = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd);
|
|
|
TelcomModemImei = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemImei);
|
|
|
TelcomSimImsi = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimImsi);
|
|
|
- TelcomSimIccid = json_object_new_string((char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid);
|
|
|
+ TelcomSimIccid = json_object_new_string((char*)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid);
|
|
|
TelcomSimStatus = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus);
|
|
|
TelcomModemMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode);
|
|
|
TelcomIpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress);
|