Browse Source

update model name rule according to 20210305

Robert 4 years ago
parent
commit
ea8295d5aa

+ 38 - 0
AwInitilizer/Model/ConnectorType.cs

@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace AwInitilizer.Model
+{
+    public enum ConnectorType
+    {
+        Unknown, None, CHadeMO, CCS1, CCS2, GBT, AC, ChaoJi, Wireless
+    }
+
+    public static class ConnectorTypeExtention
+    {
+        public static bool GetIsAc(this ConnectorType type)
+        {
+            if (type == ConnectorType.GBT || type == ConnectorType.AC)
+                return true;
+            return false;
+        }
+
+        public static bool GetIsCCS(this ConnectorType type)
+        {
+            if (type == ConnectorType.CCS1 ||
+                type == ConnectorType.CCS2)
+                return true;
+            return false;
+        }
+
+        public static bool GetIsCHadeMO(this ConnectorType type)
+        {
+            if (type == ConnectorType.CHadeMO)
+                return true;
+            return false;
+        }
+    }
+}

+ 63 - 39
AwInitilizer/Model/SystemID.cs

@@ -6,11 +6,6 @@ using System.Threading.Tasks;
 
 
 namespace AwInitilizer.Model
 namespace AwInitilizer.Model
 {
 {
-    public enum ConnectorType
-    {
-        Unknown, None, CHadeMO, CCS1, CCS2, GBT, AC
-    }
-
     public class SystemID
     public class SystemID
     {
     {
         public ModelName ModelName { get; set; }
         public ModelName ModelName { get; set; }
@@ -129,30 +124,35 @@ namespace AwInitilizer.Model
             AC_Cordset,
             AC_Cordset,
             AC_Wallmount,
             AC_Wallmount,
             AC_Pedestal,
             AC_Pedestal,
+            AC_Wallmount_Excellent,
             DC_Wallmount,
             DC_Wallmount,
             DC_Standalong,
             DC_Standalong,
             DC_Movable,
             DC_Movable,
-            DC_Roadside,
+            DC_PowerRack_NoCabinet,
             DC_Disppenser,
             DC_Disppenser,
-            DC_Outputpowercabinet
+            DC_OutputpowerCabinet,
+            DC_Infy_30KW_GB,
+            DC_PowerRack,
+            DC_OutputCommunicationBox
         }
         }
 
 
         public enum EVSE_InputConfig
         public enum EVSE_InputConfig
         {
         {
-            Y, D, L, S, W, T, E , N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, A
+            Unknown, Y, D, L, S, W, T, E, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, AA
         }
         }
 
 
         public enum EVSE_SafetyReg
         public enum EVSE_SafetyReg
         {
         {
-            Europoean,
-            NorthAmerica,
-            China,
-            Taiwan,
-            Japan,
-            Singapor,
-            Korea,
-            UK,
-            French,
+            Unknown,
+            CE_Europoean,
+            UL_NorthAmerica,
+            GB_China,
+            CNS_Taiwan,
+            JARI_Japan,
+            TR25_Singapor,
+            KC_Korea,
+            British_UK,
+            EVready_French,
             M,
             M,
             P,
             P,
             I,
             I,
@@ -253,13 +253,22 @@ namespace AwInitilizer.Model
                     model.Type = EVSE_TYPE.DC_Movable;
                     model.Type = EVSE_TYPE.DC_Movable;
                     break;
                     break;
                 case "DR":
                 case "DR":
-                    model.Type = EVSE_TYPE.DC_Roadside;
+                    model.Type = EVSE_TYPE.DC_PowerRack_NoCabinet;
                     break;
                     break;
                 case "DD":
                 case "DD":
                     model.Type = EVSE_TYPE.DC_Disppenser;
                     model.Type = EVSE_TYPE.DC_Disppenser;
                     break;
                     break;
                 case "DO":
                 case "DO":
-                    model.Type = EVSE_TYPE.DC_Outputpowercabinet;
+                    model.Type = EVSE_TYPE.DC_OutputpowerCabinet;
+                    break;
+                case "DQ":
+                    model.Type = EVSE_TYPE.DC_Infy_30KW_GB;
+                    break;
+                case "DK":
+                    model.Type = EVSE_TYPE.DC_PowerRack;
+                    break;
+                case "DX":
+                    model.Type = EVSE_TYPE.DC_OutputCommunicationBox;
                     break;
                     break;
                 default:
                 default:
                     return false;
                     return false;
@@ -290,37 +299,37 @@ namespace AwInitilizer.Model
                     model.InputConfig = EVSE_InputConfig.E;
                     model.InputConfig = EVSE_InputConfig.E;
                     break;
                     break;
                 case "0":
                 case "0":
-                    model.InputConfig = EVSE_InputConfig.N0;
+                    model.InputConfig = EVSE_InputConfig.A0;
                     break;
                     break;
                 case "1":
                 case "1":
-                    model.InputConfig = EVSE_InputConfig.N1;
+                    model.InputConfig = EVSE_InputConfig.A1;
                     break;
                     break;
                 case "2":
                 case "2":
-                    model.InputConfig = EVSE_InputConfig.N2;
+                    model.InputConfig = EVSE_InputConfig.A2;
                     break;
                     break;
                 case "3":
                 case "3":
-                    model.InputConfig = EVSE_InputConfig.N3;
+                    model.InputConfig = EVSE_InputConfig.A3;
                     break;
                     break;
                 case "4":
                 case "4":
-                    model.InputConfig = EVSE_InputConfig.N4;
+                    model.InputConfig = EVSE_InputConfig.A4;
                     break;
                     break;
                 case "5":
                 case "5":
-                    model.InputConfig = EVSE_InputConfig.N5;
+                    model.InputConfig = EVSE_InputConfig.A5;
                     break;
                     break;
                 case "6":
                 case "6":
-                    model.InputConfig = EVSE_InputConfig.N6;
+                    model.InputConfig = EVSE_InputConfig.A6;
                     break;
                     break;
                 case "7":
                 case "7":
-                    model.InputConfig = EVSE_InputConfig.N7;
+                    model.InputConfig = EVSE_InputConfig.A7;
                     break;
                     break;
                 case "8":
                 case "8":
-                    model.InputConfig = EVSE_InputConfig.N8;
+                    model.InputConfig = EVSE_InputConfig.A8;
                     break;
                     break;
                 case "9":
                 case "9":
-                    model.InputConfig = EVSE_InputConfig.N9;
+                    model.InputConfig = EVSE_InputConfig.A9;
                     break;
                     break;
                 case "A":
                 case "A":
-                    model.InputConfig = EVSE_InputConfig.N9;
+                    model.InputConfig = EVSE_InputConfig.AA;
                     break;
                     break;
                 default:
                 default:
                     return false;
                     return false;
@@ -330,31 +339,31 @@ namespace AwInitilizer.Model
             switch (safeRegStr)
             switch (safeRegStr)
             {
             {
                 case "E":
                 case "E":
-                    model.SafetyReg = EVSE_SafetyReg.Europoean;
+                    model.SafetyReg = EVSE_SafetyReg.CE_Europoean;
                     break;
                     break;
                 case "U":
                 case "U":
-                    model.SafetyReg = EVSE_SafetyReg.NorthAmerica;
+                    model.SafetyReg = EVSE_SafetyReg.UL_NorthAmerica;
                     break;
                     break;
                 case "G":
                 case "G":
-                    model.SafetyReg = EVSE_SafetyReg.China;
+                    model.SafetyReg = EVSE_SafetyReg.GB_China;
                     break;
                     break;
                 case "C":
                 case "C":
-                    model.SafetyReg = EVSE_SafetyReg.Taiwan;
+                    model.SafetyReg = EVSE_SafetyReg.CNS_Taiwan;
                     break;
                     break;
                 case "J":
                 case "J":
-                    model.SafetyReg = EVSE_SafetyReg.Japan;
+                    model.SafetyReg = EVSE_SafetyReg.JARI_Japan;
                     break;
                     break;
                 case "T":
                 case "T":
-                    model.SafetyReg = EVSE_SafetyReg.Singapor;
+                    model.SafetyReg = EVSE_SafetyReg.TR25_Singapor;
                     break;
                     break;
                 case "K":
                 case "K":
-                    model.SafetyReg = EVSE_SafetyReg.Korea;
+                    model.SafetyReg = EVSE_SafetyReg.KC_Korea;
                     break;
                     break;
                 case "B":
                 case "B":
-                    model.SafetyReg = EVSE_SafetyReg.UK;
+                    model.SafetyReg = EVSE_SafetyReg.British_UK;
                     break;
                     break;
                 case "Z":
                 case "Z":
-                    model.SafetyReg = EVSE_SafetyReg.French;
+                    model.SafetyReg = EVSE_SafetyReg.EVready_French;
                     break;
                     break;
                 case "M":
                 case "M":
                     model.SafetyReg = EVSE_SafetyReg.M;
                     model.SafetyReg = EVSE_SafetyReg.M;
@@ -406,22 +415,37 @@ namespace AwInitilizer.Model
                     case "4":
                     case "4":
                     case "5":
                     case "5":
                     case "6":
                     case "6":
+                    case "7":
+                    case "8":
                         model.ConnectorTypes[index] = ConnectorType.AC;
                         model.ConnectorTypes[index] = ConnectorType.AC;
                         break;
                         break;
                     case "J":
                     case "J":
+                    case "K":
                         model.ConnectorTypes[index] = ConnectorType.CHadeMO;
                         model.ConnectorTypes[index] = ConnectorType.CHadeMO;
                         break;
                         break;
                     case "U":
                     case "U":
                     case "V":
                     case "V":
+                    case "T":
+                    case "N":
+                    case "R":
                         model.ConnectorTypes[index] = ConnectorType.CCS1;
                         model.ConnectorTypes[index] = ConnectorType.CCS1;
                         break;
                         break;
                     case "E":
                     case "E":
                     case "F":
                     case "F":
+                    case "D":
+                    case "M":
+                    case "P":
                         model.ConnectorTypes[index] = ConnectorType.CCS2;
                         model.ConnectorTypes[index] = ConnectorType.CCS2;
                         break;
                         break;
                     case "G":
                     case "G":
                         model.ConnectorTypes[index] = ConnectorType.GBT;
                         model.ConnectorTypes[index] = ConnectorType.GBT;
                         break;
                         break;
+                    case "C":
+                        model.ConnectorTypes[index] = ConnectorType.ChaoJi;
+                        break;
+                    case "W":
+                        model.ConnectorTypes[index] = ConnectorType.Wireless;
+                        break;
                     default:
                     default:
                         return false;
                         return false;
                 }
                 }

+ 1 - 1
AwInitilizer/Properties/AssemblyInfo.cs

@@ -53,4 +53,4 @@ using System.Windows;
 // [assembly: AssemblyVersion("1.0.0.0")]
 // [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("387fb6e")]
+[assembly: AssemblyInformationalVersion("ba0a4ae")]

+ 1 - 1
Initilizer/AssemblyInfo.cs

@@ -11,5 +11,5 @@
 
 
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: AssemblyInformationalVersion("387fb6e")]
+[assembly: AssemblyInformationalVersion("ba0a4ae")]