Преглед изворни кода

2020/02/18 Jessica 7972
Actions:
1. Add RatedPower and ConnectorTypes Columns in Machine Table
2. Modify all enum type mapping number from 1 not 0

Modified Files:
1.~\EVCB_OCPP.Domain\Models\Database
2.~\EVCB_OCPP.Packet\Message\SubType

Jessica.Tseng пре 5 година
родитељ
комит
5ea1b39aba
46 измењених фајлова са 363 додато и 385 уклоњено
  1. 6 0
      EVCB_OCPP.Common.sln
  2. 7 0
      EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj
  3. 29 0
      EVCB_OCPP.Domain/MainDBContextMigrations/202002180133171_Machine_AddRatedPower_ConnectorType.Designer.cs
  4. 20 0
      EVCB_OCPP.Domain/MainDBContextMigrations/202002180133171_Machine_AddRatedPower_ConnectorType.cs
  5. 120 0
      EVCB_OCPP.Domain/MainDBContextMigrations/202002180133171_Machine_AddRatedPower_ConnectorType.resx
  6. 13 5
      EVCB_OCPP.Domain/Models/Database/Machine.cs
  7. 1 1
      EVCB_OCPP.Domain/Properties/AssemblyInfo.cs
  8. 48 0
      EVCB_OCPP.MailService/EVCB_OCPP.MailService.csproj
  9. 52 0
      EVCB_OCPP.MailService/MailRequest.cs
  10. 38 0
      EVCB_OCPP.MailService/Properties/AssemblyInfo.cs
  11. 0 7
      EVCB_OCPP.Packet/EVCB_OCPP.Packet.csproj
  12. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/AuthorizationStatus.cs
  13. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/AuthorizeStatus.cs
  14. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/AvailabilityType.cs
  15. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusAType.cs
  16. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusBType.cs
  17. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusCType.cs
  18. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusDType.cs
  19. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusEType.cs
  20. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BatteryPropertySign.cs
  21. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/BatteryType.cs
  22. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/CarConnectionStatus.cs
  23. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargeMode.cs
  24. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargeReadyStatus .cs
  25. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargeType.cs
  26. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargerAutoTerminationStatus.cs
  27. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargingProfileKindType.cs
  28. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargingProfilePurposeType.cs
  29. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargingRateUnitType.cs
  30. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ChargingStrategy.cs
  31. 0 130
      EVCB_OCPP.Packet/Messages/SubTypes/CoreStatus.cs
  32. 0 24
      EVCB_OCPP.Packet/Messages/SubTypes/CustomCommandType.cs
  33. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/DataTransferStatus.cs
  34. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/DiagnosticsStatus.cs
  35. 0 54
      EVCB_OCPP.Packet/Messages/SubTypes/IConfiguration.cs
  36. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/MessageTrigger.cs
  37. 0 60
      EVCB_OCPP.Packet/Messages/SubTypes/ProgramParam.cs
  38. 0 28
      EVCB_OCPP.Packet/Messages/SubTypes/ProgramType.cs
  39. 2 1
      EVCB_OCPP.Packet/Messages/SubTypes/Reason.cs
  40. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/RecurrencyKindType.cs
  41. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/RegistrationStatus.cs
  42. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/ResetType.cs
  43. 0 24
      EVCB_OCPP.Packet/Messages/SubTypes/StartChargingType.cs
  44. 0 24
      EVCB_OCPP.Packet/Messages/SubTypes/StartWith.cs
  45. 1 1
      EVCB_OCPP.Packet/Messages/SubTypes/UpdateType.cs
  46. 1 1
      EVCB_OCPP.Packet/Properties/AssemblyInfo.cs

+ 6 - 0
EVCB_OCPP.Common.sln

@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVCB_OCPP.Domain", "EVCB_OC
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVCB_OCPP.Packet", "EVCB_OCPP.Packet\EVCB_OCPP.Packet.csproj", "{D458D1A1-3957-48D0-95BC-505D04EF7D69}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EVCB_OCPP.MailService", "EVCB_OCPP.MailService\EVCB_OCPP.MailService.csproj", "{6C6E259B-1038-46D6-9672-AB19A2F91A36}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
 		{D458D1A1-3957-48D0-95BC-505D04EF7D69}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{D458D1A1-3957-48D0-95BC-505D04EF7D69}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{D458D1A1-3957-48D0-95BC-505D04EF7D69}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6C6E259B-1038-46D6-9672-AB19A2F91A36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6C6E259B-1038-46D6-9672-AB19A2F91A36}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6C6E259B-1038-46D6-9672-AB19A2F91A36}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6C6E259B-1038-46D6-9672-AB19A2F91A36}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 7 - 0
EVCB_OCPP.Domain/EVCB_OCPP.Domain.csproj

@@ -158,6 +158,10 @@
     <Compile Include="MainDBContextMigrations\202001130345443_Add_Column_MachineConfiure_Exists.Designer.cs">
       <DependentUpon>202001130345443_Add_Column_MachineConfiure_Exists.cs</DependentUpon>
     </Compile>
+    <Compile Include="MainDBContextMigrations\202002180133171_Machine_AddRatedPower_ConnectorType.cs" />
+    <Compile Include="MainDBContextMigrations\202002180133171_Machine_AddRatedPower_ConnectorType.Designer.cs">
+      <DependentUpon>202002180133171_Machine_AddRatedPower_ConnectorType.cs</DependentUpon>
+    </Compile>
     <Compile Include="MainDBContextMigrations\Configuration.cs" />
     <Compile Include="MeterValueDBContext.cs" />
     <Compile Include="MeterValueDBContextMigrations\201907150814558_Init.cs" />
@@ -289,6 +293,9 @@
     <EmbeddedResource Include="MainDBContextMigrations\202001130345443_Add_Column_MachineConfiure_Exists.resx">
       <DependentUpon>202001130345443_Add_Column_MachineConfiure_Exists.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="MainDBContextMigrations\202002180133171_Machine_AddRatedPower_ConnectorType.resx">
+      <DependentUpon>202002180133171_Machine_AddRatedPower_ConnectorType.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="MeterValueDBContextMigrations\201907150814558_Init.resx">
       <DependentUpon>201907150814558_Init.cs</DependentUpon>
     </EmbeddedResource>

+ 29 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202002180133171_Machine_AddRatedPower_ConnectorType.Designer.cs

@@ -0,0 +1,29 @@
+// <auto-generated />
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System.CodeDom.Compiler;
+    using System.Data.Entity.Migrations;
+    using System.Data.Entity.Migrations.Infrastructure;
+    using System.Resources;
+    
+    [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
+    public sealed partial class Machine_AddRatedPower_ConnectorType : IMigrationMetadata
+    {
+        private readonly ResourceManager Resources = new ResourceManager(typeof(Machine_AddRatedPower_ConnectorType));
+        
+        string IMigrationMetadata.Id
+        {
+            get { return "202002180133171_Machine_AddRatedPower_ConnectorType"; }
+        }
+        
+        string IMigrationMetadata.Source
+        {
+            get { return null; }
+        }
+        
+        string IMigrationMetadata.Target
+        {
+            get { return Resources.GetString("Target"); }
+        }
+    }
+}

+ 20 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202002180133171_Machine_AddRatedPower_ConnectorType.cs

@@ -0,0 +1,20 @@
+namespace EVCB_OCPP.Domain.MainDBContextMigrations
+{
+    using System;
+    using System.Data.Entity.Migrations;
+    
+    public partial class Machine_AddRatedPower_ConnectorType : DbMigration
+    {
+        public override void Up()
+        {
+            AddColumn("dbo.Machine", "RatedPower", c => c.Int(nullable: false));
+            AddColumn("dbo.Machine", "ConnectorType", c => c.String(maxLength: 50));
+        }
+        
+        public override void Down()
+        {
+            DropColumn("dbo.Machine", "ConnectorType");
+            DropColumn("dbo.Machine", "RatedPower");
+        }
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 120 - 0
EVCB_OCPP.Domain/MainDBContextMigrations/202002180133171_Machine_AddRatedPower_ConnectorType.resx


+ 13 - 5
EVCB_OCPP.Domain/Models/Database/Machine.cs

@@ -191,10 +191,7 @@
 
       
 
-        public virtual MachineVersion FW_MachineVersion { get; set; }
-      
-
-             
+        public virtual MachineVersion FW_MachineVersion { get; set; }       
 
      
 
@@ -209,6 +206,17 @@
         [StringLength(50)]
         public string FW_CurrentVersion { get; set; }
 
-      
+
+        public int RatedPower { set; get; }
+
+        /// <summary>
+        /// ConnectorType
+        /// </summary>
+        [StringLength(50)]
+        public string ConnectorType { get; set; }
+
+
+
+
     }
 }

+ 1 - 1
EVCB_OCPP.Domain/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("40aaad4")]
+[assembly: AssemblyInformationalVersion("59a77e2")]

+ 48 - 0
EVCB_OCPP.MailService/EVCB_OCPP.MailService.csproj

@@ -0,0 +1,48 @@
+<?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>{6C6E259B-1038-46D6-9672-AB19A2F91A36}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>EVCB_OCPP.MailService</RootNamespace>
+    <AssemblyName>EVCB_OCPP.MailService</AssemblyName>
+    <TargetFrameworkVersion>v4.7.1</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="MailRequest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 52 - 0
EVCB_OCPP.MailService/MailRequest.cs

@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace EVCB_OCPP.MailService
+{
+    public class MailRequest
+    {
+        public int Id { set; get; }
+      
+        /// <summary>
+        /// 寄件人
+        /// </summary>
+        public string Sender { set; get; }
+
+        /// <summary>
+        /// 收件人
+        /// </summary>
+        public string Receivers { set; get; }
+
+        /// <summary>
+        /// 寄件內容
+        /// </summary>
+        public string Content { set; get; }
+
+        /// <summary>
+        /// 備註
+        /// </summary>
+        public string Comment { set; get; }
+
+        /// <summary>
+        /// 送出否
+        /// </summary>
+        public bool IsSent { set; get; }
+
+        /// <summary>
+        /// CreatedOn
+        /// </summary>
+        public DateTime CreatedOn { set; get; }
+
+        /// <summary>
+        /// SentOn
+        /// </summary>
+        public DateTime SentOn { set; get; }
+
+
+
+
+    }
+}

+ 38 - 0
EVCB_OCPP.MailService/Properties/AssemblyInfo.cs

@@ -0,0 +1,38 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 組件的一般資訊是由下列的屬性集控制。
+// 變更這些屬性的值即可修改組件的相關
+// 資訊。
+[assembly: AssemblyTitle("EVCB_OCPP.MailService")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("EVCB_OCPP.MailService")]
+[assembly: AssemblyCopyright("Copyright ©  2020")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 將 ComVisible 設為 false 可對 COM 元件隱藏
+// 組件中的類型。若必須從 COM 存取此組件中的類型,
+// 的類型,請在該類型上將 ComVisible 屬性設定為 true。
+[assembly: ComVisible(false)]
+
+// 下列 GUID 為專案公開 (Expose) 至 COM 時所要使用的 typelib ID
+[assembly: Guid("6c6e259b-1038-46d6-9672-ab19a2f91a36")]
+
+// 組件的版本資訊由下列四個值所組成: 
+//
+//      主要版本
+//      次要版本
+//      組建編號
+//      修訂編號
+//
+// 您可以指定所有的值,或將組建編號或修訂編號設為預設值
+//方法是使用 '*',如下所示:
+// [assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyFileVersion("0.1.0.0")]
+
+[assembly: AssemblyInformationalVersion("59a77e2")]

+ 0 - 7
EVCB_OCPP.Packet/EVCB_OCPP.Packet.csproj

@@ -179,14 +179,11 @@
     <Compile Include="Messages\SubTypes\ClearCacheStatus.cs" />
     <Compile Include="Messages\SubTypes\ClearChargingProfileStatus.cs" />
     <Compile Include="Messages\SubTypes\ConfigurationStatus.cs" />
-    <Compile Include="Messages\SubTypes\CoreStatus.cs" />
     <Compile Include="Messages\SubTypes\csChargingProfiles.cs" />
-    <Compile Include="Messages\SubTypes\CustomCommandType.cs" />
     <Compile Include="Messages\SubTypes\DataTransferStatus.cs" />
     <Compile Include="Messages\SubTypes\DiagnosticsStatus.cs" />
     <Compile Include="Messages\SubTypes\FirmwareStatus.cs" />
     <Compile Include="Messages\SubTypes\GetCompositeScheduleStatus.cs" />
-    <Compile Include="Messages\SubTypes\IConfiguration.cs" />
     <Compile Include="Messages\SubTypes\IdTagInfo.cs" />
     <Compile Include="Messages\SubTypes\KeyValue.cs" />
     <Compile Include="Messages\SubTypes\Location.cs" />
@@ -194,8 +191,6 @@
     <Compile Include="Messages\SubTypes\MessageTrigger.cs" />
     <Compile Include="Messages\SubTypes\MeterValue.cs" />
     <Compile Include="Messages\SubTypes\Phase.cs" />
-    <Compile Include="Messages\SubTypes\ProgramParam.cs" />
-    <Compile Include="Messages\SubTypes\ProgramType.cs" />
     <Compile Include="Messages\SubTypes\ReadingContext.cs" />
     <Compile Include="Messages\SubTypes\Reason.cs" />
     <Compile Include="Messages\SubTypes\RecurrencyKindType.cs" />
@@ -205,8 +200,6 @@
     <Compile Include="Messages\SubTypes\ResetStatus.cs" />
     <Compile Include="Messages\SubTypes\ResetType.cs" />
     <Compile Include="Messages\SubTypes\SampledValue.cs" />
-    <Compile Include="Messages\SubTypes\StartChargingType.cs" />
-    <Compile Include="Messages\SubTypes\StartWith.cs" />
     <Compile Include="Messages\SubTypes\TriggerMessageStatus.cs" />
     <Compile Include="Messages\SubTypes\UnitOfMeasure.cs" />
     <Compile Include="Messages\SubTypes\UnlockStatus.cs" />

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/AuthorizationStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum AuthorizationStatus
     {
-        Accepted,
+        Accepted=1,
         /// <summary>Authorization被鎖住,不允許進行充電</summary>
         Blocked,
         /// <summary>Authorization過期,不允許進行充電</summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/AuthorizeStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 卡片合法
         /// </summary>
-        Accepted,
+        Accepted=1,
 
         /// <summary>
         /// 卡片凍結

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/AvailabilityType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 不允許充電槍進行充電
         /// </summary>
-        Inoperative,
+        Inoperative=1,
         /// <summary>
         /// 允許充電槍進行充電
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusAType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 正常
         /// </summary>
-        Normal,
+        Normal=1,
         /// <summary>
         /// 過高
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusBType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 正常
         /// </summary>
-        Normal,
+        Normal=1,
         /// <summary>
         /// 過高
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusCType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 低於標準
         /// </summary>
-        Below,
+        Below=1,
         /// <summary>
         /// 達標
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusDType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 正常
         /// </summary>
-        Normal,
+        Normal=1,
         /// <summary>
         /// 故障
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BMSStatusEType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 正常
         /// </summary>
-        Normal,
+        Normal=1,
         /// <summary>
         /// 超時
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BatteryPropertySign.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 租賃
         /// </summary>
-        Rent,
+        Rent=1,
         /// <summary>
         /// 車自有
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/BatteryType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 鉛酸電池
         /// </summary>
-        LeadAcid,
+        LeadAcid=1,
         /// <summary>
         /// 
         /// </s鎳氫電池ummary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/CarConnectionStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 斷開
         /// </summary>
-        Disconnection,
+        Disconnection=1,
         /// <summary>
         /// 半連接
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargeMode.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 恆壓充電
         /// </summary>
-        ConstantVoltage,
+        ConstantVoltage=1,
         /// <summary>
         /// 恆流充電
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargeReadyStatus .cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 未做好充電準備
         /// </summary>
-        NotReady,
+        NotReady=1,
         /// <summary>
         /// Ready
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargeType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 直流電樁 
         /// </summary>
-        DC,
+        DC=1,
         /// <summary>
         /// 交流電樁 
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargerAutoTerminationStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 正常
         /// </summary>
-        Normal,
+        Normal=1,
         /// <summary>
         /// 充電機終止
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargingProfileKindType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Schedule periods are relative to a fixed point in  time defined in the schedule.
         /// </summary>
-        Absolute,
+        Absolute=1,
         /// <summary>
         /// The schedule restarts periodically at the first schedule period.
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargingProfilePurposeType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Configuration for the maximum power or current  available for an entire Charge Point.
         /// </summary>
-        ChargePointMaxProfile,
+        ChargePointMaxProfile=1,
         /// <summary>
         /// Default profile to be used for new transactions
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargingRateUnitType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Watts (power).
         /// </summary>
-        W,
+        W=1,
         /// <summary>
         /// Amperes (current).
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ChargingStrategy.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 充滿為止
         /// </summary>
-        Full,
+        Full=1,
         /// <summary>
         /// 時間控制
         /// </summary>

+ 0 - 130
EVCB_OCPP.Packet/Messages/SubTypes/CoreStatus.cs

@@ -1,130 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace OCPP_Packet.Packet.Status
-{
-    public class CoreStatus
-    {
-        public enum AuthorizationStatus
-        {
-            Accepted, Blocked, Expired, Invalid, ConcurrentTx
-        }
-
-        public enum RegistrationStatus
-        {
-            Accepted, Pending, Rejected
-        }
-
-        public enum AvailabilityStatus
-        {
-            /// <summary>
-            /// 接受請求,馬上執行變更
-            /// </summary>
-            Accepted,
-            /// <summary>
-            /// 拒絕請求
-            /// </summary>
-            Rejected,
-            /// <summary>
-            /// 接受請求,等交易結束,就會馬上執行變更
-            /// </summary>
-            Scheduled,
-
-
-        }
-
-        public enum AvailabilityType
-        {
-            /// <summary>
-            /// 不允許充電槍進行充電
-            /// </summary>
-            Inoperative,
-            /// <summary>
-            /// 允許充電槍進行充電
-            /// </summary>
-            Operative
-        }
-
-        public enum ConfigurationStatus
-        {
-            /// <summary>
-            /// 接受請求,馬上執行變更
-            /// </summary>
-            Accepted,
-            /// <summary>
-            /// 拒絕請求
-            /// </summary>
-            Rejected,
-            /// <summary>
-            /// 已更改設定,需透過後台下發Reboot才會生效
-            /// </summary>
-            RebootRequired,
-            NotSupported,
-        }
-
-        public enum ClearCacheStatus
-        {
-            /// <summary>
-            /// 命令已執行
-            /// </summary>
-            Accepted,
-            /// <summary>
-            /// 命令不執行
-            /// </summary>
-            Rejected,
-        }
-
-        public enum DataTransferStatus
-        {
-            /// <summary>
-            /// 接受請求,馬上執行變更
-            /// </summary>
-            Accepted,
-            /// <summary>
-            /// 拒絕請求
-            /// </summary>
-            Rejected,
-
-            UnknownMessageId,
-            UnknownVendorId,
-
-
-        }
-
-        public enum ChargePointErrorCode
-        {
-            ConnectorLockFailure,
-            EVCommunicationError,
-            GroundFailure,
-            HighTemperature,
-            InternalError,
-            LocalListConflict,
-            NoError,
-            OtherError,
-            OverCurrentFailure,
-            OverVoltage,
-            PowerMeterFailure,
-            PowerSwitchFailure,
-            ReaderFailure,
-            ResetFailure,
-            UnderVoltage,
-            WeakSignal
-        }
-
-        public enum ChargePointStatus
-        {
-            Available,
-            Preparing,
-            Charging,
-            SuspendedEVSE,
-            SuspendedEV,
-            Finishing,
-            Reserved,
-            Unavailable,
-            Faulted
-        }
-    }
-}

+ 0 - 24
EVCB_OCPP.Packet/Messages/SubTypes/CustomCommandType.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace OCPP_Packet.Packet.Status
-{
-    public enum CustomCommandType
-    {
-        /// <summary>
-        /// QRCode 閃爍效果
-        /// </summary>
-        QRCodeFlash,
-        /// <summary>
-        /// 禁用電樁
-        /// </summary>
-        DisableCharger,
-        /// <summary>
-        /// 啟用電樁
-        /// </summary>
-        EnableCharger
-    }
-}

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/DataTransferStatus.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// 接受請求,馬上執行變更
         /// </summary>
-        Accepted,
+        Accepted=1,
         /// <summary>
         /// 拒絕請求
         /// </summary>

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/DiagnosticsStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum DiagnosticsStatus
     {
-        Idle,
+        Idle=1,
         Uploaded,
         UploadFailed,
         Uploading

+ 0 - 54
EVCB_OCPP.Packet/Messages/SubTypes/IConfiguration.cs

@@ -1,54 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EVCB_OCPP.Packet.Messages.SubTypes
-{
-    public interface IConfiguration
-    {
-        bool AllowOfflineTxForUnknownId { set; get; }
-        bool AllowOfflineTxForUnknownIdAvailable { set; get; }
-        bool AllowOfflineTxForUnknownIdEnabled { set; get; }
-        bool AuthorizationCacheAvailable { set; get; }
-        bool AuthorizationCacheEnabled { set; get; }
-        int BlinkRepeat { set; get; }
-        int ClockAlignedDataInterval { set; get; }
-        int ConnectionTimeOut { set; get; }
-        int HeartBeatInterval { set; get; }
-        int LightIntensity { set; get; }
-        bool LocalAuthorizeOffline { set; get; }
-        bool LocalPreAuthorize { set; get; }
-        bool MeterValuesAlignedData { set; get; }
-        int MeterValueSampleInterval { set; get; }
-        int MinimumStatusDuration { set; get; }
-        int ResetRetries { set; get; }
-        bool ConnectorPhaseRotation { set; get; }
-        bool StopTransactionOnEVSideDisconnect { set; get; }
-        bool LocalAuthorizationListEnabled { set; get; }
-        bool StopTransactionOnInvalidId { set; get; }
-        bool StopTxnAlignedData { set; get; }
-        bool StopTxnSampledData { set; get; }
-        bool SupportedCompliancyProfiles { set; get; }
-        int TransactionMessageAttempts { set; get; }
-        int TransactionMessageRetryInterval { set; get; }
-        bool UnlockConnectorOnEVSideDisconnect { set; get; }
-        int ChargeProfileMaxStackLevel { set; get; }
-        bool ChargingScheduleAllowedSchedulingUnit { set; get; }
-        int ChargingScheduleMaxPeriods { set; get; }
-        bool MaxChargingProfilesInstalled { set; get; }
-        int ProximityLockRetries { set; get; }
-        int ProximityContactRetries { set; get; }
-        int ChargePointId { set; get; }
-        int GetConfigurationMaxKeys { set; get; }
-        int LocalAuthListSize { set; get; }
-        bool LocalAuthMaxElementsOnce { set; get; }
-        int MaxEnergyOnInvalidId { set; get; }
-        bool MeterValuesTriggeredData { set; get; }
-        bool ReserveConnectorZeroSupported { set; get; }
-        int WebSocketPingInterval { set; get; }
-        bool Testing { set; get; }
-
-    }
-}

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/MessageTrigger.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum MessageTrigger
     {
-        BootNotification,
+        BootNotification=1,
         DiagnosticsStatusNotification,
         FirmwareStatusNotification,
         Heartbeat,

+ 0 - 60
EVCB_OCPP.Packet/Messages/SubTypes/ProgramParam.cs

@@ -1,60 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EVCB_OCPP.Packet.Messages.SubTypes
-{
-    public enum ProgramParam
-    {
-        /// <summary>
-        /// 樁程序 
-        /// </summary>
-        PileProgram=1,
-        /// <summary>
-        /// 廣告文件  
-        /// </summary>
-        Advertisement=3,
-        /// <summary>
-        /// DC 樁的中間件 CSU1  
-        /// </summary>
-        CSU1=20,
-        /// <summary>
-        /// DC 樁的中間件 CSU2   
-        /// </summary>
-        CSU2=21,
-        /// <summary>
-        /// DC 樁的中間件 PSU 
-        /// </summary>
-        PSU=22,
-        /// <summary>
-        /// DC 樁的中間件 DSP
-        /// </summary>
-        DSP=23,
-        /// <summary>
-        /// DC 樁的中間件 HMI 
-        /// </summary>
-        HMI=24,
-        /// <summary>
-        /// DC 樁的中間件 CSU3
-        /// </summary>
-        CSU3=25,
-        /// <summary>
-        /// DC 樁的中間件 CSU4
-        /// </summary>
-        CSU4=26,
-        /// <summary>
-        /// DC 樁的中間件 HMIB1 
-        /// </summary>
-        HMI_B1=27,
-        /// <summary>
-        /// DC 樁的中間件 HMIB2
-        /// </summary>
-        HMI_B2=28,
-        /// <summary>
-        /// AC 樁的中間件 MCU 
-        /// </summary>
-        MCU = 29
-    }
-}

+ 0 - 28
EVCB_OCPP.Packet/Messages/SubTypes/ProgramType.cs

@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EVCB_OCPP.Packet.Messages.SubTypes
-{
-    public enum ProgramType
-    {
-        /// <summary>
-        /// 樁程序 
-        /// </summary>
-        PileProgram=1,
-        /// <summary>
-        /// 中間件 
-        /// </summary>
-        MiddleWare,
-        /// <summary>
-        /// 廣告 
-        /// </summary>
-        Advertisement,
-        /// <summary>
-        /// 更新清單  
-        /// </summary>
-        UpdateList
-    }
-}

+ 2 - 1
EVCB_OCPP.Packet/Messages/SubTypes/Reason.cs

@@ -8,7 +8,8 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum Reason
     {
-        EmergencyStop,
+
+        EmergencyStop=1,
         EVDisconnected,
         HardReset,
         Local,

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/RecurrencyKindType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// The schedule restarts at the beginning of the next day.
         /// </summary>
-        Daily,
+        Daily=1,
         /// <summary>
         /// The schedule restarts at the beginning of the next
         /// week (defined as Monday morning)

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/RegistrationStatus.cs

@@ -8,7 +8,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
 {
     public enum RegistrationStatus
     {
-        Accepted,
+        Accepted=1,
         Pending,
         Rejected
     }

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/ResetType.cs

@@ -11,7 +11,7 @@ namespace EVCB_OCPP.Packet.Messages.SubTypes
         /// <summary>
         /// Full reboot of Charge Point software
         /// </summary>
-        Hard,
+        Hard=1,
         /// <summary>
         /// Return to initial status, gracefully terminating any  transactions in progress.
         /// </summary>

+ 0 - 24
EVCB_OCPP.Packet/Messages/SubTypes/StartChargingType.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EVCB_OCPP.Packet.Messages.SubTypes
-{
-    public enum StartChargingType
-    {
-        /// <summary>
-        /// 本地刷卡啟動
-        /// </summary>
-        RFID,
-        /// <summary>
-        /// 後台
-        /// </summary>
-        CentralSystem,
-        /// <summary>
-        /// 本地管理員
-        /// </summary>
-        LocalAdministrator
-    }
-}

+ 0 - 24
EVCB_OCPP.Packet/Messages/SubTypes/StartWith.cs

@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EVCB_OCPP.Packet.Messages.SubTypes
-{
-    public enum StartWith
-    {
-        /// <summary>
-        /// 會員
-        /// </summary>
-        Member,
-        /// <summary>
-        /// 卡號
-        /// </summary>
-        CardNumber,
-        /// <summary>
-        /// 不識別
-        /// </summary>
-        Unknown
-    }
-}

+ 1 - 1
EVCB_OCPP.Packet/Messages/SubTypes/UpdateType.cs

@@ -2,7 +2,7 @@
 {
     public enum UpdateType
     {
-        Differential,
+        Differential=1,
         Full
     }
 }

+ 1 - 1
EVCB_OCPP.Packet/Properties/AssemblyInfo.cs

@@ -35,4 +35,4 @@ using System.Runtime.InteropServices;
 [assembly: AssemblyVersion("0.1.0.0")]
 [assembly: AssemblyFileVersion("0.1.0.0")]
 
-[assembly: AssemblyInformationalVersion("40aaad4")]
+[assembly: AssemblyInformationalVersion("59a77e2")]

Неке датотеке нису приказане због велике количине промена