|
@@ -365,7 +365,6 @@ int StoreUsrConfigData(struct SysConfigData *UsrData)
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//================================================
|
|
|
// Main process
|
|
|
//================================================
|
|
@@ -401,6 +400,46 @@ int main(int argc, char *argv[]) {
|
|
|
char QRCodeMadeMode = 0;
|
|
|
char *QRCodeContent = NULL;
|
|
|
char Intensity = 0;
|
|
|
+ char *DDSystemId1=NULL;
|
|
|
+ int DDFactoryConfiguration1 = 0;
|
|
|
+ int DDAuthorisationMode1 = 0;
|
|
|
+ int DDRfidCardNumEndian1 = 0;
|
|
|
+ char DDisAPP1 = 0;
|
|
|
+ char DDisQRCode1 = 0;
|
|
|
+ char DDisRFID1 = 0;
|
|
|
+ char DDQRCodeMadeMode1 = 0;
|
|
|
+ char *DDQRCodeContent1 = NULL;
|
|
|
+ char DDIntensity1 = 0;
|
|
|
+ char *DDSystemId2=NULL;
|
|
|
+ int DDFactoryConfiguration2 = 0;
|
|
|
+ int DDAuthorisationMode2 = 0;
|
|
|
+ int DDRfidCardNumEndian2 = 0;
|
|
|
+ char DDisAPP2 = 0;
|
|
|
+ char DDisQRCode2 = 0;
|
|
|
+ char DDisRFID2 = 0;
|
|
|
+ char DDQRCodeMadeMode2 = 0;
|
|
|
+ char *DDQRCodeContent2 = NULL;
|
|
|
+ char DDIntensity2 = 0;
|
|
|
+ char *DDSystemId3=NULL;
|
|
|
+ int DDFactoryConfiguration3 = 0;
|
|
|
+ int DDAuthorisationMode3 = 0;
|
|
|
+ int DDRfidCardNumEndian3 = 0;
|
|
|
+ char DDisAPP3 = 0;
|
|
|
+ char DDisQRCode3 = 0;
|
|
|
+ char DDisRFID3 = 0;
|
|
|
+ char DDQRCodeMadeMode3 = 0;
|
|
|
+ char *DDQRCodeContent3 = NULL;
|
|
|
+ char DDIntensity3 = 0;
|
|
|
+ char *DDSystemId4=NULL;
|
|
|
+ int DDFactoryConfiguration4 = 0;
|
|
|
+ int DDAuthorisationMode4 = 0;
|
|
|
+ int DDRfidCardNumEndian4 = 0;
|
|
|
+ char DDisAPP4 = 0;
|
|
|
+ char DDisQRCode4 = 0;
|
|
|
+ char DDisRFID4 = 0;
|
|
|
+ char DDQRCodeMadeMode4 = 0;
|
|
|
+ char *DDQRCodeContent4 = NULL;
|
|
|
+ char DDIntensity4 = 0;
|
|
|
|
|
|
if( json_object_object_get_ex(jobj, "SystemId", &val_obj) ) {
|
|
|
SystemId = (char*)json_object_get_string(val_obj);
|
|
@@ -460,6 +499,166 @@ int main(int argc, char *argv[]) {
|
|
|
Intensity = json_object_get_int(val_obj);
|
|
|
ShmSysConfigAndInfo->SysConfig.LedInfo.Intensity = Intensity;
|
|
|
}
|
|
|
+ if( json_object_object_get_ex(jobj, "DDSystemId1", &val_obj) ) {
|
|
|
+ DDSystemId1 = (char*)json_object_get_string(val_obj);
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].SystemId,DDSystemId1);
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDFactoryConfiguration1", &val_obj) ) {
|
|
|
+ DDFactoryConfiguration1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].FactoryConfiguration = DDFactoryConfiguration1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDAuthorisationMode1", &val_obj) ) {
|
|
|
+ DDAuthorisationMode1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].AuthorisationMode = DDAuthorisationMode1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDRfidCardNumEndian1", &val_obj) ) {
|
|
|
+ DDRfidCardNumEndian1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].RfidCardNumEndian = DDRfidCardNumEndian1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisAPP1", &val_obj) ) {
|
|
|
+ DDisAPP1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].isAPP = DDisAPP1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisQRCode1", &val_obj) ) {
|
|
|
+ DDisQRCode1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].isQRCode = DDisQRCode1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisRFID1", &val_obj) ) {
|
|
|
+ DDisRFID1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].isRFID = DDisRFID1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeMadeMode1", &val_obj) ) {
|
|
|
+ DDQRCodeMadeMode1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].QRCodeMadeMode = DDQRCodeMadeMode1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeContent1", &val_obj) ) {
|
|
|
+ DDQRCodeContent1 = 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) ) {
|
|
|
+ DDIntensity1 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[0].LedInfo.Intensity = DDIntensity1;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDSystemId2", &val_obj) ) {
|
|
|
+ DDSystemId2 = (char*)json_object_get_string(val_obj);
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].SystemId,DDSystemId2);
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDFactoryConfiguration2", &val_obj) ) {
|
|
|
+ DDFactoryConfiguration2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].FactoryConfiguration = DDFactoryConfiguration2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDAuthorisationMode2", &val_obj) ) {
|
|
|
+ DDAuthorisationMode2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].AuthorisationMode = DDAuthorisationMode2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDRfidCardNumEndian2", &val_obj) ) {
|
|
|
+ DDRfidCardNumEndian2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].RfidCardNumEndian = DDRfidCardNumEndian2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisAPP2", &val_obj) ) {
|
|
|
+ DDisAPP2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].isAPP = DDisAPP2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisQRCode2", &val_obj) ) {
|
|
|
+ DDisQRCode2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].isQRCode = DDisQRCode2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisRFID2", &val_obj) ) {
|
|
|
+ DDisRFID2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].isRFID = DDisRFID2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeMadeMode2", &val_obj) ) {
|
|
|
+ DDQRCodeMadeMode2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].QRCodeMadeMode = DDQRCodeMadeMode2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeContent2", &val_obj) ) {
|
|
|
+ DDQRCodeContent2 = 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) ) {
|
|
|
+ DDIntensity2 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[1].LedInfo.Intensity = DDIntensity2;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDSystemId3", &val_obj) ) {
|
|
|
+ DDSystemId3 = (char*)json_object_get_string(val_obj);
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].SystemId,DDSystemId3);
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDFactoryConfiguration3", &val_obj) ) {
|
|
|
+ DDFactoryConfiguration3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].FactoryConfiguration = DDFactoryConfiguration3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDAuthorisationMode3", &val_obj) ) {
|
|
|
+ DDAuthorisationMode3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].AuthorisationMode = DDAuthorisationMode3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDRfidCardNumEndian3", &val_obj) ) {
|
|
|
+ DDRfidCardNumEndian3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].RfidCardNumEndian = DDRfidCardNumEndian3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisAPP3", &val_obj) ) {
|
|
|
+ DDisAPP3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].isAPP = DDisAPP3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisQRCode3", &val_obj) ) {
|
|
|
+ DDisQRCode3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].isQRCode = DDisQRCode3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisRFID3", &val_obj) ) {
|
|
|
+ DDisRFID3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].isRFID = DDisRFID3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeMadeMode3", &val_obj) ) {
|
|
|
+ DDQRCodeMadeMode3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].QRCodeMadeMode = DDQRCodeMadeMode3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeContent3", &val_obj) ) {
|
|
|
+ DDQRCodeContent3 = 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) ) {
|
|
|
+ DDIntensity3 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[2].LedInfo.Intensity = DDIntensity3;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDSystemId4", &val_obj) ) {
|
|
|
+ DDSystemId4 = (char*)json_object_get_string(val_obj);
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].SystemId,DDSystemId4);
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDFactoryConfiguration4", &val_obj) ) {
|
|
|
+ DDFactoryConfiguration4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].FactoryConfiguration = DDFactoryConfiguration4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDAuthorisationMode4", &val_obj) ) {
|
|
|
+ DDAuthorisationMode4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].AuthorisationMode = DDAuthorisationMode4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDRfidCardNumEndian4", &val_obj) ) {
|
|
|
+ DDRfidCardNumEndian4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].RfidCardNumEndian = DDRfidCardNumEndian4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisAPP4", &val_obj) ) {
|
|
|
+ DDisAPP4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].isAPP = DDisAPP4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisQRCode4", &val_obj) ) {
|
|
|
+ DDisQRCode4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].isQRCode = DDisQRCode4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDisRFID4", &val_obj) ) {
|
|
|
+ DDisRFID4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].isRFID = DDisRFID4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeMadeMode4", &val_obj) ) {
|
|
|
+ DDQRCodeMadeMode4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].QRCodeMadeMode = DDQRCodeMadeMode4;
|
|
|
+ }
|
|
|
+ if( json_object_object_get_ex(jobj, "DDQRCodeContent4", &val_obj) ) {
|
|
|
+ DDQRCodeContent4 = 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) ) {
|
|
|
+ DDIntensity4 = json_object_get_int(val_obj);
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[3].LedInfo.Intensity = DDIntensity4;
|
|
|
+ }
|
|
|
}
|
|
|
if (strcmp(argv[1], "2") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
@@ -825,7 +1024,9 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "aaa") == 0) {
|
|
|
//struct SysConfigData SysConfig;
|
|
|
//system
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "AW0E770001W1P0D");
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity=1;
|
|
|
+ ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity=1;
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DO0E362001D1P0D");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber, "SerialNumber");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId, "1234567890");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemDateTime, "2019-12-31 23:59:59");
|
|
@@ -904,9 +1105,6 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].EvBatterytargetVoltage=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].EvBatterySoc=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].SystemStatus=1;
|
|
|
- ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].Index=0;
|
|
|
- ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].Type=0;
|
|
|
- ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].type_index=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.CcsChargingData[0].EvBatterytargetCurrent=1;
|
|
|
//network
|
|
|
ShmSysConfigAndInfo->SysInfo.InternetConn=0;
|
|
@@ -983,6 +1181,7 @@ int main(int argc, char *argv[]) {
|
|
|
system(cmd);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (strcmp(argv[1], "button") == 0) {
|
|
|
unsigned char Button1;
|
|
|
unsigned char Button2;
|
|
@@ -1030,11 +1229,12 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj,"Result",Result);
|
|
|
json_object_object_add(jobj,"Message",Message);
|
|
|
printf("%s\n", json_object_to_json_string(jobj));
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
//web page query all
|
|
|
if ((argc == 2) & (strcmp(argv[1], "query") == 0)) {
|
|
|
char *IsAcDc[2];
|
|
|
+ char *IsDO[3];
|
|
|
char *Connector1[2];
|
|
|
char *Connector2[2];
|
|
|
char *Connector3[2];
|
|
@@ -1048,6 +1248,7 @@ int main(int argc, char *argv[]) {
|
|
|
short RatedPower;
|
|
|
short PsuQuantity = 0;
|
|
|
substr((char *)IsAcDc,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,0,1);
|
|
|
+ substr((char *)IsDO,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,0,2);
|
|
|
substr((char *)Connector1,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,7,1);
|
|
|
substr((char *)Connector2,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,9,1);
|
|
|
substr((char *)Connector3,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,8,1);
|
|
@@ -1102,6 +1303,8 @@ int main(int argc, char *argv[]) {
|
|
|
PsuQuantity = RatedPower/30;
|
|
|
}
|
|
|
}
|
|
|
+ if(strcmp(IsDO, "DO") == 0){
|
|
|
+ }
|
|
|
|
|
|
struct json_object *jobj1;
|
|
|
struct json_object *jobj2;
|
|
@@ -1170,6 +1373,60 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *FwPrimaryVersionArr= json_object_new_array();
|
|
|
struct json_object *FwSecondVersion[PsuQuantity];
|
|
|
struct json_object *FwSecondVersionArr= json_object_new_array();
|
|
|
+ /* for DO & DD*/
|
|
|
+ struct json_object *DispenserQuantity;
|
|
|
+ struct json_object *TotalConnectorQuantity;
|
|
|
+ struct json_object *DDModelName[4];
|
|
|
+ struct json_object *DDModelNameArr= json_object_new_array();
|
|
|
+ struct json_object *DDSerialNumber[4];
|
|
|
+ struct json_object *DDSerialNumberArr= json_object_new_array();
|
|
|
+ struct json_object *DDSystemId[4];
|
|
|
+ struct json_object *DDSystemIdArr= json_object_new_array();
|
|
|
+ struct json_object *DDAuthorisationMode[4];
|
|
|
+ struct json_object *DDAuthorisationModeArr= json_object_new_array();
|
|
|
+ struct json_object *DDRfidCardNumEndian[4];
|
|
|
+ struct json_object *DDRfidCardNumEndianArr= json_object_new_array();
|
|
|
+ struct json_object *DDisAPP[4];
|
|
|
+ struct json_object *DDisAPPArr= json_object_new_array();
|
|
|
+ struct json_object *DDisQRCode[4];
|
|
|
+ struct json_object *DDisQRCodeArr= json_object_new_array();
|
|
|
+ struct json_object *DDisRFID[4];
|
|
|
+ struct json_object *DDisRFIDArr= json_object_new_array();
|
|
|
+ struct json_object *DDQRCodeMadeMode[4];
|
|
|
+ struct json_object *DDQRCodeMadeModeArr= json_object_new_array();
|
|
|
+ struct json_object *DDQRCodeContent[4];
|
|
|
+ struct json_object *DDQRCodeContentArr= json_object_new_array();
|
|
|
+ struct json_object *DDFactoryConfiguration[4];
|
|
|
+ struct json_object *DDFactoryConfigurationArr= json_object_new_array();
|
|
|
+ struct json_object *DDCsuBootLoadFwRev[4];
|
|
|
+ struct json_object *DDCsuBootLoadFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDCsuKernelFwRev[4];
|
|
|
+ struct json_object *DDCsuKernelFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDCsuRootFsFwRev[4];
|
|
|
+ struct json_object *DDCsuRootFsFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDCsuPrimFwRev[4];
|
|
|
+ struct json_object *DDCsuPrimFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDLcmFwRev[4];
|
|
|
+ struct json_object *DDLcmFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDPsuPrimFwRev[4];
|
|
|
+ struct json_object *DDPsuPrimFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDPsuSecFwRev[4];
|
|
|
+ struct json_object *DDPsuSecFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDFanModuleFwRev[4];
|
|
|
+ struct json_object *DDFanModuleFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDRelayModuleFwRev[4];
|
|
|
+ struct json_object *DDRelayModuleFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDTelcomModemFwRev[4];
|
|
|
+ struct json_object *DDTelcomModemFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDLedModuleFwRev[4];
|
|
|
+ struct json_object *DDLedModuleFwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDConnector1FwRev[4];
|
|
|
+ struct json_object *DDConnector1FwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDConnector2FwRev[4];
|
|
|
+ struct json_object *DDConnector2FwRevArr= json_object_new_array();
|
|
|
+ struct json_object *DDIntensity[4];
|
|
|
+ struct json_object *DDIntensityArr= json_object_new_array();
|
|
|
+
|
|
|
//charging
|
|
|
struct json_object *MaxChargingEnergy;
|
|
|
struct json_object *MaxChargingPower;
|
|
@@ -1200,10 +1457,29 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *EvBatterytargetVoltage[3];
|
|
|
struct json_object *EvBatterySoc[3];
|
|
|
struct json_object *SystemStatus[3];
|
|
|
- struct json_object *Index[3];
|
|
|
- struct json_object *Type[3];
|
|
|
- struct json_object *type_index[3];
|
|
|
struct json_object *EvBatterytargetCurrent[3];
|
|
|
+ /* for DO & DD*/
|
|
|
+ struct json_object *DDChargingInfo1;
|
|
|
+ struct json_object *DDChargingInfo2;
|
|
|
+ struct json_object *DDChargingInfo3;
|
|
|
+ struct json_object *DDChargingInfo4;
|
|
|
+ struct json_object *DDStartUserId[4];
|
|
|
+ struct json_object *DDStartDateTime[4];
|
|
|
+ struct json_object *DDStopDateTime[4];
|
|
|
+ struct json_object *DDStartMethod[4];
|
|
|
+ struct json_object *DDConnectorTemp[4];
|
|
|
+ struct json_object *DDPresentChargingVoltage[4];
|
|
|
+ struct json_object *DDPresentChargingCurrent[4];
|
|
|
+ struct json_object *DDPresentChargingPower[4];
|
|
|
+ struct json_object *DDPresentChargedEnergy[4];
|
|
|
+ struct json_object *DDPresentChargedDuration[4];
|
|
|
+ struct json_object *DDRemainChargingDuration[4];
|
|
|
+ struct json_object *DDEvBatteryMaxVoltage[4];
|
|
|
+ struct json_object *DDEvBatterytargetVoltage[4];
|
|
|
+ struct json_object *DDEvBatterySoc[4];
|
|
|
+ struct json_object *DDSystemStatus[4];
|
|
|
+ struct json_object *DDEvBatterytargetCurrent[4];
|
|
|
+
|
|
|
//network
|
|
|
struct json_object *InternetConn;
|
|
|
struct json_object *FtpServer;
|
|
@@ -1321,6 +1597,64 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_array_add(FwSecondVersionArr,FwSecondVersion[i]);
|
|
|
}
|
|
|
}
|
|
|
+ if(strcmp(IsDO, "DO") == 0){
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity>4 || ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity<0)ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity=0;
|
|
|
+ DispenserQuantity = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity);
|
|
|
+ TotalConnectorQuantity = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity);
|
|
|
+ int DDDispenserQuantity = ShmSysConfigAndInfo->SysInfo.DispenserInfo.DispenserQuantity;
|
|
|
+ for(int i=0;i<DDDispenserQuantity;i++){
|
|
|
+ DDModelName[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].ModelName);
|
|
|
+ DDSerialNumber[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].SerialNumber);
|
|
|
+ DDSystemId[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].SystemId);
|
|
|
+ DDAuthorisationMode[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].AuthorisationMode);
|
|
|
+ DDRfidCardNumEndian[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].RfidCardNumEndian);
|
|
|
+ DDisAPP[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].isAPP);
|
|
|
+ DDisQRCode[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].isQRCode);
|
|
|
+ DDisRFID[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].isRFID);
|
|
|
+ DDQRCodeMadeMode[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].QRCodeMadeMode);
|
|
|
+ DDQRCodeContent[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].QRCodeContent);
|
|
|
+ DDFactoryConfiguration[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].FactoryConfiguration);
|
|
|
+ DDCsuBootLoadFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].CsuBootLoadFwRev);
|
|
|
+ DDCsuKernelFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].CsuKernelFwRev);
|
|
|
+ DDCsuRootFsFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].CsuRootFsFwRev);
|
|
|
+ DDCsuPrimFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].CsuPrimFwRev);
|
|
|
+ DDLcmFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].LcmFwRev);
|
|
|
+ DDPsuPrimFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].PsuPrimFwRev);
|
|
|
+ DDPsuSecFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].PsuSecFwRev);
|
|
|
+ DDFanModuleFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].FanModuleFwRev);
|
|
|
+ DDRelayModuleFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].RelayModuleFwRev);
|
|
|
+ DDTelcomModemFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].TelcomModemFwRev);
|
|
|
+ DDLedModuleFwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].LedModuleFwRev);
|
|
|
+ DDConnector1FwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].Connector1FwRev);
|
|
|
+ DDConnector2FwRev[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].Connector2FwRev);
|
|
|
+ DDIntensity[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.DispenserInfo.Dispenser[i].LedInfo.Intensity);
|
|
|
+ json_object_array_add(DDModelNameArr,DDModelName[i]);
|
|
|
+ json_object_array_add(DDSerialNumberArr,DDSerialNumber[i]);
|
|
|
+ json_object_array_add(DDSystemIdArr,DDSystemId[i]);
|
|
|
+ json_object_array_add(DDAuthorisationModeArr,DDAuthorisationMode[i]);
|
|
|
+ json_object_array_add(DDRfidCardNumEndianArr,DDRfidCardNumEndian[i]);
|
|
|
+ json_object_array_add(DDisAPPArr,DDisAPP[i]);
|
|
|
+ json_object_array_add(DDisQRCodeArr,DDisQRCode[i]);
|
|
|
+ json_object_array_add(DDisRFIDArr,DDisRFID[i]);
|
|
|
+ json_object_array_add(DDQRCodeMadeModeArr,DDQRCodeMadeMode[i]);
|
|
|
+ json_object_array_add(DDQRCodeContentArr,DDQRCodeContent[i]);
|
|
|
+ json_object_array_add(DDFactoryConfigurationArr,DDFactoryConfiguration[i]);
|
|
|
+ json_object_array_add(DDCsuBootLoadFwRevArr,DDCsuBootLoadFwRev[i]);
|
|
|
+ json_object_array_add(DDCsuKernelFwRevArr,DDCsuKernelFwRev[i]);
|
|
|
+ json_object_array_add(DDCsuRootFsFwRevArr,DDCsuRootFsFwRev[i]);
|
|
|
+ json_object_array_add(DDCsuPrimFwRevArr,DDCsuPrimFwRev[i]);
|
|
|
+ json_object_array_add(DDLcmFwRevArr,DDLcmFwRev[i]);
|
|
|
+ json_object_array_add(DDPsuPrimFwRevArr,DDPsuPrimFwRev[i]);
|
|
|
+ json_object_array_add(DDPsuSecFwRevArr,DDPsuSecFwRev[i]);
|
|
|
+ json_object_array_add(DDFanModuleFwRevArr,DDFanModuleFwRev[i]);
|
|
|
+ json_object_array_add(DDRelayModuleFwRevArr,DDRelayModuleFwRev[i]);
|
|
|
+ json_object_array_add(DDTelcomModemFwRevArr,DDTelcomModemFwRev[i]);
|
|
|
+ json_object_array_add(DDLedModuleFwRevArr,DDLedModuleFwRev[i]);
|
|
|
+ json_object_array_add(DDConnector1FwRevArr,DDConnector1FwRev[i]);
|
|
|
+ json_object_array_add(DDConnector2FwRevArr,DDConnector2FwRev[i]);
|
|
|
+ json_object_array_add(DDIntensityArr,DDIntensity[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//charging
|
|
|
int CcsGunQty=0;
|
|
@@ -1383,9 +1717,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
|
|
|
SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
|
|
|
- Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
|
|
|
- Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
|
|
|
- type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
|
|
|
EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
|
|
@@ -1405,9 +1736,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
|
|
|
SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
|
|
|
- Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
|
|
|
- Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
|
|
|
- type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
|
|
|
EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
|
|
@@ -1427,9 +1755,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
|
|
|
SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
|
|
|
- Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
|
|
|
- Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
|
|
|
- type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
|
|
|
EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
|
|
@@ -1449,9 +1774,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
|
|
|
SystemStatus[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
|
|
|
- Index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
|
|
|
- Type[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
|
|
|
- type_index[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
|
|
|
EvBatterytargetCurrent[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
@@ -1473,9 +1795,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
|
|
|
SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
|
|
|
- Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
|
|
|
- Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
|
|
|
- type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
|
|
|
EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
|
|
@@ -1495,9 +1814,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
|
|
|
SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
|
|
|
- Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
|
|
|
- Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
|
|
|
- type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
|
|
|
EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
|
|
@@ -1517,9 +1833,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
|
|
|
SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
|
|
|
- Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
|
|
|
- Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
|
|
|
- type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
|
|
|
EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
|
|
@@ -1539,9 +1852,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
|
|
|
SystemStatus[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
|
|
|
- Index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
|
|
|
- Type[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
|
|
|
- type_index[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
|
|
|
EvBatterytargetCurrent[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
@@ -1563,9 +1873,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterySoc);
|
|
|
SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus);
|
|
|
- Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index);
|
|
|
- Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type);
|
|
|
- type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index);
|
|
|
EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
|
|
@@ -1585,9 +1892,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterySoc);
|
|
|
SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus);
|
|
|
- Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index);
|
|
|
- Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type);
|
|
|
- type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index);
|
|
|
EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
|
|
@@ -1607,9 +1911,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterySoc);
|
|
|
SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus);
|
|
|
- Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index);
|
|
|
- Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type);
|
|
|
- type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index);
|
|
|
EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
|
|
@@ -1629,9 +1930,6 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatterytargetVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetVoltage);
|
|
|
EvBatterySoc[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterySoc);
|
|
|
SystemStatus[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus);
|
|
|
- Index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index);
|
|
|
- Type[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type);
|
|
|
- type_index[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index);
|
|
|
EvBatterytargetCurrent[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatterytargetCurrent);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
@@ -1641,7 +1939,28 @@ int main(int argc, char *argv[]) {
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if(strcmp(IsDO, "DO") == 0){
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity>4 || ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity<0)ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity=0;
|
|
|
+ int DDTotalConnectorQuantity = ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity;
|
|
|
+ for(int i=0;i<DDTotalConnectorQuantity;i++){
|
|
|
+ DDPresentChargingVoltage[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.PresentChargingVoltage);
|
|
|
+ DDPresentChargingCurrent[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.PresentChargingCurrent);
|
|
|
+ DDPresentChargingPower[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.PresentChargingPower);
|
|
|
+ DDPresentChargedEnergy[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.PresentChargedEnergy);
|
|
|
+ DDPresentChargedDuration[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.PresentChargedDuration);
|
|
|
+ DDRemainChargingDuration[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.RemainChargingDuration);
|
|
|
+ DDEvBatteryMaxVoltage[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.EvBatteryMaxVoltage);
|
|
|
+ DDEvBatterytargetVoltage[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.EvBatterytargetVoltage);
|
|
|
+ DDEvBatterySoc[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.EvBatterySoc);
|
|
|
+ DDSystemStatus[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.SystemStatus);
|
|
|
+ DDEvBatterytargetCurrent[i] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.EvBatterytargetCurrent);
|
|
|
+ DDStartUserId[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.StartUserId);
|
|
|
+ DDStartDateTime[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.StartDateTime);
|
|
|
+ DDStopDateTime[i] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.StopDateTime);
|
|
|
+ DDStartMethod[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.StartMethod);
|
|
|
+ DDConnectorTemp[i] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ConnectorInfo[i].GeneralChargingData.ConnectorTemp);
|
|
|
+ }
|
|
|
+ }
|
|
|
//network
|
|
|
InternetConn = json_object_new_int(ShmSysConfigAndInfo->SysInfo.InternetConn);
|
|
|
FtpServer = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer);
|
|
@@ -1751,9 +2070,39 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj1,"FwPrimaryVersion",FwPrimaryVersionArr);
|
|
|
json_object_object_add(jobj1,"FwSecondVersion",FwSecondVersionArr);
|
|
|
}
|
|
|
+ if(strcmp(IsDO, "DO") == 0){
|
|
|
+ json_object_object_add(jobj1,"DispenserQuantity",DispenserQuantity);
|
|
|
+ json_object_object_add(jobj1,"TotalConnectorQuantity",TotalConnectorQuantity);
|
|
|
+ json_object_object_add(jobj1,"DDModelName",DDModelNameArr);
|
|
|
+ json_object_object_add(jobj1,"DDSerialNumber",DDSerialNumberArr);
|
|
|
+ json_object_object_add(jobj1,"DDSystemId",DDSystemIdArr);
|
|
|
+ json_object_object_add(jobj1,"DDAuthorisationMode",DDAuthorisationModeArr);
|
|
|
+ json_object_object_add(jobj1,"DDRfidCardNumEndian",DDRfidCardNumEndianArr);
|
|
|
+ json_object_object_add(jobj1,"DDisAPP",DDisAPPArr);
|
|
|
+ json_object_object_add(jobj1,"DDisQRCode",DDisQRCodeArr);
|
|
|
+ json_object_object_add(jobj1,"DDisRFID",DDisRFIDArr);
|
|
|
+ json_object_object_add(jobj1,"DDQRCodeMadeMode",DDQRCodeMadeModeArr);
|
|
|
+ json_object_object_add(jobj1,"DDQRCodeContent",DDQRCodeContentArr);
|
|
|
+ json_object_object_add(jobj1,"DDFactoryConfiguration",DDFactoryConfigurationArr);
|
|
|
+ json_object_object_add(jobj1,"DDCsuBootLoadFwRev",DDCsuBootLoadFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDCsuKernelFwRev",DDCsuKernelFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDCsuRootFsFwRev",DDCsuRootFsFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDCsuPrimFwRev",DDCsuPrimFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDLcmFwRev",DDLcmFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDPsuPrimFwRev",DDPsuPrimFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDPsuSecFwRev",DDPsuSecFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDFanModuleFwRev",DDFanModuleFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDRelayModuleFwRev",DDRelayModuleFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDTelcomModemFwRev",DDTelcomModemFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDLedModuleFwRev",DDLedModuleFwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDConnector1FwRev",DDConnector1FwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDConnector2FwRev",DDConnector2FwRevArr);
|
|
|
+ json_object_object_add(jobj1,"DDIntensity",DDIntensityArr);
|
|
|
+ }
|
|
|
|
|
|
printf("%s\n", json_object_to_json_string(jobj1));
|
|
|
json_object_put(jobj1);
|
|
|
+
|
|
|
//charging
|
|
|
json_object_object_add(jobj2,"MaxChargingEnergy",MaxChargingEnergy);
|
|
|
json_object_object_add(jobj2,"MaxChargingPower",MaxChargingPower);
|
|
@@ -1814,9 +2163,6 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(ChargingInfo1,"EvBatterytargetVoltage",EvBatterytargetVoltage[0]);
|
|
|
json_object_object_add(ChargingInfo1,"EvBatterySoc",EvBatterySoc[0]);
|
|
|
json_object_object_add(ChargingInfo1,"SystemStatus",SystemStatus[0]);
|
|
|
- json_object_object_add(ChargingInfo1,"Index",Index[0]);
|
|
|
- json_object_object_add(ChargingInfo1,"Type",Type[0]);
|
|
|
- json_object_object_add(ChargingInfo1,"type_index",type_index[0]);
|
|
|
json_object_object_add(ChargingInfo1,"EvBatterytargetCurrent",EvBatterytargetCurrent[0]);
|
|
|
json_object_object_add(jobj2,"ChargingInfo1",ChargingInfo1);
|
|
|
}
|
|
@@ -1836,9 +2182,6 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(ChargingInfo2,"EvBatterytargetVoltage",EvBatterytargetVoltage[1]);
|
|
|
json_object_object_add(ChargingInfo2,"EvBatterySoc",EvBatterySoc[1]);
|
|
|
json_object_object_add(ChargingInfo2,"SystemStatus",SystemStatus[1]);
|
|
|
- json_object_object_add(ChargingInfo2,"Index",Index[1]);
|
|
|
- json_object_object_add(ChargingInfo2,"Type",Type[1]);
|
|
|
- json_object_object_add(ChargingInfo2,"type_index",type_index[1]);
|
|
|
json_object_object_add(ChargingInfo2,"EvBatterytargetCurrent",EvBatterytargetCurrent[1]);
|
|
|
json_object_object_add(jobj2,"ChargingInfo2",ChargingInfo2);
|
|
|
}
|
|
@@ -1858,12 +2201,93 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(ChargingInfo3,"EvBatterytargetVoltage",EvBatterytargetVoltage[2]);
|
|
|
json_object_object_add(ChargingInfo3,"EvBatterySoc",EvBatterySoc[2]);
|
|
|
json_object_object_add(ChargingInfo3,"SystemStatus",SystemStatus[2]);
|
|
|
- json_object_object_add(ChargingInfo3,"Index",Index[2]);
|
|
|
- json_object_object_add(ChargingInfo3,"Type",Type[2]);
|
|
|
- json_object_object_add(ChargingInfo3,"type_index",type_index[2]);
|
|
|
json_object_object_add(ChargingInfo3,"EvBatterytargetCurrent",EvBatterytargetCurrent[2]);
|
|
|
json_object_object_add(jobj2,"ChargingInfo3",ChargingInfo3);
|
|
|
}
|
|
|
+ if(strcmp(IsDO, "DO") == 0){
|
|
|
+ if(ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity>4|| ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity<0)ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity=0;
|
|
|
+ int DDTotalConnectorQuantity = ShmSysConfigAndInfo->SysInfo.DispenserInfo.TotalConnectorQuantity;
|
|
|
+ DDChargingInfo1=json_object_new_object();
|
|
|
+ DDChargingInfo2=json_object_new_object();
|
|
|
+ DDChargingInfo3=json_object_new_object();
|
|
|
+ DDChargingInfo4=json_object_new_object();
|
|
|
+ if(DDTotalConnectorQuantity>0){
|
|
|
+ json_object_object_add(DDChargingInfo1,"StartUserId",DDStartUserId[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"StartDateTime",DDStartDateTime[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"StopDateTime",DDStopDateTime[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"StartMethod",DDStartMethod[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"ConnectorTemp",DDConnectorTemp[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"PresentChargingVoltage",DDPresentChargingVoltage[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"PresentChargingCurrent",DDPresentChargingCurrent[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"PresentChargingPower",DDPresentChargingPower[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"PresentChargedEnergy",DDPresentChargedEnergy[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"PresentChargedDuration",DDPresentChargedDuration[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"RemainChargingDuration",DDRemainChargingDuration[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"EvBatteryMaxVoltage",DDEvBatteryMaxVoltage[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"EvBatterytargetVoltage",DDEvBatterytargetVoltage[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"EvBatterySoc",DDEvBatterySoc[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"SystemStatus",DDSystemStatus[0]);
|
|
|
+ json_object_object_add(DDChargingInfo1,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[0]);
|
|
|
+ json_object_object_add(jobj2,"DDChargingInfo1",DDChargingInfo1);
|
|
|
+ }
|
|
|
+ if(DDTotalConnectorQuantity>1){
|
|
|
+ json_object_object_add(DDChargingInfo2,"StartUserId",DDStartUserId[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"StartDateTime",DDStartDateTime[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"StopDateTime",DDStopDateTime[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"StartMethod",DDStartMethod[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"ConnectorTemp",DDConnectorTemp[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"PresentChargingVoltage",DDPresentChargingVoltage[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"PresentChargingCurrent",DDPresentChargingCurrent[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"PresentChargingPower",DDPresentChargingPower[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"PresentChargedEnergy",DDPresentChargedEnergy[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"PresentChargedDuration",DDPresentChargedDuration[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"RemainChargingDuration",DDRemainChargingDuration[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"EvBatteryMaxVoltage",DDEvBatteryMaxVoltage[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"EvBatterytargetVoltage",DDEvBatterytargetVoltage[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"EvBatterySoc",DDEvBatterySoc[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"SystemStatus",DDSystemStatus[1]);
|
|
|
+ json_object_object_add(DDChargingInfo2,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[1]);
|
|
|
+ json_object_object_add(jobj2,"DDChargingInfo2",DDChargingInfo2);
|
|
|
+ }
|
|
|
+ if(DDTotalConnectorQuantity>2){
|
|
|
+ json_object_object_add(DDChargingInfo3,"StartUserId",DDStartUserId[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"StartDateTime",DDStartDateTime[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"StopDateTime",DDStopDateTime[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"StartMethod",DDStartMethod[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"ConnectorTemp",DDConnectorTemp[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"PresentChargingVoltage",DDPresentChargingVoltage[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"PresentChargingCurrent",DDPresentChargingCurrent[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"PresentChargingPower",DDPresentChargingPower[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"PresentChargedEnergy",DDPresentChargedEnergy[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"PresentChargedDuration",DDPresentChargedDuration[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"RemainChargingDuration",DDRemainChargingDuration[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"EvBatteryMaxVoltage",DDEvBatteryMaxVoltage[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"EvBatterytargetVoltage",DDEvBatterytargetVoltage[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"EvBatterySoc",DDEvBatterySoc[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"SystemStatus",DDSystemStatus[2]);
|
|
|
+ json_object_object_add(DDChargingInfo3,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[2]);
|
|
|
+ json_object_object_add(jobj2,"DDChargingInfo3",DDChargingInfo3);
|
|
|
+ }
|
|
|
+ if(DDTotalConnectorQuantity>3){
|
|
|
+ json_object_object_add(DDChargingInfo4,"StartUserId",DDStartUserId[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"StartDateTime",DDStartDateTime[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"StopDateTime",DDStopDateTime[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"StartMethod",DDStartMethod[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"ConnectorTemp",DDConnectorTemp[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"PresentChargingVoltage",DDPresentChargingVoltage[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"PresentChargingCurrent",DDPresentChargingCurrent[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"PresentChargingPower",DDPresentChargingPower[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"PresentChargedEnergy",DDPresentChargedEnergy[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"PresentChargedDuration",DDPresentChargedDuration[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"RemainChargingDuration",DDRemainChargingDuration[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"EvBatteryMaxVoltage",DDEvBatteryMaxVoltage[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"EvBatterytargetVoltage",DDEvBatterytargetVoltage[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"EvBatterySoc",DDEvBatterySoc[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"SystemStatus",DDSystemStatus[3]);
|
|
|
+ json_object_object_add(DDChargingInfo4,"EvBatterytargetCurrent",DDEvBatterytargetCurrent[3]);
|
|
|
+ json_object_object_add(jobj2,"DDChargingInfo4",DDChargingInfo4);
|
|
|
+ }
|
|
|
+ }
|
|
|
printf("%s\n", json_object_to_json_string(jobj2));
|
|
|
json_object_put(jobj2);
|
|
|
|