Browse Source

remove local systemID define , add nugeet SystemID reference

Robert 3 years ago
parent
commit
de77dec6ae

+ 0 - 6
AwInitilizer.sln

@@ -9,8 +9,6 @@ Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "InitlizerInstaller_Shinewav
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesAdaptor", "MesAdaptor\MesAdaptor.csproj", "{6B69CF23-270B-429B-A21D-AD98C2DFF678}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhihongSystemID", "PhihongSystemID\PhihongSystemID.csproj", "{82536D82-F84B-47A5-A7F3-C668124188C5}"
-EndProject
 Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "InitlizerInstaller_Sajet", "InitlizerInstaller_Sajet\InitlizerInstaller_Sajet.vdproj", "{B5C036AF-3A25-4892-A1EE-28DEF290A024}"
 EndProject
 Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "InitlizerInstaller_Sajet2", "InitlizerInstaller_Sajet2\InitlizerInstaller_Sajet2.vdproj", "{92DFE875-0D71-4B79-81FD-F7BA9A2303FD}"
@@ -31,10 +29,6 @@ Global
 		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{6B69CF23-270B-429B-A21D-AD98C2DFF678}.Release|Any CPU.Build.0 = Release|Any CPU
-		{82536D82-F84B-47A5-A7F3-C668124188C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{82536D82-F84B-47A5-A7F3-C668124188C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{82536D82-F84B-47A5-A7F3-C668124188C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{82536D82-F84B-47A5-A7F3-C668124188C5}.Release|Any CPU.Build.0 = Release|Any CPU
 		{B5C036AF-3A25-4892-A1EE-28DEF290A024}.Debug|Any CPU.ActiveCfg = Debug
 		{B5C036AF-3A25-4892-A1EE-28DEF290A024}.Release|Any CPU.ActiveCfg = Release
 		{92DFE875-0D71-4B79-81FD-F7BA9A2303FD}.Debug|Any CPU.ActiveCfg = Debug

+ 3 - 4
AwInitilizer/Initilizer.csproj

@@ -44,6 +44,9 @@
     <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
+    <Reference Include="PhihongEv.Lib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\PhihongEv.Lib.1.0.0\lib\net40\PhihongEv.Lib.dll</HintPath>
+    </Reference>
     <Reference Include="RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
       <HintPath>..\packages\RestSharp.106.11.7\lib\net452\RestSharp.dll</HintPath>
     </Reference>
@@ -189,10 +192,6 @@
       <Project>{6b69cf23-270b-429b-a21d-ad98c2dff678}</Project>
       <Name>MesAdaptor</Name>
     </ProjectReference>
-    <ProjectReference Include="..\PhihongSystemID\PhihongSystemID.csproj">
-      <Project>{82536d82-f84b-47a5-a7f3-c668124188c5}</Project>
-      <Name>PhihongSystemID</Name>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>

+ 1 - 1
AwInitilizer/KeyinListener.cs

@@ -1,5 +1,5 @@
 using AwInitilizer.Model;
-using PhihongSystemID;
+using PhihongEv.Lib;
 using System;
 using System.Collections.Generic;
 using System.Linq;

+ 2 - 2
AwInitilizer/MainWindow.xaml.cs

@@ -3,7 +3,7 @@ using AwInitilizer.Procedure;
 using MesAdaptor;
 using Microsoft.Win32;
 using Newtonsoft.Json;
-using PhihongSystemID;
+using PhihongEv.Lib;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -44,7 +44,7 @@ namespace AwInitilizer
 
         private bool IsInitilizing = false;
 
-        private PhihongSystemID.SystemID inputSystemID;
+        private SystemID inputSystemID;
         private string csuFilePath;
         private string mcuFilePath;
 

+ 1 - 1
AwInitilizer/Model/UpdateData.cs

@@ -1,4 +1,4 @@
-using PhihongSystemID;
+using PhihongEv.Lib;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;

+ 1 - 1
AwInitilizer/Properties/AssemblyInfo.cs

@@ -53,4 +53,4 @@ using System.Windows;
 // [assembly: AssemblyVersion("1.5.0.0")]
 [assembly: AssemblyVersion("1.5.0.0")]
 [assembly: AssemblyFileVersion("1.5.0.0")]
-[assembly: AssemblyInformationalVersion("c927cfd")]
+[assembly: AssemblyInformationalVersion("5ec02c3")]

+ 1 - 0
AwInitilizer/packages.config

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
   <package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
+  <package id="PhihongEv.Lib" version="1.0.0" targetFramework="net48" />
   <package id="RestSharp" version="106.11.7" targetFramework="net48" />
 </packages>

+ 1 - 1
Initilizer/AssemblyInfo.cs

@@ -11,5 +11,5 @@
 
 [assembly: AssemblyVersion("1.5.0.0")]
 [assembly: AssemblyFileVersion("1.5.0.0")]
-[assembly: AssemblyInformationalVersion("c927cfd")]
+[assembly: AssemblyInformationalVersion("5ec02c3")]
 

+ 4 - 4
MesAdaptor/MesAdaptor.csproj

@@ -31,6 +31,9 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="PhihongEv.Lib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\PhihongEv.Lib.1.0.0\lib\net40\PhihongEv.Lib.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
@@ -52,10 +55,7 @@
     <Compile Include="SajetConnectShinewave.cs" />
   </ItemGroup>
   <ItemGroup>
-    <ProjectReference Include="..\PhihongSystemID\PhihongSystemID.csproj">
-      <Project>{82536d82-f84b-47a5-a7f3-c668124188c5}</Project>
-      <Name>PhihongSystemID</Name>
-    </ProjectReference>
+    <None Include="packages.config" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 1 - 1
MesAdaptor/Properties/AssemblyInfo.cs

@@ -34,4 +34,4 @@ using System.Runtime.InteropServices;
 // [assembly: AssemblyVersion("1.5.0.0")]
 [assembly: AssemblyVersion("1.5.0.0")]
 [assembly: AssemblyFileVersion("1.5.0.0")]
-[assembly: AssemblyInformationalVersion("c927cfd")]
+[assembly: AssemblyInformationalVersion("5ec02c3")]

+ 3 - 2
MesAdaptor/SajectConnectSajet.cs

@@ -1,4 +1,5 @@
-using System;
+using PhihongEv.Lib;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -164,7 +165,7 @@ namespace MesAdaptor
             var codePair = new Dictionary<string, string>();
 
             string model = "";
-            if (PhihongSystemID.SystemID.TryParse(SN,out var systemID))
+            if (SystemID.TryParse(SN,out var systemID))
             {
                 model = systemID.ModelName.ToString();
             }

+ 4 - 3
MesAdaptor/SajectConnectSajet2.cs

@@ -1,4 +1,5 @@
-using System;
+using PhihongEv.Lib;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -58,10 +59,10 @@ namespace MesAdaptor
             return true;
         }
 
-        private PhihongSystemID.SystemID systemID;
+        private SystemID systemID;
         public bool SajetTransSnCheck(ref string serialNumber)
         {
-            if (!PhihongSystemID.SystemID.TryParse(serialNumber, out var id))
+            if (!SystemID.TryParse(serialNumber, out var id))
             {
                 return false;
             }

+ 4 - 0
MesAdaptor/packages.config

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="PhihongEv.Lib" version="1.0.0" targetFramework="net48" />
+</packages>

+ 0 - 38
PhihongSystemID/ConnectorType.cs

@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PhihongSystemID
-{
-    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;
-        }
-    }
-}

+ 0 - 49
PhihongSystemID/PhihongSystemID.csproj

@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{82536D82-F84B-47A5-A7F3-C668124188C5}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>PhihongSystemID</RootNamespace>
-    <AssemblyName>PhihongSystemID</AssemblyName>
-    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <Deterministic>true</Deterministic>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Net.Http" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="ConnectorType.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="SystemID.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>

+ 0 - 37
PhihongSystemID/Properties/AssemblyInfo.cs

@@ -1,37 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("PhihongSystemID")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("PhihongSystemID")]
-[assembly: AssemblyCopyright("Copyright ©  2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("82536d82-f84b-47a5-a7f3-c668124188c5")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.5.0.0")]
-[assembly: AssemblyVersion("1.5.0.0")]
-[assembly: AssemblyFileVersion("1.5.0.0")]
-[assembly: AssemblyInformationalVersion("c927cfd")]

+ 0 - 525
PhihongSystemID/SystemID.cs

@@ -1,525 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace PhihongSystemID
-{
-    public class SystemID
-    {
-        public ModelName ModelName { get; set; }
-        public string SerialNumber { get; set; }
-
-        public string sourceString { get; set; }
-
-        public static bool TryParse(byte[] byteData, out SystemID connectInfo)
-        {
-            connectInfo = null;
-            if (byteData == null || byteData.Length < 14)
-                return false;
-
-            string systemIDString = null;
-            try
-            {
-                systemIDString = Encoding.ASCII.GetString(byteData);
-            }
-            catch
-            {
-                return false;
-            }
-
-            if (!string.IsNullOrEmpty(systemIDString))
-            {
-                return TryParse(systemIDString, out connectInfo);
-            }
-            return false;
-        }
-
-        public static bool TryParse(string byteString, out SystemID connectInfo)
-        {
-            connectInfo = null;
-            SystemID tmp = new SystemID();
-
-            tmp.sourceString = byteString;
-
-            if (tmp.sourceString.Length < 14)
-                return false;
-
-            if (!ModelName.TryParse(tmp.sourceString.Substring(0, 14), out var model))
-                return false;
-            tmp.ModelName = model;
-            tmp.SerialNumber = tmp.sourceString.Substring(14);
-            connectInfo = tmp;
-
-            return true;
-        }
-
-        public string ToWifiPwd()
-        {
-            return SerialNumber + ModelName.ToString();
-        }
-
-        public override string ToString()
-        {
-            return sourceString;
-        }
-
-        public override bool Equals(object obj)
-        {
-            return obj.ToString() == this.ToString();
-        }
-
-        public override int GetHashCode()
-        {
-            return this.ToString().GetHashCode();
-        }
-
-        public static bool operator ==(SystemID a, SystemID b)
-        {
-            string stra = null, strb = null;
-
-            if (Object.Equals(a, null))
-                stra = null;
-            else
-                stra = a.ToString();
-
-            if (Object.Equals(b, null))
-                strb = null;
-            else
-                strb = b.ToString();
-            return string.Equals(a, b);
-        }
-
-        public static bool operator !=(SystemID a, SystemID b)
-        {
-            string stra = null, strb = null;
-
-            if (Object.Equals(a, null))
-                stra = null;
-            else
-                stra = a.ToString();
-
-            if (Object.Equals(b, null))
-                strb = null;
-            else
-                strb = b.ToString();
-            return !string.Equals(a, b);
-        }
-    }
-
-    public class ModelName
-    {
-        public enum EVSE_TYPE_CAT
-        {
-            Unknown,
-            AC,
-            DC,
-            Hybrid
-        }
-
-        public enum EVSE_TYPE
-        {
-            Unknown,
-            AC_Cordset,
-            AC_Wallmount,
-            AC_Pedestal,
-            AC_Wallmount_Excellent,
-            DC_Wallmount,
-            DC_Standalong,
-            DC_Movable,
-            DC_PowerRack_NoCabinet,
-            DC_Disppenser,
-            DC_OutputpowerCabinet,
-            DC_Infy_30KW_GB,
-            DC_PowerRack,
-            DC_OutputCommunicationBox,
-            DC_to_DC_EVSE_Outout_Power_Cabinet
-        }
-
-        public enum EVSE_InputConfig
-        {
-            Unknown, Y, D, L, S, W, T, E, A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, AA
-        }
-
-        public enum EVSE_SafetyReg
-        {
-            Unknown,
-            CE_Europoean,
-            UL_NorthAmerica,
-            GB_China,
-            CNS_Taiwan,
-            JARI_Japan,
-            TR25_Singapor,
-            KC_Korea,
-            British_UK,
-            EVready_French,
-            M,
-            P,
-            I,
-            F,
-            L
-        }
-
-        public enum EVSE_network
-        {
-            None,
-            Ethernet,
-            Ble,
-            EthWiFi,
-            Eth4G,
-            EthBle,
-            EthWiFi4G,
-            WiFi
-        }
-
-        public EVSE_TYPE Type { get; private set; }
-        public EVSE_InputConfig InputConfig { get; private set; }
-        public EVSE_SafetyReg SafetyReg { get; private set; }
-        public double RatedPower { get; private set; }
-        public ConnectorType[] ConnectorTypes { get; private set; }
-        public EVSE_network Network { get; private set; }
-        public int Generation { get; private set; }
-        public string CustomCode { get; private set; }
-
-        public EVSE_TYPE_CAT Type_Cat { get => GetTypeCat(); }
-
-        private string _modelNameString;
-        public string modelNameString
-        {
-            get => _modelNameString;
-            set
-            {
-                if (TryParse(value, out var result))
-                {
-                    this.Type = result.Type;
-                    this.InputConfig = result.InputConfig;
-                    this.SafetyReg = result.SafetyReg;
-                    this.RatedPower = result.RatedPower;
-                    this.ConnectorTypes = result.ConnectorTypes;
-                    this.Network = result.Network;
-                    this.Generation = result.Generation;
-                    this.CustomCode = result.CustomCode;
-
-                    _modelNameString = value;
-                }
-            }
-        }
-
-        public static bool TryParse(byte[] modeNameByte, out ModelName modelName)
-        {
-            modelName = null;
-            string modelNameString;
-            try
-            {
-                modelNameString = Encoding.ASCII.GetString(modeNameByte);
-            }
-            catch
-            {
-                return false;
-            }
-
-            if (modelNameString.Length != 14 && modelNameString.Length != 12)
-                return false;
-            return TryParse(modelNameString, out modelName);
-        }
-
-        public static bool TryParse(string modeNameString, out ModelName modelName)
-        {
-            modelName = null;
-            ModelName model = new ModelName();
-
-            if (modeNameString == null || modeNameString.Length != 14)
-                return false;
-            bool isAc = modeNameString[0] == 'A';
-            var typeString = modeNameString.Substring(0, 2);
-            switch (typeString)
-            {
-                case "AC":
-                    model.Type = EVSE_TYPE.AC_Cordset;
-                    break;
-                case "AW":
-                    model.Type = EVSE_TYPE.AC_Wallmount;
-                    break;
-                case "AP":
-                    model.Type = EVSE_TYPE.AC_Pedestal;
-                    break;
-                case "AX":
-                    model.Type = EVSE_TYPE.AC_Wallmount_Excellent;
-                    break;
-                case "DW":
-                    model.Type = EVSE_TYPE.DC_Wallmount;
-                    break;
-                case "DS":
-                    model.Type = EVSE_TYPE.DC_Standalong;
-                    break;
-                case "DM":
-                    model.Type = EVSE_TYPE.DC_Movable;
-                    break;
-                case "DR":
-                    model.Type = EVSE_TYPE.DC_PowerRack_NoCabinet;
-                    break;
-                case "DD":
-                    model.Type = EVSE_TYPE.DC_Disppenser;
-                    break;
-                case "DO":
-                    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;
-                case "DB":
-                    model.Type = EVSE_TYPE.DC_to_DC_EVSE_Outout_Power_Cabinet;
-                    break;
-                default:
-                    return false;
-            }
-
-            var inputConfigStr = modeNameString.Substring(2, 1);
-            switch (inputConfigStr)
-            {
-                case "Y":
-                    model.InputConfig = EVSE_InputConfig.Y;
-                    break;
-                case "D":
-                    model.InputConfig = EVSE_InputConfig.D;
-                    break;
-                case "L":
-                    model.InputConfig = EVSE_InputConfig.L;
-                    break;
-                case "S":
-                    model.InputConfig = EVSE_InputConfig.S;
-                    break;
-                case "W":
-                    model.InputConfig = EVSE_InputConfig.W;
-                    break;
-                case "T":
-                    model.InputConfig = EVSE_InputConfig.T;
-                    break;
-                case "E":
-                    model.InputConfig = EVSE_InputConfig.E;
-                    break;
-                case "0":
-                    model.InputConfig = EVSE_InputConfig.A0;
-                    break;
-                case "1":
-                    model.InputConfig = EVSE_InputConfig.A1;
-                    break;
-                case "2":
-                    model.InputConfig = EVSE_InputConfig.A2;
-                    break;
-                case "3":
-                    model.InputConfig = EVSE_InputConfig.A3;
-                    break;
-                case "4":
-                    model.InputConfig = EVSE_InputConfig.A4;
-                    break;
-                case "5":
-                    model.InputConfig = EVSE_InputConfig.A5;
-                    break;
-                case "6":
-                    model.InputConfig = EVSE_InputConfig.A6;
-                    break;
-                case "7":
-                    model.InputConfig = EVSE_InputConfig.A7;
-                    break;
-                case "8":
-                    model.InputConfig = EVSE_InputConfig.A8;
-                    break;
-                case "9":
-                    model.InputConfig = EVSE_InputConfig.A9;
-                    break;
-                case "A":
-                    model.InputConfig = EVSE_InputConfig.AA;
-                    break;
-                default:
-                    return false;
-            }
-
-            var safeRegStr = modeNameString.Substring(3, 1);
-            switch (safeRegStr)
-            {
-                case "E":
-                    model.SafetyReg = EVSE_SafetyReg.CE_Europoean;
-                    break;
-                case "U":
-                    model.SafetyReg = EVSE_SafetyReg.UL_NorthAmerica;
-                    break;
-                case "G":
-                    model.SafetyReg = EVSE_SafetyReg.GB_China;
-                    break;
-                case "C":
-                    model.SafetyReg = EVSE_SafetyReg.CNS_Taiwan;
-                    break;
-                case "J":
-                    model.SafetyReg = EVSE_SafetyReg.JARI_Japan;
-                    break;
-                case "T":
-                    model.SafetyReg = EVSE_SafetyReg.TR25_Singapor;
-                    break;
-                case "K":
-                    model.SafetyReg = EVSE_SafetyReg.KC_Korea;
-                    break;
-                case "B":
-                    model.SafetyReg = EVSE_SafetyReg.British_UK;
-                    break;
-                case "Z":
-                    model.SafetyReg = EVSE_SafetyReg.EVready_French;
-                    break;
-                case "M":
-                    model.SafetyReg = EVSE_SafetyReg.M;
-                    break;
-                case "P":
-                    model.SafetyReg = EVSE_SafetyReg.P;
-                    break;
-                case "I":
-                    model.SafetyReg = EVSE_SafetyReg.I;
-                    break;
-                case "F":
-                    model.SafetyReg = EVSE_SafetyReg.F;
-                    break;
-                case "L":
-                    model.SafetyReg = EVSE_SafetyReg.L;
-                    break;
-                default:
-                    return false;
-            }
-
-            var ratedPowerStr = modeNameString.Substring(4, 3);
-            if (!int.TryParse(ratedPowerStr, out int ratedPowerNum) &&
-                ratedPowerNum > 0)
-                return false;
-            double realnum = (double)ratedPowerNum / 10;
-            var exp = ratedPowerNum % 10;
-            model.RatedPower = (double)(realnum * (10 ^ exp));
-
-            model.ConnectorTypes = new ConnectorType[3];
-            var connectorListStr = modeNameString.Substring(7, 3);
-            /*
-            model.ConnectorTypes.Add(ConnectorType.CHadeMO);
-            model.ConnectorTypes.Add(ConnectorType.CCS);
-            model.ConnectorTypes.Add(ConnectorType.IEC);
-            */
-            for (int index = 0; index < 3; index++)
-            {
-                var connectorStr = connectorListStr.Substring(index, 1);
-
-                switch (connectorStr)
-                {
-                    case "0":
-                        //none connecter
-                        model.ConnectorTypes[index] = ConnectorType.None;
-                        break;
-                    case "1":
-                    case "2":
-                    case "3":
-                    case "4":
-                    case "5":
-                    case "6":
-                    case "7":
-                    case "8":
-                        model.ConnectorTypes[index] = ConnectorType.AC;
-                        break;
-                    case "J":
-                    case "K":
-                        model.ConnectorTypes[index] = ConnectorType.CHadeMO;
-                        break;
-                    case "U":
-                    case "V":
-                    case "T":
-                    case "N":
-                    case "R":
-                        model.ConnectorTypes[index] = ConnectorType.CCS1;
-                        break;
-                    case "E":
-                    case "F":
-                    case "D":
-                    case "M":
-                    case "P":
-                        model.ConnectorTypes[index] = ConnectorType.CCS2;
-                        break;
-                    case "G":
-                    case "B":
-                    case "H":
-                    case "A":
-                        model.ConnectorTypes[index] = ConnectorType.GBT;
-                        break;
-                    case "C":
-                        model.ConnectorTypes[index] = ConnectorType.ChaoJi;
-                        break;
-                    case "W":
-                        model.ConnectorTypes[index] = ConnectorType.Wireless;
-                        break;
-                    default:
-                        return false;
-                }
-            }
-
-            var networkOpStr = modeNameString.Substring(10, 1);
-            switch (networkOpStr)
-            {
-                case "0":
-                    model.Network = EVSE_network.None;
-                    break;
-                case "E":
-                    model.Network = EVSE_network.Ethernet;
-                    break;
-                case "B":
-                    model.Network = EVSE_network.Ble;
-                    break;
-                case "W":
-                    model.Network = EVSE_network.EthWiFi;
-                    break;
-                case "T":
-                    model.Network = EVSE_network.Eth4G;
-                    break;
-                case "U":
-                    model.Network = EVSE_network.EthBle;
-                    break;
-                case "D":
-                case "A":
-                    model.Network = EVSE_network.EthWiFi4G;
-                    break;
-                case "F":
-                    model.Network = EVSE_network.WiFi;
-                    break;
-                default:
-                    return false;
-            }
-
-            var genStr = modeNameString.Substring(11, 1);
-            if (!int.TryParse(genStr, out var genInt))
-                return false;
-            model.Generation = genInt;
-
-            model.CustomCode = modeNameString.Substring(12, 2);
-            model._modelNameString = modeNameString;
-
-            modelName = model;
-            return true;
-        }
-
-        public ModelName() { }
-
-        public override string ToString()
-        {
-            return modelNameString;
-        }
-
-        private EVSE_TYPE_CAT GetTypeCat()
-        {
-            string typeString = Type.ToString();
-            if (typeString.Contains("AC"))
-                return EVSE_TYPE_CAT.AC;
-            else if (typeString.Contains("DC"))
-                return EVSE_TYPE_CAT.DC;
-            return EVSE_TYPE_CAT.Hybrid;
-        }
-    }
-}