|
@@ -493,7 +493,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode = QRCodeMadeMode;
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "QRCodeContent", &val_obj) ) {
|
|
|
- QRCodeContent = json_object_get_string(val_obj);
|
|
|
+ QRCodeContent = (char*)json_object_get_string(val_obj);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent,QRCodeContent);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "Intensity", &val_obj) ) {
|
|
@@ -537,7 +537,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].QRCodeMadeMode = DDQRCodeMadeMode1;
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDQRCodeContent1", &val_obj) ) {
|
|
|
- DDQRCodeContent1 = json_object_get_string(val_obj);
|
|
|
+ DDQRCodeContent1 = (char*)json_object_get_string(val_obj);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].QRCodeContent,DDQRCodeContent1);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDIntensity1", &val_obj) ) {
|
|
@@ -577,7 +577,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].QRCodeMadeMode = DDQRCodeMadeMode2;
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDQRCodeContent2", &val_obj) ) {
|
|
|
- DDQRCodeContent2 = json_object_get_string(val_obj);
|
|
|
+ DDQRCodeContent2 = (char*)json_object_get_string(val_obj);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].QRCodeContent,DDQRCodeContent2);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDIntensity2", &val_obj) ) {
|
|
@@ -617,7 +617,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].QRCodeMadeMode = DDQRCodeMadeMode3;
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDQRCodeContent3", &val_obj) ) {
|
|
|
- DDQRCodeContent3 = json_object_get_string(val_obj);
|
|
|
+ DDQRCodeContent3 = (char*)json_object_get_string(val_obj);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].QRCodeContent,DDQRCodeContent3);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDIntensity3", &val_obj) ) {
|
|
@@ -657,7 +657,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].QRCodeMadeMode = DDQRCodeMadeMode4;
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDQRCodeContent4", &val_obj) ) {
|
|
|
- DDQRCodeContent4 = json_object_get_string(val_obj);
|
|
|
+ DDQRCodeContent4 = (char*)json_object_get_string(val_obj);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].QRCodeContent,DDQRCodeContent4);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DDIntensity4", &val_obj) ) {
|
|
@@ -925,12 +925,12 @@ int main(int argc, char *argv[]) {
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiSsid", &val_obj) ) {
|
|
|
WifiSsid = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(WifiSsid, ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid) != 0) Wcnt++;
|
|
|
+ if (strcmp(WifiSsid, (char*)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid) != 0) Wcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid,WifiSsid);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiPassword", &val_obj) ) {
|
|
|
WifiPassword = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(WifiSsid, ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid) != 0) Wcnt++;
|
|
|
+ if (strcmp(WifiSsid, (char*)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid) != 0) Wcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword,WifiPassword);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiDhcpServer", &val_obj) ) {
|
|
@@ -945,37 +945,37 @@ int main(int argc, char *argv[]) {
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiIpAddress", &val_obj) ) {
|
|
|
WifiIpAddress = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(WifiIpAddress, ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress) != 0) Wcnt++;
|
|
|
+ if (strcmp(WifiIpAddress, (char*)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress) != 0) Wcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress,WifiIpAddress);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiSubmaskAddress", &val_obj) ) {
|
|
|
WifiSubmaskAddress = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(WifiSubmaskAddress, ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress) != 0) Wcnt++;
|
|
|
+ if (strcmp(WifiSubmaskAddress, (char*)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress) != 0) Wcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress,WifiSubmaskAddress);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiGatewayAddress", &val_obj) ) {
|
|
|
WifiGatewayAddress = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(WifiGatewayAddress, ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress) != 0) Wcnt++;
|
|
|
+ if (strcmp(WifiGatewayAddress, (char*)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress) != 0) Wcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress,WifiGatewayAddress);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "TelcomApn", &val_obj) ) {
|
|
|
TelcomApn = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(TelcomApn, ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomApn) != 0) Tcnt++;
|
|
|
+ if (strcmp(TelcomApn, (char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomApn) != 0) Tcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomApn,TelcomApn);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "TelcomChapPapId", &val_obj) ) {
|
|
|
TelcomChapPapId = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(TelcomChapPapId, ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId) != 0) Tcnt++;
|
|
|
+ if (strcmp(TelcomChapPapId, (char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId) != 0) Tcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId,TelcomChapPapId);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "TelcomChapPapPwd", &val_obj) ) {
|
|
|
TelcomChapPapPwd = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(TelcomChapPapPwd, ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd) != 0) Tcnt++;
|
|
|
+ if (strcmp(TelcomChapPapPwd, (char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd) != 0) Tcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd,TelcomChapPapPwd);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "TelcomIpAddress", &val_obj) ) {
|
|
|
TelcomIpAddress = (char*)json_object_get_string(val_obj);
|
|
|
- if (strcmp(TelcomIpAddress, ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress) != 0) Tcnt++;
|
|
|
+ if (strcmp(TelcomIpAddress, (char*)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress) != 0) Tcnt++;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress,TelcomIpAddress);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "TelcomEnabled", &val_obj) ) {
|
|
@@ -1001,7 +1001,9 @@ int main(int argc, char *argv[]) {
|
|
|
char *ChargeBoxId=NULL;
|
|
|
char *chargePointVendor=NULL;
|
|
|
int OcppSecurityProfile=0;
|
|
|
+ int MaintainServerSecurityProfile=0;
|
|
|
char *OcppSecurityPassword=NULL;
|
|
|
+ char *MaintainServerSecurityPassword=NULL;
|
|
|
int isEnableLocalPowerSharging=0;
|
|
|
char *OcppReceiptrURL=NULL;
|
|
|
char *MaintainServerURL=NULL;
|
|
@@ -1051,6 +1053,14 @@ int main(int argc, char *argv[]) {
|
|
|
OcppSecurityPassword = (char*)json_object_get_string(val_obj);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OcppSecurityPassword,OcppSecurityPassword);
|
|
|
}
|
|
|
+ if( json_object_object_get_ex(jobj, "MaintainServerSecurityProfile", &val_obj) ) {
|
|
|
+ MaintainServerSecurityProfile = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.MaintainServerSecurityProfile = MaintainServerSecurityProfile;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "MaintainServerSecurityPassword", &val_obj) ) {
|
|
|
+ MaintainServerSecurityPassword = (char*)json_object_get_string(val_obj);
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysConfig.MaintainServerSecurityPassword,MaintainServerSecurityPassword);
|
|
|
+ }
|
|
|
if( json_object_object_get_ex(jobj, "isEnableLocalPowerSharging", &val_obj) ) {
|
|
|
isEnableLocalPowerSharging = json_object_get_int(val_obj);
|
|
|
ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharging = isEnableLocalPowerSharging;
|
|
@@ -1350,8 +1360,8 @@ int main(int argc, char *argv[]) {
|
|
|
char *Connector2[2];
|
|
|
char *Connector3[2];
|
|
|
char *Network[2];
|
|
|
- unsigned char connector1FwVer[32];
|
|
|
- unsigned char connector2FwVer[32];
|
|
|
+ //unsigned char connector1FwVer[32];
|
|
|
+ //unsigned char connector2FwVer[32];
|
|
|
short gunQty;
|
|
|
char *RatedPower1[2];
|
|
|
char *RatedPower2[2];
|
|
@@ -1406,9 +1416,9 @@ int main(int argc, char *argv[]) {
|
|
|
substr((char *)RatedPower1,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,4,1);
|
|
|
substr((char *)RatedPower2,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,5,1);
|
|
|
substr((char *)RatedPower3,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,6,1);
|
|
|
- int p1=atoi(RatedPower1);
|
|
|
- int p2=atoi(RatedPower2);
|
|
|
- int p3=atoi(RatedPower3);
|
|
|
+ int p1=atoi((char *)RatedPower1);
|
|
|
+ int p2=atoi((char *)RatedPower2);
|
|
|
+ int p3=atoi((char *)RatedPower3);
|
|
|
if(strcmp(IsAcDc, "D") == 0){
|
|
|
RatedPower=(p1*10+p2)*pow(10,p3-1);
|
|
|
if(RatedPower>=30){
|
|
@@ -1663,6 +1673,8 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *chargePointVendor;
|
|
|
struct json_object *OcppSecurityProfile;
|
|
|
struct json_object *OcppSecurityPassword;
|
|
|
+ struct json_object *MaintainServerSecurityProfile;
|
|
|
+ struct json_object *MaintainServerSecurityPassword;
|
|
|
struct json_object *isEnableLocalPowerSharging;
|
|
|
struct json_object *OcppReceiptrURL;
|
|
|
struct json_object *MaintainServerURL;
|
|
@@ -2339,6 +2351,8 @@ int main(int argc, char *argv[]) {
|
|
|
ChargeBoxId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId);
|
|
|
OcppSecurityProfile = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OcppSecurityProfile);
|
|
|
OcppSecurityPassword = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.OcppSecurityPassword);
|
|
|
+ MaintainServerSecurityProfile = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaintainServerSecurityProfile);
|
|
|
+ MaintainServerSecurityPassword = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.MaintainServerSecurityPassword);
|
|
|
chargePointVendor = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.chargePointVendor);
|
|
|
MaintainServerURL = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.MaintainServerURL);
|
|
|
if(strcmp(IsDO, "AX") == 0){
|
|
@@ -2761,6 +2775,8 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj4,"chargePointVendor",chargePointVendor);
|
|
|
json_object_object_add(jobj4,"OcppSecurityProfile",OcppSecurityProfile);
|
|
|
json_object_object_add(jobj4,"OcppSecurityPassword",OcppSecurityPassword);
|
|
|
+ json_object_object_add(jobj4,"MaintainServerSecurityProfile",MaintainServerSecurityProfile);
|
|
|
+ json_object_object_add(jobj4,"MaintainServerSecurityPassword",MaintainServerSecurityPassword);
|
|
|
json_object_object_add(jobj4,"MaintainServerURL",MaintainServerURL);
|
|
|
if(strcmp(IsDO, "AX") == 0){
|
|
|
json_object_object_add(jobj4,"isEnableLocalPowerSharging",isEnableLocalPowerSharging);
|