ソースを参照

update for event module enhancement

sangwq 2 年 前
コミット
3f9c41937a

+ 5 - 5
Venus/Framework/Common/Account/AccountManager.cs

@@ -242,7 +242,7 @@ namespace Aitex.Core.Account
             try
             {
                 //LOG.Write(string.Format("用户{0}注销登录", accountId));
-                LOG.Define(1, accountId);
+                LOG.Write(eEvent.UserLoggedOff,  MECF.Framework.Common.Equipment.ModuleName.System, accountId);
                 accountId = accountId.ToLower();
                 if (_userList.ContainsKey(accountId))
                 {
@@ -253,7 +253,7 @@ namespace Aitex.Core.Account
             }
             catch
             {
-                LOG.Define(3, accountId);
+                LOG.Write(eEvent.UserLoggedOff,  MECF.Framework.Common.Equipment.ModuleName.System, accountId);
                 //LOG.Write(ex, string.Format("注销用户{0}发生异常", accountId));
             }
         }
@@ -410,7 +410,7 @@ namespace Aitex.Core.Account
             {
                 var msg = string.Format("修改账号{0}的密码失败", accountId);
                 //LOG.Write(ex, msg);
-                LOG.Define(4, accountId);
+                LOG.Write(eEvent.AccountChanged,  MECF.Framework.Common.Equipment.ModuleName.System, accountId);
                 return new ChangePwdResult() { ActSucc = false, Description = msg };
             }
         }
@@ -565,7 +565,7 @@ namespace Aitex.Core.Account
             catch (Exception ex)
             {
                 var msg = string.Format("删除账号{0}发生异常", accountId);
-                LOG.Define(5, accountId);
+                LOG.Write(eEvent.AccountDeleted,  MECF.Framework.Common.Equipment.ModuleName.System, accountId);
                 //LOG.Write(ex, msg);
                 return new DeleteAccountResult() { ActSucc = false, Description = msg };
             }
@@ -627,7 +627,7 @@ namespace Aitex.Core.Account
             {
                 var msg = string.Format("更新账号{0}资料发生异常", account.AccountId);
                 //LOG.Write(ex, msg);
-                LOG.Define(6, account.AccountId);
+                LOG.Write(eEvent.AccountChanged,  MECF.Framework.Common.Equipment.ModuleName.System, account.AccountId);
                 return new UpdateAccountResult() { ActSucc = false, Description = msg };
             }
         }

+ 1 - 1
Venus/Framework/Common/Account/AccountService.cs

@@ -113,7 +113,7 @@ namespace Aitex.Core.Account
         public void KickUserOut(string accountId, string kickoutReason)
         {
             //EV.PostInfoLog(Module, string.Format("Force user {0} logout system,reason:{1}。", accountId, kickoutReason));
-            LOG.Define(2, accountId, kickoutReason);
+            LOG.Write(eEvent.UserLoggedOff,  MECF.Framework.Common.Equipment.ModuleName.System, accountId, kickoutReason);
             try
             {
            //     Authorization.Exit(accountId);

+ 4 - 4
Venus/Framework/Common/Log/LOG.cs

@@ -1,7 +1,7 @@
 using Aitex.Core.RT.SCCore;
 using System;
 using System.Linq;
-
+using MECF.Framework.Common.Equipment;
 namespace Aitex.Core.RT.Log
 {
     public static class LOG
@@ -15,7 +15,7 @@ namespace Aitex.Core.RT.Log
             Error         
         }
 
-        public static ICommonLog InnerLogger { set; private get; }
+        public static ICommonLog InnerLogger { set;  private get; }
 
         private static void Debug(string message)
         {
@@ -40,12 +40,12 @@ namespace Aitex.Core.RT.Log
                 InnerLogger.Error(message);
         }
 
-        public static void Define(int id, params string[] values)
+        public static void Write(eEvent id, ModuleName module, params string[] values)
         {
            var logItem= LogDefineManager.LogItems.Where(x => x.Id == id).FirstOrDefault();
             if (logItem != null)
             {
-                string message ="Id:"+logItem.Id.ToString().PadRight(10)+logItem.Module.PadRight(12) +string.Format(logItem.GlobalDescription_zh, values);
+                string message = ((int)logItem.Id).ToString().PadRight(10)+ module.ToString().PadRight(12) +string.Format(logItem.GlobalDescription_zh, values);
                 Level level = Level.Undefine;
                 Enum.TryParse<Level>(logItem.Level, out level);
 

+ 1 - 1
Venus/Framework/Common/Log/LogItem.cs

@@ -12,7 +12,7 @@ namespace Aitex.Core.RT.Log
     public class LogItem
     {
         [DataMember(Name = "Id")]
-        public int Id { get; set; }
+        public eEvent Id { get; set; }
 
         [DataMember(Name = "Level")]
         public string Level { get; set; }

+ 1 - 1
Venus/Framework/Common/WCF/WcfServiceManager.cs

@@ -26,7 +26,7 @@ namespace Aitex.Core.WCF
                 }
                 catch (Exception ex)
                 {
-                    LOG.Define(0,t.Name, ex.Message);
+                    LOG.Write(0,MECF.Framework.Common.Equipment.ModuleName.System, t.Name, ex.Message);
                     throw new ApplicationException(string.Format("初始化{0}服务失败,", t.ToString(), ex.Message));
                 }
             }

+ 2 - 1
Venus/Venus_Core/Venus_Core.csproj

@@ -49,6 +49,7 @@
   <ItemGroup>
     <Compile Include="DataName.cs" />
     <Compile Include="DeviceName.cs" />
+    <Compile Include="EventDefine.cs" />
     <Compile Include="FADefine.cs" />
     <Compile Include="InvokeName.cs" />
     <Compile Include="ModuleName.cs" />
@@ -56,7 +57,7 @@
     <Compile Include="RtState.cs" />
     <Compile Include="SCValue.cs" />
     <Compile Include="SerializeHelper.cs" />
-    <Compile Include="VirgoDevice.cs" />
+    <Compile Include="VenusDevice.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 60 - 32
Venus/Venus_RT/App.config

@@ -1,24 +1,24 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
 	<configSections>
-		<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net "/>
+		<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net " />
 	</configSections>
 	<log4net>
 		<appender name="fileAppender" type="log4net.Appender.RollingFileAppender">
 			<param name="Encoding" value="utf-8" />
-			<param name="File" value="Logs/log"/>
-			<param name="AppendToFile" value="true"/>
-			<param name="RollingStyle" value="Date"/>
-			<param name="StaticLogFileName" value="false"/>
-			<datePattern value="yyyyMMdd'.txt'"/>
+			<param name="File" value="Logs/log" />
+			<param name="AppendToFile" value="true" />
+			<param name="RollingStyle" value="Date" />
+			<param name="StaticLogFileName" value="false" />
+			<datePattern value="yyyyMMdd'.txt'" />
 			<layout type="log4net.Layout.PatternLayout,log4net">
-				<param name="ConversionPattern"  value="%d  %-5p  %m%n"/>
-				<param name="Header" value="&#xA;----------------------开启Venus--------------------------&#xA;"/>
+				<param name="ConversionPattern" value="%d  %-5p  %m%n" />
+				<param name="Header" value="&#xA;----------------------开启Venus--------------------------&#xA;" />
 			</layout>
 		</appender>
 		<root>
-			<level value="ALL"/>
-			<appender-ref ref="fileAppender"/>
+			<level value="ALL" />
+			<appender-ref ref="fileAppender" />
 		</root>
 	</log4net>
 	
@@ -26,7 +26,7 @@
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
 	</startup>
 	<connectionStrings>
-		<add name="PostgreSQL" connectionString="Server=localhost;Port=5432;User Id=postgres;Password=123456;Database=postgres;Enlist=true;Preload Reader = true;"/>
+		<add name="PostgreSQL" connectionString="Server=localhost;Port=5432;User Id=postgres;Password=123456;Database=postgres;Enlist=true;Preload Reader = true;" />
 	</connectionStrings>
 	<system.serviceModel>
 		<!--<diagnostics>
@@ -35,57 +35,85 @@
 		<bindings>
 			<netTcpBinding>
 				<binding name="Aitex_netTcpBinding" maxReceivedMessageSize="102400000" receiveTimeout="00:10:00">
-					<readerQuotas maxDepth="32" maxStringContentLength="1048576" maxArrayLength="163840000" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
+					<readerQuotas maxDepth="32" maxStringContentLength="1048576" maxArrayLength="163840000" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
 					<security mode="None">
-						<transport clientCredentialType="None"/>
-						<message clientCredentialType="None"/>
+						<transport clientCredentialType="None" />
+						<message clientCredentialType="None" />
 					</security>
 				</binding>
 			</netTcpBinding>
 		</bindings>
 		<services>
 			<service behaviorConfiguration="BasicBehavior" name="Aitex.Core.Account.AccountService">
-				<endpoint address="net.tcp://localhost:8775/AccountService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="Aitex.Core.Account.IAccountService"/>
+				<endpoint address="net.tcp://localhost:8775/AccountService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="Aitex.Core.Account.IAccountService" />
 			</service>
 			<service behaviorConfiguration="BasicBehavior" name="MECF.Framework.Common.OperationCenter.InvokeService">
-				<endpoint address="net.tcp://localhost:8751/InvokeService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.OperationCenter.IInvokeService"/>
+				<endpoint address="net.tcp://localhost:8751/InvokeService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.OperationCenter.IInvokeService" />
 			</service>
 			<service behaviorConfiguration="BasicBehavior" name="Aitex.Core.WCF.EventService">
-				<endpoint address="net.tcp://localhost:8752/EventService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="Aitex.Core.WCF.Interface.IEventService"/>
+				<endpoint address="net.tcp://localhost:8752/EventService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="Aitex.Core.WCF.Interface.IEventService" />
 			</service>
 			<service behaviorConfiguration="BasicBehavior" name="MECF.Framework.Common.DataCenter.QueryDataService">
-				<endpoint address="net.tcp://localhost:8771/QueryDataService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.DataCenter.IQueryDataService"/>
+				<endpoint address="net.tcp://localhost:8771/QueryDataService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.DataCenter.IQueryDataService" />
 			</service>
 			<service behaviorConfiguration="BasicBehavior" name="MECF.Framework.Common.RecipeCenter.RecipeService">
-				<endpoint address="net.tcp://localhost:8773/RecipeService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.RecipeCenter.IRecipeService"/>
+				<endpoint address="net.tcp://localhost:8773/RecipeService" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="MECF.Framework.Common.RecipeCenter.IRecipeService" />
 			</service>
 		</services>
 
 		<client>
-			<endpoint address="net.tcp://localhost:9002/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IPECVDService"/>
-			<endpoint address="net.tcp://localhost:9004/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IIBEService"/>
-			<endpoint address="net.tcp://localhost:9006/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IICPService"/>
+			<endpoint address="net.tcp://localhost:9002/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IPECVDService" />
+			<endpoint address="net.tcp://localhost:9004/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IIBEService" />
+			<endpoint address="net.tcp://localhost:9006/PMService" behaviorConfiguration="EndpointBehavior" binding="netTcpBinding" bindingConfiguration="Aitex_netTcpBinding" contract="ClusterInterface.IPmService" name="Client_IICPService" />
 		</client>
 		<behaviors>
 			<serviceBehaviors>
 				<behavior name="BasicBehavior">
-					<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
-					<serviceMetadata httpGetEnabled="false"/>
-					<serviceDebug includeExceptionDetailInFaults="true"/>
-					<serviceAuthorization impersonateCallerForAllOperations="false"/>
+					<dataContractSerializer maxItemsInObjectGraph="2147483647" />
+					<serviceMetadata httpGetEnabled="false" />
+					<serviceDebug includeExceptionDetailInFaults="true" />
+					<serviceAuthorization impersonateCallerForAllOperations="false" />
 				</behavior>
 				<behavior name="SingleModeBehavior">
-					<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
-					<serviceMetadata httpGetEnabled="false"/>
-					<serviceDebug includeExceptionDetailInFaults="true"/>
-					<serviceAuthorization impersonateCallerForAllOperations="false"/>
+					<dataContractSerializer maxItemsInObjectGraph="2147483647" />
+					<serviceMetadata httpGetEnabled="false" />
+					<serviceDebug includeExceptionDetailInFaults="true" />
+					<serviceAuthorization impersonateCallerForAllOperations="false" />
 				</behavior>
 			</serviceBehaviors>
 			<endpointBehaviors>
 				<behavior name="EndpointBehavior">
-					<dataContractSerializer maxItemsInObjectGraph="2147483647"/>
+					<dataContractSerializer maxItemsInObjectGraph="2147483647" />
 				</behavior>
 			</endpointBehaviors>
 		</behaviors>
 	</system.serviceModel>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-2.0.8.0" newVersion="2.0.8.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="SciChart.Charting" publicKeyToken="b55dd9efe817e823" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.1.12982" newVersion="6.0.1.12982" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="SciChart.Data" publicKeyToken="b55dd9efe817e823" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.1.12982" newVersion="6.0.1.12982" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
 </configuration>

BIN
Venus/Venus_RT/Config/DeviceModelVenus.xml


+ 255 - 225
Venus/Venus_RT/Config/EventDefine.xml

@@ -1,229 +1,246 @@
 <?xml version="1.0"?>
 <EventDefine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-  <EventDefinition>
-    <Id>9</Id>
-    <Description>操控权限:{0}</Description>
-    <Level>Information</Level>
-    <EventEnum>OperationAuthorization</EventEnum>
-    <DetailDesc>Only authorized account can execute operation and control command</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>10</Id>
-    <Description>'{0}' 退出系统。</Description>
-    <Level>Information</Level>
-    <EventEnum>UserLoggedOff</EventEnum>
-    <DetailDesc>用户退出系统。</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>11</Id>
-    <Description>User {0} login</Description>
-    <Level>Information</Level>
-    <EventEnum>UserLoggedIn</EventEnum>
-    <DetailDesc>用户登录</DetailDesc>
-    <GlobalDescription_en>User {0} login</GlobalDescription_en>
-    <GlobalDescription_zh>账号{0}登录</GlobalDescription_zh>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>12</Id>
-    <Description>用户帐号'{0}'的内容被修改。</Description>
-    <Level>Information</Level>
-    <EventEnum>AccountChanged</EventEnum>
-    <DetailDesc>用户帐号改变</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>13</Id>
-    <Description>用户账号'{0}'的密码被修改。</Description>
-    <Level>Information</Level>
-    <EventEnum>PasswordChanged</EventEnum>
-    <DetailDesc>用户账号密码变更</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>14</Id>
-    <Description>用户帐号'{0}'已被删除。</Description>
-    <Level>Information</Level>
-    <EventEnum>AccountDeleted</EventEnum>
-    <DetailDesc>用户帐号删除</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>15</Id>
-    <Description>用户帐号'{0}'已被创建。</Description>
-    <Level>Information</Level>
-    <EventEnum>AccountCreated</EventEnum>
-    <DetailDesc>用户帐号创建</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>19</Id>
-    <Description>Wafer placed to {0}</Description>
-    <Level>Information</Level>
-    <EventEnum>PuttingWaferToChamberEnds</EventEnum>
-    <DetailDesc>This event is posted right after put a wafer</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>20</Id>
-    <Description>Placing wafer to {0}</Description>
-    <Level>Information</Level>
-    <EventEnum>PuttingWaferToChamberBegins</EventEnum>
-    <DetailDesc>This event is posted right before placing</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>21</Id>
-    <Description>Wafer picked from {0}</Description>
-    <Level>Information</Level>
-    <EventEnum>PickingWaferFromChamberEnds</EventEnum>
-    <DetailDesc>This event is posted right after wafer picked</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>22</Id>
-    <Description>Picking wafer from {0}</Description>
-    <Level>Information</Level>
-    <EventEnum>PickingWaferFromChamberBegins</EventEnum>
-    <DetailDesc>This event is posted right before  picking  </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>25</Id>
-    <Description>Align start:notch is {0}。</Description>
-    <Level>Information</Level>
-    <EventEnum>AlignBegins</EventEnum>
-    <DetailDesc>When aligners start aligning.</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>26</Id>
-    <Description>Align end。</Description>
-    <Level>Information</Level>
-    <EventEnum>AlignEnds</EventEnum>
-    <DetailDesc>When aligners aligning completed.</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>27</Id>
-    <Description>Align failed。{0}</Description>
-    <Level>Warning</Level>
-    <EventEnum>AlignFailed</EventEnum>
-    <DetailDesc>When aligners aligning failed.</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>28</Id>
-    <Description>Wafer {0} moved from {1} {2} to {3} {4}</Description>
-    <Level>Information</Level>
-    <EventEnum>WaferMoved</EventEnum>
-    <DetailDesc>Wafer Move information.</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>36</Id>
-    <Description>Wafer created at {0} slot {1}, status is {2}.</Description>
-    <Level>Information</Level>
-    <EventEnum>WaferCreate</EventEnum>
-    <DetailDesc>Wafer Create Information </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>37</Id>
-    <Description>Wafer deleted from {0} slot {1}.</Description>
-    <Level>Information</Level>
-    <EventEnum>WaferDelete</EventEnum>
-    <DetailDesc>Wafer Delete Information</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>41</Id>
-    <Description>{0} load FOUP start.</Description>
-    <Level>Information</Level>
-    <EventEnum>LoadFOUPStart</EventEnum>
-    <DetailDesc>
-    </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>42</Id>
-    <Description>{0} load FOUP end.</Description>
-    <Level>Information</Level>
-    <EventEnum>LoadFOUPEnd</EventEnum>
-    <DetailDesc>
-    </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>43</Id>
-    <Description>{0} load FOUP Failed.</Description>
-    <Level>Alarm</Level>
-    <EventEnum>LoadFOUPFailed</EventEnum>
-    <DetailDesc>
-    </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>44</Id>
-    <Description>{0} unload FOUP start.</Description>
-    <Level>Information</Level>
-    <EventEnum>UnloadFOUPStart</EventEnum>
-    <DetailDesc>
-    </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>45</Id>
-    <Description>{0} unload Foup end.</Description>
-    <Level>Information</Level>
-    <EventEnum>UnloadFOUPEnd</EventEnum>
-    <DetailDesc>
-    </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>46</Id>
-    <Description>{0} unload Foup failed.</Description>
-    <Level>Alarm</Level>
-    <EventEnum>UnloadFOUPFailed</EventEnum>
-    <DetailDesc>
-    </DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <!-- PM Information -->
-  <EventDefinition>
-    <Id>1000</Id>
-    <Description>{0}</Description>
-    <Level>Information</Level>
-    <EventEnum>GeneralInfo</EventEnum>
-    <DetailDesc>默认事件类型(通用)</DetailDesc>
-    <Solution>1222</Solution>
-  </EventDefinition>
-  <EventDefinition>
-    <Id>1023</Id>
-    <Description>{0} '{1}' stopped,reason: {2}。</Description>
-    <Level>Information</Level>
-    <EventEnum>ServiceRoutineAborted</EventEnum>
-    <DetailDesc>where {0} is the chamber name, while {1} is the service name. When service routine is aborted, this event will be posted.</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>1033</Id>
-    <Description>{0} {1}:{2}。</Description>
-    <Level>Information</Level>
-    <EventEnum>ServiceRoutineInfo</EventEnum>
-    <DetailDesc>用于显示在服务程序运行过程中的信息显示,{0}反应腔名,{1}服务程序名,{2}当前动作名。</DetailDesc>
-    <Solution />
-  </EventDefinition>
-  <EventDefinition>
-    <Id>1040</Id>
-    <Description>{0} {1}。</Description>
-    <Level>Information</Level>
-    <EventEnum>GuiCmdExecSucc</EventEnum>
-    <DetailDesc>当收到用户界面命令,并成功执行时,发出该事件。{0}反应腔名,{1}命令解释。</DetailDesc>
-    <Solution />
+    <!-- System Event id: 0 - 999 -->
+    <EventDefinition>
+        <Id>9</Id>
+        <Description>操控权限:{0}</Description>
+        <Level>Information</Level>
+        <EventEnum>OperationAuthorization</EventEnum>
+        <DetailDesc>Only authorized account can execute operation and control command</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>10</Id>
+        <Description>'{0}' 退出系统。</Description>
+        <Level>Information</Level>
+        <EventEnum>UserLoggedOff</EventEnum>
+        <DetailDesc>用户退出系统。</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>11</Id>
+        <Description>User {0} login</Description>
+        <Level>Information</Level>
+        <EventEnum>UserLoggedIn</EventEnum>
+        <DetailDesc>用户登录</DetailDesc>
+        <GlobalDescription_en>User {0} login</GlobalDescription_en>
+        <GlobalDescription_zh>账号{0}登录</GlobalDescription_zh>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>12</Id>
+        <Description>用户帐号'{0}'的内容被修改。</Description>
+        <Level>Information</Level>
+        <EventEnum>AccountChanged</EventEnum>
+        <DetailDesc>用户帐号改变</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>13</Id>
+        <Description>用户账号'{0}'的密码被修改。</Description>
+        <Level>Information</Level>
+        <EventEnum>PasswordChanged</EventEnum>
+        <DetailDesc>用户账号密码变更</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>14</Id>
+        <Description>用户帐号'{0}'已被删除。</Description>
+        <Level>Information</Level>
+        <EventEnum>AccountDeleted</EventEnum>
+        <DetailDesc>用户帐号删除</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>15</Id>
+        <Description>用户帐号'{0}'已被创建。</Description>
+        <Level>Information</Level>
+        <EventEnum>AccountCreated</EventEnum>
+        <DetailDesc>用户帐号创建</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>19</Id>
+        <Description>Wafer placed to {0}</Description>
+        <Level>Information</Level>
+        <EventEnum>PuttingWaferToChamberEnds</EventEnum>
+        <DetailDesc>This event is posted right after put a wafer</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>20</Id>
+        <Description>Placing wafer to {0}</Description>
+        <Level>Information</Level>
+        <EventEnum>PuttingWaferToChamberBegins</EventEnum>
+        <DetailDesc>This event is posted right before placing</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>21</Id>
+        <Description>Wafer picked from {0}</Description>
+        <Level>Information</Level>
+        <EventEnum>PickingWaferFromChamberEnds</EventEnum>
+        <DetailDesc>This event is posted right after wafer picked</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>22</Id>
+        <Description>Picking wafer from {0}</Description>
+        <Level>Information</Level>
+        <EventEnum>PickingWaferFromChamberBegins</EventEnum>
+        <DetailDesc>This event is posted right before  picking  </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>25</Id>
+        <Description>Align start:notch is {0}。</Description>
+        <Level>Information</Level>
+        <EventEnum>AlignBegins</EventEnum>
+        <DetailDesc>When aligners start aligning.</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>26</Id>
+        <Description>Align end。</Description>
+        <Level>Information</Level>
+        <EventEnum>AlignEnds</EventEnum>
+        <DetailDesc>When aligners aligning completed.</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>27</Id>
+        <Description>Align failed。{0}</Description>
+        <Level>Warning</Level>
+        <EventEnum>AlignFailed</EventEnum>
+        <DetailDesc>When aligners aligning failed.</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>28</Id>
+        <Description>Wafer {0} moved from {1} {2} to {3} {4}</Description>
+        <Level>Information</Level>
+        <EventEnum>WaferMoved</EventEnum>
+        <DetailDesc>Wafer Move information.</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>36</Id>
+        <Description>Wafer created at {0} slot {1}, status is {2}.</Description>
+        <Level>Information</Level>
+        <EventEnum>WaferCreate</EventEnum>
+        <DetailDesc>Wafer Create Information </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>37</Id>
+        <Description>Wafer deleted from {0} slot {1}.</Description>
+        <Level>Information</Level>
+        <EventEnum>WaferDelete</EventEnum>
+        <DetailDesc>Wafer Delete Information</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>41</Id>
+        <Description>{0} load FOUP start.</Description>
+        <Level>Information</Level>
+        <EventEnum>LoadFOUPStart</EventEnum>
+        <DetailDesc>
+        </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>42</Id>
+        <Description>{0} load FOUP end.</Description>
+        <Level>Information</Level>
+        <EventEnum>LoadFOUPEnd</EventEnum>
+        <DetailDesc>
+        </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>43</Id>
+        <Description>{0} load FOUP Failed.</Description>
+        <Level>Alarm</Level>
+        <EventEnum>LoadFOUPFailed</EventEnum>
+        <DetailDesc>
+        </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>44</Id>
+        <Description>{0} unload FOUP start.</Description>
+        <Level>Information</Level>
+        <EventEnum>UnloadFOUPStart</EventEnum>
+        <DetailDesc>
+        </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>45</Id>
+        <Description>{0} unload Foup end.</Description>
+        <Level>Information</Level>
+        <EventEnum>UnloadFOUPEnd</EventEnum>
+        <DetailDesc>
+        </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>46</Id>
+        <Description>{0} unload Foup failed.</Description>
+        <Level>Alarm</Level>
+        <EventEnum>UnloadFOUPFailed</EventEnum>
+        <DetailDesc>
+        </DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>500</Id>
+	    <Description>"[{0}] routine, {1}"</Description>
+	    <Level>Information</Level>
+	    <EventEnum>RoutineNotify</EventEnum>
+	    <DetailDesc></DetailDesc>
+	    <Solution />
+    </EventDefinition>
+	<EventDefinition>
+		<Id>501</Id>
+		<Description>"[{0}] routine failed, {1}"</Description>
+		<Level>Alarm</Level>
+		<EventEnum>RoutineFailed</EventEnum>
+		<DetailDesc></DetailDesc>
+		<Solution />
+	</EventDefinition>
+    <!-- PM Event id: 1000 - 1999 -->
+    <EventDefinition>
+        <Id>1000</Id>
+        <Description>{0}</Description>
+        <Level>Information</Level>
+        <EventEnum>GeneralInfo</EventEnum>
+        <DetailDesc>默认事件类型(通用)</DetailDesc>
+        <Solution>1222</Solution>
+    </EventDefinition>
+    <EventDefinition>
+        <Id>1023</Id>
+        <Description>{0} '{1}' stopped,reason: {2}。</Description>
+        <Level>Information</Level>
+        <EventEnum>ServiceRoutineAborted</EventEnum>
+        <DetailDesc>where {0} is the chamber name, while {1} is the service name. When service routine is aborted, this event will be posted.</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>1033</Id>
+        <Description>{0} {1}:{2}。</Description>
+        <Level>Information</Level>
+        <EventEnum>ServiceRoutineInfo</EventEnum>
+        <DetailDesc>用于显示在服务程序运行过程中的信息显示,{0}反应腔名,{1}服务程序名,{2}当前动作名。</DetailDesc>
+        <Solution />
+    </EventDefinition>
+    <EventDefinition>
+        <Id>1040</Id>
+        <Description>{0} {1}。</Description>
+        <Level>Information</Level>
+        <EventEnum>GuiCmdExecSucc</EventEnum>
+        <DetailDesc>当收到用户界面命令,并成功执行时,发出该事件。{0}反应腔名,{1}命令解释。</DetailDesc>
+        <Solution />
   </EventDefinition>
   <EventDefinition>
     <Id>1052</Id>
@@ -233,7 +250,9 @@
     <DetailDesc>当发生软件互锁时,发出该警告信息。{0}反应腔名,{1}具体软件互锁原因。</DetailDesc>
     <Solution />
   </EventDefinition>
-  <!-- TM Warning -->
+    <!-- TM Event id: 2000 - 2999 -->
+	<!-- LoadLock Event id: 3000 - 3999 -->
+	<!-- EFEM Event id: 4000 - 4999 -->
   <EventDefinition>
     <Id>2052</Id>
     <Description>用户 {0} 无操控权,请先获取操控权</Description>
@@ -464,5 +483,16 @@
       Notify after mapped wafer.
     </Solution>
   </EventDefinition>
+
+	<EventDefinition>
+		<Id>5308</Id>
+		<Description>{0} wafer mapped, {1}</Description>
+		<Level>Information</Level>
+		<EventEnum>SlotMapAvailable_2</EventEnum>
+		<DetailDesc></DetailDesc>
+		<Solution>
+			Notify after mapped wafer.
+		</Solution>
+	</EventDefinition>
   
 </EventDefine>

+ 59 - 59
Venus/Venus_RT/Devices/SkyPump.cs

@@ -477,7 +477,7 @@ namespace Venus_RT.Devices
                     if (_trigPumpOn.Q && _timerPumpOn.IsTimeout())
                     {
                         _trigPumpOn.RST = true;
-                        EV.PostMessage(Module, EventEnum.DefaultWarning, "Dry Pump 无法打开");
+                        LOG.Write(eEvent.DefaultWarning, ModuleHelper.Converter(Module), "Dry Pump 无法打开");
                     }
                     if (_trigPumpOff.Q)
                     {
@@ -505,68 +505,68 @@ namespace Venus_RT.Devices
 
         public void ErrSta1(int error)
         {
-            switch (error)
-            {
-                //case 7:
-                //    LOG.Error($"[{Module}]上泵变频器除通讯外故障");
-                //    break;
-                //case 6:
-                //    LOG.Error($"[{Module}]下泵变频器除通讯外故障");
-                //    break;
-                //case 5:
-                //    LOG.Error($"[{Module}]上泵接触器");
-                //    break;
-                //case 4:
-                //    LOG.Error($"[{Module}]下泵接触器");
-                //    break;
-                //case 3:
-                //    LOG.Error($"[{Module}]上泵电机过热");
-                //    break;
-                //case 2:
-                //    LOG.Error($"[{Module}]下泵电机过热");
-                //    break;
-                //case 1:
-                //    LOG.Error($"[{Module}]急停");
-                //    break;
-                //case 0:
-                //    LOG.Error($"[{Module}]水冷");
-                //    break;
-                //default:
-                //    break;
-            }
+            //switch (error)
+            //{
+            //    //case 7:
+            //    //    LOG.Error($"[{Module}]上泵变频器除通讯外故障");
+            //    //    break;
+            //    //case 6:
+            //    //    LOG.Error($"[{Module}]下泵变频器除通讯外故障");
+            //    //    break;
+            //    //case 5:
+            //    //    LOG.Error($"[{Module}]上泵接触器");
+            //    //    break;
+            //    //case 4:
+            //    //    LOG.Error($"[{Module}]下泵接触器");
+            //    //    break;
+            //    //case 3:
+            //    //    LOG.Error($"[{Module}]上泵电机过热");
+            //    //    break;
+            //    //case 2:
+            //    //    LOG.Error($"[{Module}]下泵电机过热");
+            //    //    break;
+            //    //case 1:
+            //    //    LOG.Error($"[{Module}]急停");
+            //    //    break;
+            //    //case 0:
+            //    //    LOG.Error($"[{Module}]水冷");
+            //    //    break;
+            //    //default:
+            //    //    break;
+            //}
         }
 
         public void ErrSta2(int error)
         {
-            switch (error)
-            {
-                //case 7:
-                //    LOG.Error($"[{Module}]下泵变频器通讯故障");
-                //    break;
-                //case 6:
-                //    LOG.Error($"[{Module}]上泵变频器通讯故障");
-                //    break;
-                //case 5:
-                //    LOG.Error($"[{Module}]排气压力");
-                //    break;
-                //case 4:
-                //    LOG.Error($"[{Module}]氮气流量");
-                //    break;
-                //case 3:
-                //    LOG.Error($"[{Module}]下泵电流");
-                //    break;
-                //case 2:
-                //    LOG.Error($"[{Module}]上泵电流");
-                //    break;
-                //case 1:
-                //    LOG.Error($"[{Module}]下泵温度");
-                //    break;
-                //case 0:
-                //    LOG.Error($"[{Module}]上泵温度");
-                //    break;
-                //default:
-                //    break;
-            }
+            //switch (error)
+            //{
+            //    //case 7:
+            //    //    LOG.Error($"[{Module}]下泵变频器通讯故障");
+            //    //    break;
+            //    //case 6:
+            //    //    LOG.Error($"[{Module}]上泵变频器通讯故障");
+            //    //    break;
+            //    //case 5:
+            //    //    LOG.Error($"[{Module}]排气压力");
+            //    //    break;
+            //    //case 4:
+            //    //    LOG.Error($"[{Module}]氮气流量");
+            //    //    break;
+            //    //case 3:
+            //    //    LOG.Error($"[{Module}]下泵电流");
+            //    //    break;
+            //    //case 2:
+            //    //    LOG.Error($"[{Module}]上泵电流");
+            //    //    break;
+            //    //case 1:
+            //    //    LOG.Error($"[{Module}]下泵温度");
+            //    //    break;
+            //    //case 0:
+            //    //    LOG.Error($"[{Module}]上泵温度");
+            //    //    break;
+            //    //default:
+            //    //    break;
+            //}
         }
 
         public void ErrSta3(int error)

+ 1 - 1
Venus/Venus_RT/Instances/App.xaml.cs

@@ -16,7 +16,7 @@ namespace Venus_RT
     public partial class App : Application
     {
         protected override void OnStartup(StartupEventArgs e)
-        {
+    {
             base.OnStartup(e);
 
             RtApplication.Instance.Initialize(new RtInstance());

+ 79 - 2
Venus/Venus_RT/Venus_RT.csproj

@@ -29,6 +29,8 @@
     <IsWebBootstrapper>false</IsWebBootstrapper>
     <UseApplicationTrust>false</UseApplicationTrust>
     <BootstrapperEnabled>true</BootstrapperEnabled>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -60,13 +62,67 @@
     <Reference Include="FabConnect">
       <HintPath>..\ThirdParty\FabConnect.dll</HintPath>
     </Reference>
+    <Reference Include="FSharp.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\FSharp.Core.5.0.1\lib\netstandard2.0\FSharp.Core.dll</HintPath>
+    </Reference>
+    <Reference Include="FSharp.Data, Version=5.0.2.0, Culture=neutral, PublicKeyToken=49286adf818aa259, processorArchitecture=MSIL">
+      <HintPath>..\packages\FSharp.Data.5.0.2\lib\netstandard2.0\FSharp.Data.dll</HintPath>
+    </Reference>
+    <Reference Include="FSharp.Data.Npgsql.DesignTime, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <HintPath>..\packages\FSharp.Data.Npgsql.DesignTime.1.0.0\lib\net461\FSharp.Data.Npgsql.DesignTime.dll</HintPath>
+    </Reference>
     <Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\ThirdParty\log4net.dll</HintPath>
     </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.FileExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.Json, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.Json.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Configuration.UserSecrets, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.FileProviders.Abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.FileProviders.Physical, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.FileProviders.Physical.2.0.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.FileSystemGlobbing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.FileSystemGlobbing.2.0.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Primitives, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Extensions.Primitives.2.0.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
+    </Reference>
+    <Reference Include="Npgsql, Version=4.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
+      <HintPath>..\packages\Npgsql.4.0.3\lib\net451\Npgsql.dll</HintPath>
+    </Reference>
+    <Reference Include="Npgsql.LegacyPostgis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
+      <HintPath>..\packages\Npgsql.LegacyPostgis.1.0.0\lib\net45\Npgsql.LegacyPostgis.dll</HintPath>
+    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Data" />
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.0\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
     <Reference Include="System.Xml" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Core" />
@@ -99,6 +155,9 @@
     <Compile Include="Devices\EdwardsPump.cs" />
     <Compile Include="Devices\ESC5HighVoltage.cs" />
     <Compile Include="Devices\FinsPlc.cs" />
+    <Compile Include="Devices\IODevices\IoCylinder.cs" />
+    <Compile Include="Devices\IODevices\IoLid.cs" />
+    <Compile Include="Devices\JetPM.cs" />
     <Compile Include="Devices\KashiyamaPump.cs" />
     <Compile Include="Devices\PendulumValve.cs" />
     <Compile Include="Devices\PlasmaController.cs" />
@@ -121,9 +180,11 @@
     <Compile Include="Instances\RtInstance.cs" />
     <Compile Include="Instances\ToolLoader.cs" />
     <Compile Include="Modules\PMs\PMEntity.cs" />
+    <Compile Include="Modules\PMs\PMRoutineBase.cs" />
     <Compile Include="Modules\PMs\Recipe.cs" />
-    <Compile Include="Modules\PMs\VirgoRecipeFileContext.cs" />
-    <Compile Include="Modules\PMs\VirgoSequenceFileContext.cs" />
+    <Compile Include="Modules\PMs\VentRoutine.cs" />
+    <Compile Include="Modules\PMs\VenusRecipeFileContext.cs" />
+    <Compile Include="Modules\PMs\VenusSequenceFileContext.cs" />
     <Compile Include="Modules\RouteManager.cs" />
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
@@ -170,6 +231,7 @@
     <Content Include="Config\LogDefine.json">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -235,6 +297,9 @@
     <Content Include="Config\SequenceFormat.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
+    <Content Include="Config\VenusPreProcess.py">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
     <Content Include="Config\_ioDefineVenus.xml">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Content>
@@ -252,5 +317,17 @@
       <Install>false</Install>
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>python.exe  ../../Config/VenusPreProcess.py
+</PreBuildEvent>
+  </PropertyGroup>
+  <Import Project="..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.0.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets" Condition="Exists('..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.0.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.0.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.0.0\build\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.targets'))" />
+  </Target>
 </Project>

+ 4 - 0
Venus/Venus_Simulator/Venus_Simulator.csproj

@@ -39,6 +39,10 @@
     <Reference Include="log4net">
       <HintPath>..\ThirdParty\log4net.dll</HintPath>
     </Reference>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\ThirdParty\Newtonsoft.Json.dll</HintPath>
+    </Reference>
     <Reference Include="OpenSEMI.Ctrlib">
       <HintPath>..\ThirdParty\OpenSEMI.Ctrlib.dll</HintPath>
     </Reference>