|
@@ -15,12 +15,12 @@
|
|
|
|
|
|
#include <unistd.h>
|
|
|
#include <stdarg.h>
|
|
|
-#include <stdio.h> /*標準輸入輸出定義*/
|
|
|
-#include <stdlib.h> /*標準函數庫定義*/
|
|
|
-#include <unistd.h> /*Unix 標準函數定義*/
|
|
|
-#include <fcntl.h> /*檔控制定義*/
|
|
|
-#include <termios.h> /*PPSIX 終端控制定義*/
|
|
|
-#include <errno.h> /*錯誤號定義*/
|
|
|
+#include <stdio.h>
|
|
|
+#include <stdlib.h>
|
|
|
+#include <unistd.h>
|
|
|
+#include <fcntl.h>
|
|
|
+#include <termios.h>
|
|
|
+#include <errno.h>
|
|
|
#include <errno.h>
|
|
|
#include <string.h>
|
|
|
#include <time.h>
|
|
@@ -264,23 +264,25 @@ int main(int argc, char *argv[])
|
|
|
{
|
|
|
memcpy((char*)SysConfig.ModelName, ShmSysConfigAndInfo->SysConfig.ModelName, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.ModelName));
|
|
|
memcpy((char*)SysConfig.SerialNumber, ShmSysConfigAndInfo->SysConfig.SerialNumber, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.SerialNumber));
|
|
|
+ memcpy((char*)SysConfig.CsuBootLoadFwRev, ShmSysConfigAndInfo->SysConfig.CsuBootLoadFwRev, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.CsuBootLoadFwRev));
|
|
|
|
|
|
DEBUG_INFO("InitShareMemory OK.\n");
|
|
|
}
|
|
|
|
|
|
sprintf((char*)SysConfig.SystemId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
|
|
|
sprintf((char*)SysConfig.SystemDateTime, "%d-%d-%d %d:%d:%d", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
|
|
|
- SysConfig.AuthorisationMode = 0;
|
|
|
- SysConfig.DefaultLanguage = 0;
|
|
|
- SysConfig.RfidCardNumEndian = 0;
|
|
|
+ SysConfig.AuthorisationMode = 0;
|
|
|
+ SysConfig.DefaultLanguage = 0;
|
|
|
+ SysConfig.RfidCardNumEndian = 0;
|
|
|
+ SysConfig.BillingData.isBilling = 0;
|
|
|
|
|
|
|
|
|
- SysConfig.MaxChargingEnergy = 0;
|
|
|
- SysConfig.MaxChargingPower = 0;
|
|
|
- SysConfig.MaxChargingCurrent = 0;
|
|
|
- SysConfig.MaxChargingDuration = 0;
|
|
|
- SysConfig.PhaseLossPolicy = 0;
|
|
|
- SysConfig.AcPhaseCount = 1;
|
|
|
+ SysConfig.MaxChargingEnergy = 0;
|
|
|
+ SysConfig.MaxChargingPower = 0;
|
|
|
+ SysConfig.MaxChargingCurrent = 0;
|
|
|
+ SysConfig.MaxChargingDuration = 0;
|
|
|
+ SysConfig.PhaseLossPolicy = 0;
|
|
|
+ SysConfig.AcPhaseCount = 1;
|
|
|
|
|
|
|
|
|
strcpy((char*)SysConfig.FtpServer, "");
|
|
@@ -294,26 +296,37 @@ int main(int argc, char *argv[])
|
|
|
strcpy((char*)SysConfig.Eth1Interface.EthSubmaskAddress, "255.255.255.0");
|
|
|
strcpy((char*)SysConfig.Eth1Interface.EthGatewayAddress, "192.168.0.254");
|
|
|
|
|
|
- SysConfig.AthInterface.WifiMode = 2;
|
|
|
- SysConfig.AthInterface.WifiRssi = 0;
|
|
|
- SysConfig.AthInterface.WifiDhcpServer = 0;
|
|
|
- SysConfig.AthInterface.WifiDhcpClient = 0;
|
|
|
-
|
|
|
- strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "");
|
|
|
- SysConfig.TelecomInterface.TelcomEnabled = 1;
|
|
|
- SysConfig.TelecomInterface.TelcomSimStatus = 0;
|
|
|
- SysConfig.TelecomInterface.TelcomModemMode = 0;
|
|
|
+
|
|
|
+ SysConfig.AthInterface.WifiMode = 2;
|
|
|
+ SysConfig.AthInterface.WifiRssi = 0;
|
|
|
+ strcpy((char *) SysConfig.AthInterface.WifiSsid, "");
|
|
|
+ strcpy((char *) SysConfig.AthInterface.WifiPassword, "");
|
|
|
+ SysConfig.AthInterface.WifiDhcpServer = 0;
|
|
|
+ SysConfig.AthInterface.WifiDhcpClient = 0;
|
|
|
+ SysConfig.AthInterface.WifiBroadcastSsid = 1;
|
|
|
+
|
|
|
+
|
|
|
+ strcpy((char*)SysConfig.TelecomInterface.TelcomApn, "");
|
|
|
+ SysConfig.TelecomInterface.TelcomEnabled = 1;
|
|
|
+ SysConfig.TelecomInterface.TelcomRssi = 0;
|
|
|
+ SysConfig.TelecomInterface.TelcomSimStatus = 0;
|
|
|
+ SysConfig.TelecomInterface.TelcomModemMode = 0;
|
|
|
+ strcpy((char *) SysConfig.TelecomInterface.TelcomChapPapId, "");
|
|
|
+ strcpy((char *) SysConfig.TelecomInterface.TelcomChapPapPwd, "");
|
|
|
+ strcpy((char *) SysConfig.TelecomInterface.TelcomModemImei, "");
|
|
|
+ strcpy((char *) SysConfig.TelecomInterface.TelcomSimImsi, "");
|
|
|
+ strcpy((char *) SysConfig.TelecomInterface.TelcomSimIccid, "");
|
|
|
|
|
|
|
|
|
strcpy((char*)SysConfig.OcppServerURL, "");
|
|
|
sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
|
|
|
- strcpy((char *)SysConfig.chargePointVendor, "");
|
|
|
+ strcpy((char *)SysConfig.chargePointVendor, "");
|
|
|
strcpy((char*)SysConfig.MaintainServerURL, "");
|
|
|
- SysConfig.BackendConnTimeout=300;
|
|
|
- SysConfig.OfflinePolicy = 2;
|
|
|
- SysConfig.OfflineMaxChargeEnergy = 0;
|
|
|
- SysConfig.OfflineMaxChargeDuration = 0;
|
|
|
-
|
|
|
+ SysConfig.BackendConnTimeout=300;
|
|
|
+ SysConfig.OfflinePolicy = 2;
|
|
|
+ SysConfig.OfflineMaxChargeEnergy = 0;
|
|
|
+ SysConfig.OfflineMaxChargeDuration = 0;
|
|
|
+
|
|
|
|
|
|
|
|
|
if(SysConfig.ModelName[12] == 'P')
|
|
@@ -321,16 +334,16 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
strcpy((char*)SysConfig.OcppServerURL, "");
|
|
|
sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
|
|
|
- strcpy((char *)SysConfig.chargePointVendor, "");
|
|
|
+ strcpy((char *)SysConfig.chargePointVendor, "");
|
|
|
strcpy((char*)SysConfig.MaintainServerURL, "wss://ocpp.phihong.com.tw:2013/");
|
|
|
}
|
|
|
else if(SysConfig.ModelName[12] == 'A')
|
|
|
{
|
|
|
|
|
|
- SysConfig.AuthorisationMode = 0;
|
|
|
- SysConfig.RfidCardNumEndian = 1;
|
|
|
+ SysConfig.AuthorisationMode = 0;
|
|
|
+ SysConfig.RfidCardNumEndian = 1;
|
|
|
|
|
|
- SysConfig.AthInterface.WifiMode = 1;
|
|
|
+ SysConfig.AthInterface.WifiMode = 1;
|
|
|
strcpy((char*)SysConfig.AthInterface.WifiSsid, "ChargeLab-EVC");
|
|
|
strcpy((char*)SysConfig.AthInterface.WifiPassword, "evc-pwd-default-21");
|
|
|
|
|
@@ -339,15 +352,15 @@ int main(int argc, char *argv[])
|
|
|
strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.io");
|
|
|
sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
|
|
|
strcpy((char*)SysConfig.chargePointVendor, "ChargeLab");
|
|
|
- SysConfig.OfflinePolicy = 0;
|
|
|
+ SysConfig.OfflinePolicy = 0;
|
|
|
}
|
|
|
else if(SysConfig.ModelName[12] == 'T')
|
|
|
{
|
|
|
|
|
|
- SysConfig.AuthorisationMode = 0;
|
|
|
- SysConfig.RfidCardNumEndian = 1;
|
|
|
+ SysConfig.AuthorisationMode = 0;
|
|
|
+ SysConfig.RfidCardNumEndian = 1;
|
|
|
|
|
|
- SysConfig.AthInterface.WifiMode = 1;
|
|
|
+ SysConfig.AthInterface.WifiMode = 1;
|
|
|
strcpy((char*)SysConfig.AthInterface.WifiSsid, "ChargeLab-EVC");
|
|
|
strcpy((char*)SysConfig.AthInterface.WifiPassword, "evc-pwd-default-21");
|
|
|
|
|
@@ -356,7 +369,7 @@ int main(int argc, char *argv[])
|
|
|
strcpy((char*)SysConfig.OcppServerURL, "wss://ocpp.io");
|
|
|
sprintf((char*)SysConfig.ChargeBoxId, "%s%s", SysConfig.ModelName, SysConfig.SerialNumber);
|
|
|
strcpy((char*)SysConfig.chargePointVendor, "ChargeLab");
|
|
|
- SysConfig.OfflinePolicy = 0;
|
|
|
+ SysConfig.OfflinePolicy = 0;
|
|
|
}
|
|
|
else
|
|
|
{
|