大更新

This commit is contained in:
13118993771@163.com 2022-12-16 13:01:24 +08:00
parent b593a243a5
commit eb23e102b4
1279 changed files with 29652 additions and 1097632 deletions

View File

@ -115,7 +115,7 @@
<section name="rewriteMaps" overrideModeDefault="Allow" /> <section name="rewriteMaps" overrideModeDefault="Allow" />
</sectionGroup> </sectionGroup>
<section name="webSocket" overrideModeDefault="Deny" /> <section name="webSocket" overrideModeDefault="Deny" />
<section name="aspNetCore" overrideModeDefault="Allow" /></sectionGroup> </sectionGroup>
</configSections> </configSections>
<configProtectedData> <configProtectedData>
<providers> <providers>
@ -229,7 +229,6 @@
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" /> <add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" /> <add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" /> <add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" />
<add name="AspNetCoreModuleV2" image="%IIS_BIN%\Asp.Net Core Module\V2\aspnetcorev2.dll" />
</globalModules> </globalModules>
<httpCompression directory="%TEMP%"> <httpCompression directory="%TEMP%">
<scheme name="gzip" dll="%IIS_BIN%\gzip.dll" /> <scheme name="gzip" dll="%IIS_BIN%\gzip.dll" />
@ -239,6 +238,7 @@
<add mimeType="application/x-javascript" enabled="true" /> <add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/javascript" enabled="true" /> <add mimeType="application/javascript" enabled="true" />
<add mimeType="*/*" enabled="false" /> <add mimeType="*/*" enabled="false" />
<add mimeType="text/event-stream" enabled="false" />
</dynamicTypes> </dynamicTypes>
<staticTypes> <staticTypes>
<add mimeType="text/*" enabled="true" /> <add mimeType="text/*" enabled="true" />
@ -779,7 +779,6 @@
<add name="Rewrite" value="1024" /> <add name="Rewrite" value="1024" />
<add name="FastCGI" value="4096" /> <add name="FastCGI" value="4096" />
<add name="WebSocket" value="16384" /> <add name="WebSocket" value="16384" />
<add name="ANCM" value="65536" />
</areas> </areas>
</add> </add>
<add name="ASP" guid="{06b94d9a-b15e-456e-a4ef-37c984a2cb4b}"> <add name="ASP" guid="{06b94d9a-b15e-456e-a4ef-37c984a2cb4b}">
@ -870,7 +869,6 @@
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" /> <add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" />
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" /> <add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" />
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" /> <add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" />
<add name="AspNetCoreModuleV2" lockItem="true" />
</modules> </modules>
<handlers accessPolicy="Read, Script"> <handlers accessPolicy="Read, Script">
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> --> <!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> -->

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
{
"CurrentProjectSetting": null
}

View File

@ -1,7 +0,0 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\ARI.EAP.HOST.sln",
"PreviewInSolutionExplorer": false
}

Binary file not shown.

View File

@ -47,11 +47,11 @@
</Reference> </Reference>
<Reference Include="Glorysoft.SECSwell, Version=4.0.1.17, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Glorysoft.SECSwell, Version=4.0.1.17, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>CommonDll\net45\net45\Glorysoft.SECSwell.dll</HintPath> <HintPath>CommonDll\Glorysoft.SECSwell.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=1.2.13.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>.\log4net.dll</HintPath> <HintPath>CommonDll\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@ -82,6 +82,9 @@
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath> <HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Ports, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.IO.Ports.5.0.0\lib\net461\System.IO.Ports.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath> <HintPath>packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
</Reference> </Reference>
@ -142,6 +145,7 @@
<Compile Include="Common\EquipmentStatus.cs" /> <Compile Include="Common\EquipmentStatus.cs" />
<Compile Include="Common\IEventHandler.cs" /> <Compile Include="Common\IEventHandler.cs" />
<Compile Include="Common\MESHeartBit.cs" /> <Compile Include="Common\MESHeartBit.cs" />
<Compile Include="Common\S1F1HeartBit.cs" />
<Compile Include="Common\SocketClient.cs" /> <Compile Include="Common\SocketClient.cs" />
<Compile Include="Handlers\EventHandlers\AlarmClearedHandler.cs" /> <Compile Include="Handlers\EventHandlers\AlarmClearedHandler.cs" />
<Compile Include="Handlers\EventHandlers\ContainerRemoveHandler.cs" /> <Compile Include="Handlers\EventHandlers\ContainerRemoveHandler.cs" />
@ -329,7 +333,9 @@
<None Include="Configuration\appsettings.json"> <None Include="Configuration\appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="GlorysoftAutoKey.lic" /> <None Include="GlorysoftAutoKey.lic">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
@ -345,7 +351,7 @@
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Configuration\ACOAT_01.xml"> <Content Include="Configuration\MARK_01.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Configuration\SECSLibrary.xml"> <Content Include="Configuration\SECSLibrary.xml">
@ -355,7 +361,6 @@
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Connected Services\" /> <WCFMetadata Include="Connected Services\" />
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions /> <ProjectExtensions />
</Project> </Project>

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.30804.86 VisualStudioVersion = 17.3.32922.545
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARI.EAP.HOST", "ARI.EAP.HOST.csproj", "{1A07C34C-AF0C-4C0F-8663-26CE71A2DF50}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ARI.EAP.HOST", "ARI.EAP.HOST.csproj", "{1A07C34C-AF0C-4C0F-8663-26CE71A2DF50}"
EndProject EndProject

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>
@ -11,4 +14,178 @@
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<log4net>
<root>
</root>
<logger name="SYSLogger">
<level value="ALL" />
<appender-ref ref="SYSLoggerDebug" />
<appender-ref ref="SYSLoggerInfo" />
<appender-ref ref="SYSLoggerError" />
</logger>
<logger name="SECSLogger">
<level value="ALL" />
<appender-ref ref="SECSLoggerDebug" />
<appender-ref ref="SECSLoggerInfo" />
<appender-ref ref="SECSLoggerError" />
</logger>
<logger name="MQLogger">
<level value="ALL" />
<appender-ref ref="MQLoggerDebug" />
<appender-ref ref="MQLoggerInfo" />
<appender-ref ref="MQLoggerError" />
</logger>
<appender name="SYSLoggerDebug" type="log4net.Appender.RollingFileAppender">
<!--定义文件存放位置-->
<param name="File" value="logs/SYSTEM/DEBUG/"/>
<!--是否追加到文件-->
<param name="AppendToFile" value="true"/>
<!--最多产生的日志文件数超过则只保留最新的n个。设定值value="1"为不限文件数-->
<param name="MaxSizeRollBackups" value="-1"/>
<!--是否只写到一个文件中-->
<param name="StaticLogFileName" value="false"/>
<!--按日期划分文件夹和命名文件名-->
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<!--按照何种方式产生多个日志文件(日期[Date],文件大小[Size],混合[Composite])-->
<param name="RollingStyle" value="Date"/>
<!--输出格式-样例-->
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<!--记录日志写入文件时不锁定文本文件防止多线程时不能写Log,官方说线程非安全-->
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="Debug" />
<param name="LevelMax" value="Debug" />
</filter>
</appender>
<appender name="SYSLoggerError" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/SYSTEM/ERROR/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="SYSLoggerInfo" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/SYSTEM/INFO/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
<appender name="SECSLoggerDebug" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/SECS/DEBUG/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="Debug" />
<param name="LevelMax" value="Debug" />
</filter>
</appender>
<appender name="SECSLoggerError" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/SECS/ERROR/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="SECSLoggerInfo" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/SECS/INFO/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
<appender name="MQLoggerDebug" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/MQ/DEBUG/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="Debug" />
<param name="LevelMax" value="Debug" />
</filter>
</appender>
<appender name="MQLoggerError" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/MQ/ERROR/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<appender name="MQLoggerInfo" type="log4net.Appender.RollingFileAppender">
<param name="File" value="logs/MQ/INFO/"/>
<param name="AppendToFile" value="true"/>
<param name="MaxSizeRollBackups" value="-1"/>
<param name="StaticLogFileName" value="false"/>
<param name="DatePattern" value="yyyy-MM/yyyyMMdd&quot;.txt&quot;"/>
<param name="RollingStyle" value="Date"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date: %message%newline %n" />
</layout>
<lockingmodel type="log4net.appender.fileappender+minimallock" />
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender>
</log4net>
</configuration> </configuration>

View File

@ -8,6 +8,9 @@
// + 创建 Command.S1F1.cs 文件. by Michael @2019/11/8 0:08 // + 创建 Command.S1F1.cs 文件. by Michael @2019/11/8 0:08
// ******************************************************************************** // ********************************************************************************
using ARI.EAP.HOST;
using Glorysoft.SECS.EQP.Utilities;
namespace Glorysoft.SECS.EQP.Commands namespace Glorysoft.SECS.EQP.Commands
{ {
public static partial class Command public static partial class Command
@ -17,6 +20,8 @@ namespace Glorysoft.SECS.EQP.Commands
var trans = SimulatorInfo.Instance.Context.GetTransaction(1, 1, "S1F1"); var trans = SimulatorInfo.Instance.Context.GetTransaction(1, 1, "S1F1");
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans); SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary);
} }
} }
} }

View File

@ -21,7 +21,7 @@ namespace Glorysoft.SECS.EQP.Commands
var trans = SimulatorInfo.Instance.Context?.GetTransaction(1, 13, "S1F13"); var trans = SimulatorInfo.Instance.Context?.GetTransaction(1, 13, "S1F13");
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans); SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description,"=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans); SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans); SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -26,10 +26,10 @@ namespace Glorysoft.SECS.EQP.Commands
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected) if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
{ {
var trans = SimulatorInfo.Instance.Context.GetTransaction(1, 3, "S1F3"); var trans = SimulatorInfo.Instance.Context.GetTransaction(1, 3, "S1F3");
var content = Configuration.conf.commandContentCollection.findContent("S1F3").content; var content = Configurations.conf.commandContentCollection.findContent("S1F3").content;
foreach(string value in content) foreach(string value in content)
{ {
var sv = Configuration.conf.sRDConfiguration.findSV(value); var sv = Configurations.conf.sRDConfiguration.findSV(value);
if (sv != null) if (sv != null)
{ {
trans.Primary.Root.Add(SECSUtil.CreateSECSItem(value, eSECS_FORMAT.U4, sv.svid)); trans.Primary.Root.Add(SECSUtil.CreateSECSItem(value, eSECS_FORMAT.U4, sv.svid));
@ -37,7 +37,7 @@ namespace Glorysoft.SECS.EQP.Commands
} }
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -24,12 +24,12 @@ namespace Glorysoft.SECS.EQP.Commands
if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected) if (SimulatorInfo.Instance.Context != null && SimulatorInfo.Instance.Context.IsConnected)
{ {
var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 13, "S2F13"); var trans = SimulatorInfo.Instance.Context.GetTransaction(2, 13, "S2F13");
foreach(var ec in Configuration.conf.sRDConfiguration.ecvs) foreach(var ec in Configurations.conf.sRDConfiguration.ecvs)
{ {
trans.Primary.Root.Add(SECSUtil.CreateSECSItem(ec.name, eSECS_FORMAT.U4, ec.ecid)); trans.Primary.Root.Add(SECSUtil.CreateSECSItem(ec.name, eSECS_FORMAT.U4, ec.ecid));
} }
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);

View File

@ -35,17 +35,17 @@ namespace Glorysoft.SECS.EQP.Commands
ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECID), eSECS_FORMAT.U4, item.ECID)); ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECID), eSECS_FORMAT.U4, item.ECID));
ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECV), eSECS_FORMAT.U1, item.ECV)); ec.Add(SECSUtil.CreateSECSItem(nameof(item.ECV), eSECS_FORMAT.U1, item.ECV));
trans.Primary.Root.Add(ec); trans.Primary.Root.Add(ec);
eCChangeBody.ECList.Add($"{item.ECID}({Configuration.conf.sRDConfiguration.findEC(item.ECID)})", item.ECV.ToString()); eCChangeBody.ECList.Add($"{item.ECID}({Configurations.conf.sRDConfiguration.findEC(item.ECID)})", item.ECV.ToString());
} }
tag = eCChangeBody; tag = eCChangeBody;
} }
else else
{ {
var content = Configuration.conf.commandContentCollection.findContent("S2F15_ControlState").content; var content = Configurations.conf.commandContentCollection.findContent("S2F15_ControlState").content;
foreach (string value in content) foreach (string value in content)
{ {
var ec = SECSUtil.CreateSECSItem(nameof(items.ECs), eSECS_FORMAT.LIST); var ec = SECSUtil.CreateSECSItem(nameof(items.ECs), eSECS_FORMAT.LIST);
var ecv = Configuration.conf.sRDConfiguration.findEC(value); var ecv = Configurations.conf.sRDConfiguration.findEC(value);
ec.Add(SECSUtil.CreateSECSItem(value, eSECS_FORMAT.U4, ecv.ecid)); ec.Add(SECSUtil.CreateSECSItem(value, eSECS_FORMAT.U4, ecv.ecid));
trans.Primary.Root.Add(ec); trans.Primary.Root.Add(ec);
} }
@ -54,7 +54,7 @@ namespace Glorysoft.SECS.EQP.Commands
} }
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -39,7 +39,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
catch (Exception e) catch (Exception e)

View File

@ -45,14 +45,14 @@ namespace Glorysoft.SECS.EQP.Commands
} }
else else
{ {
foreach (var even in Configuration.conf.sRDConfiguration.events) foreach (var even in Configurations.conf.sRDConfiguration.events)
{ {
var rpt = SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.LIST); var rpt = SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.LIST);
rpt.Add(SECSUtil.CreateSECSItem(nameof(even.reportid), eSECS_FORMAT.U4, even.reportid)); rpt.Add(SECSUtil.CreateSECSItem(nameof(even.reportid), eSECS_FORMAT.U4, even.reportid));
rpt.Add(SECSUtil.CreateSECSItem("SVList", eSECS_FORMAT.LIST)); rpt.Add(SECSUtil.CreateSECSItem("SVList", eSECS_FORMAT.LIST));
foreach(var id in even.validVariables) foreach(var id in even.validVariables)
{ {
rpt.Item(2).Add(SECSUtil.CreateSECSItem(Configuration.conf.sRDConfiguration.tryGetSVOrDV(id), eSECS_FORMAT.U4, id)); rpt.Item(2).Add(SECSUtil.CreateSECSItem(Configurations.conf.sRDConfiguration.tryGetSVOrDV(id), eSECS_FORMAT.U4, id));
} }
trans.Primary.Root.Item(2).Add(rpt); trans.Primary.Root.Item(2).Add(rpt);
} }
@ -61,9 +61,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
if (!EquipmentStatus.initStatus) if (!EquipmentStatus.initStatus)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Delete Reports", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Delete Reports", 0);
else else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Define Reports", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Define Reports", 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -44,7 +44,7 @@ namespace Glorysoft.SECS.EQP.Commands
} }
else else
{ {
foreach(var even in Configuration.conf.sRDConfiguration.events) foreach(var even in Configurations.conf.sRDConfiguration.events)
{ {
var evt = SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.LIST); var evt = SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.LIST);
evt.Add(SECSUtil.CreateSECSItem("CEID", eSECS_FORMAT.U4, even.ceid)); evt.Add(SECSUtil.CreateSECSItem("CEID", eSECS_FORMAT.U4, even.ceid));
@ -57,9 +57,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
if (!EquipmentStatus.initStatus) if (!EquipmentStatus.initStatus)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Delete Link Report", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Delete Link Report", 0);
else else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Define Link Report", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Define Link Report", 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -39,14 +39,14 @@ namespace Glorysoft.SECS.EQP.Commands
} }
else else
{ {
foreach (var even in Configuration.conf.sRDConfiguration.events) foreach (var even in Configurations.conf.sRDConfiguration.events)
{ {
trans.Primary.Root.Item(2).Add(SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.U4, even.ceid)); trans.Primary.Root.Item(2).Add(SECSUtil.CreateSECSItem(even.name, eSECS_FORMAT.U4, even.ceid));
} }
} }
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -41,9 +41,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
if (sc.CurrentStep == 10) if (sc.CurrentStep == 10)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Reset Spooling", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Reset Spooling", 0);
else else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Set Spooling", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Set Spooling", 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -34,9 +34,9 @@ namespace Glorysoft.SECS.EQP.Commands
param.Add(SECSUtil.CreateSECSItem(nameof(item.ParanName), eSECS_FORMAT.ASCII, item.ParanVal)); param.Add(SECSUtil.CreateSECSItem(nameof(item.ParanName), eSECS_FORMAT.ASCII, item.ParanVal));
trans.Primary.Root.Item(4).Add(param); trans.Primary.Root.Item(4).Add(param);
} }
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -29,9 +29,9 @@ namespace Glorysoft.SECS.EQP.Commands
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
if (items.ALED == 0) if (items.ALED == 0)
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Alarm Disable", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Alarm Disable", 0);
else else
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, "Alarm Enable", "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, "Alarm Enable", 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -24,7 +24,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans); SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
catch(Exception e) catch(Exception e)

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Commands
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context?.SendMessage(trans); SimulatorInfo.Instance.Context?.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
} }

View File

@ -24,7 +24,7 @@ namespace Glorysoft.SECS.EQP.Commands
var trans = SimulatorInfo.Instance.Context.GetTransaction(7, 19, "S7F19"); var trans = SimulatorInfo.Instance.Context.GetTransaction(7, 19, "S7F19");
trans.Tag = tag; trans.Tag = tag;
SimulatorInfo.Instance.Context.SendMessage(trans); SimulatorInfo.Instance.Context.SendMessage(trans);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Send, trans.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
} }
catch(Exception e) catch(Exception e)

View File

@ -30,19 +30,21 @@ namespace ARI.EAP.HOST.SRD
/// xml配置文件的实体类 /// xml配置文件的实体类
/// </summary> /// </summary>
[Serializable] [Serializable]
public class Configuration public class Configurations
{ {
[XmlIgnore] [XmlIgnore]
public static Configuration conf { get; set; } public static Configurations conf { get; set; }
public ConnectSetting connectSetting { get; set; } public ConnectSetting connectSetting { get; set; }
public EAPMonitorSetting eapMonitorSetting { get; set; }
public MQConnectionCfg mQConnectionCfg { get; set; } public MQConnectionCfg mQConnectionCfg { get; set; }
public HttpConfiguration httpConfiguration { get; set; } public HttpConfiguration httpConfiguration { get; set; }
public ScenarioCollection scenarioCollection { get; set; } public ScenarioCollection scenarioCollection { get; set; }
public CommandContentCollection commandContentCollection { get; set; } public CommandContentCollection commandContentCollection { get; set; }
public SRDConfiguration sRDConfiguration { get; set; } public SRDConfiguration sRDConfiguration { get; set; }
public Configuration() public Configurations()
{ {
connectSetting = new ConnectSetting(); connectSetting = new ConnectSetting();
eapMonitorSetting = new EAPMonitorSetting();
mQConnectionCfg = new MQConnectionCfg(); mQConnectionCfg = new MQConnectionCfg();
httpConfiguration = new HttpConfiguration(); httpConfiguration = new HttpConfiguration();
scenarioCollection = new ScenarioCollection(); scenarioCollection = new ScenarioCollection();
@ -64,6 +66,15 @@ namespace ARI.EAP.HOST.SRD
public string remotePort { get; set; } public string remotePort { get; set; }
} }
[Serializable]
public class EAPMonitorSetting
{
[XmlAttribute]
public string IPAddress { get; set; }
[XmlAttribute]
public string Port { get; set; }
}
[Serializable] [Serializable]
public class HttpConfiguration public class HttpConfiguration
{ {

View File

@ -30,7 +30,7 @@ namespace ARI.EAP.HOST.Common
/// </summary> /// </summary>
public static class Constants public static class Constants
{ {
public const string equipmentName = "ACOAT_01"; public const string equipmentName = "MARK_01";
public const string configuerPath = "Configuration/" + equipmentName + ".xml"; public const string configuerPath = "Configuration/" + equipmentName + ".xml";
} }

View File

@ -11,6 +11,7 @@ namespace ARI.EAP.HOST.Common
public static class EquipmentStatus public static class EquipmentStatus
{ {
public static string S5F3 { get; set; } = "AlarmEnable"; public static string S5F3 { get; set; } = "AlarmEnable";
public static bool S1F1FuntionStatus { get; set; } = false;
public static ushort SpoolingFlag { get; set; } = 0; public static ushort SpoolingFlag { get; set; } = 0;
public static Dictionary<string, IEventHandler> EventHandlers { get; set; } public static Dictionary<string, IEventHandler> EventHandlers { get; set; }
public static ushort commandCount { get; set; } = 0; public static ushort commandCount { get; set; } = 0;
@ -18,6 +19,10 @@ namespace ARI.EAP.HOST.Common
public static MESHeartBit mESHeartBit; public static MESHeartBit mESHeartBit;
public static SocketClient socketClient;
public static S1F1HeartBit S1F1HeartBit;
private static string _MQstate = ConnectState.disconnected; private static string _MQstate = ConnectState.disconnected;
private static string _EqConnectState = ConnectState.disconnected; private static string _EqConnectState = ConnectState.disconnected;
@ -68,6 +73,8 @@ namespace ARI.EAP.HOST.Common
static EquipmentStatus() static EquipmentStatus()
{ {
mESHeartBit = new MESHeartBit(); mESHeartBit = new MESHeartBit();
socketClient = new SocketClient();
S1F1HeartBit = new S1F1HeartBit();
EventHandlers = new Dictionary<string, IEventHandler>(); EventHandlers = new Dictionary<string, IEventHandler>();
foreach (Type item in MethodBase.GetCurrentMethod().DeclaringType.Assembly.GetTypes()) foreach (Type item in MethodBase.GetCurrentMethod().DeclaringType.Assembly.GetTypes())
{ {

View File

@ -28,31 +28,33 @@ namespace ARI.EAP.HOST.Common
{ {
/// <summary> /// <summary>
/// MESHeartBit 的摘要说明 /// MESHeartBit 的摘要说明
/// 提供与MES的连接心跳 /// 提供与MES的连接心跳和monitor的心跳
/// </summary> /// </summary>
public class MESHeartBit public class MESHeartBit
{ {
private Timer timer; private Timer timer1;
private string url = Configuration.conf.httpConfiguration.heartBitUrl; private string url = Configurations.conf.httpConfiguration.heartBitUrl;
public MESHeartBit() public MESHeartBit()
{ {
timer = new Timer(60000); timer1 = new Timer(60000);
timer.Elapsed += new ElapsedEventHandler(Method); timer1.Elapsed += new ElapsedEventHandler(Method);
timer.AutoReset = true; timer1.AutoReset = true;
timer.Enabled = true; timer1.Enabled = true;
} }
public void Method(object source, ElapsedEventArgs e) public void Method(object source, ElapsedEventArgs e)
{ {
string httpContent = SECSUtil.ToJson<MESHeartBitParam>(new MESHeartBitParam()); string httpContent = SECSUtil.ToJson<MESHeartBitParam>(new MESHeartBitParam());
HttpUtils.sentPOST(url,httpContent); HttpUtils.sentPOST(url,httpContent);
EquipmentStatus.socketClient.SendMessage(httpContent);
} }
public void Method() public void Method()
{ {
string httpContent = SECSUtil.ToJson<MESHeartBitParam>(new MESHeartBitParam()); string httpContent = SECSUtil.ToJson<MESHeartBitParam>(new MESHeartBitParam());
HttpUtils.sentPOST(url, httpContent); HttpUtils.sentPOST(url, httpContent);
EquipmentStatus.socketClient.SendMessage(httpContent);
} }
} }
@ -69,10 +71,10 @@ namespace ARI.EAP.HOST.Common
public MESHeartBitParam() public MESHeartBitParam()
{ {
this.deviceId = Configuration.conf.connectSetting.deviceId; this.deviceId = Configurations.conf.connectSetting.deviceId;
this.equipmentName = Configuration.conf.connectSetting.name; this.equipmentName = Configurations.conf.connectSetting.name;
this.ip = Configuration.conf.connectSetting.remoteIp; this.ip = Configurations.conf.connectSetting.remoteIp;
this.port = Configuration.conf.connectSetting.remotePort; this.port = Configurations.conf.connectSetting.remotePort;
this.connectStatus = EquipmentStatus.EqConnectState; this.connectStatus = EquipmentStatus.EqConnectState;
this.mqStatus = EquipmentStatus.MQstate; this.mqStatus = EquipmentStatus.MQstate;
this.eapStatus = EquipmentStatus.EapState.ToString(); this.eapStatus = EquipmentStatus.EapState.ToString();

49
Common/S1F1HeartBit.cs Normal file
View File

@ -0,0 +1,49 @@
using Glorysoft.SECS.EQP.Commands;
using Glorysoft.SECS.EQP.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
namespace ARI.EAP.HOST.Common
{
public class S1F1HeartBit
{
public Timer timer1;
public Timer timer2;
public S1F1HeartBit()
{
timer1 = new Timer(60000);
timer1.Elapsed += new ElapsedEventHandler(Method);
timer1.AutoReset = true;
timer1.Enabled = true;
timer2 = new Timer(30000);
timer2.Elapsed += new ElapsedEventHandler(Method1);
timer2.AutoReset = false;
timer2.Enabled = false;
}
public void Method(object source, ElapsedEventArgs e)
{
if (EquipmentStatus.S1F1FuntionStatus)
{
if (EquipmentStatus.EqConnectState.Equals(ConnectState.connected))
{
Command.S1F1Command(null);
timer2.Stop();
timer2.Start();
}
}
}
public void Method1(object source, ElapsedEventArgs e)
{
LoggerService.SYSLogger.Debug("未收到S1F2回复判断设备与EAP已断连开始重连...");
EquipmentStatus.EqConnectState = ConnectState.connecting;
Global.MF.pushBotton("Connect");
}
}
}

View File

@ -117,6 +117,8 @@ namespace Glorysoft.SECS.EQP.Common
} }
if (Handlers.ContainsKey(msgName)) if (Handlers.ContainsKey(msgName))
{ {
EquipmentStatus.S1F1HeartBit.timer1.Stop();
EquipmentStatus.S1F1HeartBit.timer1.Start();
Task.Run(() => Handlers[msgName].Execute(this, trans, err, errmsg)); Task.Run(() => Handlers[msgName].Execute(this, trans, err, errmsg));
} }
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,24 +1,25 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Configurations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<connectSetting name="ACOAT_01" deviceId="0" remoteIp="192.168.2.100" remotePort="5000" /> <connectSetting name="MARK_01" deviceId="0" remoteIp="127.0.0.1" remotePort="6000" />
<mQConnectionCfg HostName="mq.picaiba.com" VirtualHost="cigs" UserName="ypfqF66wKskKfpkpJdEmfrCMBVpAP98y" Password="g4NtT55HHzXECDig2BWLvtkZRfD8oiMT" Port="5672" ClientProvidedName="ACOAT_01"> <eapMonitorSetting IPAddress="127.0.0.1" Port="10086" />
<Exchange>ACOAT_01_Exchange</Exchange> <mQConnectionCfg HostName="172.16.21.191" VirtualHost="cdte" UserName="cdte" Password="cdte" Port="5672" ClientProvidedName="MARK_01">
<Exchange>MARK_01_Exchange</Exchange>
<Exchange_RTDB>cdte</Exchange_RTDB> <Exchange_RTDB>cdte</Exchange_RTDB>
<EAP_Request_Queue>ACOAT_01_EAP_Request_Queue</EAP_Request_Queue> <EAP_Request_Queue>MARK_01_EAP_Request_Queue</EAP_Request_Queue>
<EAP_Response_Queue>ACOAT_01_EAP_Response_Queue</EAP_Response_Queue> <EAP_Response_Queue>MARK_01_EAP_Response_Queue</EAP_Response_Queue>
<MES_Request_Queue>ACOAT_01_MES_Request_Queue</MES_Request_Queue> <MES_Request_Queue>MARK_01_MES_Request_Queue</MES_Request_Queue>
<MES_Response_Queue>ACOAT_01_MES_Response_Queue</MES_Response_Queue> <MES_Response_Queue>MARK_01_MES_Response_Queue</MES_Response_Queue>
<EAP_Request_Queue_RTDB>logs</EAP_Request_Queue_RTDB> <EAP_Request_Queue_RTDB>logs</EAP_Request_Queue_RTDB>
<EAP_Request_Queue_RoutingKey>ACOAT_01_EAP_Request_Queue_RoutingKey</EAP_Request_Queue_RoutingKey> <EAP_Request_Queue_RoutingKey>MARK_01_EAP_Request_Queue_RoutingKey</EAP_Request_Queue_RoutingKey>
<EAP_Response_Queue_RoutingKey>ACOAT_01_EAP_Response_Queue_RoutingKey</EAP_Response_Queue_RoutingKey> <EAP_Response_Queue_RoutingKey>MARK_01_EAP_Response_Queue_RoutingKey</EAP_Response_Queue_RoutingKey>
<MES_Request_Queue_RoutingKey>ACOAT_01_MES_Request_Queue_RoutingKey</MES_Request_Queue_RoutingKey> <MES_Request_Queue_RoutingKey>MARK_01_MES_Request_Queue_RoutingKey</MES_Request_Queue_RoutingKey>
<MES_Response_Queue_RoutingKey>ACOAT_01_MES_Response_Queue_RoutingKey</MES_Response_Queue_RoutingKey> <MES_Response_Queue_RoutingKey>MARK_01_MES_Response_Queue_RoutingKey</MES_Response_Queue_RoutingKey>
<Exchange_Name_Dle>Dead_Letter_Exchange</Exchange_Name_Dle> <Exchange_Name_Dle>Dead_Letter_Exchange</Exchange_Name_Dle>
<Dead_Letter_RoutingKey>Dead_Letter_RoutingKey</Dead_Letter_RoutingKey> <Dead_Letter_RoutingKey>Dead_Letter_RoutingKey</Dead_Letter_RoutingKey>
</mQConnectionCfg> </mQConnectionCfg>
<httpConfiguration> <httpConfiguration>
<heartBitUrl>http://localhost:8080/api/mq/EquipmentInterfaceStatus/update</heartBitUrl> <heartBitUrl>http://172.16.21.112:8080/api/mq/EquipmentInterfaceStatus/update</heartBitUrl>
<fileDownloadUrl>http://zzdhg.mes.picaiba.com/api/common/attachment/downloadFile</fileDownloadUrl> <fileDownloadUrl>http://172.16.21.190/api/common/attachment/downloadFile</fileDownloadUrl>
<contentType>application/json</contentType> <contentType>application/json</contentType>
</httpConfiguration> </httpConfiguration>
<scenarioCollection> <scenarioCollection>
@ -761,4 +762,4 @@
</EVENT>--> </EVENT>-->
</events> </events>
</sRDConfiguration> </sRDConfiguration>
</Configuration> </Configurations>

View File

@ -134,7 +134,7 @@
</SECSMessage> </SECSMessage>
<SECSMessage name="S1F13"> <SECSMessage name="S1F13">
<MessageName>S1F13</MessageName> <MessageName>S1F13</MessageName>
<Description>On Line Data</Description> <Description>Establish Eommunication</Description>
<Stream>1</Stream> <Stream>1</Stream>
<Function>13</Function> <Function>13</Function>
<Direction>H&lt;-&gt;E</Direction> <Direction>H&lt;-&gt;E</Direction>
@ -148,7 +148,7 @@
</SECSMessage> </SECSMessage>
<SECSMessage name="S1F14"> <SECSMessage name="S1F14">
<MessageName>S1F14</MessageName> <MessageName>S1F14</MessageName>
<Description>Selected Equipment Status Request</Description> <Description>Establish Eommunication</Description>
<Stream>1</Stream> <Stream>1</Stream>
<Function>14</Function> <Function>14</Function>
<Direction>H-&gt;E</Direction> <Direction>H-&gt;E</Direction>

View File

@ -1 +1 @@
TO+NmEh20RU6Ajz1aKvAI++0BcxLzgN9PCZiBq5BWr4=7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axVisMoeV6fWgW8nO6Pvj7/qxhXo7+WqY437Vh/JY7RzE7xryHPgf1jnA+kSamMxSF4Z7TFcJJid7XHOd7CbEYpQ==gP+R7YuG8BLDSHGlgWVkVwztLcDeJjg81Xj/dg+rAwoQt43JGaWAIqXUEovEij2+ET+D3bLsTWOVIykjpDQ5kw==7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axBxrTOY1NpjfdRCaMFpTucE/xZ/+6ZupOvyLO27MeQck=7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axDD0WlCHYT2B2bS0O3qUOew==7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axDD0WlCHYT2B2bS0O3qUOew== aY6xTaNTXtMDxysesLOJKoi/9Sfk75KgQU3rwWKixFE=7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axVisMoeV6fWgW8nO6Pvj7/qxhXo7+WqY437Vh/JY7RzE7xryHPgf1jnA+kSamMxSF4Z7TFcJJid7XHOd7CbEYpQ==gP+R7YuG8BLDSHGlgWVkVwztLcDeJjg81Xj/dg+rAwoQt43JGaWAIqXUEovEij2+ET+D3bLsTWOVIykjpDQ5kw==7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axe4lyXKTWbeSKliHfU3B612ygAUdFvG9c5SbkquYk/aM=7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axDD0WlCHYT2B2bS0O3qUOew==7PnRh6qVjxRu8KbvF5hoOYoDBDPNZt6tsUTXe7b+ySrTkD0duBtqiwhYVRFqC2axDD0WlCHYT2B2bS0O3qUOew==

View File

@ -46,7 +46,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("AlarmID"): case ("AlarmID"):
@ -79,9 +79,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = alarmReportBody; mQMessage.body = alarmReportBody;

View File

@ -46,7 +46,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("AlarmID"): case ("AlarmID"):
@ -79,9 +79,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = alarmReportBody; mQMessage.body = alarmReportBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -73,9 +73,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = containerPlaceBody; mQMessage.body = containerPlaceBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -73,9 +73,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = containerPlaceBody; mQMessage.body = containerPlaceBody;

View File

@ -43,7 +43,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -70,9 +70,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = controlStateChangeBody; mQMessage.body = controlStateChangeBody;

View File

@ -43,7 +43,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -70,9 +70,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = controlStateChangeBody; mQMessage.body = controlStateChangeBody;

View File

@ -43,7 +43,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -70,9 +70,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = equipmentStateChangeBody; mQMessage.body = equipmentStateChangeBody;

View File

@ -78,7 +78,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
item.RCMD = "NEW-SUBSTRATEID"; item.RCMD = "NEW-SUBSTRATEID";
Param p1 = new Param(); Param p1 = new Param();
p1.ParanName = "ToolName"; p1.ParanName = "ToolName";
p1.ParanVal = Configuration.conf.connectSetting.name; p1.ParanVal = Configurations.conf.connectSetting.name;
item.PARAMS.Add(p1); item.PARAMS.Add(p1);
Param p2 = new Param(); Param p2 = new Param();
p2.ParanName = "STATIONID"; p2.ParanName = "STATIONID";
@ -109,7 +109,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
public static void RequestS1F3(JObject body = null) public static void RequestS1F3(JObject body = null)
{ {
Global.MF.pushBotton("S1F3Request"); Global.MF.pushBotton("S1F3");
} }
public static void RequestS2F13(JObject body = null) public static void RequestS2F13(JObject body = null)
@ -152,7 +152,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
item.RCMD = "EQSTATEUPDATE"; item.RCMD = "EQSTATEUPDATE";
Param p1 = new Param(); Param p1 = new Param();
p1.ParanName = "ToolName"; p1.ParanName = "ToolName";
p1.ParanVal = Configuration.conf.connectSetting.name; p1.ParanVal = Configurations.conf.connectSetting.name;
item.PARAMS.Add(p1); item.PARAMS.Add(p1);
Param p2 = new Param(); Param p2 = new Param();
p2.ParanName = "NEWSTATE"; p2.ParanName = "NEWSTATE";
@ -185,9 +185,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
public static void UploadFile(JObject body = null) public static void UploadFile(JObject body = null)
{ {
long fileId = long.Parse(body["fileId"].ToString()); long fileId = long.Parse(body["fileId"].ToString());
DownLoadFileParam downLoadFileParam = new DownLoadFileParam(fileId, Configuration.conf.connectSetting.name + ".xml", "1"); DownLoadFileParam downLoadFileParam = new DownLoadFileParam(fileId, Configurations.conf.connectSetting.name + ".xml", "1");
string param = SECSUtil.ObjectToGetParam(downLoadFileParam); string param = SECSUtil.ObjectToGetParam(downLoadFileParam);
HttpWebResponse response = HttpUtils.sentGET(Configuration.conf.httpConfiguration.fileDownloadUrl, param); HttpWebResponse response = HttpUtils.sentGET(Configurations.conf.httpConfiguration.fileDownloadUrl, param);
if(response.StatusCode != HttpStatusCode.OK) if(response.StatusCode != HttpStatusCode.OK)
{ {
return; return;
@ -208,5 +208,81 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
respnseStream.Close(); respnseStream.Close();
} }
} }
public static void RequestTraceDataInit(JObject body = null)
{
S2F23Item item = new S2F23Item();
if (string.IsNullOrEmpty(body["totsmp"].ToString())|| string.IsNullOrEmpty(body["dsper"].ToString())|| string.IsNullOrEmpty(body["state"].ToString()))
{
LoggerService.MQLogger.Debug("值不能为空");
return;
}
if (body["state"].ToString().Equals("Y"))
{
item.TOTSMP = ushort.Parse(body["totsmp"].ToString());
}
else
{
item.TOTSMP = 0;
}
string dsper = body["dsper"].ToString();
while(dsper.Length < 6)
{
dsper = "0" + dsper;
}
item.DSPER_hhmmss = dsper;
item.TRID = 1;
item.REPGSZ = 1;
string[] svs = body["vID"].ToString().FromJson<string[]>();
List<ushort> SVID = new List<ushort>();
foreach (string s in svs)
{
SVID.Add(ushort.Parse(s));
}
item.SVID = SVID;
foreach(WorkFlow workFlow in SimulatorInfo.Instance.Scenarios.Scenarios.FirstOrDefault(sc => sc.Name == "Init").WorkFlows)
{
if (workFlow.MessageName.Equals("S2F23"))
{
workFlow.MessageContent = item.ToJson<S2F23Item>();
break;
}
}
}
public static void RequestTraceData(JObject body = null)
{
S2F23Item item = new S2F23Item();
if (string.IsNullOrEmpty(body["totsmp"].ToString()) || string.IsNullOrEmpty(body["dsper"].ToString()) || string.IsNullOrEmpty(body["state"].ToString()))
{
LoggerService.MQLogger.Debug("值不能为空");
return;
}
if (body["state"].ToString().Equals("Y"))
{
item.TOTSMP = ushort.Parse(body["totsmp"].ToString());
}
else
{
item.TOTSMP = 0;
}
string dsper = body["dsper"].ToString();
while (dsper.Length < 6)
{
dsper = "0" + dsper;
}
item.DSPER_hhmmss = dsper;
item.TRID = 1;
item.REPGSZ = 1;
string[] svs = body["vID"].ToString().FromJson<string[]>();
List<ushort> SVID = new List<ushort>();
foreach (string s in svs)
{
SVID.Add(ushort.Parse(s));
}
item.SVID = SVID;
Command.S2F23Command(item);
}
} }
} }

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -68,9 +68,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = machineDataBody; mQMessage.body = machineDataBody;
Task.Run(() => MainForm.mq.EAPRequest(mQMessage)); Task.Run(() => MainForm.mq.EAPRequest(mQMessage));

View File

@ -46,7 +46,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -58,9 +58,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = maintenanceBody; mQMessage.body = maintenanceBody;

View File

@ -46,7 +46,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -58,9 +58,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = maintenanceBody; mQMessage.body = maintenanceBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialReceivedForTransBody; mQMessage.body = materialReceivedForTransBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialReceivedForTransBody; mQMessage.body = materialReceivedForTransBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("VirtualSubstrateID"): case ("VirtualSubstrateID"):
@ -78,9 +78,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = lSTAMaterialReceivedBody; mQMessage.body = lSTAMaterialReceivedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialReceivedForTransBody; mQMessage.body = materialReceivedForTransBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialRemovedBody; mQMessage.body = materialRemovedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialRemovedBody; mQMessage.body = materialRemovedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialRemovedBody; mQMessage.body = materialRemovedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -113,9 +113,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialRemovedBody; mQMessage.body = materialRemovedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -128,9 +128,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialStoredToContainerBody; mQMessage.body = materialStoredToContainerBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -128,9 +128,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialStoredToContainerBody; mQMessage.body = materialStoredToContainerBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -82,9 +82,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialStoredToPalletBody; mQMessage.body = materialStoredToPalletBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -118,9 +118,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialHoldBody; mQMessage.body = materialHoldBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -83,9 +83,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialReceivedBody; mQMessage.body = materialReceivedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -118,9 +118,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialRemovedBody; mQMessage.body = materialRemovedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -118,9 +118,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = materialScrapBody; mQMessage.body = materialScrapBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -89,9 +89,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = palletCompletedBody; mQMessage.body = palletCompletedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -72,9 +72,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = palletRemovedBody; mQMessage.body = palletRemovedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("RecipeName"): case ("RecipeName"):
@ -68,9 +68,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = processProgramChangeBody; mQMessage.body = processProgramChangeBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -73,9 +73,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = processRecipeSelectedBody; mQMessage.body = processRecipeSelectedBody;

View File

@ -44,7 +44,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -93,9 +93,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = processFinishBody; mQMessage.body = processFinishBody;
Task.Run(() => Task.Run(() =>
@ -112,7 +112,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
public void formatCheck(uint id,SECSItem item) public void formatCheck(uint id,SECSItem item)
{ {
eSECS_FORMAT standardFormat = Configuration.conf.sRDConfiguration.GetSECS_FORMAT(id); eSECS_FORMAT standardFormat = Configurations.conf.sRDConfiguration.GetSECS_FORMAT(id);
eSECS_FORMAT format = item.Format; eSECS_FORMAT format = item.Format;
if (standardFormat != format) if (standardFormat != format)
{ {
@ -120,7 +120,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
mQMessage.header.messageName = "FormatError"; mQMessage.header.messageName = "FormatError";
FormatErrorBody formatErrorBody = new FormatErrorBody(); FormatErrorBody formatErrorBody = new FormatErrorBody();
formatErrorBody.eventName = "ProcessFinished"; formatErrorBody.eventName = "ProcessFinished";
formatErrorBody.paramName = Configuration.conf.sRDConfiguration.tryGetSVOrDV(id); formatErrorBody.paramName = Configurations.conf.sRDConfiguration.tryGetSVOrDV(id);
formatErrorBody.paramValue = item.Value.ToString(); formatErrorBody.paramValue = item.Value.ToString();
switch (format) switch (format)
{ {

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("SubstrateID"): case ("SubstrateID"):
@ -83,9 +83,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = processStartedBody; mQMessage.body = processStartedBody;

View File

@ -45,7 +45,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -77,9 +77,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = slotListBody; mQMessage.body = slotListBody;

View File

@ -34,9 +34,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
{ {
try try
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
Scenario scenario = SimulatorInfo.Instance.Scenarios.Scenarios.FirstOrDefault(sc => sc.Name == "Init"); Scenario scenario = SimulatorInfo.Instance.Scenarios.Scenarios.FirstOrDefault(sc => sc.Name == "Init");
if (scenario.CurrentStep == 8) if (scenario.CurrentStep == 8)

View File

@ -46,7 +46,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -68,9 +68,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = userLoggedOnBody; mQMessage.body = userLoggedOnBody;

View File

@ -46,7 +46,7 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
int index = 1; int index = 1;
foreach (var key in even.validVariables) foreach (var key in even.validVariables)
{ {
string name = Configuration.conf.sRDConfiguration.tryGetSVOrDV(key); string name = Configurations.conf.sRDConfiguration.tryGetSVOrDV(key);
switch (name) switch (name)
{ {
case ("Clock"): case ("Clock"):
@ -68,9 +68,9 @@ namespace ARI.EAP.HOST.Handlers.EventHandlers
trans.Primary.Root.Item(3).Item(2).Item(index).Name = name; trans.Primary.Root.Item(3).Item(2).Item(index).Name = name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, even.name, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, even.name, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, even.name, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, even.name, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = userLoggedOnBody; mQMessage.body = userLoggedOnBody;

View File

@ -26,7 +26,7 @@ namespace Glorysoft.SECS.EQP.Handlers
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
MQMessage mQMessage = new MQMessage(); MQMessage mQMessage = new MQMessage();
mQMessage.header.messageName = "EstablishCommunication"; mQMessage.header.messageName = "EstablishCommunication";

View File

@ -23,7 +23,7 @@ namespace Glorysoft.SECS.EQP.Handlers
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
if (trans.Tag != null) if (trans.Tag != null)
{ {

View File

@ -23,7 +23,7 @@ namespace Glorysoft.SECS.EQP.Handlers
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
if (trans.Tag != null) if (trans.Tag != null)
{ {

View File

@ -7,8 +7,11 @@
// 更新历史: // 更新历史:
// + 创建 S1F2Handler.cs 文件. by Michael @2019/11/8 0:08 // + 创建 S1F2Handler.cs 文件. by Michael @2019/11/8 0:08
// ******************************************************************************** // ********************************************************************************
using ARI.EAP.HOST;
using ARI.EAP.HOST.Common;
using Glorysoft.SECS.EQP.Common; using Glorysoft.SECS.EQP.Common;
using Glorysoft.SECS.EQP.Message; using Glorysoft.SECS.EQP.Message;
using Glorysoft.SECS.EQP.Utilities;
using Glorysoft.SECSwell; using Glorysoft.SECSwell;
using System.Threading; using System.Threading;
@ -18,15 +21,9 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
SECSMessage reply = trans.Secondary; EquipmentStatus.S1F1HeartBit.timer2.Stop();
Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
S1F2Item item = new S1F2Item(); LoggerService.SECSLogger.Info(trans.Secondary);
item.MDLN = reply.Root.Item(1).Value.ToString();
item.SOFTREV = reply.Root.Item(2).Value.ToString();
var scenario = trans.Tag as Scenario;
scenario.CurrentStep++;
Thread.Sleep(500);
scenario.ExecuteNextStep();
} }
} }
} }

View File

@ -27,9 +27,9 @@ namespace Glorysoft.SECS.EQP.Handlers
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
MQMessage mQMessage = new MQMessage(); MQMessage mQMessage = new MQMessage();
mQMessage.header.messageName = "SVList"; mQMessage.header.messageName = "SvList";
SVListBody sVListBody = new SVListBody(); SVListBody sVListBody = new SVListBody();
var content = Configuration.conf.commandContentCollection.findContent("S1F3").content; var content = Configurations.conf.commandContentCollection.findContent("S1F3").content;
for(int i = 0; i < content.Count; i++) for(int i = 0; i < content.Count; i++)
{ {
switch (content[i]) switch (content[i])
@ -77,7 +77,7 @@ namespace Glorysoft.SECS.EQP.Handlers
} }
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = sVListBody; mQMessage.body = sVListBody;

View File

@ -30,14 +30,14 @@ namespace Glorysoft.SECS.EQP.Handlers
mQMessage.header.messageName = "ECRequest"; mQMessage.header.messageName = "ECRequest";
ECRequestBody eCRequestBody = new ECRequestBody(); ECRequestBody eCRequestBody = new ECRequestBody();
int index = 1; int index = 1;
foreach(var ec in Configuration.conf.sRDConfiguration.ecvs) foreach(var ec in Configurations.conf.sRDConfiguration.ecvs)
{ {
eCRequestBody.ECList.Add(ec.name, trans.Secondary.Root.Item(index).Value.ToString()); eCRequestBody.ECList.Add(ec.name, trans.Secondary.Root.Item(index).Value.ToString());
trans.Secondary.Root.Item(index).Name = ec.name; trans.Secondary.Root.Item(index).Name = ec.name;
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
mQMessage.body = eCRequestBody; mQMessage.body = eCRequestBody;

View File

@ -27,7 +27,7 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;
S2F16Item item = new S2F16Item(); S2F16Item item = new S2F16Item();

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
if (trans.Tag != null) if (trans.Tag != null)
{ {

View File

@ -25,9 +25,9 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
var sc = trans.Tag as Scenario; var sc = trans.Tag as Scenario;
if(!EquipmentStatus.initStatus) if(!EquipmentStatus.initStatus)
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, "Delete Report", "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, "Delete Report", 1);
else else
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, "Define Report", "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, "Define Report", 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
EquipmentStatus.initStatus = true; EquipmentStatus.initStatus = true;

View File

@ -25,9 +25,9 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
var sc = trans.Tag as Scenario; var sc = trans.Tag as Scenario;
if (!EquipmentStatus.initStatus) if (!EquipmentStatus.initStatus)
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, "Delete Link Report", "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, "Delete Link Report", 1);
else else
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, "Define Link Report", "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, "Define Link Report", 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
if (trans.Tag != null) if (trans.Tag != null)
{ {

View File

@ -22,7 +22,7 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
} }
} }

View File

@ -30,13 +30,13 @@ namespace Glorysoft.SECS.EQP.Handlers
S5F4Item item = new S5F4Item(); S5F4Item item = new S5F4Item();
item.ACKC5 = reply.Root.Value.To<byte[]>().FirstOrDefault(); item.ACKC5 = reply.Root.Value.To<byte[]>().FirstOrDefault();
MQMessage mQMessage = new MQMessage(); MQMessage mQMessage = new MQMessage();
mQMessage.header.messageName = "Disable/EnableAlarm"; mQMessage.header.messageName = "DisableEnableAlarm";
S5F3Body s5F3Body = new S5F3Body(); S5F3Body s5F3Body = new S5F3Body();
s5F3Body.eventTimestamp = System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fff"); s5F3Body.eventTimestamp = System.DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fff");
if (EquipmentStatus.S5F3 == "AlarmEnable" && item.ACKC5 == 0) if (EquipmentStatus.S5F3 == "AlarmEnable" && item.ACKC5 == 0)
{ {
Global.MF.S5F3BottonUpdate(EquipmentStatus.S5F3); Global.MF.S5F3BottonUpdate(EquipmentStatus.S5F3);
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, "Alarm Disable", "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, "Alarm Disable", 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
s5F3Body.enableAlarmState = "0"; s5F3Body.enableAlarmState = "0";
EquipmentStatus.S5F3 = "AlarmDisable"; EquipmentStatus.S5F3 = "AlarmDisable";
@ -44,7 +44,7 @@ namespace Glorysoft.SECS.EQP.Handlers
else if(EquipmentStatus.S5F3 == "AlarmDisable" && item.ACKC5 == 0) else if(EquipmentStatus.S5F3 == "AlarmDisable" && item.ACKC5 == 0)
{ {
Global.MF.S5F3BottonUpdate(EquipmentStatus.S5F3); Global.MF.S5F3BottonUpdate(EquipmentStatus.S5F3);
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, "Alarm Enable", "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, "Alarm Enable", 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
s5F3Body.enableAlarmState = "1"; s5F3Body.enableAlarmState = "1";
EquipmentStatus.S5F3 = "AlarmEnable"; EquipmentStatus.S5F3 = "AlarmEnable";

View File

@ -43,7 +43,7 @@ namespace Glorysoft.SECS.EQP.Handlers
index++; index++;
} }
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
if (trans.Tag != null) if (trans.Tag != null)
{ {

View File

@ -34,7 +34,7 @@ namespace Glorysoft.SECS.EQP.Handlers
context.ReplyMessage(trans); context.ReplyMessage(trans);
//int CEID = (int)primary.Root.Item(2).Value; //int CEID = (int)primary.Root.Item(2).Value;
uint CEID = (uint)primary.Root.Item(2).Value; uint CEID = (uint)primary.Root.Item(2).Value;
var even = Configuration.conf.sRDConfiguration.findEvent(CEID); var even = Configurations.conf.sRDConfiguration.findEvent(CEID);
string eventName = even.name; string eventName = even.name;
var handlerName = $"{eventName}Handler"; var handlerName = $"{eventName}Handler";
if (EquipmentStatus.EventHandlers.ContainsKey(handlerName)) if (EquipmentStatus.EventHandlers.ContainsKey(handlerName))

View File

@ -32,9 +32,9 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
SECSMessage primary = trans.Primary; SECSMessage primary = trans.Primary;
context.ReplyMessage(trans); context.ReplyMessage(trans);
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Primary.Stream}F{trans.Primary.Function}", LoggerService.Receive, trans.Primary.Description, "=" + trans.Primary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Primary.Description, 0);
LoggerService.SECSLogger.Info(trans.Primary); LoggerService.SECSLogger.Info(trans.Primary);
Global.MF.addlog(LoggerService.HtoE, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Send, trans.Secondary.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Send, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
} }
catch(Exception e) catch(Exception e)

View File

@ -23,7 +23,7 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog( LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
S6F24Item item = new S6F24Item(); S6F24Item item = new S6F24Item();

View File

@ -25,8 +25,9 @@ namespace Glorysoft.SECS.EQP.Handlers
{ {
public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg) public void Execute(SECSContext context, SECSTransaction trans, SECSErrors err, string errmsg)
{ {
Global.MF.addlog(LoggerService.EtoH, $"S{trans.Secondary.Stream}F{trans.Secondary.Function}", LoggerService.Receive, trans.Description, "=" + trans.Secondary.SystemBytes.ToString()); Global.MF.addlog(trans, LoggerService.Receive, trans.Secondary.Description, 1);
LoggerService.SECSLogger.Info(trans.Secondary); LoggerService.SECSLogger.Info(trans.Secondary);
SECSMessage reply = trans.Secondary; SECSMessage reply = trans.Secondary;
MQMessage mQMessage = new MQMessage(); MQMessage mQMessage = new MQMessage();
mQMessage.header.messageName = "RecipeListSend"; mQMessage.header.messageName = "RecipeListSend";

View File

@ -14,71 +14,20 @@ namespace ARI.EAP.HOST
{ {
public partial class LogForm : Form public partial class LogForm : Form
{ {
public string FlogFilePath; private string FeventName;
public string FeventName; private string Fcontent;
public string FLogTime;
public string FeventDisc;
public string Fkey;
public string Ftype;
public LogForm(string logFilePath,string eventName, string LogTime,string eventDisc,string key,string type) public LogForm(string eventName, string Content)
{ {
FlogFilePath = logFilePath;
FeventName = eventName; FeventName = eventName;
FLogTime = LogTime; Fcontent = Content;
FeventDisc = eventDisc;
Fkey = key;
Ftype = type;
InitializeComponent(); InitializeComponent();
} }
private void LogForm_Load(object sender, EventArgs e) private void LogForm_Load(object sender, EventArgs e)
{ {
try this.Text = FeventName;
{ this.richTextBox1.Text = Fcontent;
this.Text = FeventDisc;
FileStream fs = new FileStream(FlogFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
StreamReader str = new StreamReader(fs);
string Line;
while ((Line = str.ReadLine()) != null)
{
//if (Ftype == "SECS")
//{
if (Line.Contains(FLogTime) && Line.Contains(Fkey) && Line.Contains(FeventName))
{
if (FeventName == "S1F17" || FeventName == "S1F15")
{
this.richTextBox1.Text = this.richTextBox1.Text + Line;
}
else
{
while (Line.StartsWith(".") == false)
{
this.richTextBox1.Text = this.richTextBox1.Text + Line + Environment.NewLine;
Line = str.ReadLine();
}
this.richTextBox1.Text = this.richTextBox1.Text + Line;
}
}
//}
//else
//{
// if (Line.Contains(FLogTime) && Line.Contains(Fkey))
// {
// while (Line.StartsWith(".") == false)
// {
// this.richTextBox1.Text = this.richTextBox1.Text + Line + Environment.NewLine;
// Line = str.ReadLine();
// }
// this.richTextBox1.Text = this.richTextBox1.Text + Line;
// }
//}
}
}
catch (Exception ex)
{
LoggerService.SECSLogger.Error(ex);
}
} }
} }
} }

View File

@ -33,8 +33,8 @@ namespace ARI.EAP.HOST.MQ
messageType = "Request"; messageType = "Request";
from = "EAP"; from = "EAP";
to = "MES"; to = "MES";
transactionId = $"{Configuration.conf.connectSetting.name}_{System.DateTime.Now.ToString("yyyyMMddHHmmss")}" + new Random().Next(100).ToString(); transactionId = $"{Configurations.conf.connectSetting.name}_{System.DateTime.Now.ToString("yyyyMMddHHmmss")}" + new Random().Next(100).ToString();
equipmentId = Configuration.conf.connectSetting.name; equipmentId = Configurations.conf.connectSetting.name;
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More