|
@@ -338,7 +338,7 @@ int main(int argc, char *argv[]) {
|
|
|
// int AcPhaseCount = 0;
|
|
|
int FactoryConfiguration = 0;
|
|
|
int AuthorisationMode = 0;
|
|
|
- int DefaultLanguage = 0;
|
|
|
+ // int DefaultLanguage = 0;
|
|
|
int RfidCardNumEndian = 0;
|
|
|
int PsuAcInputType = 0;
|
|
|
|
|
@@ -357,9 +357,9 @@ int main(int argc, char *argv[]) {
|
|
|
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, "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);
|
|
|
}
|
|
@@ -370,7 +370,7 @@ int main(int argc, char *argv[]) {
|
|
|
// ShmSysConfigAndInfo->SysConfig.AcPhaseCount = AcPhaseCount;
|
|
|
ShmSysConfigAndInfo->SysInfo.FactoryConfiguration = FactoryConfiguration;
|
|
|
ShmSysConfigAndInfo->SysConfig.AuthorisationMode = AuthorisationMode;
|
|
|
- ShmSysConfigAndInfo->SysConfig.DefaultLanguage = DefaultLanguage;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.DefaultLanguage = DefaultLanguage;
|
|
|
ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = RfidCardNumEndian;
|
|
|
ShmSysConfigAndInfo->SysConfig.PsuAcInputType = PsuAcInputType;
|
|
|
|
|
@@ -466,19 +466,19 @@ 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;
|
|
|
- char *FtpServer=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;
|
|
|
+ // char *Eth1IpAddress=NULL;
|
|
|
+ // char *Eth1SubmaskAddress=NULL;
|
|
|
+ // char *Eth1GatewayAddress=NULL;
|
|
|
int WifiMode=0;
|
|
|
char *WifiSsid=NULL;
|
|
|
char *WifiPassword=NULL;
|
|
|
- int WifiDhcpServer=0;
|
|
|
+ // int WifiDhcpServer=0;
|
|
|
int WifiDhcpClient=0;
|
|
|
char *WifiIpAddress=NULL;
|
|
|
char *WifiSubmaskAddress=NULL;
|
|
@@ -487,9 +487,9 @@ 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, "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 +502,18 @@ 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, "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);
|
|
|
}
|
|
@@ -523,9 +523,9 @@ int main(int argc, char *argv[]) {
|
|
|
if( json_object_object_get_ex(jobj, "WifiPassword", &val_obj) ) {
|
|
|
WifiPassword = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
- if( json_object_object_get_ex(jobj, "WifiDhcpServer", &val_obj) ) {
|
|
|
- WifiDhcpServer = json_object_get_int(val_obj);
|
|
|
- }
|
|
|
+ // if( json_object_object_get_ex(jobj, "WifiDhcpServer", &val_obj) ) {
|
|
|
+ // WifiDhcpServer = json_object_get_int(val_obj);
|
|
|
+ // }
|
|
|
if( json_object_object_get_ex(jobj, "WifiDhcpClient", &val_obj) ) {
|
|
|
WifiDhcpClient = json_object_get_int(val_obj);
|
|
|
}
|
|
@@ -551,19 +551,19 @@ int main(int argc, char *argv[]) {
|
|
|
TelcomIpAddress = (char*)json_object_get_string(val_obj);
|
|
|
}
|
|
|
|
|
|
- strcpy((char *)&ShmSysConfigAndInfo->SysConfig.FtpServer,FtpServer);
|
|
|
+ // 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);
|
|
|
+ // 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);
|
|
|
- ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer=WifiDhcpServer;
|
|
|
+ // ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpServer=WifiDhcpServer;
|
|
|
ShmSysConfigAndInfo->SysConfig.AthInterface.WifiDhcpClient=WifiDhcpClient;
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiIpAddress,WifiIpAddress);
|
|
|
strcpy((char *)&ShmSysConfigAndInfo->SysConfig.AthInterface.WifiSubmaskAddress,WifiSubmaskAddress);
|