|
@@ -288,13 +288,14 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "1") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
|
json_object *val_obj = NULL;
|
|
|
- const char *SystemId=NULL;
|
|
|
- const char *SystemDateTime = NULL;
|
|
|
- const char *AcPhaseCount = NULL;
|
|
|
- const char *FactoryConfiguration = NULL;
|
|
|
- const char *AuthorisationMode = NULL;
|
|
|
- const char *DefaultLanguage = NULL;
|
|
|
- const char *RfidCardNumEndian = NULL;
|
|
|
+ char *SystemId=NULL;
|
|
|
+ char *SystemDateTime = NULL;
|
|
|
+ int AcPhaseCount = 0;
|
|
|
+ int FactoryConfiguration = 0;
|
|
|
+ int AuthorisationMode = 0;
|
|
|
+ int DefaultLanguage = 0;
|
|
|
+ int RfidCardNumEndian = 0;
|
|
|
+ int PsuAcInputType = 0;
|
|
|
|
|
|
if( json_object_object_get_ex(jobj, "SystemId", &val_obj) ) {
|
|
|
SystemId = json_object_get_string(val_obj);
|
|
@@ -303,26 +304,30 @@ int main(int argc, char *argv[]) {
|
|
|
SystemDateTime = json_object_get_string(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "AcPhaseCount", &val_obj) ) {
|
|
|
- AcPhaseCount = json_object_get_string(val_obj);
|
|
|
+ AcPhaseCount = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "FactoryConfiguration", &val_obj) ) {
|
|
|
- FactoryConfiguration = json_object_get_string(val_obj);
|
|
|
+ FactoryConfiguration = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "AuthorisationMode", &val_obj) ) {
|
|
|
- AuthorisationMode = json_object_get_string(val_obj);
|
|
|
+ AuthorisationMode = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "DefaultLanguage", &val_obj) ) {
|
|
|
- DefaultLanguage = json_object_get_string(val_obj);
|
|
|
+ DefaultLanguage = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "RfidCardNumEndian", &val_obj) ) {
|
|
|
- RfidCardNumEndian = json_object_get_string(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);
|
|
|
}
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId,SystemId);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AcPhaseCount,AcPhaseCount);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysInfo.FactoryConfiguration,FactoryConfiguration);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AuthorisationMode,AuthorisationMode);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.DefaultLanguage,DefaultLanguage);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian,RfidCardNumEndian);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AcPhaseCount = AcPhaseCount;
|
|
|
+ ShmSysConfigAndInfo->SysInfo.FactoryConfiguration = FactoryConfiguration;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AuthorisationMode = AuthorisationMode;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.DefaultLanguage = DefaultLanguage;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = RfidCardNumEndian;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.PsuAcInputType = PsuAcInputType;
|
|
|
|
|
|
if(strlen(SystemDateTime)>0){
|
|
|
char cmd[100];
|
|
@@ -336,21 +341,21 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "2") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
|
json_object *val_obj = NULL;
|
|
|
- const int *MaxChargingEnergy= 0;
|
|
|
- const int *MaxChargingPower = 0;
|
|
|
- const int *MaxChargingCurrent = 0;
|
|
|
- const int *MaxChargingDuration = 0;
|
|
|
- const char *PhaseLossPolicy = NULL;
|
|
|
- const char *LocalWhiteCard0 = NULL;
|
|
|
- const char *LocalWhiteCard1 = NULL;
|
|
|
- const char *LocalWhiteCard2 = NULL;
|
|
|
- const char *LocalWhiteCard3 = NULL;
|
|
|
- const char *LocalWhiteCard4 = NULL;
|
|
|
- const char *LocalWhiteCard5 = NULL;
|
|
|
- const char *LocalWhiteCard6 = NULL;
|
|
|
- const char *LocalWhiteCard7 = NULL;
|
|
|
- const char *LocalWhiteCard8 = NULL;
|
|
|
- const char *LocalWhiteCard9 = NULL;
|
|
|
+ int MaxChargingEnergy= 0;
|
|
|
+ int MaxChargingPower = 0;
|
|
|
+ int MaxChargingCurrent = 0;
|
|
|
+ int MaxChargingDuration = 0;
|
|
|
+ int PhaseLossPolicy = 0;
|
|
|
+ char *LocalWhiteCard0 = NULL;
|
|
|
+ char *LocalWhiteCard1 = NULL;
|
|
|
+ char *LocalWhiteCard2 = NULL;
|
|
|
+ char *LocalWhiteCard3 = NULL;
|
|
|
+ char *LocalWhiteCard4 = NULL;
|
|
|
+ char *LocalWhiteCard5 = NULL;
|
|
|
+ char *LocalWhiteCard6 = NULL;
|
|
|
+ char *LocalWhiteCard7 = NULL;
|
|
|
+ char *LocalWhiteCard8 = NULL;
|
|
|
+ char *LocalWhiteCard9 = NULL;
|
|
|
|
|
|
if( json_object_object_get_ex(jobj, "MaxChargingEnergy", &val_obj) ) {
|
|
|
MaxChargingEnergy = json_object_get_int(val_obj);
|
|
@@ -365,7 +370,7 @@ int main(int argc, char *argv[]) {
|
|
|
MaxChargingDuration = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "PhaseLossPolicy", &val_obj) ) {
|
|
|
- PhaseLossPolicy = json_object_get_string(val_obj);
|
|
|
+ PhaseLossPolicy = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "LocalWhiteCard0", &val_obj) ) {
|
|
|
LocalWhiteCard0 = json_object_get_string(val_obj);
|
|
@@ -401,7 +406,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingPower = MaxChargingPower;
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent = MaxChargingCurrent;
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingDuration = MaxChargingDuration;
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy,PhaseLossPolicy);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy = PhaseLossPolicy;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[0],LocalWhiteCard0);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[1],LocalWhiteCard1);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[2],LocalWhiteCard2);
|
|
@@ -416,32 +421,32 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "3") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
|
json_object *val_obj = NULL;
|
|
|
- const char *FtpServer=NULL;
|
|
|
- const char *Eth0DhcpClient=NULL;
|
|
|
- const char *Eth0IpAddress=NULL;
|
|
|
- const char *Eth0SubmaskAddress=NULL;
|
|
|
- const char *Eth0GatewayAddress=NULL;
|
|
|
- const char *Eth1DhcpClient=NULL;
|
|
|
- const char *Eth1IpAddress=NULL;
|
|
|
- const char *Eth1SubmaskAddress=NULL;
|
|
|
- const char *Eth1GatewayAddress=NULL;
|
|
|
- const char *WifiMode=NULL;
|
|
|
- const char *WifiSsid=NULL;
|
|
|
- const char *WifiPassword=NULL;
|
|
|
- const char *WifiDhcpServer=NULL;
|
|
|
- const char *WifiDhcpClient=NULL;
|
|
|
- const char *WifiIpAddress=NULL;
|
|
|
- const char *WifiSubmaskAddress=NULL;
|
|
|
- const char *WifiGatewayAddress=NULL;
|
|
|
- const char *TelcomApn=NULL;
|
|
|
- const char *TelcomChapPapId=NULL;
|
|
|
- const char *TelcomChapPapPwd=NULL;
|
|
|
- const char *TelcomIpAddress=NULL;
|
|
|
+ char *FtpServer=NULL;
|
|
|
+ int Eth0DhcpClient=0;
|
|
|
+ char *Eth0IpAddress=NULL;
|
|
|
+ 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;
|
|
|
+ int WifiDhcpServer=0;
|
|
|
+ int WifiDhcpClient=0;
|
|
|
+ char *WifiIpAddress=NULL;
|
|
|
+ char *WifiSubmaskAddress=NULL;
|
|
|
+ char *WifiGatewayAddress=NULL;
|
|
|
+ char *TelcomApn=NULL;
|
|
|
+ char *TelcomChapPapId=NULL;
|
|
|
+ char *TelcomChapPapPwd=NULL;
|
|
|
+ char *TelcomIpAddress=NULL;
|
|
|
if( json_object_object_get_ex(jobj, "FtpServer", &val_obj) ) {
|
|
|
FtpServer = json_object_get_string(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "Eth0DhcpClient", &val_obj) ) {
|
|
|
- Eth0DhcpClient = json_object_get_string(val_obj);
|
|
|
+ Eth0DhcpClient = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "Eth0IpAddress", &val_obj) ) {
|
|
|
Eth0IpAddress = json_object_get_string(val_obj);
|
|
@@ -453,7 +458,7 @@ int main(int argc, char *argv[]) {
|
|
|
Eth0GatewayAddress = json_object_get_string(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "Eth1DhcpClient", &val_obj) ) {
|
|
|
- Eth1DhcpClient = json_object_get_string(val_obj);
|
|
|
+ Eth1DhcpClient = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "Eth1IpAddress", &val_obj) ) {
|
|
|
Eth1IpAddress = json_object_get_string(val_obj);
|
|
@@ -465,7 +470,7 @@ int main(int argc, char *argv[]) {
|
|
|
Eth1GatewayAddress = json_object_get_string(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiMode", &val_obj) ) {
|
|
|
- WifiMode = json_object_get_string(val_obj);
|
|
|
+ WifiMode = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiSsid", &val_obj) ) {
|
|
|
WifiSsid = json_object_get_string(val_obj);
|
|
@@ -474,10 +479,10 @@ int main(int argc, char *argv[]) {
|
|
|
WifiPassword = json_object_get_string(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiDhcpServer", &val_obj) ) {
|
|
|
- WifiDhcpServer = json_object_get_string(val_obj);
|
|
|
+ WifiDhcpServer = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiDhcpClient", &val_obj) ) {
|
|
|
- WifiDhcpClient = json_object_get_string(val_obj);
|
|
|
+ WifiDhcpClient = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "WifiIpAddress", &val_obj) ) {
|
|
|
WifiIpAddress = json_object_get_string(val_obj);
|
|
@@ -502,19 +507,19 @@ int main(int argc, char *argv[]) {
|
|
|
}
|
|
|
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer,FtpServer);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient,Eth0DhcpClient);
|
|
|
+ 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);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient,Eth1DhcpClient);
|
|
|
+ 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);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode,WifiMode);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode=WifiMode;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid,WifiSsid);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword,WifiPassword);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer,WifiDhcpServer);
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient,WifiDhcpClient);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer=WifiDhcpServer;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient=WifiDhcpClient;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress,WifiIpAddress);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress,WifiSubmaskAddress);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress,WifiGatewayAddress);
|
|
@@ -526,26 +531,23 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "4") == 0) {
|
|
|
struct json_object *jobj = json_tokener_parse(argv[2]);
|
|
|
json_object *val_obj = NULL;
|
|
|
- const int *BackendConnTimeout=0;
|
|
|
- const char *OfflinePolicy=NULL;
|
|
|
- const int *OfflineMaxChargeEnergy=0;
|
|
|
- const int *OfflineMaxChargeDuration=0;
|
|
|
- const char *OcppServerURL=NULL;
|
|
|
- const char *ChargeBoxId=NULL;
|
|
|
+ int BackendConnTimeout=0;
|
|
|
+ int OfflinePolicy=0;
|
|
|
+ int OfflineMaxChargeEnergy=0;
|
|
|
+ int OfflineMaxChargeDuration=0;
|
|
|
+ char *OcppServerURL=NULL;
|
|
|
+ char *ChargeBoxId=NULL;
|
|
|
|
|
|
if( json_object_object_get_ex(jobj, "BackendConnTimeout", &val_obj) ) {
|
|
|
- //BackendConnTimeout = json_object_get_string(val_obj);
|
|
|
BackendConnTimeout = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "OfflinePolicy", &val_obj) ) {
|
|
|
- OfflinePolicy = json_object_get_string(val_obj);
|
|
|
+ OfflinePolicy = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "OfflineMaxChargeEnergy", &val_obj) ) {
|
|
|
- //OfflineMaxChargeEnergy = json_object_get_string(val_obj);
|
|
|
OfflineMaxChargeEnergy = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "OfflineMaxChargeDuration", &val_obj) ) {
|
|
|
- //OfflineMaxChargeDuration = json_object_get_string(val_obj);
|
|
|
OfflineMaxChargeDuration = json_object_get_int(val_obj);
|
|
|
}
|
|
|
if( json_object_object_get_ex(jobj, "OcppServerURL", &val_obj) ) {
|
|
@@ -556,7 +558,7 @@ int main(int argc, char *argv[]) {
|
|
|
}
|
|
|
|
|
|
ShmSysConfigAndInfo->SysConfig.BackendConnTimeout = BackendConnTimeout;
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OfflinePolicy,OfflinePolicy);
|
|
|
+ ShmSysConfigAndInfo->SysConfig.OfflinePolicy = OfflinePolicy;
|
|
|
ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy = OfflineMaxChargeEnergy;
|
|
|
ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration = OfflineMaxChargeDuration;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL,OcppServerURL);
|
|
@@ -573,7 +575,7 @@ int main(int argc, char *argv[]) {
|
|
|
if (strcmp(argv[1], "aaa") == 0) {
|
|
|
struct SysConfigData SysConfig;
|
|
|
//system
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DWLU700111W1PH");
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ModelName, "DSLU122110T1P0");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SerialNumber, "SerialNumber");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemId, "1234567890");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.SystemDateTime, "2019-12-31 23:59:59");
|
|
@@ -587,6 +589,7 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed=0;
|
|
|
ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian=0;
|
|
|
+ ShmSysConfigAndInfo->SysConfig.PsuAcInputType=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.AuxPower5V=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.AuxPower12V=0;
|
|
|
ShmSysConfigAndInfo->SysInfo.AuxPower24V=0;
|
|
@@ -617,9 +620,6 @@ int main(int argc, char *argv[]) {
|
|
|
ShmSysConfigAndInfo->SysConfig.Ccs1PlugInTime=0;
|
|
|
ShmSysConfigAndInfo->SysConfig.Ccs2PlugInTimes=0;
|
|
|
ShmSysConfigAndInfo->SysConfig.ChademoPlugInTimes=0;
|
|
|
- //Set default configuration
|
|
|
- strcpy(SysConfig.SystemId, "0987654321");
|
|
|
- strcpy(SysConfig.SystemDateTime, "2019-08-12 00:00:00");
|
|
|
//charging
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy=0;
|
|
|
ShmSysConfigAndInfo->SysConfig.MaxChargingPower=0;
|
|
@@ -680,6 +680,7 @@ int main(int argc, char *argv[]) {
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd,"");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemImei,"");
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimImsi,"");
|
|
|
+ strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid,"");
|
|
|
ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus=0;
|
|
|
ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode=0;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress,"");
|
|
@@ -693,7 +694,7 @@ int main(int argc, char *argv[]) {
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId,"");
|
|
|
|
|
|
ShmSysConfigAndInfo->SysInfo.FirmwareUpdate=0;
|
|
|
- StoreUsrConfigData(&SysConfig);
|
|
|
+ StoreUsrConfigData(&ShmSysConfigAndInfo->SysConfig);
|
|
|
|
|
|
#ifdef SystemLogMessage
|
|
|
DEBUG_INFO("WebService initial OK");
|
|
@@ -776,6 +777,7 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *SystemFanRotaSpeed;
|
|
|
struct json_object *PsuFanRotaSpeed;
|
|
|
struct json_object *RfidCardNumEndian;
|
|
|
+ struct json_object *PsuAcInputType;
|
|
|
struct json_object *AuxPower5V;
|
|
|
struct json_object *AuxPower12V;
|
|
|
struct json_object *AuxPower24V;
|
|
@@ -871,7 +873,7 @@ int main(int argc, char *argv[]) {
|
|
|
struct json_object *TelcomChapPapPwd;
|
|
|
struct json_object *TelcomModemImei;
|
|
|
struct json_object *TelcomSimImsi;
|
|
|
-// struct json_object *TelcomSimIccid;
|
|
|
+ struct json_object *TelcomSimIccid;
|
|
|
struct json_object *TelcomSimStatus;
|
|
|
struct json_object *TelcomModemMode;
|
|
|
struct json_object *TelcomIpAddress;
|
|
@@ -897,20 +899,21 @@ int main(int argc, char *argv[]) {
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AcPhaseCount,1);
|
|
|
- FactoryConfiguration = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.FactoryConfiguration,1);
|
|
|
- AuthorisationMode = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AuthorisationMode,1);
|
|
|
- DefaultLanguage = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.DefaultLanguage,1);
|
|
|
+ AcPhaseCount = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcPhaseCount);
|
|
|
+ FactoryConfiguration = json_object_new_int(ShmSysConfigAndInfo->SysInfo.FactoryConfiguration);
|
|
|
+ AuthorisationMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
|
|
|
+ DefaultLanguage = json_object_new_int(ShmSysConfigAndInfo->SysConfig.DefaultLanguage);
|
|
|
InputVoltageR = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageR);
|
|
|
InputVoltageS = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageS);
|
|
|
InputVoltageT = json_object_new_double(ShmSysConfigAndInfo->SysInfo.InputVoltageT);
|
|
|
- SystemFanRotaSpeed = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed);
|
|
|
- PsuFanRotaSpeed = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed);
|
|
|
- RfidCardNumEndian = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian,1);
|
|
|
- AuxPower5V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower5V,1);
|
|
|
- AuxPower12V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower12V,1);
|
|
|
- AuxPower24V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower24V,1);
|
|
|
- AuxPower48V = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AuxPower48V,1);
|
|
|
+ SystemFanRotaSpeed = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemFanRotaSpeed);
|
|
|
+ PsuFanRotaSpeed = json_object_new_int(ShmSysConfigAndInfo->SysInfo.PsuFanRotaSpeed);
|
|
|
+ RfidCardNumEndian = json_object_new_int(ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
|
|
|
+ PsuAcInputType = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PsuAcInputType);
|
|
|
+ AuxPower5V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower5V);
|
|
|
+ AuxPower12V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower12V);
|
|
|
+ AuxPower24V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower24V);
|
|
|
+ AuxPower48V = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AuxPower48V);
|
|
|
CsuHwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuHwRev);
|
|
|
CsuBootLoadFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuBootLoadFwRev);
|
|
|
CsuKernelFwRev = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.CsuKernelFwRev);
|
|
@@ -928,15 +931,15 @@ 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);
|
|
|
- SystemAmbientTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.SystemAmbientTemp);
|
|
|
- SystemCriticalTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.SystemCriticalTemp);
|
|
|
- CcsConnectorTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.CcsConnectorTemp);
|
|
|
- PsuAmbientTemp = json_object_new_int((int)ShmSysConfigAndInfo->SysInfo.PsuAmbientTemp);
|
|
|
- AcPlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.AcPlugInTimes);
|
|
|
- GbPlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.GbPlugInTimes);
|
|
|
- Ccs1PlugInTime = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.Ccs1PlugInTime);
|
|
|
- Ccs2PlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.Ccs2PlugInTimes);
|
|
|
- ChademoPlugInTimes = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.ChademoPlugInTimes);
|
|
|
+ SystemAmbientTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemAmbientTemp);
|
|
|
+ SystemCriticalTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.SystemCriticalTemp);
|
|
|
+ CcsConnectorTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsConnectorTemp);
|
|
|
+ PsuAmbientTemp = json_object_new_int(ShmSysConfigAndInfo->SysInfo.PsuAmbientTemp);
|
|
|
+ AcPlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AcPlugInTimes);
|
|
|
+ GbPlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.GbPlugInTimes);
|
|
|
+ Ccs1PlugInTime = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Ccs1PlugInTime);
|
|
|
+ Ccs2PlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Ccs2PlugInTimes);
|
|
|
+ ChademoPlugInTimes = json_object_new_int(ShmSysConfigAndInfo->SysConfig.ChademoPlugInTimes);
|
|
|
FirmwareUpdate = json_object_new_string((char *)&ShmSysConfigAndInfo->SysInfo.FirmwareUpdate);
|
|
|
//charging
|
|
|
int CcsGunQty=0;
|
|
@@ -946,11 +949,11 @@ int main(int argc, char *argv[]) {
|
|
|
ChargingInfo1=json_object_new_object();
|
|
|
ChargingInfo2=json_object_new_object();
|
|
|
ChargingInfo3=json_object_new_object();
|
|
|
- MaxChargingEnergy = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy);
|
|
|
- MaxChargingPower = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingPower);
|
|
|
- MaxChargingCurrent = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
|
|
|
- MaxChargingDuration = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.MaxChargingDuration);
|
|
|
- PhaseLossPolicy = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy,1);
|
|
|
+ MaxChargingEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingEnergy);
|
|
|
+ MaxChargingPower = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingPower);
|
|
|
+ MaxChargingCurrent = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
|
|
|
+ MaxChargingDuration = json_object_new_int(ShmSysConfigAndInfo->SysConfig.MaxChargingDuration);
|
|
|
+ PhaseLossPolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.PhaseLossPolicy);
|
|
|
LocalWhiteCard[0] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[0]);
|
|
|
LocalWhiteCard[1] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[1]);
|
|
|
LocalWhiteCard[2] = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.LocalWhiteCard[2]);
|
|
@@ -973,17 +976,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus,1);
|
|
|
- Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index,1);
|
|
|
- Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type,1);
|
|
|
- type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod);
|
|
|
+ ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp);
|
|
|
CcsGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 2){//GB
|
|
@@ -996,17 +999,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus,1);
|
|
|
- Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index,1);
|
|
|
- Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type,1);
|
|
|
- type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod);
|
|
|
+ ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp);
|
|
|
GbGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 3){//CHAdeMO
|
|
@@ -1019,17 +1022,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus,1);
|
|
|
- Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index,1);
|
|
|
- Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type,1);
|
|
|
- type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod);
|
|
|
+ ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp);
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType1 == 4){//AC
|
|
@@ -1042,17 +1045,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[0] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus,1);
|
|
|
- Index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index,1);
|
|
|
- Type[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type,1);
|
|
|
- type_index[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[0] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
+ ConnectorTemp[0] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
@@ -1067,17 +1070,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus,1);
|
|
|
- Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index,1);
|
|
|
- Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type,1);
|
|
|
- type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod);
|
|
|
+ ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp);
|
|
|
CcsGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 2){//GB
|
|
@@ -1090,17 +1093,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus,1);
|
|
|
- Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index,1);
|
|
|
- Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type,1);
|
|
|
- type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod);
|
|
|
+ ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp);
|
|
|
GbGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 3){//CHAdeMO
|
|
@@ -1113,17 +1116,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus,1);
|
|
|
- Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index,1);
|
|
|
- Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type,1);
|
|
|
- type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod);
|
|
|
+ ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp);
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType2 == 4){//AC
|
|
@@ -1136,17 +1139,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[1] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus,1);
|
|
|
- Index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index,1);
|
|
|
- Type[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type,1);
|
|
|
- type_index[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[1] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
+ ConnectorTemp[1] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
@@ -1161,17 +1164,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].SystemStatus,1);
|
|
|
- Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Index,1);
|
|
|
- Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].Type,1);
|
|
|
- type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].StartMethod);
|
|
|
+ ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.CcsChargingData[CcsGunQty].ConnectorTemp);
|
|
|
CcsGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 2){//GB
|
|
@@ -1184,17 +1187,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].SystemStatus,1);
|
|
|
- Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Index,1);
|
|
|
- Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].Type,1);
|
|
|
- type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].StartMethod);
|
|
|
+ ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.GbChargingData[GbGunQty].ConnectorTemp);
|
|
|
GbGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 3){//CHAdeMO
|
|
@@ -1207,17 +1210,17 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].SystemStatus,1);
|
|
|
- Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Index,1);
|
|
|
- Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].Type,1);
|
|
|
- type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].StartMethod);
|
|
|
+ ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.ChademoChargingData[CHAdeMOGunQty].ConnectorTemp);
|
|
|
CHAdeMOGunQty++;
|
|
|
}
|
|
|
else if(connectorType3 == 4){//AC
|
|
@@ -1230,61 +1233,61 @@ int main(int argc, char *argv[]) {
|
|
|
EvBatteryMaxVoltage[2] = json_object_new_double(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].EvBatteryMaxVoltage);
|
|
|
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_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].SystemStatus,1);
|
|
|
- Index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Index,1);
|
|
|
- Type[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].Type,1);
|
|
|
- type_index[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].type_index,1);
|
|
|
+ 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);
|
|
|
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);
|
|
|
- StartMethod[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod,1);
|
|
|
- ConnectorTemp[2] = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp,1);
|
|
|
+ StartMethod[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].StartMethod);
|
|
|
+ ConnectorTemp[2] = json_object_new_int(ShmSysConfigAndInfo->SysInfo.AcChargingData[AcGunQty].ConnectorTemp);
|
|
|
AcGunQty++;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//network
|
|
|
- InternetConn = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.InternetConn,1);
|
|
|
+ InternetConn = json_object_new_int(ShmSysConfigAndInfo->SysInfo.InternetConn);
|
|
|
FtpServer = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer);
|
|
|
- Eth0DhcpClient = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient,1);
|
|
|
+ Eth0DhcpClient = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthDhcpClient);
|
|
|
Eth0MacAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthMacAddress);
|
|
|
Eth0IpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthIpAddress);
|
|
|
Eth0SubmaskAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthSubmaskAddress);
|
|
|
Eth0GatewayAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth0Interface.EthGatewayAddress);
|
|
|
- Eth1DhcpClient = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient,1);
|
|
|
+ Eth1DhcpClient = json_object_new_int(ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthDhcpClient);
|
|
|
Eth1MacAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthMacAddress);
|
|
|
Eth1IpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthIpAddress);
|
|
|
Eth1SubmaskAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthSubmaskAddress);
|
|
|
Eth1GatewayAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.Eth1Interface.EthGatewayAddress);
|
|
|
- WifiMode = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode,1);
|
|
|
+ WifiMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMode);
|
|
|
WifiSsid = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSsid);
|
|
|
WifiPassword = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiPassword);
|
|
|
- WifiRssi = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.AthInterface.WifiRssi);
|
|
|
- WifiDhcpServer = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer,1);
|
|
|
- WifiDhcpClient = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient,1);
|
|
|
+ WifiRssi = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiRssi);
|
|
|
+ WifiDhcpServer = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer);
|
|
|
+ WifiDhcpClient = json_object_new_int(ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient);
|
|
|
WifiMacAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiMacAddress);
|
|
|
WifiIpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress);
|
|
|
WifiSubmaskAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress);
|
|
|
WifiGatewayAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiGatewayAddress);
|
|
|
WifiNetworkConn = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiNetworkConn);
|
|
|
TelcomApn = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomApn);
|
|
|
- TelcomRssi = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomRssi);
|
|
|
+ TelcomRssi = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomRssi);
|
|
|
TelcomChapPapId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapId);
|
|
|
TelcomChapPapPwd = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomChapPapPwd);
|
|
|
TelcomModemImei = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemImei);
|
|
|
TelcomSimImsi = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimImsi);
|
|
|
- //TelcomSimIccid = json_object_new_string(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid);
|
|
|
- TelcomSimStatus = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus,1);
|
|
|
- TelcomModemMode = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode,1);
|
|
|
+ TelcomSimIccid = json_object_new_string(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimIccid);
|
|
|
+ TelcomSimStatus = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomSimStatus);
|
|
|
+ TelcomModemMode = json_object_new_int(ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomModemMode);
|
|
|
TelcomIpAddress = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomIpAddress);
|
|
|
TelcomNetworkConn = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.TelecomInterface.TelcomNetworkConn);
|
|
|
//backend
|
|
|
- BackendConnTimeout = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
|
|
|
- OfflinePolicy = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysConfig.OfflinePolicy,1);
|
|
|
- OfflineMaxChargeEnergy = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy);
|
|
|
- OfflineMaxChargeDuration = json_object_new_int((int)ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration);
|
|
|
+ BackendConnTimeout = json_object_new_int(ShmSysConfigAndInfo->SysConfig.BackendConnTimeout);
|
|
|
+ OfflinePolicy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflinePolicy);
|
|
|
+ OfflineMaxChargeEnergy = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeEnergy);
|
|
|
+ OfflineMaxChargeDuration = json_object_new_int(ShmSysConfigAndInfo->SysConfig.OfflineMaxChargeDuration);
|
|
|
OcppConnStatus = json_object_new_string_len((char *)&ShmSysConfigAndInfo->SysInfo.OcppConnStatus,1);
|
|
|
OcppServerURL = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.OcppServerURL);
|
|
|
ChargeBoxId = json_object_new_string((char *)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId);
|
|
@@ -1305,6 +1308,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj1,"SystemFanRotaSpeed",SystemFanRotaSpeed);
|
|
|
json_object_object_add(jobj1,"PsuFanRotaSpeed",PsuFanRotaSpeed);
|
|
|
json_object_object_add(jobj1,"RfidCardNumEndian",RfidCardNumEndian);
|
|
|
+ json_object_object_add(jobj1,"PsuAcInputType",PsuAcInputType);
|
|
|
json_object_object_add(jobj1,"AuxPower5V",AuxPower5V);
|
|
|
json_object_object_add(jobj1,"AuxPower12V",AuxPower12V);
|
|
|
json_object_object_add(jobj1,"AuxPower24V",AuxPower24V);
|
|
@@ -1459,6 +1463,7 @@ int main(int argc, char *argv[]) {
|
|
|
json_object_object_add(jobj3,"TelcomChapPapPwd",TelcomChapPapPwd);
|
|
|
json_object_object_add(jobj3,"TelcomModemImei",TelcomModemImei);
|
|
|
json_object_object_add(jobj3,"TelcomSimImsi",TelcomSimImsi);
|
|
|
+ json_object_object_add(jobj3,"TelcomSimIccid",TelcomSimIccid);
|
|
|
json_object_object_add(jobj3,"TelcomSimStatus",TelcomSimStatus);
|
|
|
json_object_object_add(jobj3,"TelcomModemMode",TelcomModemMode);
|
|
|
json_object_object_add(jobj3,"TelcomIpAddress",TelcomIpAddress);
|