Skip to content

Commit

Permalink
fix EAPConfig namespace incorrect.
Browse files Browse the repository at this point in the history
change eap driver namespace
  • Loading branch information
Jeff He committed Dec 9, 2016
1 parent 2598905 commit fc80722
Show file tree
Hide file tree
Showing 39 changed files with 1,581 additions and 88 deletions.
14 changes: 5 additions & 9 deletions secs4net/Core/CIM.EAP/CIM.Eap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ProjectGuid>{51CBED10-A51E-43A7-8370-81DE490BE207}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Online.Eap</RootNamespace>
<AssemblyName>Online.Eap</AssemblyName>
<RootNamespace>Cim.Eap</RootNamespace>
<AssemblyName>Cim.Eap</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down Expand Up @@ -97,10 +97,6 @@
<HintPath>..\..\packages\log4net.2.0.5\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
Expand Down Expand Up @@ -171,9 +167,9 @@
<Compile Include="TxReport\WaferStartReport.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Extension\Serialization.Json\Serialization.Json.csproj">
<Project>{60938345-e9cf-41f0-a588-505b05e5e544}</Project>
<Name>Serialization.Json</Name>
<ProjectReference Include="..\..\Extension\Serialization.Sml\Serialization.Sml.csproj">
<Project>{f7c036db-d4c9-4326-a17b-713cb00f313c}</Project>
<Name>Serialization.Sml</Name>
</ProjectReference>
<ProjectReference Include="..\CIM.Management\CIM.Management.csproj">
<Project>{3EEDDDF5-284E-4C9E-87AF-4FFF72C480D4}</Project>
Expand Down
8 changes: 5 additions & 3 deletions secs4net/Core/CIM.EAP/EapConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ sealed class EAPConfig : ConfigurationSection {
public string TcsId => string.IsNullOrEmpty((string)this["tcs"]) ? this.ToolId : (string)this["tcs"];

[Description(@"預先定義好的SECS message清單")]
[ConfigurationProperty("sml", DefaultValue = @"..\config\secs.sml")]
[ConfigurationProperty("sml", IsRequired = true)]
[CallbackValidator(Type = typeof(EAPConfig), CallbackMethodName = "CheckFileExist")]
public string SmlFile => (string)this["sml"];

[Description(@"GEM event report define link config file")]
[ConfigurationProperty("gem", DefaultValue = @"..\config\gem.xml")]
[ConfigurationProperty("gem", IsRequired = true)]
[CallbackValidator(Type = typeof(EAPConfig), CallbackMethodName = "CheckFileExist")]
public string GemXml => (string)this["gem"];

Expand Down Expand Up @@ -85,7 +85,9 @@ sealed class EAPConfig : ConfigurationSection {
public int T8 => (int)this["t8"];

public static void CheckFileExist(object value) {
if (!File.Exists(value as string)) throw new FileNotFoundException("相關組態檔找不到", value as string);
var filePath = value as string;
if (!string.IsNullOrWhiteSpace(filePath) && !File.Exists(filePath))
throw new FileNotFoundException("相關組態檔找不到", value as string);
}
public static void IPAddressCheck(object value) {
IPAddress.Parse(value as string);
Expand Down
4 changes: 2 additions & 2 deletions secs4net/Core/CIM.EAP/SecsMessageList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System.Linq;
using Secs4Net;
using System.Collections.ObjectModel;
using Secs4Net.Json;
using Secs4Net.Sml;

namespace Cim.Eap
{
public sealed class SecsMessageList : ReadOnlyCollection<SecsMessage> {
public SecsMessageList(string jsonFile) : base(File.OpenText(jsonFile).ToSecsMessages()) { }
public SecsMessageList(string jsonFile) : base(File.OpenText(jsonFile).ToSecsMessages().ToList()) { }

public SecsMessage this[byte s, byte f, string name] => this[s, f].First(m => m.Name == name);

Expand Down
2 changes: 1 addition & 1 deletion secs4net/Core/EAPHost/DateRollingLogFileAppender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Cim.Eap;
using log4net.Appender;
using log4net.Core;
using Online.Eap.Properties;
using Cim.Eap.Properties;

namespace Cim.Eap {
sealed class RollingLogFileAppender : FileAppender {
Expand Down
8 changes: 4 additions & 4 deletions secs4net/Core/EAPHost/EAP Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>WinExe</OutputType>
<RootNamespace>Online.Eap</RootNamespace>
<RootNamespace>Cim.Eap</RootNamespace>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<StartupObject>Cim.Eap.Program</StartupObject>
<FileUpgradeFlags>
Expand Down Expand Up @@ -237,9 +237,9 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Extension\Serialization.Json\Serialization.Json.csproj">
<Project>{60938345-e9cf-41f0-a588-505b05e5e544}</Project>
<Name>Serialization.Json</Name>
<ProjectReference Include="..\..\Extension\Serialization.Sml\Serialization.Sml.csproj">
<Project>{f7c036db-d4c9-4326-a17b-713cb00f313c}</Project>
<Name>Serialization.Sml</Name>
</ProjectReference>
<ProjectReference Include="..\CIM.EAP\CIM.Eap.csproj">
<Project>{51cbed10-a51e-43a7-8370-81de490be207}</Project>
Expand Down
4 changes: 2 additions & 2 deletions secs4net/Core/EAPHost/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using log4net.Layout;
using log4net.Repository.Hierarchy;
using Secs4Net;
using Secs4Net.Json;
using Secs4Net.Sml;

namespace Cim.Eap
{
Expand Down Expand Up @@ -237,7 +237,7 @@ async void btnSend_Click(object sender, EventArgs e)
void listBoxSecsMessageList_SelectedIndexChanged(object sender, EventArgs e)
{
SecsMessage secsMsg = SecsMessages[listBoxSecsMessages.SelectedIndex];
txtMsg.Text = secsMsg.ToJson();
txtMsg.Text = secsMsg.ToSML();
}

void enableTraceLogToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down
4 changes: 2 additions & 2 deletions secs4net/Core/EAPHost/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;
using Cim.Eap.Properties;
using Cim.Management;
using Cim.Services;
using log4net;
using log4net.Core;
using log4net.Layout;
using log4net.ObjectRenderer;
using log4net.Repository.Hierarchy;
using Online.Eap.Properties;
using Secs4Net;
using Secs4Net.Json;
using Secs4Net.Sml;

namespace Cim.Eap
{
Expand Down
11 changes: 1 addition & 10 deletions secs4net/Core/EAPHost/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions secs4net/Core/EAPHost/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Online.Eap.Properties" GeneratedClassName="Settings">
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Cim.Eap.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="EDA_Path" Type="System.String" Scope="Application">
<Value Profile="(Default)">FormatName:DIRECT=TCP:172.22.6.153\TEMP</Value>
</Setting>
<Setting Name="ZUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">tcp://127.0.0.1:9999/manager</Value>
</Setting>
Expand Down
11 changes: 4 additions & 7 deletions secs4net/Core/EAPHost/app.config
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="eap" type="Online.Eap.EAPConfig, Online.Eap"/>
<section name="eap" type="Cim.Eap.EAPConfig, Cim.Eap"/>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="Online.Eap.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<section name="Cim.Eap.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>

<eap id="MWN01" ip="127.0.0.1" port="5000" deviceId="0" recvBufferSize="0x4000" mode="Active" sml="..\config\common.sml" gem="..\config\gem.xml" driver="Online.Eap.EapDriver, Online.Eap"/>

<applicationSettings>
<Online.Eap.Properties.Settings>
<setting name="EDA_Path" serializeAs="String">
<value>FormatName:DIRECT=TCP:172.22.6.153\TEMP</value>
</setting>
<Cim.Eap.Properties.Settings>
<setting name="ZUrl" serializeAs="String">
<value>tcp://127.0.0.1:9999/manager</value>
</setting>
Expand All @@ -26,6 +23,6 @@
<setting name="RollSize" serializeAs="String">
<value>20000000</value>
</setting>
</Online.Eap.Properties.Settings>
</Cim.Eap.Properties.Settings>
</applicationSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
13 changes: 8 additions & 5 deletions secs4net/Devices/MWN01/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
</sectionGroup>
</configSections>

<eap id="MWN01" ip="127.0.0.1" port="5000" mode="Active" driver="Cim.Eap.Driver, EAPDriver"/>
<eap id="MWN01"
ip="127.0.0.1"
port="5000"
mode="Active"
driver="Eap.Driver.MWN.Driver, Eap.Driver.MWN"
sml=".\config\secs.sml"
gem=".\config\gem.xml"/>

<applicationSettings>
<Cim.Eap.Properties.Settings>
<setting name="ZUrl" serializeAs="String">
<value>tcp://172.22.104.143:9999/manager</value>
</setting>
<setting name="EDA_Path" serializeAs="String">
<value>FormatName:DIRECT=TCP:172.22.104.143\private$\eda</value>
</setting>
<setting name="TcpBindTo" serializeAs="String">
<value>172.22.104.143</value>
<value>127.0.0.1</value>
</setting>
</Cim.Eap.Properties.Settings>
</applicationSettings>
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/DefineLink.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Secs4Net;

namespace Cim.Eap
namespace Eap.Driver.MWN
{
partial class Driver
{
Expand Down
5 changes: 3 additions & 2 deletions secs4net/Devices/MWN01/Driver.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using Cim.Eap.Tx;
using Cim.Eap;
using Cim.Eap.Tx;
using Secs4Net;

namespace Cim.Eap
namespace Eap.Driver.MWN
{
sealed partial class Driver : EapDriver
{
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.CarrierIdRead.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_CarrierIDRead(SecsMessage msg) {
byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0];
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.CarrierIdReadFail.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_CarrierIDReadFail(SecsMessage msg) {
byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0];
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.ControlJobEnd.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_ControlJobEnd(SecsMessage msg) {
EAP.Report(new ControlJobEndReport {
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.ControlJobStart.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_ControlJobStart(SecsMessage msg) {
EAP.Report(new ControlJobStartReport {
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.DataCollection.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_WaferProcessData_LLH_LHC(SecsMessage msg) {
Item tempList = msg.SecsItem.Items[2].Items[0].Items[1].Items[0];
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.LoadComplete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Secs4Net;
using System.Threading;
using System;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
async void EQP_LoadComplete(SecsMessage msg) {
byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0];
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.ProcessJobEnd.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_ProcessJobEnd(SecsMessage msg) {
string id = msg.SecsItem.Items[2].Items[0].Items[1].Items[0].GetValue<string>().Trim();
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.ProcessJobStart.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_ProcessJobStart(SecsMessage msg) {
EAP.Report(new ProcessJobStartReport {
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.ReadyToLoad.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_ReadyToLoad(SecsMessage msg) {
EAP.Report(new ReadyToLoadReport {
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.ReadyToUnload.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_ReadyToUnload(SecsMessage msg) {
EAP.Report(new ReadyToUnloadReport {
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.SlotMapReport.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_SlotMapReport(SecsMessage msg) {
byte portNo = (byte)msg.SecsItem.Items[2].Items[0].Items[1].Items[0];
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/EQP.UnloadComplete.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Cim.Eap.Tx;
using Secs4Net;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
void EQP_UnloadComplete(SecsMessage msg) {
EAP.Report(new UnloadCompleteReport {
Expand Down
2 changes: 1 addition & 1 deletion secs4net/Devices/MWN01/Helper.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Cim.Eap.Data;
using System;
namespace Cim.Eap {
namespace Eap.Driver.MWN {
partial class Driver {
readonly IDictionary<string, ProcessJob> _ProcessingJobs = new Dictionary<string, ProcessJob>(StringComparer.Ordinal);

Expand Down
Loading

0 comments on commit fc80722

Please sign in to comment.