|
@@ -247,6 +247,7 @@ int main(void)
|
|
|
printf("\n system: system configuration menu.");
|
|
|
printf("\n ocpp: ocpp configuration menu.");
|
|
|
printf("\n network: netwok configuration menu.");
|
|
|
+ printf("\n test: charger start/stop test.");
|
|
|
printf("\n upgrade: trigger firmware upgrade.");
|
|
|
printf("\n save: Save config.");
|
|
|
printf("\n exit: Exit config tools.");
|
|
@@ -261,6 +262,8 @@ int main(void)
|
|
|
printf("\n ***** system configuration menu ******************");
|
|
|
printf("\n modelname: EVSE model name.");
|
|
|
printf("\n serialnumber: EVSE serial number.");
|
|
|
+ printf("\n authentication: Authentication function.");
|
|
|
+ printf("\n rfidendian: RFID read endian.");
|
|
|
printf("\n *************************************************");
|
|
|
printf("\n Please input operation item: ");
|
|
|
scanf("%s", &cmd[0]);
|
|
@@ -305,6 +308,34 @@ int main(void)
|
|
|
strcpy((char*)&ShmSysConfigAndInfo->SysConfig.SerialNumber[0], (char*)&cmd[0]);
|
|
|
}
|
|
|
}
|
|
|
+ else if(strcmp(cmd, "authentication") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n 0: Enable.");
|
|
|
+ printf("\n 1: Disable.");
|
|
|
+ printf("\n *************************************************");
|
|
|
+
|
|
|
+ printf("\n Current mode: %d", ShmSysConfigAndInfo->SysConfig.AuthorisationMode);
|
|
|
+ printf("\n Please input authentication mode: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ ShmSysConfigAndInfo->SysConfig.AuthorisationMode = ((0<=atoi(cmd))&&(atoi(cmd)<=1)?atoi(cmd):0);
|
|
|
+ }
|
|
|
+ else if(strcmp(cmd, "rfidendian") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n 0: Little endian.");
|
|
|
+ printf("\n 1: Big endian.");
|
|
|
+ printf("\n *************************************************");
|
|
|
+
|
|
|
+ printf("\n Current mode: %d", ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian);
|
|
|
+ printf("\n Please input rfid endian mode: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ ShmSysConfigAndInfo->SysConfig.RfidCardNumEndian = ((0<=atoi(cmd))&&(atoi(cmd)<=1)?atoi(cmd):0);
|
|
|
+ }
|
|
|
}
|
|
|
else if(strcmp(cmd, "ocpp") == 0)
|
|
|
{
|
|
@@ -312,6 +343,9 @@ int main(void)
|
|
|
printf("\n *************************************************");
|
|
|
printf("\n ocppurl: OCPP backend server url.");
|
|
|
printf("\n cboxid: Charger box id.");
|
|
|
+ printf("\n vender: Charger point vender.");
|
|
|
+ printf("\n offlinepolicy: Charger off line policy.");
|
|
|
+ printf("\n localloadbalance: Charger local load balance.");
|
|
|
printf("\n *************************************************");
|
|
|
printf("\n Please input operation item: ");
|
|
|
scanf("%s", &cmd[0]);
|
|
@@ -356,6 +390,55 @@ int main(void)
|
|
|
strcpy((char*)&ShmSysConfigAndInfo->SysConfig.ChargeBoxId[0], (char*)&cmd[0]);
|
|
|
}
|
|
|
}
|
|
|
+ else if(strcmp(cmd, "vender") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n Current OCPP vender: %s", ShmSysConfigAndInfo->SysConfig.chargePointVendor);
|
|
|
+ printf("\n 0: Keep current config.");
|
|
|
+ printf("\n 1: Input new charger box id.");
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n Please input operation item: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ if(atoi(cmd) == 1)
|
|
|
+ {
|
|
|
+ printf("\n Please input OCPP vender: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ memset(&ShmSysConfigAndInfo->SysConfig.chargePointVendor[0], 0x00, ARRAY_SIZE(ShmSysConfigAndInfo->SysConfig.chargePointVendor));
|
|
|
+ strcpy((char*)&ShmSysConfigAndInfo->SysConfig.chargePointVendor[0], (char*)&cmd[0]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(strcmp(cmd, "offlinepolicy") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n 0: Local list.");
|
|
|
+ printf("\n 2: Free charging.");
|
|
|
+ printf("\n 3: Deny charging.");
|
|
|
+ printf("\n *************************************************");
|
|
|
+
|
|
|
+ printf("\n Current mode: %d", ShmSysConfigAndInfo->SysConfig.OfflinePolicy);
|
|
|
+ printf("\n Please input off line policy mode: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ ShmSysConfigAndInfo->SysConfig.OfflinePolicy = ((0<=atoi(cmd))&&(atoi(cmd)<=3)&&(atoi(cmd)!=1)?atoi(cmd):0);
|
|
|
+ }
|
|
|
+ else if(strcmp(cmd, "localloadbalance") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n 0: Disable.");
|
|
|
+ printf("\n 1: Enable.");
|
|
|
+ printf("\n *************************************************");
|
|
|
+
|
|
|
+ printf("\n Current mode: %d", ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharging);
|
|
|
+ printf("\n Please input local load balance mode: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ ShmSysConfigAndInfo->SysConfig.isEnableLocalPowerSharging = ((0<=atoi(cmd))&&(atoi(cmd)<=1)?atoi(cmd):0);
|
|
|
+ }
|
|
|
}
|
|
|
else if(strcmp(cmd, "network") == 0)
|
|
|
{
|
|
@@ -532,6 +615,50 @@ int main(void)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ else if(strcmp(cmd, "test") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n ***** test menu ******************");
|
|
|
+ printf("\n start: EVSE start charging request.");
|
|
|
+ printf("\n stop: EVSE stop charging request.");
|
|
|
+ printf("\n cancel: return to main menu.");
|
|
|
+ printf("\n *************************************************");
|
|
|
+ printf("\n Please input operation item: ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ if(strcmp(cmd, "start") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n Please input gun index(1~2): ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ if((0 < atoi(cmd)) && (atoi(cmd) < 3))
|
|
|
+ {
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[atoi(cmd)-1].schedule.isTriggerStart = ON;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ printf("\n Invalid input gun_index.");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(strcmp(cmd, "stop") == 0)
|
|
|
+ {
|
|
|
+ memset(cmd, 0x00, ARRAY_SIZE(cmd));
|
|
|
+ printf("\n Please input gun index(1~2): ");
|
|
|
+ scanf("%s", &cmd[0]);
|
|
|
+
|
|
|
+ if((0 < atoi(cmd)) && (atoi(cmd) < 3))
|
|
|
+ {
|
|
|
+ ShmSysConfigAndInfo->SysInfo.AcChargingData[atoi(cmd)-1].schedule.isTriggerStop = ON;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ printf("\n Invalid input gun_index.");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if(strcmp(cmd, "cancel") == 0)
|
|
|
+ {}
|
|
|
+ }
|
|
|
else if(strcmp(cmd, "upgrade") == 0)
|
|
|
{
|
|
|
printf("\n Firmware upgrade trigger.");
|