Forráskód Böngészése

[Add][AW-CCS][Module_Config]

2021.05.29 / Folus Wen

Actions:
1. Module_Config task add authetication, rfid endian, ocpp vender, ocpp local balance configuration.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 3 éve
szülő
commit
aa03b2dd8a
1 módosított fájl, 83 hozzáadás és 1 törlés
  1. 83 1
      EVSE/Projects/AW-CCS/Apps/Module_ConfigTools.c

+ 83 - 1
EVSE/Projects/AW-CCS/Apps/Module_ConfigTools.c

@@ -262,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]);
@@ -306,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)
 		{
@@ -313,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]);
@@ -357,7 +390,56 @@ 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)
 		{
 			memset(cmd, 0x00, ARRAY_SIZE(cmd));