|
@@ -43,8 +43,11 @@
|
|
|
|
|
|
#define MtdBlockSize 0x600000
|
|
|
|
|
|
-struct SysConfigAndInfo *ShmSysConfigAndInfo;
|
|
|
-struct StatusCodeData *ShmStatusCodeData;
|
|
|
+struct SysConfigAndInfo *ShmSysConfigAndInfo;
|
|
|
+struct StatusCodeData *ShmStatusCodeData;
|
|
|
+struct CHAdeMOData *ShmCHAdeMOData;
|
|
|
+struct GBTData *ShmGBTData;
|
|
|
+struct CcsData *ShmCcsData;
|
|
|
|
|
|
void trim(char *s);
|
|
|
int mystrcmp(char *p1, char *p2);
|
|
@@ -200,6 +203,11 @@ int ModelType(char* type,char* network){
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
+// 四捨五入 取到 小數點第 2 位
|
|
|
+float rounding(float a)
|
|
|
+{
|
|
|
+ return (int)(a*100+0.5)/100.0;
|
|
|
+}
|
|
|
//==========================================
|
|
|
// Init all share memory
|
|
|
//==========================================
|
|
@@ -341,6 +349,11 @@ int main(int argc, char *argv[]) {
|
|
|
// int DefaultLanguage = 0;
|
|
|
int RfidCardNumEndian = 0;
|
|
|
int PsuAcInputType = 0;
|
|
|
+ char isAPP = NULL;
|
|
|
+ char isQRCode = NULL;
|
|
|
+ char isRFID = NULL;
|
|
|
+ char QRCodeMadeMode = NULL;
|
|
|
+ char *QRCodeContent = NULL;
|
|
|
|
|
|
if( json_object_object_get_ex(jobj, "SystemId", &val_obj) ) {
|
|
|
SystemId = (char*)json_object_get_string(val_obj);
|
|
@@ -348,31 +361,43 @@ int main(int argc, char *argv[]) {
|
|
|
if( json_object_object_get_ex(jobj, "SystemDateTime", &val_obj) ) {
|
|
|
SystemDateTime = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
-// if( json_object_object_get_ex(jobj, "AcPhaseCount", &val_obj) ) {
|
|
|
-// AcPhaseCount = json_object_get_int(val_obj);
|
|
|
-// }
|
|
|
if( json_object_object_get_ex(jobj, "FactoryConfiguration", &val_obj) ) {
|
|
|
FactoryConfiguration = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "AuthorisationMode", &val_obj) ) {
|
|
|
AuthorisationMode = json_object_get_int(val_obj);
|
|
|
}
|
|
|
- // if( json_object_object_get_ex(jobj, "DefaultLanguage", &val_obj) ) {
|
|
|
- // DefaultLanguage = json_object_get_int(val_obj);
|
|
|
- // }
|
|
|
if( json_object_object_get_ex(jobj, "RfidCardNumEndian", &val_obj) ) {
|
|
|
RfidCardNumEndian = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "PsuAcInputType", &val_obj) ) {
|
|
|
PsuAcInputType = json_object_get_int(val_obj);
|
|
|
}
|
|
|
+ // if( json_object_object_get_ex(jobj, "isAPP", &val_obj) ) {
|
|
|
+ // isAPP = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "isQRCode", &val_obj) ) {
|
|
|
+ // isQRCode = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "isRFID", &val_obj) ) {
|
|
|
+ // isRFID = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "QRCodeMadeMode", &val_obj) ) {
|
|
|
+ // QRCodeMadeMode = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "QRCodeContent", &val_obj) ) {
|
|
|
+ // QRCodeContent = json_object_get_string(val_obj);
|
|
|
+ // }
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId,SystemId);
|
|
|
-// ShmSysConfigAndInfo->SysConfig.AcPhaseCount = AcPhaseCount;
|
|
|
ShmSysConfigAndInfo->SysInfo.FactoryConfiguration = FactoryConfiguration;
|
|
|
ShmSysConfigAndInfo->SysConfig.AuthorisationMode = AuthorisationMode;
|
|
|
- // ShmSysConfigAndInfo->SysConfig.DefaultLanguage = DefaultLanguage;
|
|
|
ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = RfidCardNumEndian;
|
|
|
ShmSysConfigAndInfo->SysConfig.PsuAcInputType = PsuAcInputType;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.isAPP = isAPP;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.isQRCode = isQRCode;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.isRFID = isRFID;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode = QRCodeMadeMode;
|
|
|
+ // strcpy((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent,QRCodeContent);
|
|
|
|
|
|
if(strlen(SystemDateTime)>0){
|
|
|
char cmd[100];
|
|
@@ -401,6 +426,32 @@ int main(int argc, char *argv[]) {
|
|
|
char *LocalWhiteCard7 = NULL;
|
|
|
char *LocalWhiteCard8 = NULL;
|
|
|
char *LocalWhiteCard9 = NULL;
|
|
|
+ char isBilling = 0;
|
|
|
+ char Currency = 0;
|
|
|
+ float Fee0 = 0;
|
|
|
+ float Fee1 = 0;
|
|
|
+ float Fee2 = 0;
|
|
|
+ float Fee3 = 0;
|
|
|
+ float Fee4 = 0;
|
|
|
+ float Fee5 = 0;
|
|
|
+ float Fee6 = 0;
|
|
|
+ float Fee7 = 0;
|
|
|
+ float Fee8 = 0;
|
|
|
+ float Fee9 = 0;
|
|
|
+ float Fee10 = 0;
|
|
|
+ float Fee11 = 0;
|
|
|
+ float Fee12 = 0;
|
|
|
+ float Fee13 = 0;
|
|
|
+ float Fee14 = 0;
|
|
|
+ float Fee15 = 0;
|
|
|
+ float Fee16 = 0;
|
|
|
+ float Fee17 = 0;
|
|
|
+ float Fee18 = 0;
|
|
|
+ float Fee19 = 0;
|
|
|
+ float Fee20 = 0;
|
|
|
+ float Fee21 = 0;
|
|
|
+ float Fee22 = 0;
|
|
|
+ float Fee23 = 0;
|
|
|
|
|
|
if( json_object_object_get_ex(jobj, "MaxChargingEnergy", &val_obj) ) {
|
|
|
MaxChargingEnergy = json_object_get_int(val_obj);
|
|
@@ -447,6 +498,84 @@ int main(int argc, char *argv[]) {
|
|
|
if( json_object_object_get_ex(jobj, "LocalWhiteCard9", &val_obj) ) {
|
|
|
LocalWhiteCard9 = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
+ // if( json_object_object_get_ex(jobj, "isBilling", &val_obj) ) {
|
|
|
+ // isBilling = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Currency", &val_obj) ) {
|
|
|
+ // Currency = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee0", &val_obj) ) {
|
|
|
+ // Fee0 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee1", &val_obj) ) {
|
|
|
+ // Fee1 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee2", &val_obj) ) {
|
|
|
+ // Fee2 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee3", &val_obj) ) {
|
|
|
+ // Fee3 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee4", &val_obj) ) {
|
|
|
+ // Fee4 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee5", &val_obj) ) {
|
|
|
+ // Fee5 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee6", &val_obj) ) {
|
|
|
+ // Fee6 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee7", &val_obj) ) {
|
|
|
+ // Fee7 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee8", &val_obj) ) {
|
|
|
+ // Fee8 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee9", &val_obj) ) {
|
|
|
+ // Fee9 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee10", &val_obj) ) {
|
|
|
+ // Fee10 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee11", &val_obj) ) {
|
|
|
+ // Fee11 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee12", &val_obj) ) {
|
|
|
+ // Fee12 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee13", &val_obj) ) {
|
|
|
+ // Fee13 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee14", &val_obj) ) {
|
|
|
+ // Fee14 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee15", &val_obj) ) {
|
|
|
+ // Fee15 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee16", &val_obj) ) {
|
|
|
+ // Fee16 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee17", &val_obj) ) {
|
|
|
+ // Fee17 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee18", &val_obj) ) {
|
|
|
+ // Fee18 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee19", &val_obj) ) {
|
|
|
+ // Fee19 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee20", &val_obj) ) {
|
|
|
+ // Fee20 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee21", &val_obj) ) {
|
|
|
+ // Fee21 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee22", &val_obj) ) {
|
|
|
+ // Fee22 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
+ // if( json_object_object_get_ex(jobj, "Fee23", &val_obj) ) {
|
|
|
+ // Fee23 = json_object_get_double(val_obj);
|
|
|
+ // }
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy = MaxChargingEnergy;
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingPower = MaxChargingPower;
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent = MaxChargingCurrent;
|
|
@@ -462,6 +591,32 @@ int main(int argc, char *argv[]) {
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[7],LocalWhiteCard7);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[8],LocalWhiteCard8);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[9],LocalWhiteCard9);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.isBilling = isBilling;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Currency = Currency;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[0] = rounding(Fee0);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[1] = rounding(Fee1);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[2] = rounding(Fee2);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[3] = rounding(Fee3);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[4] = rounding(Fee4);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[5] = rounding(Fee5);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[6] = rounding(Fee6);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[7] = rounding(Fee7);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[8] = rounding(Fee8);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[9] = rounding(Fee9);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[10] = rounding(Fee10);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[11] = rounding(Fee11);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[12] = rounding(Fee12);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[13] = rounding(Fee13);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[14] = rounding(Fee14);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[15] = rounding(Fee15);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[16] = rounding(Fee16);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[17] = rounding(Fee17);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[18] = rounding(Fee18);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[19] = rounding(Fee19);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[20] = rounding(Fee20);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[21] = rounding(Fee21);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[22] = rounding(Fee22);
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.BillingData.Fee[23] = rounding(Fee23);
|
|
|
}
|
|
|
if (strcmp(argv[1], "3") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
@@ -472,9 +627,6 @@ int main(int argc, char *argv[]) {
|
|
|
char *Eth0SubmaskAddress=NULL;
|
|
|
char *Eth0GatewayAddress=NULL;
|
|
|
int Eth1DhcpClient=0;
|
|
|
- // char *Eth1IpAddress=NULL;
|
|
|
- // char *Eth1SubmaskAddress=NULL;
|
|
|
- // char *Eth1GatewayAddress=NULL;
|
|
|
int WifiMode=0;
|
|
|
char *WifiSsid=NULL;
|
|
|
char *WifiPassword=NULL;
|
|
@@ -487,9 +639,6 @@ int main(int argc, char *argv[]) {
|
|
|
char *TelcomChapPapId=NULL;
|
|
|
char *TelcomChapPapPwd=NULL;
|
|
|
char *TelcomIpAddress=NULL;
|
|
|
- // if( json_object_object_get_ex(jobj, "FtpServer", &val_obj) ) {
|
|
|
- // FtpServer = (char*)json_object_get_string(val_obj);
|
|
|
- // }
|
|
|
if( json_object_object_get_ex(jobj, "Eth0DhcpClient", &val_obj) ) {
|
|
|
Eth0DhcpClient = json_object_get_int(val_obj);
|
|
|
}
|
|
@@ -502,18 +651,6 @@ int main(int argc, char *argv[]) {
|
|
|
if( json_object_object_get_ex(jobj, "Eth0GatewayAddress", &val_obj) ) {
|
|
|
Eth0GatewayAddress = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
- // if( json_object_object_get_ex(jobj, "Eth1DhcpClient", &val_obj) ) {
|
|
|
- // Eth1DhcpClient = json_object_get_int(val_obj);
|
|
|
- // }
|
|
|
- // if( json_object_object_get_ex(jobj, "Eth1IpAddress", &val_obj) ) {
|
|
|
- // Eth1IpAddress = (char*)json_object_get_string(val_obj);
|
|
|
- // }
|
|
|
- // if( json_object_object_get_ex(jobj, "Eth1SubmaskAddress", &val_obj) ) {
|
|
|
- // Eth1SubmaskAddress = (char*)json_object_get_string(val_obj);
|
|
|
- // }
|
|
|
- // if( json_object_object_get_ex(jobj, "Eth1GatewayAddress", &val_obj) ) {
|
|
|
- // Eth1GatewayAddress = (char*)json_object_get_string(val_obj);
|
|
|
- // }
|
|
|
if( json_object_object_get_ex(jobj, "WifiMode", &val_obj) ) {
|
|
|
WifiMode = json_object_get_int(val_obj);
|
|
|
}
|
|
@@ -551,15 +688,11 @@ int main(int argc, char *argv[]) {
|
|
|
TelcomIpAddress = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
|
|
|
- // strcpy((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer,FtpServer);
|
|
|
ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient=Eth0DhcpClient;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress,Eth0IpAddress);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress,Eth0SubmaskAddress);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress,Eth0GatewayAddress);
|
|
|
ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient=Eth1DhcpClient;
|
|
|
- // strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthIpAddress,Eth1IpAddress);
|
|
|
- // strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthSubmaskAddress,Eth1SubmaskAddress);
|
|
|
- // strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthGatewayAddress,Eth1GatewayAddress);
|
|
|
ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode=WifiMode;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid,WifiSsid);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword,WifiPassword);
|
|
@@ -637,7 +770,7 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "aaa") == 0) {
|
|
|
//struct SysConfigData SysConfig;
|
|
|
//system
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DWLU770111T1P0D");
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DSLU601U1JT1P0D");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber, "SerialNumber");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId, "1234567890");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemDateTime, "2019-12-31 23:59:59");
|
|
@@ -821,28 +954,61 @@ int main(int argc, char *argv[]) {
|
|
|
char *Connector2[2];
|
|
|
char *Connector3[2];
|
|
|
char *Network[2];
|
|
|
+ unsigned char connector1FwVer[32];
|
|
|
+ unsigned char connector2FwVer[32];
|
|
|
+ short gunQty;
|
|
|
substr((char *)IsAcDc,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,0,1);
|
|
|
substr((char *)Connector1,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,7,1);
|
|
|
- substr((char *)Connector2,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,8,1);
|
|
|
- substr((char *)Connector3,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,9,1);
|
|
|
+ substr((char *)Connector2,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,9,1);
|
|
|
+ substr((char *)Connector3,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,8,1);
|
|
|
substr((char *)Network,(const char *)ShmSysConfigAndInfo->SysConfig.ModelName,10,1);
|
|
|
int connectorType1,connectorType2,connectorType3;
|
|
|
connectorType1=ConnectorType((char *)Connector1);
|
|
|
connectorType2=ConnectorType((char *)Connector2);
|
|
|
connectorType3=ConnectorType((char *)Connector3);
|
|
|
-// modelType=ModelType((char *)IsAcDc,(char *)Network);
|
|
|
-// printf("modelType:%d\n",modelType);
|
|
|
+ if(connectorType1 == connectorType2){
|
|
|
+ gunQty = 1;
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ gunQty = 0;
|
|
|
+ }
|
|
|
+ if(connectorType1 != 0){
|
|
|
+ if(connectorType1 == 1){
|
|
|
+ //strcpy((char *)&connector1FwVer,ShmCcsData->V2GMessage_DIN70121->version);
|
|
|
+// memcpy(connector1FwVer,ShmCcsData->V2GMessage_DIN70121->version,ARRAY_SIZE(ShmCcsData->V2GMessage_DIN70121->version));
|
|
|
+ }
|
|
|
+ else if(connectorType1 == 2){
|
|
|
+ //strcpy((char *)&connector1FwVer,ShmGBTData->evse[0].version);
|
|
|
+// memcpy(connector1FwVer,ShmGBTData->evse[0].version,ARRAY_SIZE(ShmGBTData->evse[0].version));
|
|
|
+ }
|
|
|
+ else if(connectorType1 == 3){
|
|
|
+ //strcpy((char *)&connector1FwVer,ShmCHAdeMOData->evse[0].version);
|
|
|
+// memcpy(connector1FwVer,ShmCHAdeMOData->evse[0].version,ARRAY_SIZE(ShmCHAdeMOData->evse[0].version));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(connectorType2 != 0){
|
|
|
+ if(connectorType2 == 1){
|
|
|
+ //strcpy((char *)&connector2FwVer,ShmCcsData->V2GMessage_DIN70121->version);
|
|
|
+// memcpy(connector2FwVer,ShmCcsData->V2GMessage_DIN70121->version,ARRAY_SIZE(ShmCcsData->V2GMessage_DIN70121->version));
|
|
|
+ }
|
|
|
+ else if(connectorType2 == 2){
|
|
|
+ //strcpy((char *)&connector2FwVer,ShmGBTData->evse[gunQty].version);
|
|
|
+// memcpy(connector2FwVer,ShmGBTData->evse[gunQty].version,ARRAY_SIZE(ShmGBTData->evse[gunQty].version));
|
|
|
+ }
|
|
|
+ else if(connectorType2 == 3){
|
|
|
+// strcpy((char *)&connector2FwVer,ShmCHAdeMOData->evse[gunQty].version);
|
|
|
+// memcpy(connector2FwVer,ShmCHAdeMOData->evse[gunQty].version,ARRAY_SIZE(ShmCHAdeMOData->evse[gunQty].version));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
struct json_object *jobj1;
|
|
|
struct json_object *jobj2;
|
|
|
struct json_object *jobj3;
|
|
|
struct json_object *jobj4;
|
|
|
-// struct json_object *array_obj;
|
|
|
//system
|
|
|
struct json_object *ModelName;
|
|
|
struct json_object *SerialNumber;
|
|
|
struct json_object *SystemId;
|
|
|
-// struct json_object *SystemDateTime;
|
|
|
struct json_object *AcPhaseCount;
|
|
|
struct json_object *FactoryConfiguration;
|
|
|
struct json_object *AuthorisationMode;
|
|
@@ -855,6 +1021,12 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *RfidCardNumEndian;
|
|
|
struct json_object *PsuAcInputType;
|
|
|
struct json_object *RatingCurrent;
|
|
|
+ struct json_object *AcRatingCurrent;
|
|
|
+ // struct json_object *isAPP;
|
|
|
+ // struct json_object *isQRCode;
|
|
|
+ // struct json_object *isRFID;
|
|
|
+ // struct json_object *QRCodeMadeMode;
|
|
|
+ // struct json_object *QRCodeContent;
|
|
|
struct json_object *AuxPower5V;
|
|
|
struct json_object *AuxPower12V;
|
|
|
struct json_object *AuxPower24V;
|
|
@@ -876,6 +1048,9 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *RelayModuleHwRev;
|
|
|
struct json_object *RelayModuleFwRev;
|
|
|
struct json_object *TelcomModemFwRev;
|
|
|
+ struct json_object *Connector1FwRev;
|
|
|
+ struct json_object *Connector2FwRev;
|
|
|
+ struct json_object *LedModuleFwRev;
|
|
|
struct json_object *SystemAmbientTemp;
|
|
|
struct json_object *SystemCriticalTemp;
|
|
|
struct json_object *CcsConnectorTemp;
|
|
@@ -894,13 +1069,13 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *PhaseLossPolicy;
|
|
|
struct json_object *LocalWhiteCard[10];
|
|
|
struct json_object *LocalWhiteCardArr= json_object_new_array();
|
|
|
-// struct json_object *CcsAuthentication;
|
|
|
-// struct json_object *AcCcsChargingMode;
|
|
|
-// struct json_object *UserId;
|
|
|
+ // struct json_object *isBilling;
|
|
|
+ // struct json_object *Currency;
|
|
|
+ // struct json_object *Fee[24];
|
|
|
+ // struct json_object *FeeArr= json_object_new_array();
|
|
|
struct json_object *ChargingInfo1;
|
|
|
struct json_object *ChargingInfo2;
|
|
|
struct json_object *ChargingInfo3;
|
|
|
-// struct json_object *CardNumber[3];
|
|
|
struct json_object *StartUserId[3];
|
|
|
struct json_object *StartDateTime[3];
|
|
|
struct json_object *StopDateTime[3];
|
|
@@ -965,7 +1140,6 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *ChargeBoxId;
|
|
|
struct json_object *chargePointVendor;
|
|
|
|
|
|
-// array_obj = json_object_new_array();
|
|
|
jobj1=json_object_new_object();
|
|
|
jobj2=json_object_new_object();
|
|
|
jobj3=json_object_new_object();
|
|
@@ -974,7 +1148,6 @@ int main(int argc, char *argv[]) {
|
|
|
ModelName = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.ModelName);
|
|
|
SerialNumber = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber);
|
|
|
SystemId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.SystemId);
|
|
|
-// SystemDateTime = json_object_new_string(ShmSysConfigAndInfo->SysConfig.SystemDateTime);
|
|
|
AcPhaseCount = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcPhaseCount);
|
|
|
FactoryConfiguration = json_object_new_int(ShmSysConfigAndInfo->SysInfo.FactoryConfiguration);
|
|
|
AuthorisationMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
|
|
@@ -987,6 +1160,12 @@ int main(int argc, char *argv[]) {
|
|
|
RfidCardNumEndian = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
|
|
|
PsuAcInputType = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PsuAcInputType);
|
|
|
RatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RatingCurrent);
|
|
|
+ // AcRatingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcRatingCurrent);
|
|
|
+ // isAPP = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isAPP);
|
|
|
+ // isQRCode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isQRCode);
|
|
|
+ // isRFID = json_object_new_int(ShmSysConfigAndInfo->SysConfig.isRFID);
|
|
|
+ // QRCodeMadeMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.QRCodeMadeMode);
|
|
|
+ // QRCodeContent = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.QRCodeContent);
|
|
|
AuxPower5V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower5V);
|
|
|
AuxPower12V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower12V);
|
|
|
AuxPower24V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower24V);
|
|
@@ -1008,6 +1187,9 @@ int main(int argc, char *argv[]) {
|
|
|
RelayModuleHwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.RelayModuleHwRev);
|
|
|
RelayModuleFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.RelayModuleFwRev);
|
|
|
TelcomModemFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.TelcomModemFwRev);
|
|
|
+ // Connector1FwRev = json_object_new_string((char *)&connector1FwVer);
|
|
|
+ // Connector2FwRev = json_object_new_string((char *)&connector2FwVer);
|
|
|
+ //LedModuleFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.LedModuleFwRev);
|
|
|
SystemAmbientTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemAmbientTemp);
|
|
|
SystemCriticalTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemCriticalTemp);
|
|
|
CcsConnectorTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsConnectorTemp);
|
|
@@ -1041,7 +1223,32 @@ int main(int argc, char *argv[]) {
|
|
|
LocalWhiteCard[7] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[7]);
|
|
|
LocalWhiteCard[8] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[8]);
|
|
|
LocalWhiteCard[9] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[9]);
|
|
|
- //UserId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.UserId);
|
|
|
+ // isBilling = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BillingData.isBilling);
|
|
|
+ // Currency = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BillingData.Currency);
|
|
|
+ // Fee[0] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[0]);
|
|
|
+ // Fee[1] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[1]);
|
|
|
+ // Fee[2] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[2]);
|
|
|
+ // Fee[3] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[3]);
|
|
|
+ // Fee[4] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[4]);
|
|
|
+ // Fee[5] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[5]);
|
|
|
+ // Fee[6] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[6]);
|
|
|
+ // Fee[7] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[7]);
|
|
|
+ // Fee[8] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[8]);
|
|
|
+ // Fee[9] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[9]);
|
|
|
+ // Fee[10] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[10]);
|
|
|
+ // Fee[11] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[11]);
|
|
|
+ // Fee[12] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[12]);
|
|
|
+ // Fee[13] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[13]);
|
|
|
+ // Fee[14] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[14]);
|
|
|
+ // Fee[15] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[15]);
|
|
|
+ // Fee[16] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[16]);
|
|
|
+ // Fee[17] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[17]);
|
|
|
+ // Fee[18] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[18]);
|
|
|
+ // Fee[19] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[19]);
|
|
|
+ // Fee[20] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[20]);
|
|
|
+ // Fee[21] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[21]);
|
|
|
+ // Fee[22] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[22]);
|
|
|
+ // Fee[23] = json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[23]);
|
|
|
if(connectorType1 != 0){
|
|
|
if(connectorType1 == 1){//CCS
|
|
|
PresentChargingVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].PresentChargingVoltage);
|
|
@@ -1058,7 +1265,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
|
|
|
StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
|
|
@@ -1081,7 +1287,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
|
|
|
StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
|
|
@@ -1104,7 +1309,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
|
|
|
StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
|
|
@@ -1127,7 +1331,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
|
|
|
StartUserId[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
StartDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
|
StopDateTime[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
@@ -1152,7 +1355,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
|
|
|
StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
|
|
@@ -1175,7 +1377,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
|
|
|
StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
|
|
@@ -1198,7 +1399,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
|
|
|
StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
|
|
@@ -1221,7 +1421,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
|
|
|
StartUserId[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
StartDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
|
StopDateTime[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
@@ -1246,7 +1445,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].CardNumber);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartDateTime);
|
|
|
StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StopDateTime);
|
|
@@ -1269,7 +1467,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].CardNumber);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartDateTime);
|
|
|
StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StopDateTime);
|
|
@@ -1292,7 +1489,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].CardNumber);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartDateTime);
|
|
|
StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StopDateTime);
|
|
@@ -1315,7 +1511,6 @@ int main(int argc, char *argv[]) {
|
|
|
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);
|
|
|
-// CardNumber[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].CardNumber);
|
|
|
StartUserId[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartUserId);
|
|
|
StartDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartDateTime);
|
|
|
StopDateTime[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StopDateTime);
|
|
@@ -1374,7 +1569,6 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj1,"ModelName",ModelName);
|
|
|
json_object_object_add(jobj1,"SerialNumber",SerialNumber);
|
|
|
json_object_object_add(jobj1,"SystemId",SystemId);
|
|
|
-// json_object_object_add(jobj1,"SystemDateTime",SystemDateTime);
|
|
|
json_object_object_add(jobj1,"AcPhaseCount",AcPhaseCount);
|
|
|
json_object_object_add(jobj1,"FactoryConfiguration",FactoryConfiguration);
|
|
|
json_object_object_add(jobj1,"AuthorisationMode",AuthorisationMode);
|
|
@@ -1387,6 +1581,12 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj1,"RfidCardNumEndian",RfidCardNumEndian);
|
|
|
json_object_object_add(jobj1,"PsuAcInputType",PsuAcInputType);
|
|
|
json_object_object_add(jobj1,"RatingCurrent",RatingCurrent);
|
|
|
+ // json_object_object_add(jobj1,"AcRatingCurrent",AcRatingCurrent);
|
|
|
+ // json_object_object_add(jobj1,"isAPP",isAPP);
|
|
|
+ // json_object_object_add(jobj1,"isQRCode",isQRCode);
|
|
|
+ // json_object_object_add(jobj1,"isRFID",isRFID);
|
|
|
+ // json_object_object_add(jobj1,"QRCodeMadeMode",QRCodeMadeMode);
|
|
|
+ // json_object_object_add(jobj1,"QRCodeContent",QRCodeContent);
|
|
|
json_object_object_add(jobj1,"AuxPower5V",AuxPower5V);
|
|
|
json_object_object_add(jobj1,"AuxPower12V",AuxPower12V);
|
|
|
json_object_object_add(jobj1,"AuxPower24V",AuxPower24V);
|
|
@@ -1408,6 +1608,9 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj1,"RelayModuleHwRev",RelayModuleHwRev);
|
|
|
json_object_object_add(jobj1,"RelayModuleFwRev",RelayModuleFwRev);
|
|
|
json_object_object_add(jobj1,"TelcomModemFwRev",TelcomModemFwRev);
|
|
|
+ // json_object_object_add(jobj1,"Connector1FwRev",Connector1FwRev);
|
|
|
+ // json_object_object_add(jobj1,"Connector2FwRev",Connector2FwRev);
|
|
|
+ // json_object_object_add(jobj1,"LedModuleFwRev",LedModuleFwRev);
|
|
|
json_object_object_add(jobj1,"SystemAmbientTemp",SystemAmbientTemp);
|
|
|
json_object_object_add(jobj1,"SystemCriticalTemp",SystemCriticalTemp);
|
|
|
json_object_object_add(jobj1,"CcsConnectorTemp",CcsConnectorTemp);
|
|
@@ -1437,10 +1640,34 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_array_add(LocalWhiteCardArr,LocalWhiteCard[8]);
|
|
|
json_object_array_add(LocalWhiteCardArr,LocalWhiteCard[9]);
|
|
|
json_object_object_add(jobj2,"LocalWhiteCard",LocalWhiteCardArr);
|
|
|
-// json_object_object_add(jobj2,"CcsAuthentication",CcsAuthentication);
|
|
|
-// json_object_object_add(jobj2,"AcCcsChargingMode",AcCcsChargingMode);
|
|
|
+ // json_object_object_add(jobj2,"isBilling",isBilling);
|
|
|
+ // json_object_object_add(jobj2,"Currency",Currency);
|
|
|
+ // json_object_array_add(FeeArr,Fee[0]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[1]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[2]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[3]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[4]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[5]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[6]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[7]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[8]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[9]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[10]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[11]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[12]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[13]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[14]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[15]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[16]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[17]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[18]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[19]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[20]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[21]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[22]);
|
|
|
+ // json_object_array_add(FeeArr,Fee[23]);
|
|
|
+ // json_object_object_add(jobj2,"Fee",FeeArr);
|
|
|
if(connectorType1 != 0){
|
|
|
-// json_object_object_add(ChargingInfo1,"CardNumber",CardNumber[0]);
|
|
|
json_object_object_add(ChargingInfo1,"StartUserId",StartUserId[0]);
|
|
|
json_object_object_add(ChargingInfo1,"StartDateTime",StartDateTime[0]);
|
|
|
json_object_object_add(ChargingInfo1,"StopDateTime",StopDateTime[0]);
|
|
@@ -1463,7 +1690,6 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj2,"ChargingInfo1",ChargingInfo1);
|
|
|
}
|
|
|
if(connectorType2 != 0){
|
|
|
-// json_object_object_add(ChargingInfo2,"CardNumber",CardNumber[1]);
|
|
|
json_object_object_add(ChargingInfo2,"StartUserId",StartUserId[1]);
|
|
|
json_object_object_add(ChargingInfo2,"StartDateTime",StartDateTime[1]);
|
|
|
json_object_object_add(ChargingInfo2,"StopDateTime",StopDateTime[1]);
|
|
@@ -1486,7 +1712,6 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj2,"ChargingInfo2",ChargingInfo2);
|
|
|
}
|
|
|
if(connectorType3 != 0){
|
|
|
-// json_object_object_add(ChargingInfo3,"CardNumber",CardNumber[2]);
|
|
|
json_object_object_add(ChargingInfo3,"StartUserId",StartUserId[2]);
|
|
|
json_object_object_add(ChargingInfo3,"StartDateTime",StartDateTime[2]);
|
|
|
json_object_object_add(ChargingInfo3,"StopDateTime",StopDateTime[2]);
|