Commit 7223b93e 张东亮

界面更新

1 个父辈 05b1c9b2
正在显示 87 个修改的文件 包含 3178 行增加1884 行删除
...@@ -9,6 +9,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClientTest", "AgvClientT ...@@ -9,6 +9,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClientTest", "AgvClientT
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClient", "AgvClient\AgvClient.csproj", "{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgvClient", "AgvClient\AgvClient.csproj", "{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceLibrary", "DeviceLibrary\DeviceLibrary.csproj", "{F9619F07-15F1-4E59-A383-3871952BBB79}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{BAFEAFE6-04E2-48EE-8845-BFC7EA3E3C21}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGV_UI", "AGV_UI\AGV_UI.csproj", "{C6D2FC09-46F7-4EC5-A877-15EA06342E4F}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -27,6 +33,18 @@ Global ...@@ -27,6 +33,18 @@ Global
{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Release|Any CPU.Build.0 = Release|Any CPU {7DAD8F15-0EC9-42DF-AE0B-94B45DE0F0AC}.Release|Any CPU.Build.0 = Release|Any CPU
{F9619F07-15F1-4E59-A383-3871952BBB79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9619F07-15F1-4E59-A383-3871952BBB79}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9619F07-15F1-4E59-A383-3871952BBB79}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9619F07-15F1-4E59-A383-3871952BBB79}.Release|Any CPU.Build.0 = Release|Any CPU
{BAFEAFE6-04E2-48EE-8845-BFC7EA3E3C21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAFEAFE6-04E2-48EE-8845-BFC7EA3E3C21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAFEAFE6-04E2-48EE-8845-BFC7EA3E3C21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BAFEAFE6-04E2-48EE-8845-BFC7EA3E3C21}.Release|Any CPU.Build.0 = Release|Any CPU
{C6D2FC09-46F7-4EC5-A877-15EA06342E4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6D2FC09-46F7-4EC5-A877-15EA06342E4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6D2FC09-46F7-4EC5-A877-15EA06342E4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C6D2FC09-46F7-4EC5-A877-15EA06342E4F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>AGV_3D_SMD</RootNamespace> <RootNamespace>AGV_3D_SMD</RootNamespace>
<AssemblyName>AGV_3D_SMD</AssemblyName> <AssemblyName>AGV_3D_SMD</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -67,52 +68,26 @@ ...@@ -67,52 +68,26 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="bean\Agv_Info.cs" />
<Compile Include="bean\DisplayBoard.cs" />
<Compile Include="bean\Job.cs" />
<Compile Include="bean\JobStep.cs" />
<Compile Include="bean\jobType\ChargeJobType.cs" />
<Compile Include="bean\jobType\ReturnJobType.cs" />
<Compile Include="bean\JobType.cs" />
<Compile Include="bean\job\GetShelfJob.cs" />
<Compile Include="bean\job\SendShelfJob.cs" />
<Compile Include="bean\job\PackingJob_TransferShelf.cs" />
<Compile Include="bean\job\RecycleEmptyShelf.cs" />
<Compile Include="bean\job\PackingJob_SendShelf.cs" />
<Compile Include="bean\job\PackingJob_GetShelf.cs" />
<Compile Include="bean\job\StandyJob.cs" />
<Compile Include="bean\job\ChargeJob.cs" />
<Compile Include="bean\job\EnterLeaveShelfJob.cs" />
<Compile Include="bean\node\Node.cs" />
<Compile Include="bean\node\ClientNode.cs" />
<Compile Include="bean\jobType\ReelStringJobType.cs" />
<Compile Include="bean\jobType\PackingJobType.cs" />
<Compile Include="BLL\AGVManager.cs" />
<Compile Include="BLL\AgvServer.cs" />
<Compile Include="BLL\ScopeLimit.cs" />
<Compile Include="BLL\Standby.cs" />
<Compile Include="BLL\Charge.cs" />
<Compile Include="BLL\Common.cs" />
<Compile Include="BLL\Control.cs" />
<Compile Include="BLL\HttpHelper.cs" />
<Compile Include="BLL\FileHelper.cs" />
<Compile Include="BLL\JsonHelper.cs" />
<Compile Include="BLL\MyWebClient.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="BLL\SettingString.cs" />
<Compile Include="FrmMain.cs"> <Compile Include="FrmMain.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="FrmMain.Designer.cs"> <Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon> <DependentUpon>FrmMain.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BLL\MiR_API.cs" /> <Compile Include="Manual.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Manual.Designer.cs">
<DependentUpon>Manual.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmMain.resx"> <EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon> <DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Manual.resx">
<DependentUpon>Manual.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
...@@ -149,6 +124,19 @@ ...@@ -149,6 +124,19 @@
<ItemGroup> <ItemGroup>
<Content Include="icon.ico" /> <Content Include="icon.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup>
<ProjectReference Include="..\AGV_UI\AGV_UI.csproj">
<Project>{c6d2fc09-46f7-4ec5-a877-15ea06342e4f}</Project>
<Name>AGV_UI</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{bafeafe6-04e2-48ee-8845-bfc7ea3e3c21}</Project>
<Name>Common</Name>
</ProjectReference>
<ProjectReference Include="..\DeviceLibrary\DeviceLibrary.csproj">
<Project>{f9619f07-15f1-4e59-a383-3871952bbb79}</Project>
<Name>DeviceLibrary</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections> </configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup> </startup>
<log4net> <log4net>
<appender name="AGV_3D_SMD" type="log4net.Appender.RollingFileAppender"> <appender name="AGV_3D_SMD" type="log4net.Appender.RollingFileAppender">
...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
</root> </root>
</log4net> </log4net>
<appSettings> <appSettings>
<add key="http_server" value="http://10.85.199.25/myproject/" /> <add key="http_server" value="http://10.85.199.25/myproject/"/>
<add key="FLEET" value="10.85.199.3" /> <add key="FLEET" value="10.85.199.3"/>
<add key="LocalIP" value="10.85.199.20" /> <add key="LocalIP" value="10.85.199.20"/>
<add key="AutoCharge" value="True" /> <add key="AutoCharge" value="True"/>
<add key="ChargeThreshold" value="20,90" /> <add key="ChargeThreshold" value="20,90"/>
<add key="LimitPoints" value="0,0;0,0;0,0;0,0" /> <add key="LimitPoints" value="0,0;0,0;0,0;0,0"/>
</appSettings> </appSettings>
</configuration>
\ No newline at end of file \ No newline at end of file
</configuration>
节点名,别名,佳世达线名 节点名,别名,佳世达线名
B1,packing-19,包装仓10-1
B2,packing-20,包装仓10-2
B3,packing-21,包装仓11-1
B4,packing-22,包装仓11-2
B5,packing-24,包装仓12-1
B6,packing-23,包装仓12-2
A1,A1,VMI-A1出口 A1,A1,VMI-A1出口
A2,A2,VMI-A2入口 A2,A2,VMI-A2入口
A3,A3,包装线-A3入口
A4,A4,包装线-A4出口
A7,A7,分盘线-A7出口 A7,A7,分盘线-A7出口
A8,A8,分盘线-A8入口 A8,A8,分盘线-A8入口
C1,C1,入料3-C1入口 T1_1,T1_1,入料T1入口
C2,C2,入料3-C2出口 T1_2,T1_2,入料T1出口
C3,C3,入料2-C3入口 T2_1,T2_1,入料T2入口
C4,C4,入料2-C4出口 T2_2,T2_2,入料T2出口
C5,C5,入料1-C5入口 T3_1,T3_1,入料T3入口
C6,C6,入料1-C6出口 T3_2,T3_2,入料T3出口
C7,C7,紧急料-C7入口 T5_1,T5_1,入料T5入口
C8,C8,紧急料-C8出口 T5_2,T5_2,入料T5出口
T4_1,T4_1,紧急料T4入口
T4_2,T4_2,紧急料T4出口
D1,D1,点料机-D1入口 D1,D1,点料机-D1入口
D2,D2,点料机-D2出口 D2,D2,点料机-D2出口
D3,D3,点料机-D3口 D3,D3,点料机-D3口
D4,D4,点料机-D4口
G23,G23,退料线入口
G24,G24,退料线出口
\ No newline at end of file \ No newline at end of file
D4,D4,点料机-D4口
\ No newline at end of file \ No newline at end of file
...@@ -28,223 +28,75 @@ ...@@ -28,223 +28,75 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
this.DgvAgv = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column11 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tabControlAGV = new System.Windows.Forms.TabControl();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.flowPanelKanBan = new System.Windows.Forms.FlowLayoutPanel();
this.lblCharge1 = new System.Windows.Forms.Label();
this.lblCharge2 = new System.Windows.Forms.Label();
this.lblStandy1 = new System.Windows.Forms.Label();
this.lblStandy2 = new System.Windows.Forms.Label();
this.lblStandy3 = new System.Windows.Forms.Label();
this.lblStandy4 = new System.Windows.Forms.Label();
this.lblLimit = new System.Windows.Forms.Label();
this.panelNode = new System.Windows.Forms.Panel();
this.groupBoxNode = new System.Windows.Forms.GroupBox();
this.DgvNode = new System.Windows.Forms.DataGridView(); this.DgvNode = new System.Windows.Forms.DataGridView();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn(); this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.TxtLog = new System.Windows.Forms.TextBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.btnWriteMarks = new System.Windows.Forms.Button();
this.btnGetMarks = new System.Windows.Forms.Button();
this.txtBoxMark = new System.Windows.Forms.TextBox();
this.groupBox8 = new System.Windows.Forms.GroupBox();
this.lblStandy4 = new System.Windows.Forms.Label();
this.lblStandy3 = new System.Windows.Forms.Label();
this.lblStandy2 = new System.Windows.Forms.Label();
this.lblStandy1 = new System.Windows.Forms.Label();
this.lblCharge2 = new System.Windows.Forms.Label();
this.lblCharge1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.chkBoxOpenMission = new System.Windows.Forms.CheckBox();
this.btnReSendTask = new System.Windows.Forms.Button();
this.BtnClearError = new System.Windows.Forms.Button();
this.BtnMissionReady = new System.Windows.Forms.Button();
this.BtnMissionPause = new System.Windows.Forms.Button();
this.BtnMissionAdd = new System.Windows.Forms.Button();
this.LstAgvPlace = new System.Windows.Forms.ListBox();
this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.lblLimit = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).BeginInit();
this.tableLayoutPanel3.SuspendLayout(); this.tableLayoutPanel3.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout(); this.tabPage3.SuspendLayout();
this.groupBox8.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout(); this.tableLayoutPanel4.SuspendLayout();
this.tableLayoutPanel6.SuspendLayout(); this.panelNode.SuspendLayout();
this.groupBoxNode.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// DgvAgv
//
this.DgvAgv.AllowUserToAddRows = false;
this.DgvAgv.AllowUserToDeleteRows = false;
this.DgvAgv.AllowUserToResizeColumns = false;
this.DgvAgv.AllowUserToResizeRows = false;
this.DgvAgv.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.DgvAgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DgvAgv.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
this.DgvAgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DgvAgv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column4,
this.Column14,
this.Column21,
this.Column3,
this.Column18,
this.Column23,
this.Column13,
this.Column19,
this.Column11});
this.DgvAgv.Location = new System.Drawing.Point(3, 3);
this.DgvAgv.MultiSelect = false;
this.DgvAgv.Name = "DgvAgv";
this.DgvAgv.ReadOnly = true;
this.DgvAgv.RowHeadersVisible = false;
this.DgvAgv.RowHeadersWidth = 51;
this.DgvAgv.RowTemplate.Height = 23;
this.DgvAgv.Size = new System.Drawing.Size(1061, 125);
this.DgvAgv.TabIndex = 3;
this.DgvAgv.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellClick);
//
// Column1
//
this.Column1.HeaderText = "名称";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column2
//
this.Column2.HeaderText = "IP";
this.Column2.MinimumWidth = 6;
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column4
//
this.Column4.HeaderText = "小车状态";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column14
//
this.Column14.HeaderText = "任务ID";
this.Column14.MinimumWidth = 6;
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column21
//
this.Column21.HeaderText = "任务名称";
this.Column21.MinimumWidth = 6;
this.Column21.Name = "Column21";
this.Column21.ReadOnly = true;
this.Column21.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column3
//
this.Column3.HeaderText = "任务状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column18
//
this.Column18.HeaderText = "目的地";
this.Column18.MinimumWidth = 6;
this.Column18.Name = "Column18";
this.Column18.ReadOnly = true;
this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column23
//
this.Column23.HeaderText = "负载";
this.Column23.MinimumWidth = 6;
this.Column23.Name = "Column23";
this.Column23.ReadOnly = true;
this.Column23.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column13
//
this.Column13.HeaderText = "连接";
this.Column13.MinimumWidth = 6;
this.Column13.Name = "Column13";
this.Column13.ReadOnly = true;
this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column19
//
this.Column19.HeaderText = "电量";
this.Column19.MinimumWidth = 6;
this.Column19.Name = "Column19";
this.Column19.ReadOnly = true;
this.Column19.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column11
//
this.Column11.HeaderText = "自动";
this.Column11.MinimumWidth = 6;
this.Column11.Name = "Column11";
this.Column11.ReadOnly = true;
//
// tableLayoutPanel3 // tableLayoutPanel3
// //
this.tableLayoutPanel3.ColumnCount = 1; this.tableLayoutPanel3.ColumnCount = 1;
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel3.Controls.Add(this.tabControl1, 0, 2); this.tableLayoutPanel3.Controls.Add(this.tabControl1, 0, 1);
this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel4, 0, 1); this.tableLayoutPanel3.Controls.Add(this.tableLayoutPanel4, 0, 0);
this.tableLayoutPanel3.Controls.Add(this.DgvAgv, 0, 0);
this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel3.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tableLayoutPanel3.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel3.Name = "tableLayoutPanel3"; this.tableLayoutPanel3.Name = "tableLayoutPanel3";
this.tableLayoutPanel3.RowCount = 3; this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 45.37815F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 54.62185F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(1067, 656); this.tableLayoutPanel3.Size = new System.Drawing.Size(1190, 833);
this.tableLayoutPanel3.TabIndex = 7; this.tableLayoutPanel3.TabIndex = 7;
// //
// tabControl1 // tabControl1
// //
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(3, 330); this.tabControl1.Location = new System.Drawing.Point(3, 380);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1061, 323); this.tabControl1.Size = new System.Drawing.Size(1184, 450);
this.tabControl1.TabIndex = 7; this.tabControl1.TabIndex = 7;
// //
// tabPage1 // tabPage1
...@@ -252,10 +104,10 @@ ...@@ -252,10 +104,10 @@
this.tabPage1.Controls.Add(this.tableLayoutPanel2); this.tabPage1.Controls.Add(this.tableLayoutPanel2);
this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1053, 297); this.tabPage1.Size = new System.Drawing.Size(1176, 424);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "节点状态"; this.tabPage1.Text = "状态显示";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// tableLayoutPanel2 // tableLayoutPanel2
...@@ -263,46 +115,220 @@ ...@@ -263,46 +115,220 @@
this.tableLayoutPanel2.ColumnCount = 1; this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel2.Controls.Add(this.DgvNode, 0, 0); this.tableLayoutPanel2.Controls.Add(this.panelNode, 0, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1; this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(1047, 291); this.tableLayoutPanel2.Size = new System.Drawing.Size(1170, 418);
this.tableLayoutPanel2.TabIndex = 34; this.tableLayoutPanel2.TabIndex = 34;
// //
// tabPage3
//
this.tabPage3.Controls.Add(this.groupBox1);
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
this.tabPage3.Size = new System.Drawing.Size(1176, 402);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "手动&日志";
this.tabPage3.UseVisualStyleBackColor = true;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.richTextBox1);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox1.Location = new System.Drawing.Point(3, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(752, 396);
this.groupBox1.TabIndex = 33;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "日志";
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(3, 17);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(746, 376);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.tabControlAGV);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Right;
this.groupBox2.Location = new System.Drawing.Point(755, 3);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
this.groupBox2.Size = new System.Drawing.Size(418, 396);
this.groupBox2.TabIndex = 32;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "AGV手动";
//
// tabControlAGV
//
this.tabControlAGV.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlAGV.Location = new System.Drawing.Point(2, 16);
this.tabControlAGV.Name = "tabControlAGV";
this.tabControlAGV.SelectedIndex = 0;
this.tabControlAGV.Size = new System.Drawing.Size(414, 378);
this.tabControlAGV.TabIndex = 47;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Controls.Add(this.flowPanelKanBan, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(2, 2);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(2);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 1;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 339F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(1186, 373);
this.tableLayoutPanel4.TabIndex = 8;
//
// flowPanelKanBan
//
this.flowPanelKanBan.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowPanelKanBan.Location = new System.Drawing.Point(3, 3);
this.flowPanelKanBan.Name = "flowPanelKanBan";
this.flowPanelKanBan.Size = new System.Drawing.Size(1180, 367);
this.flowPanelKanBan.TabIndex = 0;
//
// lblCharge1
//
this.lblCharge1.AutoSize = true;
this.lblCharge1.Dock = System.Windows.Forms.DockStyle.Top;
this.lblCharge1.Location = new System.Drawing.Point(2, 16);
this.lblCharge1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCharge1.Name = "lblCharge1";
this.lblCharge1.Size = new System.Drawing.Size(65, 12);
this.lblCharge1.TabIndex = 0;
//
// lblCharge2
//
this.lblCharge2.AutoSize = true;
this.lblCharge2.Dock = System.Windows.Forms.DockStyle.Top;
this.lblCharge2.Location = new System.Drawing.Point(2, 28);
this.lblCharge2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCharge2.Name = "lblCharge2";
this.lblCharge2.Size = new System.Drawing.Size(65, 12);
this.lblCharge2.TabIndex = 1;
//
// lblStandy1
//
this.lblStandy1.AutoSize = true;
this.lblStandy1.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy1.Location = new System.Drawing.Point(2, 40);
this.lblStandy1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy1.Name = "lblStandy1";
this.lblStandy1.Size = new System.Drawing.Size(65, 12);
this.lblStandy1.TabIndex = 2;
//
// lblStandy2
//
this.lblStandy2.AutoSize = true;
this.lblStandy2.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy2.Location = new System.Drawing.Point(2, 52);
this.lblStandy2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy2.Name = "lblStandy2";
this.lblStandy2.Size = new System.Drawing.Size(65, 12);
this.lblStandy2.TabIndex = 3;
//
// lblStandy3
//
this.lblStandy3.AutoSize = true;
this.lblStandy3.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy3.Location = new System.Drawing.Point(2, 64);
this.lblStandy3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy3.Name = "lblStandy3";
this.lblStandy3.Size = new System.Drawing.Size(65, 12);
this.lblStandy3.TabIndex = 4;
//
// lblStandy4
//
this.lblStandy4.AutoSize = true;
this.lblStandy4.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy4.Location = new System.Drawing.Point(2, 76);
this.lblStandy4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy4.Name = "lblStandy4";
this.lblStandy4.Size = new System.Drawing.Size(65, 12);
this.lblStandy4.TabIndex = 5;
//
// lblLimit
//
this.lblLimit.AutoSize = true;
this.lblLimit.Dock = System.Windows.Forms.DockStyle.Top;
this.lblLimit.Location = new System.Drawing.Point(2, 88);
this.lblLimit.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblLimit.Name = "lblLimit";
this.lblLimit.Size = new System.Drawing.Size(35, 12);
this.lblLimit.TabIndex = 6;
//
// panelNode
//
this.panelNode.Controls.Add(this.groupBoxNode);
this.panelNode.Dock = System.Windows.Forms.DockStyle.Left;
this.panelNode.Location = new System.Drawing.Point(3, 3);
this.panelNode.Name = "panelNode";
this.panelNode.Size = new System.Drawing.Size(511, 412);
this.panelNode.TabIndex = 0;
//
// groupBoxNode
//
this.groupBoxNode.Controls.Add(this.DgvNode);
this.groupBoxNode.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBoxNode.Location = new System.Drawing.Point(0, 0);
this.groupBoxNode.Name = "groupBoxNode";
this.groupBoxNode.Size = new System.Drawing.Size(511, 412);
this.groupBoxNode.TabIndex = 0;
this.groupBoxNode.TabStop = false;
this.groupBoxNode.Text = "节点状态";
//
// DgvNode // DgvNode
// //
this.DgvNode.AllowUserToAddRows = false; this.DgvNode.AllowUserToAddRows = false;
this.DgvNode.AllowUserToDeleteRows = false; this.DgvNode.AllowUserToDeleteRows = false;
this.DgvNode.AllowUserToResizeColumns = false; this.DgvNode.AllowUserToResizeColumns = false;
this.DgvNode.AllowUserToResizeRows = false; this.DgvNode.AllowUserToResizeRows = false;
this.DgvNode.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.DgvNode.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.DgvNode.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DgvNode.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; this.DgvNode.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.DgvNode.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.DgvNode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.DgvNode.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DgvNode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.DgvNode.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column6, this.Column6,
this.Column7, this.Column7,
this.Column10, this.Column10,
this.Column22,
this.Column9, this.Column9,
this.Column5, this.Column5,
this.Column16}); this.Column16});
this.DgvNode.Location = new System.Drawing.Point(3, 3); this.DgvNode.Dock = System.Windows.Forms.DockStyle.Fill;
this.DgvNode.Location = new System.Drawing.Point(3, 17);
this.DgvNode.MultiSelect = false; this.DgvNode.MultiSelect = false;
this.DgvNode.Name = "DgvNode"; this.DgvNode.Name = "DgvNode";
this.DgvNode.ReadOnly = true; this.DgvNode.ReadOnly = true;
this.DgvNode.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; this.DgvNode.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
this.DgvNode.RowHeadersVisible = false; this.DgvNode.RowHeadersVisible = false;
this.DgvNode.RowHeadersWidth = 50; this.DgvNode.RowHeadersWidth = 50;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.DgvNode.RowsDefaultCellStyle = dataGridViewCellStyle2;
this.DgvNode.RowTemplate.Height = 23; this.DgvNode.RowTemplate.Height = 23;
this.DgvNode.Size = new System.Drawing.Size(1041, 285); this.DgvNode.Size = new System.Drawing.Size(505, 392);
this.DgvNode.TabIndex = 1; this.DgvNode.TabIndex = 3;
this.DgvNode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvNode_CellClick); this.DgvNode.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvNode_CellClick);
// //
// Column6 // Column6
...@@ -332,15 +358,6 @@ ...@@ -332,15 +358,6 @@
this.Column10.ReadOnly = true; this.Column10.ReadOnly = true;
this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.Column10.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
// //
// Column22
//
this.Column22.FillWeight = 107.563F;
this.Column22.HeaderText = "Mark";
this.Column22.MinimumWidth = 6;
this.Column22.Name = "Column22";
this.Column22.ReadOnly = true;
this.Column22.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column9 // Column9
// //
this.Column9.FillWeight = 107.563F; this.Column9.FillWeight = 107.563F;
...@@ -367,429 +384,63 @@ ...@@ -367,429 +384,63 @@
this.Column16.Name = "Column16"; this.Column16.Name = "Column16";
this.Column16.ReadOnly = true; this.Column16.ReadOnly = true;
// //
// tabPage2
//
this.tabPage2.Controls.Add(this.TxtLog);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(1053, 296);
this.tabPage2.TabIndex = 3;
this.tabPage2.Text = "日志";
this.tabPage2.UseVisualStyleBackColor = true;
//
// TxtLog
//
this.TxtLog.Dock = System.Windows.Forms.DockStyle.Fill;
this.TxtLog.Location = new System.Drawing.Point(0, 0);
this.TxtLog.Multiline = true;
this.TxtLog.Name = "TxtLog";
this.TxtLog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.TxtLog.Size = new System.Drawing.Size(1053, 296);
this.TxtLog.TabIndex = 7;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.chkBoxOpenMission);
this.tabPage3.Controls.Add(this.btnWriteMarks);
this.tabPage3.Controls.Add(this.btnGetMarks);
this.tabPage3.Controls.Add(this.txtBoxMark);
this.tabPage3.Controls.Add(this.groupBox8);
this.tabPage3.Controls.Add(this.groupBox2);
this.tabPage3.Controls.Add(this.BtnMissionAdd);
this.tabPage3.Controls.Add(this.LstAgvPlace);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
this.tabPage3.Size = new System.Drawing.Size(1053, 297);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "手动";
this.tabPage3.UseVisualStyleBackColor = true;
this.tabPage3.Click += new System.EventHandler(this.tabPage3_Click);
//
// btnWriteMarks
//
this.btnWriteMarks.Location = new System.Drawing.Point(506, 59);
this.btnWriteMarks.Name = "btnWriteMarks";
this.btnWriteMarks.Size = new System.Drawing.Size(68, 25);
this.btnWriteMarks.TabIndex = 40;
this.btnWriteMarks.Text = "写入Marks";
this.btnWriteMarks.UseVisualStyleBackColor = true;
this.btnWriteMarks.Click += new System.EventHandler(this.btnWriteMarks_Click);
//
// btnGetMarks
//
this.btnGetMarks.Location = new System.Drawing.Point(506, 20);
this.btnGetMarks.Name = "btnGetMarks";
this.btnGetMarks.Size = new System.Drawing.Size(68, 25);
this.btnGetMarks.TabIndex = 39;
this.btnGetMarks.Text = "获取Marks";
this.btnGetMarks.UseVisualStyleBackColor = true;
this.btnGetMarks.Click += new System.EventHandler(this.btnGetMarks_Click);
//
// txtBoxMark
//
this.txtBoxMark.Location = new System.Drawing.Point(286, 24);
this.txtBoxMark.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txtBoxMark.Multiline = true;
this.txtBoxMark.Name = "txtBoxMark";
this.txtBoxMark.Size = new System.Drawing.Size(204, 61);
this.txtBoxMark.TabIndex = 38;
//
// groupBox8
//
this.groupBox8.Controls.Add(this.lblLimit);
this.groupBox8.Controls.Add(this.lblStandy4);
this.groupBox8.Controls.Add(this.lblStandy3);
this.groupBox8.Controls.Add(this.lblStandy2);
this.groupBox8.Controls.Add(this.lblStandy1);
this.groupBox8.Controls.Add(this.lblCharge2);
this.groupBox8.Controls.Add(this.lblCharge1);
this.groupBox8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox8.Location = new System.Drawing.Point(218, 106);
this.groupBox8.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox8.Name = "groupBox8";
this.groupBox8.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox8.Size = new System.Drawing.Size(549, 154);
this.groupBox8.TabIndex = 37;
this.groupBox8.TabStop = false;
this.groupBox8.Text = "位置占用情况";
//
// lblStandy4
//
this.lblStandy4.AutoSize = true;
this.lblStandy4.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy4.Location = new System.Drawing.Point(2, 76);
this.lblStandy4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy4.Name = "lblStandy4";
this.lblStandy4.Size = new System.Drawing.Size(65, 12);
this.lblStandy4.TabIndex = 5;
this.lblStandy4.Text = "lblStandy4";
//
// lblStandy3
//
this.lblStandy3.AutoSize = true;
this.lblStandy3.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy3.Location = new System.Drawing.Point(2, 64);
this.lblStandy3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy3.Name = "lblStandy3";
this.lblStandy3.Size = new System.Drawing.Size(65, 12);
this.lblStandy3.TabIndex = 4;
this.lblStandy3.Text = "lblStandy3";
//
// lblStandy2
//
this.lblStandy2.AutoSize = true;
this.lblStandy2.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy2.Location = new System.Drawing.Point(2, 52);
this.lblStandy2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy2.Name = "lblStandy2";
this.lblStandy2.Size = new System.Drawing.Size(65, 12);
this.lblStandy2.TabIndex = 3;
this.lblStandy2.Text = "lblStandy2";
//
// lblStandy1
//
this.lblStandy1.AutoSize = true;
this.lblStandy1.Dock = System.Windows.Forms.DockStyle.Top;
this.lblStandy1.Location = new System.Drawing.Point(2, 40);
this.lblStandy1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblStandy1.Name = "lblStandy1";
this.lblStandy1.Size = new System.Drawing.Size(65, 12);
this.lblStandy1.TabIndex = 2;
this.lblStandy1.Text = "lblStandy1";
//
// lblCharge2
//
this.lblCharge2.AutoSize = true;
this.lblCharge2.Dock = System.Windows.Forms.DockStyle.Top;
this.lblCharge2.Location = new System.Drawing.Point(2, 28);
this.lblCharge2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCharge2.Name = "lblCharge2";
this.lblCharge2.Size = new System.Drawing.Size(65, 12);
this.lblCharge2.TabIndex = 1;
this.lblCharge2.Text = "lblCharge4";
//
// lblCharge1
//
this.lblCharge1.AutoSize = true;
this.lblCharge1.Dock = System.Windows.Forms.DockStyle.Top;
this.lblCharge1.Location = new System.Drawing.Point(2, 16);
this.lblCharge1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblCharge1.Name = "lblCharge1";
this.lblCharge1.Size = new System.Drawing.Size(65, 12);
this.lblCharge1.TabIndex = 0;
this.lblCharge1.Text = "lblCharge3";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.btnReSendTask);
this.groupBox2.Controls.Add(this.BtnClearError);
this.groupBox2.Controls.Add(this.BtnMissionReady);
this.groupBox2.Controls.Add(this.BtnMissionPause);
this.groupBox2.Location = new System.Drawing.Point(790, 20);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Size = new System.Drawing.Size(231, 177);
this.groupBox2.TabIndex = 32;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "操作";
//
// chkBoxOpenMission
//
this.chkBoxOpenMission.AutoSize = true;
this.chkBoxOpenMission.Checked = true;
this.chkBoxOpenMission.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkBoxOpenMission.Location = new System.Drawing.Point(928, 217);
this.chkBoxOpenMission.Name = "chkBoxOpenMission";
this.chkBoxOpenMission.Size = new System.Drawing.Size(72, 16);
this.chkBoxOpenMission.TabIndex = 46;
this.chkBoxOpenMission.Text = "接收任务";
this.chkBoxOpenMission.UseVisualStyleBackColor = true;
this.chkBoxOpenMission.Visible = false;
this.chkBoxOpenMission.CheckedChanged += new System.EventHandler(this.chkBoxOpenMission_CheckedChanged);
//
// btnReSendTask
//
this.btnReSendTask.Location = new System.Drawing.Point(138, 106);
this.btnReSendTask.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnReSendTask.Name = "btnReSendTask";
this.btnReSendTask.Size = new System.Drawing.Size(75, 52);
this.btnReSendTask.TabIndex = 45;
this.btnReSendTask.Text = "任务重发";
this.btnReSendTask.UseVisualStyleBackColor = true;
this.btnReSendTask.Click += new System.EventHandler(this.btnReSendTask_Click);
//
// BtnClearError
//
this.BtnClearError.Location = new System.Drawing.Point(21, 106);
this.BtnClearError.Name = "BtnClearError";
this.BtnClearError.Size = new System.Drawing.Size(75, 52);
this.BtnClearError.TabIndex = 19;
this.BtnClearError.Text = "清除错误";
this.BtnClearError.UseVisualStyleBackColor = true;
this.BtnClearError.Click += new System.EventHandler(this.BtnClearError_Click);
//
// BtnMissionReady
//
this.BtnMissionReady.Location = new System.Drawing.Point(21, 23);
this.BtnMissionReady.Name = "BtnMissionReady";
this.BtnMissionReady.Size = new System.Drawing.Size(75, 52);
this.BtnMissionReady.TabIndex = 1;
this.BtnMissionReady.Text = "运行";
this.BtnMissionReady.UseVisualStyleBackColor = true;
this.BtnMissionReady.Click += new System.EventHandler(this.BtnMissionReady_Click);
//
// BtnMissionPause
//
this.BtnMissionPause.Location = new System.Drawing.Point(138, 19);
this.BtnMissionPause.Name = "BtnMissionPause";
this.BtnMissionPause.Size = new System.Drawing.Size(75, 52);
this.BtnMissionPause.TabIndex = 2;
this.BtnMissionPause.Text = "暂停";
this.BtnMissionPause.UseVisualStyleBackColor = true;
this.BtnMissionPause.Click += new System.EventHandler(this.BtnMissionPause_Click);
//
// BtnMissionAdd
//
this.BtnMissionAdd.Location = new System.Drawing.Point(170, 24);
this.BtnMissionAdd.Name = "BtnMissionAdd";
this.BtnMissionAdd.Size = new System.Drawing.Size(75, 60);
this.BtnMissionAdd.TabIndex = 3;
this.BtnMissionAdd.Text = "添加任务";
this.BtnMissionAdd.UseVisualStyleBackColor = true;
this.BtnMissionAdd.Click += new System.EventHandler(this.BtnMissionAdd_Click);
//
// LstAgvPlace
//
this.LstAgvPlace.Dock = System.Windows.Forms.DockStyle.Left;
this.LstAgvPlace.FormattingEnabled = true;
this.LstAgvPlace.IntegralHeight = false;
this.LstAgvPlace.ItemHeight = 12;
this.LstAgvPlace.Location = new System.Drawing.Point(3, 3);
this.LstAgvPlace.Name = "LstAgvPlace";
this.LstAgvPlace.Size = new System.Drawing.Size(150, 291);
this.LstAgvPlace.TabIndex = 0;
//
// tableLayoutPanel4
//
this.tableLayoutPanel4.ColumnCount = 1;
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Controls.Add(this.tableLayoutPanel6, 0, 0);
this.tableLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel4.Location = new System.Drawing.Point(2, 133);
this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 1;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 169F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(1063, 192);
this.tableLayoutPanel4.TabIndex = 8;
//
// tableLayoutPanel6
//
this.tableLayoutPanel6.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.OutsetPartial;
this.tableLayoutPanel6.ColumnCount = 2;
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 49.99999F));
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 15F));
this.tableLayoutPanel6.Controls.Add(this.label2, 1, 0);
this.tableLayoutPanel6.Controls.Add(this.label1, 0, 0);
this.tableLayoutPanel6.Controls.Add(this.label4, 1, 1);
this.tableLayoutPanel6.Controls.Add(this.label3, 0, 1);
this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel6.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tableLayoutPanel6.Location = new System.Drawing.Point(2, 2);
this.tableLayoutPanel6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.tableLayoutPanel6.Name = "tableLayoutPanel6";
this.tableLayoutPanel6.RowCount = 2;
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel6.Size = new System.Drawing.Size(1059, 188);
this.tableLayoutPanel6.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(532, 3);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(522, 89);
this.label2.TabIndex = 1;
this.label2.Text = "label2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(5, 3);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(520, 89);
this.label1.TabIndex = 0;
this.label1.Text = "label1";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label4.Location = new System.Drawing.Point(532, 95);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(55, 15);
this.label4.TabIndex = 3;
this.label4.Text = "label4";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label3.Location = new System.Drawing.Point(5, 95);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(55, 15);
this.label3.TabIndex = 2;
this.label3.Text = "label3";
//
// lblLimit
//
this.lblLimit.AutoSize = true;
this.lblLimit.Dock = System.Windows.Forms.DockStyle.Top;
this.lblLimit.Location = new System.Drawing.Point(2, 88);
this.lblLimit.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblLimit.Name = "lblLimit";
this.lblLimit.Size = new System.Drawing.Size(35, 12);
this.lblLimit.TabIndex = 6;
this.lblLimit.Text = "limit";
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1067, 656); this.ClientSize = new System.Drawing.Size(1190, 833);
this.Controls.Add(this.tableLayoutPanel3); this.Controls.Add(this.tableLayoutPanel3);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false; this.MaximizeBox = false;
this.Name = "FrmMain"; this.Name = "FrmMain";
this.Text = "AGV料仓调度"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SMD AGV调度系统";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
this.Load += new System.EventHandler(this.FrmMain_Load); this.Load += new System.EventHandler(this.FrmMain_Load);
((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).EndInit();
this.tableLayoutPanel3.ResumeLayout(false); this.tableLayoutPanel3.ResumeLayout(false);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabPage1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).EndInit();
this.tabPage2.ResumeLayout(false);
this.tabPage2.PerformLayout();
this.tabPage3.ResumeLayout(false); this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout(); this.groupBox1.ResumeLayout(false);
this.groupBox8.ResumeLayout(false);
this.groupBox8.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false); this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel6.ResumeLayout(false); this.panelNode.ResumeLayout(false);
this.tableLayoutPanel6.PerformLayout(); this.groupBoxNode.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.DataGridView DgvAgv;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel3;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.DataGridView DgvNode; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.FlowLayoutPanel flowPanelKanBan;
private System.Windows.Forms.TabPage tabPage3; private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button BtnClearError;
private System.Windows.Forms.Button BtnMissionAdd;
private System.Windows.Forms.Button BtnMissionPause;
private System.Windows.Forms.Button BtnMissionReady;
private System.Windows.Forms.ListBox LstAgvPlace;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel6;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnReSendTask;
private System.Windows.Forms.GroupBox groupBox8;
private System.Windows.Forms.Label lblStandy2;
private System.Windows.Forms.Label lblStandy1;
private System.Windows.Forms.Label lblCharge2;
private System.Windows.Forms.Label lblCharge1; private System.Windows.Forms.Label lblCharge1;
private System.Windows.Forms.Label lblStandy4; private System.Windows.Forms.Label lblCharge2;
private System.Windows.Forms.Label lblStandy1;
private System.Windows.Forms.Label lblStandy2;
private System.Windows.Forms.Label lblStandy3; private System.Windows.Forms.Label lblStandy3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1; private System.Windows.Forms.Label lblStandy4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2; private System.Windows.Forms.Label lblLimit;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4; private System.Windows.Forms.TabControl tabControlAGV;
private System.Windows.Forms.DataGridViewTextBoxColumn Column14; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column21; private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3; private System.Windows.Forms.Panel panelNode;
private System.Windows.Forms.DataGridViewTextBoxColumn Column18; private System.Windows.Forms.GroupBox groupBoxNode;
private System.Windows.Forms.DataGridViewTextBoxColumn Column23; private System.Windows.Forms.DataGridView DgvNode;
private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
private System.Windows.Forms.DataGridViewTextBoxColumn Column19;
private System.Windows.Forms.DataGridViewButtonColumn Column11;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6; private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7; private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.DataGridViewTextBoxColumn Column10; private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
private System.Windows.Forms.DataGridViewTextBoxColumn Column22;
private System.Windows.Forms.DataGridViewTextBoxColumn Column9; private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5; private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewButtonColumn Column16; private System.Windows.Forms.DataGridViewButtonColumn Column16;
private System.Windows.Forms.CheckBox chkBoxOpenMission;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TextBox TxtLog;
private System.Windows.Forms.Button btnWriteMarks;
private System.Windows.Forms.Button btnGetMarks;
private System.Windows.Forms.TextBox txtBoxMark;
private System.Windows.Forms.Label lblLimit;
} }
} }
using AGVControl.BLL; using System;
using MiR;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using Common;
using DeviceLibrary;
using System.Collections.Generic;
namespace AGVControl namespace AGVControl
{ {
public partial class FrmMain : Form public partial class FrmMain : Form
...@@ -21,8 +14,6 @@ namespace AGVControl ...@@ -21,8 +14,6 @@ namespace AGVControl
private NotifyIcon notify; private NotifyIcon notify;
private ContextMenuStrip notifyMenu; private ContextMenuStrip notifyMenu;
private System.Timers.Timer showTimer; private System.Timers.Timer showTimer;
private Label[] agvRunInfo;
//private string[] agvRunStep;
public FrmMain() public FrmMain()
{ {
InitializeComponent(); InitializeComponent();
...@@ -32,11 +23,8 @@ namespace AGVControl ...@@ -32,11 +23,8 @@ namespace AGVControl
//showTimer.AutoReset = true; //showTimer.AutoReset = true;
showTimer.Elapsed += ShowTimer_Elapsed; showTimer.Elapsed += ShowTimer_Elapsed;
showTimer.Start(); showTimer.Start();
Common.logTextBox = TxtLog;
agvRunInfo = new Label[] { label1, label2, label3, label4 }; CommonVar.control.limitArea.ScopeLimitStateChangedEvent += LimitArea_ScopeLimitStateChangedEvent;
Common.control.limitArea.ScopeLimitStateChangedEvent += LimitArea_ScopeLimitStateChangedEvent;
} }
/// <summary> /// <summary>
...@@ -47,7 +35,7 @@ namespace AGVControl ...@@ -47,7 +35,7 @@ namespace AGVControl
{ {
Invoke(new Action(()=> Invoke(new Action(()=>
{ {
if (Common.control.limitArea.Available) if (CommonVar.control.limitArea.Available)
lblLimit.Text = "限制区域车辆:"; lblLimit.Text = "限制区域车辆:";
else else
{ {
...@@ -59,41 +47,39 @@ namespace AGVControl ...@@ -59,41 +47,39 @@ namespace AGVControl
private void ShowConfig() private void ShowConfig()
{ {
int n; int n;
//agvRunStep = new string[Common.agvInfo.Count]; for (int i = 0; i < CommonVar.agvInfo.Count; i++)
for (int i = 0; i < Common.agvInfo.Count; i++)
{ {
Common.mir.Get_IO_Status(Common.agvInfo[i], out bool[] input, out bool[] output); MiR_API.Get_IO_Status(CommonVar.agvInfo[i], out bool[] input, out bool[] output);
if (input != null && input.Length == 4) if (input != null && input.Length == 4)
Common.agvInfo[i].IsExistShelf = input[3]; CommonVar.agvInfo[i].IsExistShelf = input[3];
n = DgvAgv.Rows.Add(Common.agvInfo[i].ToRow()); flowPanelKanBan.Controls.Add(CommonVar.agvInfo[i].StateKanban);
DgvAgv.Rows[n].HeaderCell.Value = (n + 1).ToString(); AddForm(CommonVar.agvInfo[i].Name,new Manual(CommonVar.agvInfo[i]));
if (i % 2 == 0) }
DgvAgv.Rows[n].DefaultCellStyle.BackColor = Color.LightBlue; for (int i = 0; i < CommonVar.agvInfo.Count; i++)
if (!Common.agvInfo[i].IsCon) {
DgvAgv.Rows[n].DefaultCellStyle.ForeColor = Color.Red; CommonVar.agvInfo[i].StateKanban.SetBattery(50);
CommonVar.agvInfo[i].StateKanban.SetConnectState(true);
CommonVar.agvInfo[i].StateKanban.SetCurState("Ready");
CommonVar.agvInfo[i].StateKanban.Init();
} }
for (int i = 0; i < Common.nodeInfo.Count; i++) for (int i = 0; i < CommonVar.nodeInfo.Count; i++)
{ {
n = DgvNode.Rows.Add(Common.nodeInfo[i].ToRow()); n = DgvNode.Rows.Add(CommonVar.nodeInfo[i].ToRow());
DgvNode.Rows[n].HeaderCell.Value = (n + 1).ToString(); DgvNode.Rows[n].HeaderCell.Value = (n + 1).ToString();
if (i % 2 == 0) if (i % 2 == 0)
DgvNode.Rows[n].DefaultCellStyle.BackColor = Color.LightBlue; DgvNode.Rows[n].DefaultCellStyle.BackColor = Color.LightBlue;
if (!Common.nodeInfo[i].Online) if (!CommonVar.nodeInfo[i].Online)
DgvNode.Rows[n].DefaultCellStyle.ForeColor = Color.Red; DgvNode.Rows[n].DefaultCellStyle.ForeColor = Color.Red;
} }
LstAgvPlace.Items.Clear();
LstAgvPlace.Items.AddRange(Common.showNameMissionName.Keys.ToArray());
LstAgvPlace.SelectedIndex = 0;
} }
private void Server_NodeChanged(int nodeIndex) private void Server_NodeChanged(int nodeIndex)
{ {
Invoke(new Action(() => Invoke(new Action(() =>
{ {
DgvNode.Rows[nodeIndex].DefaultCellStyle.ForeColor = Common.nodeInfo[nodeIndex].Online && Common.nodeInfo[nodeIndex].IsUse ? Color.Black : Color.Red; DgvNode.Rows[nodeIndex].DefaultCellStyle.ForeColor = CommonVar.nodeInfo[nodeIndex].Online && CommonVar.nodeInfo[nodeIndex].IsUse ? Color.Black : Color.Red;
DgvNode.Rows[nodeIndex].SetValues(Common.nodeInfo[nodeIndex].ToRow()); DgvNode.Rows[nodeIndex].SetValues(CommonVar.nodeInfo[nodeIndex].ToRow());
})); }));
System.GC.Collect(); System.GC.Collect();
} }
...@@ -102,37 +88,12 @@ namespace AGVControl ...@@ -102,37 +88,12 @@ namespace AGVControl
{ {
Invoke(new Action(() => Invoke(new Action(() =>
{ {
DgvNode.Rows[nodeIndex].DefaultCellStyle.ForeColor = Common.nodeInfo[nodeIndex].Online ? Color.Black : Color.Red; DgvNode.Rows[nodeIndex].DefaultCellStyle.ForeColor = CommonVar.nodeInfo[nodeIndex].Online ? Color.Black : Color.Red;
DgvNode.Rows[nodeIndex].SetValues(Common.nodeInfo[nodeIndex].ToRow()); DgvNode.Rows[nodeIndex].SetValues(CommonVar.nodeInfo[nodeIndex].ToRow());
})); }));
System.GC.Collect(); System.GC.Collect();
} }
private void Control_AgvChanged(int agvIndex)
{
Invoke(new Action(() => { DgvAgv.Rows[agvIndex].DefaultCellStyle.ForeColor = Common.agvInfo[agvIndex].StateID.Equals(eAGVState.Error) ? Color.Red : Color.Black; }));
Invoke(new Action(() =>
{
DgvAgv.Rows[agvIndex].SetValues(Common.agvInfo[agvIndex].ToRow());
}));
System.GC.Collect();
}
private void MissionManager_MissionChanged()
{
//ShowEmptyTask();
}
private void Control_AgvOnline(int agvIndex)
{
Invoke(new Action(() => { DgvAgv.Rows[agvIndex].DefaultCellStyle.ForeColor = Common.agvInfo[agvIndex].IsCon ? Color.Black : Color.Red; }));
Invoke(new Action(() =>
{
DgvAgv.Rows[agvIndex].SetValues(Common.agvInfo[agvIndex].ToRow());
}));
GC.Collect();
}
private void ItemShow_Click(object sender, EventArgs e) private void ItemShow_Click(object sender, EventArgs e)
{ {
Show(); Show();
...@@ -142,9 +103,9 @@ namespace AGVControl ...@@ -142,9 +103,9 @@ namespace AGVControl
private void ItemExit_Click(object sender, EventArgs e) private void ItemExit_Click(object sender, EventArgs e)
{ {
foreach (var item in Common.agvInfo) foreach (var item in CommonVar.agvInfo)
{ {
Common.WriteIni(item.Name, SettingString.RFID, item.RFID); CommonVar.WriteIni(item.Name, SettingString.RFID, item.RFID);
} }
notify.Dispose(); notify.Dispose();
exit = true; exit = true;
...@@ -174,18 +135,12 @@ namespace AGVControl ...@@ -174,18 +135,12 @@ namespace AGVControl
ShowConfig(); ShowConfig();
change = true; change = true;
//ChkAutoCharge.Checked = Common.chargeStatus.AutoCharge; //ChkAutoCharge.Checked = CommonVar.chargeStatus.AutoCharge;
change = false; change = false;
Common.control.AgvChanged += Control_AgvChanged; // CommonVar.control.AgvChanged += Control_AgvChanged;
Common.control.AgvOnline += Control_AgvOnline; CommonVar.server.NodeChanged += Server_NodeChanged;
Common.server.NodeChanged += Server_NodeChanged; CommonVar.server.NodeOnline += Server_NodeOnline;
Common.server.NodeOnline += Server_NodeOnline; richTextBox1 = LogUtil.logBox;
//foreach (var item in Common.agvInfo)
//{
// cmbBoxAGVName.Items.Add(item.Name);
//}
//cmbBoxAGVName.Items.Add("None");
//cmbBoxAGVName.SelectedIndex = Common.agvInfo.Count;
} }
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
...@@ -195,55 +150,16 @@ namespace AGVControl ...@@ -195,55 +150,16 @@ namespace AGVControl
e.Cancel = true; e.Cancel = true;
Hide(); Hide();
} }
foreach (var item in Common.agvInfo) foreach (var item in CommonVar.agvInfo)
{ {
Common.WriteIni(item.Name, SettingString.RFID, item.RFID); CommonVar.WriteIni(item.Name, SettingString.RFID, item.RFID);
} }
//showTimer.Enabled = false; //showTimer.Enabled = false;
showTimer.Stop(); showTimer.Stop();
Common.control.AgvChanged -= Control_AgvChanged; // CommonVar.control.AgvChanged -= Control_AgvChanged;
Common.control.AgvOnline -= Control_AgvOnline; CommonVar.server.NodeChanged -= Server_NodeChanged;
Common.server.NodeChanged -= Server_NodeChanged; CommonVar.server.NodeOnline -= Server_NodeOnline;
Common.server.NodeOnline -= Server_NodeOnline;
}
private void DgvAgv_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1) return;
if (e.ColumnIndex == 10) //调用
{
if (Common.agvInfo[e.RowIndex].IsUse.Equals(true))
{
Common.agvInfo[e.RowIndex].IsUse = false;
Common.agvInfo[e.RowIndex].CurJob = null;
Common.Standby.DelOccupyInfo(Common.agvInfo[e.RowIndex].Name);
Common.Charge.DelOccupyInfo(Common.agvInfo[e.RowIndex].Name);
Common.mir.Del_Mission_Fleet(Common.agvInfo[e.RowIndex], Common.agvInfo[e.RowIndex].CurTaskID.ToString());
}
else
{
if (Common.agvInfo[e.RowIndex].IsExistShelf)
{
Common.LogInfo(string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Common.agvInfo[e.RowIndex].Name));
return;
}
Common.agvInfo[e.RowIndex].CurJob = null;
//添加Init任务
Common.mir.Add_Mission_Fleet(Common.agvInfo[e.RowIndex], Common.agvMission["Init"]);
Common.mir.State_Ready(Common.agvInfo[e.RowIndex]);
Common.LogInfo(string.Format("{0} 手动开启小车自动模式,清空上一次的运行信息:{1}", Common.agvInfo[e.RowIndex].Name, Common.agvInfo[e.RowIndex].RunInfo()));
if (Common.agvInfo[e.RowIndex].Place.Equals(SettingString.Standby) || Common.agvInfo[e.RowIndex].Place.Equals(SettingString.AutoCharge))
Common.agvInfo[e.RowIndex].Place = "";
Common.agvInfo[e.RowIndex].RFID = "";
Common.agvInfo[e.RowIndex].IsUse = true;
}
DgvAgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.agvInfo[e.RowIndex].IsUse.ToString();
Common.WriteIni(Common.agvInfo[e.RowIndex].Name, SettingString.IsUse, Common.agvInfo[e.RowIndex].IsUse.ToString());
DgvAgv.Rows[e.RowIndex].SetValues(Common.agvInfo[e.RowIndex].ToRow());
}
} }
private void DgvNode_CellClick(object sender, DataGridViewCellEventArgs e) private void DgvNode_CellClick(object sender, DataGridViewCellEventArgs e)
...@@ -252,91 +168,11 @@ namespace AGVControl ...@@ -252,91 +168,11 @@ namespace AGVControl
if (e.ColumnIndex == DgvNode.Columns.Count - 1) //调用 if (e.ColumnIndex == DgvNode.Columns.Count - 1) //调用
{ {
Common.nodeInfo[e.RowIndex].IsUse = !Common.nodeInfo[e.RowIndex].IsUse; CommonVar.nodeInfo[e.RowIndex].IsUse = !CommonVar.nodeInfo[e.RowIndex].IsUse;
DgvNode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = Common.nodeInfo[e.RowIndex].IsUse.ToString(); DgvNode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = CommonVar.nodeInfo[e.RowIndex].IsUse.ToString();
Common.WriteIni(Common.nodeInfo[e.RowIndex].Name, SettingString.IsUse, Common.nodeInfo[e.RowIndex].IsUse.ToString()); CommonVar.WriteIni(CommonVar.nodeInfo[e.RowIndex].Name, SettingString.IsUse, CommonVar.nodeInfo[e.RowIndex].IsUse.ToString());
DgvNode.Rows[e.RowIndex].SetValues(Common.nodeInfo[e.RowIndex].ToRow()); DgvNode.Rows[e.RowIndex].SetValues(CommonVar.nodeInfo[e.RowIndex].ToRow());
Common.LogInfo(string.Format("手动设置节点调用: {0}={1}", Common.nodeInfo[e.RowIndex].LineName, Common.nodeInfo[e.RowIndex].IsUse));
} }
else if (e.ColumnIndex == 8) //清除缓存
{
//清除节点缓存
string name = Common.nodeInfo[e.RowIndex].AgvName;
Common.nodeInfo[e.RowIndex].AgvName = "";
DgvNode.Rows[e.RowIndex].Cells[5].Value = "";
Common.nodeInfo[e.RowIndex].RFID = "";
DgvNode.Rows[e.RowIndex].Cells[4].Value = "";
//清除小车缓存
int idx = Common.agvInfo.FindIndex(s => s.Name == name);
if (idx > -1)
{
Common.agvInfo[idx].Place = "";
Common.agvInfo[idx].RFID = "";
DgvAgv.Rows[idx].SetValues(Common.agvInfo[idx].ToRow());
//添加Init任务
Common.mir.Add_Mission_Fleet(Common.agvInfo[idx], Common.agvMission["Init"]);
Common.mir.State_Ready(Common.agvInfo[idx]);
}
DgvNode.Rows[e.RowIndex].SetValues(Common.nodeInfo[e.RowIndex].ToRow());
}
}
private void BtnMissionReady_Click(object sender, EventArgs e)
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
if (Common.agvInfo[idx].IsCon)
Common.mir.State_Ready(Common.agvInfo[idx]);
}
private void BtnMissionPause_Click(object sender, EventArgs e)
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
if (Common.agvInfo[idx].IsCon)
Common.mir.State_Pause(Common.agvInfo[idx]);
Common.LogInfo("手动暂停:[" + Common.agvInfo[idx].Name + "]");
}
private void BtnMissionAdd_Click(object sender, EventArgs e)
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
if (Common.agvInfo[idx].IsCon)
{
if (!Common.agvInfo[idx].IsUse)
{
if (LstAgvPlace.Text.Equals(SettingString.Enter) || LstAgvPlace.Text.Equals(SettingString.Leave))
{
Common.LogInfo(Common.agvInfo[idx].Name + " 禁止在软件添加进料/出料任务。若需要,请在AGV网页操作");
return;
}
bool rtn = Common.mir.Add_Mission_Fleet(Common.agvInfo[idx], Common.agvMission[Common.showNameMissionName[LstAgvPlace.Text]]);
if (!rtn)
return;
if (LstAgvPlace.Text.StartsWith("Move"))
Common.agvInfo[idx].Place = LstAgvPlace.Text.Substring(4);
Common.LogInfo("手动添加任务:[" + Common.agvInfo[idx].Name + "][" + Common.agvInfo[idx].CurTaskName + "]");
}
Common.Standby.DelOccupyInfo(Common.agvInfo[idx].Name);
Common.Charge.DelOccupyInfo(Common.agvInfo[idx].Name);
DgvAgv.Rows[idx].SetValues(Common.agvInfo[idx].ToRow());
}
}
private void BtnClearError_Click(object sender, EventArgs e)
{
if (DgvAgv.SelectedCells.Count == 0) return;
int idx = DgvAgv.SelectedCells[0].RowIndex;
if (idx < 0) return;
if (Common.agvInfo[idx].IsCon)
Common.mir.Clear_Error(Common.agvInfo[idx]);
Common.LogInfo("手动清除错误:[" + Common.agvInfo[idx].Name + "]");
} }
bool InShhow = false; bool InShhow = false;
...@@ -350,63 +186,40 @@ namespace AGVControl ...@@ -350,63 +186,40 @@ namespace AGVControl
Invoke(new Action(() => Invoke(new Action(() =>
{ {
for (int i = 0; i < Common.agvInfo.Count; i++) lblCharge1.Text = "充电桩1:" + CommonVar.Charge.Station[Charge.AutoCharge1];
{ lblCharge2.Text = "充电桩2:" + CommonVar.Charge.Station[Charge.AutoCharge2];
agvRunInfo[i].Text = Common.agvInfo[i].RunInfo(); lblStandy1.Text = "待机位1:" + CommonVar.Standby.Station[0];
} lblStandy2.Text = "待机位2:" + CommonVar.Standby.Station[1];
lblStandy3.Text = "待机位3:" + CommonVar.Standby.Station[2];
lblCharge1.Text = "充电桩1:" + Common.Charge.Station[Charge.AutoCharge1]; lblStandy4.Text = "待机位4:" + CommonVar.Standby.Station[3];
lblCharge2.Text = "充电桩2:" + Common.Charge.Station[Charge.AutoCharge2];
lblStandy1.Text = "待机位1:" + Common.Standby.Station[0];
lblStandy2.Text = "待机位2:" + Common.Standby.Station[1];
lblStandy3.Text = "待机位3:" + Common.Standby.Station[2];
lblStandy4.Text = "待机位4:" + Common.Standby.Station[3];
})); }));
Application.DoEvents(); Application.DoEvents();
InShhow = false; InShhow = false;
} }
/// <summary>
private void btnReSendTask_Click(object sender, EventArgs e) /// 添加窗体
{ /// </summary>
if (DgvAgv.SelectedCells.Count == 0) return; /// <param name="text"></param>
int idx = DgvAgv.SelectedCells[0].RowIndex; /// <param name="form"></param>
if (idx < 0) return; private void AddForm(string text, Form form)
if (Common.agvInfo[idx].IsCon) {
{ text = text.PadLeft(10, ' ');
if (Common.agvInfo[idx].IsUse) TabPage lineTabPage = new TabPage(text);
{ // lineTabPage.AutoScroll = true;
if (MessageBox.Show("确定在自动模式下对小车重发任务?", Common.agvInfo[idx].Name, MessageBoxButtons.YesNo) == DialogResult.No) // lineTabPage.Tag = lineBean;
return; Panel linePan = new Panel();
Common.agvInfo[idx].Resend(); linePan.Dock = DockStyle.Fill;
Common.mir.State_Ready(Common.agvInfo[idx]); linePan.AutoScroll = true;
//Common.agvInfo[idx].TaskSend = LstAgvPlace.Text; lineTabPage.Controls.Add(linePan);
Common.LogInfo("手动重发任务:[" + Common.agvInfo[idx].Name + "][" + Common.agvInfo[idx].CurTaskName + "]"); form.FormBorderStyle = FormBorderStyle.None;
} form.TopLevel = false;
DgvAgv.Rows[idx].SetValues(Common.agvInfo[idx].ToRow()); linePan.Controls.Add(form);
} //form.Dock = DockStyle.Fill;
} //linePan.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
//form.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
private void tabPage3_Click(object sender, EventArgs e) form.Show();
{ // tabPageList.Add(lineTabPage);
tabControlAGV.Controls.Add(lineTabPage);
}
private void chkBoxOpenMission_CheckedChanged(object sender, EventArgs e)
{
BLL.Control.OpenGetJob = chkBoxOpenMission.Checked;
}
private void btnGetMarks_Click(object sender, EventArgs e)
{
txtBoxMark.Text=bean.jobType.PackingJobType.GetMarks();
// btnWriteMarks.Enabled = true;
}
private void btnWriteMarks_Click(object sender, EventArgs e)
{
bean.jobType.PackingJobType.WriteMarks(txtBoxMark.Text);
txtBoxMark.Text = "";
// btnWriteMarks.Enabled = false;
} }
} }
} }
...@@ -117,39 +117,6 @@ ...@@ -117,39 +117,6 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
...@@ -159,9 +126,6 @@ ...@@ -159,9 +126,6 @@
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
...@@ -177,94 +141,94 @@ ...@@ -177,94 +141,94 @@
AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAADAE AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAADAE
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQARgoKAmoAAAAfAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRbRaNlWkWiAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAQEAEgKCgJqAAAAHQAAAAAAAAAAAAAAAAAAAAkAAAARERECaFdWDdVOTQzOQkILvAAA AAAAAAAAAAAAAAAAAABkW0WjZVpFogAAAAAAAAAAAAAAAAAAAACcelv/sYVj/8qTbK6QclbWi3BV4Ytv
AB4AAAAAAAAAABYWAmlYVw3UT04Mzz8/CroAAAAZAAAAAAAAACIPIWq7GDGfzR8jIrZYVg/TNTUZuGhm VOOLb1Tji3BV4ZByVtbKk2yusYVj/5t5Wv8AAAAAAAAAAAAAAAAAAAAA+6pz/+mPLv/9sIH/lXZY/2Va
EOkFCh6ZCxM+dwYNK3cfHwunV1YQ0DU0GLdnZA/nBAcZjwQHGUgAAABKHytftyNI7/8cOLLTLjAYsSwq Rf9kWkX/ZFpF/2VaRf+Wdln//bCB/+mPLv/7qnP/AAAAAAAAAAAAAAAAAAAAAP2tef/6qnD//7GC//+x
B7UMDhC8EiV4tBQog7MTKn2xChg/sSIpELQtLAe1DA8OuxIogLQLEkJ0AAAAORYriMUjSO//I0jv/xw6 gv//sYL//7GC//+xgv//sYL//7GC//+xgv/6qnD//a15/wAAAAAAAAAAAAAAAAAAAAD/vZT8/8aj//+4
w9wCEhmYDJPCzg6i194OotjiDqLY4g2YyNkMksDUDY69yQuGsssFS2K8AAAAGQAAABMWLJDHGDCizhgx jf//sYL/96x//9qbcv/am3L/96x///+xgv//uI3//8aj//+9lPwAAAAAAAAAAAAAAAAAAAAA/9G01//c
n80cOr7ZAAAAMgAAACAAAAAzAAAAKAAAACIAAAAiAAAAI1pZM8Oxr2PvHBwQbQAAAAAAAAAADRxem0FE yP//yqr/9qx+/9OXb//Ejmn/xI5p/9SXcP/2rH7//8qq///cx///0bXXAAAAAAAAAAAAAAAAAAAAAP+v
Obi9umvtDx9gtwAAADICHSdoAyc0ngAKDksAAAAAAAAAAAAAAAAhIROTJiUUvAAAABgAAAAAAAAAAAMD g0D/sYPe1Jdv/9CVbv/QlW7/0JVu/9CVbv/QlW7/0JVu/9SXb///soLd/62APgAAAAAAAAAAAAAAAAAA
EUoVJGy6urho6RIfVLQAAAAyAAYGKAMjLpoAAAAXAAAAAAAAAAATEw1PQT8ltQsLBi4AAAAAAAAAAAAA AAD/sYJi/7GCp4FlTP9PRzf/T0c3/09HN/9PRzf/T0c3/09HN/+EZ03//7GDpv+wgWEAAAAAAAAAAAAA
AAAAAAACDBlTpRotgrkXMKDKAAAAMgAAAAAAAABZAAAAAAAAAAAGBgArLi0ZtQUFAC8AAAAAAAAAAAAA AAAAAAAAAAAAAP+2hhXMkWz4bVlE/2NTQP9bTjz/W048/2NTQP9tWkT/zpRt9/+2hhUAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAABMDCBZdAwgWXQAAAAwAAAAAAAAAWQAAAAAAAAATLS0aqRoXDU4AAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAA/7KCNf+ygoH/sIKV4aF3z+Ghd8//sIKV/7GBgP+wgi0AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFcAAAALKSkXnSEhEmYAAAAAAAAAAAAA AAAAAAAAAAAAAGZZRDxkW0WjZlhGNwAAAAAAAAAAAAAAAGVaRaplWkWqAAAAAAAAAAAAAAAAY1pHNmVa
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAABQNTQdnigoFYcAAAAAAAAAAAAA RaJiWkdBAAAAAAAAAAAAAAAAZlxHGWRaRX1jWUWxZFpFm2NaRZ9lWkV3ZVpFd2NaRZ9kWkWbY1lFsWNZ
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0Ly4asigoF5IAAAAFAAAAAAAA RX5oXkIbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQoKCGQAAAAFAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA//8AAPHjAACAwQAAgAEAAIABAACH8wAAhvMAAMb3 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAAz/MAAMADAADAAwAAwAMAAMADAADAAwAA4AcAAOAH
AADH7wAA/98AAP+/AAD/PwAA/n8AAP//AAAoAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAA AADwDwAA+B8AAN57AADxjwAA//8AAP//AAAoAAAAIAAAAEAAAAABACAAAAAAAIAQAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZVtDNWVa
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA RERlWkREZVtDNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABlW0M1ZVpERGVaRERlW0M1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAABAAAAXgMDALAICAHGBwcBuwAAAIsAAAANAAAAAAAAAAAAAAAAAAAAAAAA AABkWkX7ZFpF/2RaRf9kWkX6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAEAAABjAwMAsQgIAcYFBQG9AAAAhgAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRaRftkWkX/ZFpF/2RaRfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIkoKAfBcnAS+3RyEv90chL/UU4M1AQEAb0AAAALAAAAAAAA AAAAAAAAAAAAAGRaRf9kWkX/ZFpF/2hcRv/epXsfqoZhP6uDZECsgWFZqYBhXKmAYmimfV92pn1fdqZ9
AAAAAAAAAAAAAAAAAAAAAAAAAgIAjC4uB8BzcRL9dHIS/3RyEv9PTQ3GAwMAvAAAAAgAAAAAAAAAAAAA X3amfV92qYBiaKmAYVysgWFZq4NkQKqGYT/epXsfZ1tH/2RaRf9kWkX/ZFpF/wAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAApAAAAMwAAADMAAABIGhkEwnRyEv89OwnEGBgHwTU0CMV0chL/SEcLygAA AAAAAAAAAAAAAAAAAAAAAAAAx5Fs/+ejef/0q37//7GC//2vgf+Pclb/ZFpF/2RaRf9kWkX/ZFpF/2Ra
AHoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACghIQW/dHIS/zY2CcIYGAfBOzoJx3RyEv9BPgrFAAAAbwAA Rf9kWkX/ZFpF/2RaRf9kWkX/ZFpF/2RaRf9kWkX/j3JW//2vgf//sYL/9Kt+/+ejef/GkWz/AAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAUAQMIvQkSPsENG1m/DBlTvwQIGMs1NQjCdHIS/wkJAtKsqWDfKioYwmBd AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/sYL//K14//CZSP/slDr//7GC//Wsfv98Z07/ZFpF/2Ra
D91ycBL+AQEAtgAAABEAAAARAAAAEQAAABEAAAAKAAAAWj49CsR0chL/BwcC1bGwY+IgIBLFZmQP6G9t Rf9kWkX/ZFpF/2RaRf9kWkX/ZFpF/2RaRf9kWkX/ZFpF/3xnTv/1rH7//7GC/+yUOv/wmUj//a15//+x
EfcAAACoAAAAAAAAAAAAAAAAAAAAAAAAAHoTKYjHI0jv/yNI7/8jSO//EieAwzQzCMN0chL/aWcQ6xoa gv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+xgv/vmEX/5Yge/+WIHv//sYL//7GC/+2n
BMEYFgTBcnAS+lFPDM8CBRHRCBAywggQMsIHDS7DBQojxgUKI8YCBQ/SPz4KxXRyEv9mZBDmGBYEwRoa e/+EbFL/Z1tH/2RaRf9kWkX/ZFpF/2RaRf9kWkX/ZFpF/2dbR/+GbVP/7ad7//+xgv//sYL/5Yge/+WI
BMFzcRL9R0ULygIFEdAFCiPGAwUPygAAAEIAAAAAAAAAmQwOC88ePs7lI0jv/yNI7/8iRej2BQgOzEdF Hv/vmUb//7GC/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/7GC//SgWP/znVP/+KZn//+x
C8pycRLQdHITwHNxE79FQwq2Cg4dsiBC2b0jSO7AI0juwCNI7sAjSO7AI0juwCJC3L0LDhWySkkLtnRy gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+x
E8B0chPAc3ETv0RECrUKDRy0IkPgvSNI7sAPHmS1AAAASQAAAAAAAACOVVUwwBIme8UjSO//I0jv/yNI gv/4pmf/851T//SgWP//sYL/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/sYL//7GC//+x
7/8hReX0DBhTvgoLDrQGBgHPAgIB2gABAfYCBxLVBA0gxQQNIMUEDSDFBRAlwgQOIcQEDiHEBBAezAEL gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+x
EtUABwneCBIRxw0RCMYCBQTaAAEB7wQKG8gECh/IBQwnxAMIGKoAAAARAAAAAAAAAIAGBgXbHTrC3yNI gv//sYL//7GC//+xgv//sYL//7GC//+xgv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+x
7/8jSO//I0jv/yNI7/8jSO//FCiFxAAAAHwDIy/FEL/+/xC//v8Qv/7/EL/+/xC//v8Qv/7/EL/+/xC/ gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL/+a5///mtgP//sYL//7GC//+x
/v8Qv/7/EL/+/xC//v8Qv/7/EL/+/xC//v8Qv/7/EL/+/xC8+voIZYXDAAAAXQAAAAAAAAAAAAAAZRMo gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
g8cjSO//I0jv/yNI7/8jSO//I0jv/yNI7/8WLJbJAAAAZwEHCb0HSmTACWeIvAlrjcEJbZLGCW2Sxglt AAAAAAAA/7iN+v/j0v//5dX//+TT///JqP//sYL//7GC//+xgv/7r4D/86p9/+Ogd/+Ka1D/jGtR/+Og
ksYJbZLGCW2SxghnicQIW3jCB1l2vgdRa7oFRl29BkJYtgY/VbkEOErABDhKwAENEcMAAAAeAAAAAAAA d//zqn3/+6+A//+xgv//sYL//7GC///JqP//5NP//+XV///j0v//t4z5AAAAAAAAAAAAAAAAAAAAAAAA
AAAAAABHDh5hwiNI7/8jSO//I0jv/yNI7/8jSO//I0jv/xYslskAAABjAAAAAwAAADgAAABJAAAAVQAA AAAAAAAAAAAAAAAAAAD/vJPU//38//////////////v5///St//+sYH/1phw/7OEYv+feFn/k3BU/4pq
AFUAAABPAAAARAAAAEQAAABEAAAARAAAAEQAAABEAAAARBUUC82gn1vkoJ9b5KCfW+QQEAnOAAAAAwAA UP+KalD/lHBU/594Wf+zhGL/1phx//6xgf//07j///v5//////////////79//+7ldMAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAABEFCSDIIkfq+g0dYMAMGVW/CRVFwAoWSMMdO8XkFiyWyQAAAGMAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+wg1T/wZv//76Y//+3i///sYL//7GC//+xgv//sYL//7GC//+x
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACEREJyM3Kc/zPzHT/zcpz/AkJ gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7aK//++l///wp3+/7GDUgAA
BcEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBBrMfQdjrCwwJzqGfWtivrWPioZ9a3AcMJsQWLJbJAAAAYwAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+ygnr/sYL+/7GC//+xgv//sYL//7GC//+x
AAAAAAALAAQGtwAAAGoAAgKoAAICfQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABRDg4IyTU1 gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYL//7GC/f+w
HcAREQrOAAAAZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUQ0cXMEJETjAn5xZ0c/MdP/PzHT/CQ0XyRYs gngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/sYAk/7GCqf+xgcf/sYL/n3hZ/4pq
lskAAABjAAAAAAAAABQDHSfEAQ8UyghggMIABgi5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA UP+KalD/impQ/4pqUP+KalD/impQ/4pqUP+KalD/impQ/4pqUP+KalD/impQ/4pqUP+KalD/oHda//+x
AFsrKxjAXFszyAAAAKsAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAQMJwR9A0+gODw3Lzst0/s/M gv//sYPH/7GCqf+xgCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+wg0r/sYL//7GC//+x
dP8QEhnDFiyWyQAAAGMAAAAAAAAAAAACA5MFQFS/AyUywwAAAF0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA gvObdFf/T0c3/09HN/9PRzf/T0c3/09HN/9PRzf/T0c3/09HN/9PRzf/T0c3/09HN/9PRzf/T0c3/09H
AAAAAABHLCsZw4aDTM4DAwGsAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfEiZ7xQ0b N/+gd1r//7GC8v+xgv//sYL//7CDSgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+x
WsBubT3Dz8x0/wwOE8YWLJbJAAAAYwAAAAAAAAAAAAAAAQAAAJkAAABLAAAAAAAAAAAAAAAAAAAAAAAA gjH/s4FD/7CDntKWb/9PRzf/T0c3/09HN/9PRzf/T0c3/09HN/9PRzf/T0c3/09HN/9PRzf/T0c3/09H
AAAAAAAAAAAAGA4OCMd6d0XJAwMCpwAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA N/9PRzf/T0c3/9qbcv//s4Kd/7CDRP+xgjEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAgBBAvNIUXm9gcMIcApJxbDCxRCwBYslskAAABjAAAAAAAAAAAAAAAAAAAAjwAAACMAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAD/sIFH/bCB/15QPf9PRzf/T0c3/09HN/9PRzf/T0c3/09HN/9PRzf/T0c3/09H
AAAAAAAAAAAAAAAAAAgFBQS7Z2U6xwMDAqMAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA N/9PRzf/T0c3/09HN/9nVUH//7GC//+zg0YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAGUJFELCIkbo+SBC2uojSO//FiyWyQAAAGMAAAAAAAAAAAAAAAAAAACfAAAAFAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+/gAT/sYLX2pty/5NwVP94YEn/aldD/1tOPP9bTjz/W048/1tO
AAAAAAAAAAAAAAAAAAAAAAABAwMCn3BtPsQICAS+AAAACQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA PP9bTjz/W048/2tYQv95YEn/lnFW/9ycdP//sYLZ/7+ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFUAAQO4AQEFwAEBB7gCAgWZAAAAOQAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+xgCT/sYK3/7GC8P+xgv//sYL//7GC//+x
AK4AAAAFAAAAAAAAAAAAAAAAAAAAAAAAAHlZVzK7EREJyAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA gv//sYL//7GC//+xgv//sYL//7GC//+xgv//sYLw/7GCs/+xgCQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/6+AEP+0
AAAAAAAAAAAAsgAAAAAAAAAAAAAAAAAAAAAAAABRNjUevB0dEL8AAAA6AAAAAAAAAAAAAAAAAAAAAAAA gCz/sINEjXFW/7SHZoK0h2aCjXFW//+zgUP/soIr/6qIDwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZVlFhmRbRIpmWUAUAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAACvAAAAAAAAAAAAAAAAAAAAMxQUC8A5Nx+9AAAAWQAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAABkWkX/Y1pFVWNaRVVkWkX/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AABjVUcSY1pEg2VaRZMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlWUZqZFlF5GRaRfNjWUaaYllDOQAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAALAAAAAAAAAAAAAAADAREQnCTUwrvQAAAHwAAAAAAAAAAAAA AAEAAAAAAAAAAAAAAAAAAAAAAAAAAGRaRf9jWkVVY1pFVWRaRf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAFmWEY3ZFpFl2VaRfFkWkXoY1pEdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVVVUGY1lFZGRa
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbAAAAmQAAAAAAAAA4GRgPv3h3RMcCAgKfAAAAAQAA Rc5kWkX/ZFtG52RaRqVlWkZ8ZFpGZmVbRWhkWkWcZFpF/2NaRVVjWkVVZFpF/2RaRZxlW0VoZFpGZmVa
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA RnxkWkSkZFtG52RaRf9lWUXQZFpEaWBgQAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD4AAAB1AAAAOBERCcORj1LRBgYDtwAA AAAAAAAAAAAAAGZZRihlWkZ8ZFpFsmRaReFkWkXuZFpF62RaRcxkWUZ1YGBACGBgQAhjW0V2ZFpFzGRa
AAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA RetkWkXuZFpF4WRaRbJkWkV9YVtDKgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZQAAAJcTEwrGjIpOzwUF AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A7wAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB1GxoOxZ+d AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
WtgFBQS7AAAADQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
ABYHBwS3BwcEwgAAABUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAQAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////////////////////4f+H/4D+A/+A/gPwAH4B8AA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////8P//D/D//w/wAAAP8AAAD/AA
AAGAAAABgAAAAYAgAAPAIAADwD//B8A//wfAOv+P4Dh/j+A4/x/wPf4/8D38f/g9+P/8Pfn///3z///9 AA/wAAAP8AAAD/AAAA/wAAAP8AAAD/gAAB/8AAA/+AAAH/gAAB/+AAB//wAA//8AAP//gAH///w//+f9
5////c////2P////H////D////x////8//////// v+fx/b+P/DmcP/+Dwf//////////////////////
</value> </value>
</data> </data>
</root> </root>
\ No newline at end of file \ No newline at end of file
namespace AGVControl
{
partial class Manual
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Manual));
this.panelInfo = new System.Windows.Forms.Panel();
this.lblInfo = new System.Windows.Forms.Label();
this.grpBxRunMode = new System.Windows.Forms.GroupBox();
this.chkBxAuto = new System.Windows.Forms.CheckBox();
this.btnReSendTask = new System.Windows.Forms.Button();
this.grpBxOperation = new System.Windows.Forms.GroupBox();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.btnReady = new System.Windows.Forms.Button();
this.btnPause = new System.Windows.Forms.Button();
this.btnClearErr = new System.Windows.Forms.Button();
this.grpBxMission = new System.Windows.Forms.GroupBox();
this.btnAssignTask = new System.Windows.Forms.Button();
this.cmbBxMission = new System.Windows.Forms.ComboBox();
this.panelInfo.SuspendLayout();
this.grpBxRunMode.SuspendLayout();
this.grpBxOperation.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.grpBxMission.SuspendLayout();
this.SuspendLayout();
//
// panelInfo
//
this.panelInfo.Controls.Add(this.lblInfo);
this.panelInfo.Dock = System.Windows.Forms.DockStyle.Top;
this.panelInfo.Location = new System.Drawing.Point(0, 0);
this.panelInfo.Name = "panelInfo";
this.panelInfo.Size = new System.Drawing.Size(385, 43);
this.panelInfo.TabIndex = 0;
//
// lblInfo
//
this.lblInfo.BackColor = System.Drawing.Color.LightBlue;
this.lblInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblInfo.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblInfo.Location = new System.Drawing.Point(0, 0);
this.lblInfo.Name = "lblInfo";
this.lblInfo.Size = new System.Drawing.Size(385, 43);
this.lblInfo.TabIndex = 0;
this.lblInfo.Text = "#号车";
this.lblInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// grpBxRunMode
//
this.grpBxRunMode.Controls.Add(this.chkBxAuto);
this.grpBxRunMode.Controls.Add(this.btnReSendTask);
this.grpBxRunMode.Dock = System.Windows.Forms.DockStyle.Top;
this.grpBxRunMode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.grpBxRunMode.Location = new System.Drawing.Point(0, 43);
this.grpBxRunMode.Name = "grpBxRunMode";
this.grpBxRunMode.Size = new System.Drawing.Size(385, 70);
this.grpBxRunMode.TabIndex = 1;
this.grpBxRunMode.TabStop = false;
this.grpBxRunMode.Text = "模式选择";
//
// chkBxAuto
//
this.chkBxAuto.AutoSize = true;
this.chkBxAuto.Location = new System.Drawing.Point(7, 21);
this.chkBxAuto.Name = "chkBxAuto";
this.chkBxAuto.Size = new System.Drawing.Size(76, 16);
this.chkBxAuto.TabIndex = 0;
this.chkBxAuto.Text = "自动模式";
this.chkBxAuto.UseVisualStyleBackColor = true;
this.chkBxAuto.CheckedChanged += new System.EventHandler(this.chkBxAuto_CheckedChanged);
//
// btnReSendTask
//
this.btnReSendTask.Location = new System.Drawing.Point(251, 11);
this.btnReSendTask.Name = "btnReSendTask";
this.btnReSendTask.Size = new System.Drawing.Size(75, 53);
this.btnReSendTask.TabIndex = 3;
this.btnReSendTask.Text = "任务重发";
this.btnReSendTask.UseVisualStyleBackColor = true;
this.btnReSendTask.Click += new System.EventHandler(this.btnReSendTask_Click);
//
// grpBxOperation
//
this.grpBxOperation.Controls.Add(this.flowLayoutPanel1);
this.grpBxOperation.Dock = System.Windows.Forms.DockStyle.Top;
this.grpBxOperation.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.grpBxOperation.Location = new System.Drawing.Point(0, 113);
this.grpBxOperation.Name = "grpBxOperation";
this.grpBxOperation.Size = new System.Drawing.Size(385, 108);
this.grpBxOperation.TabIndex = 2;
this.grpBxOperation.TabStop = false;
this.grpBxOperation.Text = "操作";
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.btnReady);
this.flowLayoutPanel1.Controls.Add(this.btnPause);
this.flowLayoutPanel1.Controls.Add(this.btnClearErr);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 17);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(379, 88);
this.flowLayoutPanel1.TabIndex = 0;
//
// btnReady
//
this.btnReady.BackColor = System.Drawing.Color.Lime;
this.btnReady.Location = new System.Drawing.Point(30, 3);
this.btnReady.Margin = new System.Windows.Forms.Padding(30, 3, 5, 3);
this.btnReady.Name = "btnReady";
this.btnReady.Size = new System.Drawing.Size(88, 61);
this.btnReady.TabIndex = 0;
this.btnReady.Text = "运行";
this.btnReady.UseVisualStyleBackColor = false;
this.btnReady.Click += new System.EventHandler(this.btnReady_Click);
//
// btnPause
//
this.btnPause.BackColor = System.Drawing.Color.Red;
this.btnPause.Location = new System.Drawing.Point(153, 3);
this.btnPause.Margin = new System.Windows.Forms.Padding(30, 3, 3, 3);
this.btnPause.Name = "btnPause";
this.btnPause.Size = new System.Drawing.Size(88, 61);
this.btnPause.TabIndex = 1;
this.btnPause.Text = "暂停";
this.btnPause.UseVisualStyleBackColor = false;
this.btnPause.Click += new System.EventHandler(this.btnPause_Click);
//
// btnClearErr
//
this.btnClearErr.BackColor = System.Drawing.Color.Yellow;
this.btnClearErr.Location = new System.Drawing.Point(274, 3);
this.btnClearErr.Margin = new System.Windows.Forms.Padding(30, 3, 3, 3);
this.btnClearErr.Name = "btnClearErr";
this.btnClearErr.Size = new System.Drawing.Size(88, 61);
this.btnClearErr.TabIndex = 2;
this.btnClearErr.Text = "清除错误";
this.btnClearErr.UseVisualStyleBackColor = false;
this.btnClearErr.Click += new System.EventHandler(this.btnClearErr_Click);
//
// grpBxMission
//
this.grpBxMission.Controls.Add(this.btnAssignTask);
this.grpBxMission.Controls.Add(this.cmbBxMission);
this.grpBxMission.Dock = System.Windows.Forms.DockStyle.Top;
this.grpBxMission.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.grpBxMission.Location = new System.Drawing.Point(0, 221);
this.grpBxMission.Name = "grpBxMission";
this.grpBxMission.Size = new System.Drawing.Size(385, 70);
this.grpBxMission.TabIndex = 3;
this.grpBxMission.TabStop = false;
this.grpBxMission.Text = "手动任务";
//
// btnAssignTask
//
this.btnAssignTask.Location = new System.Drawing.Point(216, 12);
this.btnAssignTask.Name = "btnAssignTask";
this.btnAssignTask.Size = new System.Drawing.Size(131, 35);
this.btnAssignTask.TabIndex = 1;
this.btnAssignTask.Text = "发任务";
this.btnAssignTask.UseVisualStyleBackColor = true;
this.btnAssignTask.Click += new System.EventHandler(this.btnAssignTask_Click);
//
// cmbBxMission
//
this.cmbBxMission.FormattingEnabled = true;
this.cmbBxMission.Location = new System.Drawing.Point(12, 20);
this.cmbBxMission.Name = "cmbBxMission";
this.cmbBxMission.Size = new System.Drawing.Size(159, 20);
this.cmbBxMission.TabIndex = 0;
//
// Manual
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(385, 297);
this.Controls.Add(this.grpBxMission);
this.Controls.Add(this.grpBxOperation);
this.Controls.Add(this.grpBxRunMode);
this.Controls.Add(this.panelInfo);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Manual";
this.Load += new System.EventHandler(this.Manual_Load);
this.panelInfo.ResumeLayout(false);
this.grpBxRunMode.ResumeLayout(false);
this.grpBxRunMode.PerformLayout();
this.grpBxOperation.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.grpBxMission.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panelInfo;
private System.Windows.Forms.Label lblInfo;
private System.Windows.Forms.GroupBox grpBxRunMode;
private System.Windows.Forms.CheckBox chkBxAuto;
private System.Windows.Forms.GroupBox grpBxOperation;
private System.Windows.Forms.Button btnReady;
private System.Windows.Forms.Button btnPause;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Button btnReSendTask;
private System.Windows.Forms.Button btnClearErr;
private System.Windows.Forms.GroupBox grpBxMission;
private System.Windows.Forms.Button btnAssignTask;
private System.Windows.Forms.ComboBox cmbBxMission;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DeviceLibrary;
using Common;
namespace AGVControl
{
public partial class Manual : Form
{
public Manual(Agv_Info agv)
{
InitializeComponent();
Agv = agv;
btnReSendTask.Enabled = agv.IsUse;
btnAssignTask.Enabled = !agv.IsUse;
}
Agv_Info Agv;
private void Manual_Load(object sender, EventArgs e)
{
lblInfo.Text = string.Format("[{0}]", Agv.IP);
cmbBxMission.Items.AddRange(CommonVar.showNameMissionName.Keys.ToArray());
cmbBxMission.SelectedIndex = 0;
}
private void chkBxAuto_CheckedChanged(object sender, EventArgs e)
{
this.Invoke(new Action(() =>
{
btnReSendTask.Enabled = chkBxAuto.Checked;
btnAssignTask.Enabled = !chkBxAuto.Checked;
if (!chkBxAuto.Checked)
{
Agv.CurJob = null;
CommonVar.Standby.DelOccupyInfo(Agv.Name);
CommonVar.Charge.DelOccupyInfo(Agv.Name);
//添加Init任务
MiR_API.Add_Mission_Fleet(Agv, CommonVar.agvMission[SettingString.Init]);
MiR_API.State_Ready(Agv);
if (Agv.Place.Equals(SettingString.Standby) || Agv.Place.Equals(SettingString.AutoCharge))
Agv.Place = "";
}
else
{
if (Agv.IsExistShelf)
{
LogUtil.error(string.Format("{0} 车上有负载,无法开启自动模式,请先清空小车负载!", Agv.Name));
return;
}
Agv.CurJob = null;
MiR_API.Del_Mission_Fleet(Agv, Agv.CurTaskID.ToString());
MiR_API.Del_Mission(Agv);
Agv.RFID = "";
}
Agv.IsUse = chkBxAuto.Checked;
}));
}
private void btnReSendTask_Click(object sender, EventArgs e)
{
if (Agv.IsCon)
{
if (MessageBox.Show("确定对小车重发任务?", Agv.Name, MessageBoxButtons.YesNo) == DialogResult.No)
return;
Agv.Resend();
LogUtil.info(string.Format("{0} 手动重发任务", Agv.Name));
}
}
private void btnReady_Click(object sender, EventArgs e)
{
if (Agv.IsCon)
{
MiR_API.State_Ready(Agv);
LogUtil.info(string.Format("{0} 手动点击运行", Agv.Name));
}
}
private void btnPause_Click(object sender, EventArgs e)
{
if (Agv.IsCon)
{
MiR_API.State_Pause(Agv);
LogUtil.info(string.Format("{0} 手动点击暂停", Agv.Name));
}
}
private void btnClearErr_Click(object sender, EventArgs e)
{
if (Agv.IsCon)
{
MiR_API.Clear_Error(Agv);
LogUtil.info(string.Format("{0} 手动点击清除按钮", Agv.Name));
}
}
private void btnAssignTask_Click(object sender, EventArgs e)
{
if (Agv.IsCon)
{
Agv.AssignTask(CommonVar.showNameMissionName[cmbBxMission.SelectedItem.ToString()]);
LogUtil.info(string.Format("{0} 手动发任务 {1}", Agv.Name, cmbBxMission.SelectedItem.ToString()));
}
}
private void btnExit_Click(object sender, EventArgs e)
{
Close();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAMAQAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD/J75P/ye9d/8nvXf/J713/ye9d/8nvXf/J713/ye9d/8nvXf/J713/ye9d/8n
vXf/J713/ye+TgAAAAD/LKwu/yyuaAAAAAAAAAAAAAAAAAAAAAD/LK1d/y2ud/8trnf/LK9cAAAAAAAA
AAAAAAAAAAAAAP8ur2n/LbAt/y2lEf8zn6D/M6Cm/zOfiP8zn4j/M5+I/zWiPwAAAAAAAAAA/zWiP/8z
n4j/M5+I/zOfiP8zoKb/M5+g/y2lEQAAAAD/OJNA/zeUcP85kqb/OJKI/ziSiP84koj/OJKI/ziSiP84
koj/OJKI/ziSiP85kqb/N5Rw/ziTQAAAAAAAAAAA/0CDQP9AhHD/QINAAAAAAAAAAAD/P4FB/0CDkP9A
grT/QINn/0OFFwAAAAD/QINA/0CEcP9Ag0AAAAAAAAAAAP9IdED/R3Rw/0h0QAAAAAAAAAAA/0Z2kf9F
dTD/QnAy/0V1Vf9FdHIAAAAA/0h0QP9HdHD/SHRAAAAAAAAAAAD/TGhA/0tmcP9MaEAAAAAA/01nav9N
aEz/Y3qx/3mM6f9LZDP/TGe1AAAAAP9MaED/S2Zw/0xoQAAAAAAAAAAA/1RYQP9UV3D/VFhAAAAAAP9R
Vy//Ulif/2lfa/9rYbX/UFUw/1NakQAAAAD/VFhA/1RXcP9UWEAAAAAAAAAAAP9YTED/V0tw/1hMQAAA
AAD/gIAC/1lJp/9YS53/V0lJ/1dKlf9XSUYAAAAA/1hMQP9XS3D/WExAAAAAAAAAAAD/YDxA/106bv9d
PkIAAAAAAAAAAAAAAAD/Xj4x/188bgAAAAAAAAAAAAAAAP9dPkL/XTpu/2A8QAAAAAAAAAAA/2IrL/9l
LXL/ZC94/2MviP9jL4j/Yy+I/2MviP9jL4j/Yy+I/2MviP9jL4j/ZS13/2Utcv9kLC4AAAAAAAAAAAAA
AAD/bCFc/2sgiP9rIIj/ayCI/2sgiP9rIIj/ayCI/2sgiP9rIIj/ayCI/2sgiP9sH1oAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA//8AAP//AAD//wAA//8AAIPBAADgBwAA/n8AAP3/AAD+XwAA/V8AAPy/AAD//wAA8A8AAOAH
AAD//wAA//8AAA==
</value>
</data>
</root>
\ No newline at end of file \ No newline at end of file
using MiR; using log4net.Config;
using log4net.Config;
using log4net.Util.TypeConverters; using log4net.Util.TypeConverters;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -8,7 +7,8 @@ using System.Linq; ...@@ -8,7 +7,8 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using AGVControl.bean.jobType; using DeviceLibrary;
using Common;
namespace AGVControl namespace AGVControl
{ {
...@@ -36,8 +36,8 @@ namespace AGVControl ...@@ -36,8 +36,8 @@ namespace AGVControl
if (process.MainModule.FileName == current.MainModule.FileName) if (process.MainModule.FileName == current.MainModule.FileName)
{ {
//显示已打开的程序 //显示已打开的程序
API.ShowWindow(process.MainWindowHandle, API.SW_RESTORE); Window_API.ShowWindow(process.MainWindowHandle, Window_API.SW_RESTORE);
API.SwitchToThisWindow(process.MainWindowHandle, true); Window_API.SwitchToThisWindow(process.MainWindowHandle, true);
return; return;
} }
} }
...@@ -49,24 +49,21 @@ namespace AGVControl ...@@ -49,24 +49,21 @@ namespace AGVControl
private static void Start() private static void Start()
{ {
Common.logTextBox = new TextBox(); LogUtil.info("=====程序开始=====");
Common.log = log4net.LogManager.GetLogger("AGVControl_SMD_BOX");
Common.log.Info("=====程序开始=====");
ReadConfig(); ReadConfig();
Common.Charge = new BLL.Charge(); CommonVar.Charge = new Charge();
Common.Standby = new BLL.Standby(); CommonVar.Standby = new Standby();
Common.mir = new MiR.API(); CommonVar.control = new DeviceLibrary.Control();
Common.control = new BLL.Control();
Common.control.Start(); CommonVar.control.Start();
Common.server = new BLL.AgvServer(); CommonVar.server = new AgvServer();
Common.server.Start(); CommonVar.server.Start();
} }
private static void Stop() private static void Stop()
{ {
Common.control.Stop(); CommonVar.control.Stop();
Common.server.Stop(); CommonVar.server.Stop();
Common.log.Info("=====程序结束=====\r\n"); LogUtil.info("=====程序结束=====\r\n");
} }
private static void ReadConfig() private static void ReadConfig()
{ {
...@@ -77,58 +74,58 @@ namespace AGVControl ...@@ -77,58 +74,58 @@ namespace AGVControl
string rfid = ""; string rfid = "";
Common.agvInfo = new List<Agv_Info>(); CommonVar.agvInfo = new List<Agv_Info>();
path = Common.CONFIG_PATH + SettingString.FileName_AGV; path = CommonVar.CONFIG_PATH + SettingString.FileName_AGV;
line = System.IO.File.ReadAllLines(path, Encoding.UTF8); line = System.IO.File.ReadAllLines(path, Encoding.UTF8);
for (int i = 1; i < line.Length; i++) for (int i = 1; i < line.Length; i++)
{ {
temp = line[i].Split(','); temp = line[i].Split(',');
if (temp.Length != 5) continue; if (temp.Length != 5) continue;
//string val = Common.appConfig.AppSettings.Settings[temp[1]].Value; //string val = CommonVar.appConfig.AppSettings.Settings[temp[1]].Value;
bool.TryParse(Common.ReadIni(temp[1], SettingString.IsUse), out isuse); //Convert.ToBoolean(val.Split(',')[0]); bool.TryParse(CommonVar.ReadIni(temp[1], SettingString.IsUse), out isuse); //Convert.ToBoolean(val.Split(',')[0]);
rfid = Common.ReadIni(temp[1], SettingString.RFID); //val.Split(',')[1]; rfid = CommonVar.ReadIni(temp[1], SettingString.RFID); //val.Split(',')[1];
Common.agvInfo.Add(new Agv_Info(temp[0], temp[1], temp[2], temp[3], temp[4], isuse, rfid)); CommonVar.agvInfo.Add(new Agv_Info(temp[0], temp[1], temp[2], temp[3], temp[4], isuse, rfid));
} }
Common.agvMission = new Dictionary<string, string>(); CommonVar.agvMission = new Dictionary<string, string>();
Common.showNameMissionName = new Dictionary<string, string>(); CommonVar.showNameMissionName = new Dictionary<string, string>();
path = Common.CONFIG_PATH + SettingString.FileName_AgvMission; path = CommonVar.CONFIG_PATH + SettingString.FileName_AgvMission;
line = System.IO.File.ReadAllLines(path, Encoding.UTF8); line = System.IO.File.ReadAllLines(path, Encoding.UTF8);
for (int i = 1; i < line.Length; i++) for (int i = 1; i < line.Length; i++)
{ {
temp = line[i].Split(','); temp = line[i].Split(',');
if (temp.Length != 3) continue; if (temp.Length != 3) continue;
Common.agvMission.Add(temp[1], temp[2]); CommonVar.agvMission.Add(temp[1], temp[2]);
Common.showNameMissionName.Add(temp[0], temp[1]); CommonVar.showNameMissionName.Add(temp[0], temp[1]);
} }
Common.nodeInfo = new List<ClientNode>(); CommonVar.nodeInfo = new List<ClientNode>();
path = Common.CONFIG_PATH + SettingString.FileName_AgvProductionLine; path = CommonVar.CONFIG_PATH + SettingString.FileName_AgvProductionLine;
line = System.IO.File.ReadAllLines(path, Encoding.GetEncoding("gb2312")); line = System.IO.File.ReadAllLines(path, Encoding.GetEncoding("gb2312"));
for (int i = 1; i < line.Length; i++) for (int i = 1; i < line.Length; i++)
{ {
temp = line[i].Split(','); temp = line[i].Split(',');
if (temp.Length != 3) continue; if (temp.Length != 3) continue;
Boolean.TryParse(Common.ReadIni(temp[0], SettingString.IsUse), out bool isUse); Boolean.TryParse(CommonVar.ReadIni(temp[0], SettingString.IsUse), out bool isUse);
Common.nodeInfo.Add(new ClientNode(temp[0], temp[1],temp[2], isUse)); CommonVar.nodeInfo.Add(new ClientNode(temp[0], temp[1],temp[2], isUse));
} }
//加载任务类型 //加载任务类型
Common.jobTypeInfo = new List<JobType>(); CommonVar.jobTypeInfo = new List<JobType>();
Common.jobTypeInfo.Add(new PackingJobType()); //CommonVar.jobTypeInfo.Add(new PackingJobType());
Common.jobTypeInfo.Add(new ReelStringJobType()); CommonVar.jobTypeInfo.Add(new ReelStringJobType());
Common.jobTypeInfo.Add(new ReturnJobType()); //CommonVar.jobTypeInfo.Add(new ReturnJobType());
Common.jobTypeInfo.Add(new ChargeJobType()); CommonVar.jobTypeInfo.Add(new ChargeJobType());
} }
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{ {
Common.log.Error("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject); LogUtil.error("CurrentDomain_UnhandledException", (Exception)e.ExceptionObject);
} }
private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{ {
Common.log.Error("Application_ThreadException", e.Exception); LogUtil.error("Application_ThreadException", e.Exception);
} }
} }
......
此文件类型无法预览
此文件类型无法预览
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C6D2FC09-46F7-4EC5-A877-15EA06342E4F}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>AGV_UI</RootNamespace>
<AssemblyName>AGV_UI</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Status.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Status.Designer.cs">
<DependentUpon>Status.cs</DependentUpon>
</Compile>
<Compile Include="Manager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Status.resx">
<DependentUpon>Status.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="battery\charge.png" />
<None Include="state\Unknown.png" />
<None Include="state\ready.png" />
<None Include="state\pause.png" />
<None Include="state\manual.png" />
<None Include="state\Executing.png" />
<None Include="state\Error.png" />
<None Include="state\emergency.png" />
<None Include="state\Aborted.png" />
<None Include="task.png" />
<None Include="online.png" />
<None Include="battery\full.png" />
<None Include="battery\common.png" />
<None Include="battery\low.png" />
<None Include="offline.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file \ No newline at end of file
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGV_UI
{
class Manager
{
static ImageList connImageList;
static ImageList batteryImageList;
static ImageList stateImageList;
static string OnLine = "OnLine";
static string OffLine = "OffLine";
static string LowBattery = "LowBattery";
static string CommonBattery = "CommonBattery";
static string FullBattery = "FullBattery";
static string ChargeBattery = "ChargeBattery";
static string Ready = "Ready";
static string Pause = "Pause";
static string Executing = "Executing";
static string Aborted = "Aborted";
static string EmergencyStop = "EmergencyStop";
static string ManualControl = "ManualControl";
static string Error = "Error";
static string UNKNOWN = "UNKNOWN";
static void InitconnImageList()
{
connImageList = new ImageList();
connImageList.ImageSize = new System.Drawing.Size(32, 32);
connImageList.Images.Add(OnLine, Properties.Resources.online);
connImageList.Images.Add(OffLine, Properties.Resources.offline);
}
static void InitbatteryImageList()
{
batteryImageList = new ImageList();
batteryImageList.ImageSize = new System.Drawing.Size(48, 48);
batteryImageList.Images.Add(LowBattery, Properties.Resources.low);
batteryImageList.Images.Add(CommonBattery, Properties.Resources.common);
batteryImageList.Images.Add(FullBattery, Properties.Resources.full);
batteryImageList.Images.Add(ChargeBattery, Properties.Resources.charge);
}
static void InitStateImageList()
{
stateImageList = new ImageList();
stateImageList.ImageSize = new System.Drawing.Size(48, 48);
stateImageList.Images.Add(UNKNOWN, Properties.Resources.Unknown);
stateImageList.Images.Add(Ready, Properties.Resources.ready);
stateImageList.Images.Add(Pause, Properties.Resources.pause);
stateImageList.Images.Add(ManualControl, Properties.Resources.manual);
stateImageList.Images.Add(Executing, Properties.Resources.Executing);
stateImageList.Images.Add(Error, Properties.Resources.Error);
stateImageList.Images.Add(EmergencyStop, Properties.Resources.emergency);
stateImageList.Images.Add(Aborted, Properties.Resources.Aborted);
}
/// <summary>
/// 设置连接状态
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
public static Image SetConnState(bool state = false)
{
string tmp = state ? OnLine : OffLine;
if (connImageList == null)
InitconnImageList();
return connImageList.Images[tmp];
}
/// <summary>
/// 设置电量
/// </summary>
/// <param name="min"></param>
/// <param name="max"></param>
public static object[] SetBattery(int curBattery, bool isCharge = false, int min = 20, int max = 90)
{
if (curBattery < 0) curBattery = 0;
Image image;
if (batteryImageList == null)
InitbatteryImageList();
if (isCharge)
{
image = batteryImageList.Images[ChargeBattery];
}
else
{
if (curBattery < min)
image = batteryImageList.Images[LowBattery];
else if (curBattery < max)
image = batteryImageList.Images[CommonBattery];
else
image = batteryImageList.Images[FullBattery];
}
return new object[] { string.Format("{0}%",curBattery), image };
}
/// <summary>
/// 设置小车状态
/// </summary>
/// <param name="curState"></param>
public static object[] SetAGVState(string curState)
{
Image image;
if (stateImageList == null)
InitStateImageList();
if(stateImageList.Images.ContainsKey(curState))
image = stateImageList.Images[curState];
else
image = stateImageList.Images[UNKNOWN];
return new object[] { curState, image };
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("AGVStatus")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AGVStatus")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("c6d2fc09-46f7-4ec5-a877-15ea06342e4f")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace AGV_UI.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AGV_UI.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Aborted {
get {
object obj = ResourceManager.GetObject("Aborted", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap charge {
get {
object obj = ResourceManager.GetObject("charge", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap common {
get {
object obj = ResourceManager.GetObject("common", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap emergency {
get {
object obj = ResourceManager.GetObject("emergency", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Error {
get {
object obj = ResourceManager.GetObject("Error", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Executing {
get {
object obj = ResourceManager.GetObject("Executing", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap full {
get {
object obj = ResourceManager.GetObject("full", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap low {
get {
object obj = ResourceManager.GetObject("low", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap manual {
get {
object obj = ResourceManager.GetObject("manual", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap offline {
get {
object obj = ResourceManager.GetObject("offline", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap online {
get {
object obj = ResourceManager.GetObject("online", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap pause {
get {
object obj = ResourceManager.GetObject("pause", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap ready {
get {
object obj = ResourceManager.GetObject("ready", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap task {
get {
object obj = ResourceManager.GetObject("task", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap Unknown {
get {
object obj = ResourceManager.GetObject("Unknown", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="offline" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\offline.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="task" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\task.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="online" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\online.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Aborted" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\Aborted.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="emergency" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\emergency.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Error" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\Error.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Executing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\Executing.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="manual" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\manual.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ready" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\ready.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Unknown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\state\Unknown.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="charge" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\battery\charge.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="common" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\battery\common.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="full" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\battery\full.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="low" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\battery\low.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
\ No newline at end of file \ No newline at end of file
namespace AGV_UI
{
partial class Status
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Status));
this.panelTitle = new System.Windows.Forms.Panel();
this.lblBattery = new System.Windows.Forms.Label();
this.picBxConn = new System.Windows.Forms.PictureBox();
this.lblName = new System.Windows.Forms.Label();
this.panelAGVState = new System.Windows.Forms.Panel();
this.lblAGVState = new System.Windows.Forms.Label();
this.lblTask = new System.Windows.Forms.Label();
this.flowPanelMissionState = new System.Windows.Forms.FlowLayoutPanel();
this.panelTitle.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picBxConn)).BeginInit();
this.panelAGVState.SuspendLayout();
this.SuspendLayout();
//
// panelTitle
//
this.panelTitle.BackColor = System.Drawing.Color.LightBlue;
this.panelTitle.Controls.Add(this.lblBattery);
this.panelTitle.Controls.Add(this.picBxConn);
this.panelTitle.Controls.Add(this.lblName);
this.panelTitle.Dock = System.Windows.Forms.DockStyle.Top;
this.panelTitle.Location = new System.Drawing.Point(0, 0);
this.panelTitle.Name = "panelTitle";
this.panelTitle.Size = new System.Drawing.Size(287, 47);
this.panelTitle.TabIndex = 0;
//
// lblBattery
//
this.lblBattery.Dock = System.Windows.Forms.DockStyle.Right;
this.lblBattery.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblBattery.ForeColor = System.Drawing.Color.Black;
this.lblBattery.Image = ((System.Drawing.Image)(resources.GetObject("lblBattery.Image")));
this.lblBattery.Location = new System.Drawing.Point(249, 0);
this.lblBattery.Name = "lblBattery";
this.lblBattery.Size = new System.Drawing.Size(38, 47);
this.lblBattery.TabIndex = 2;
this.lblBattery.Text = "0%";
this.lblBattery.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// picBxConn
//
this.picBxConn.Dock = System.Windows.Forms.DockStyle.Left;
this.picBxConn.Image = global::AGV_UI.Properties.Resources.offline;
this.picBxConn.Location = new System.Drawing.Point(0, 0);
this.picBxConn.Name = "picBxConn";
this.picBxConn.Size = new System.Drawing.Size(51, 47);
this.picBxConn.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.picBxConn.TabIndex = 1;
this.picBxConn.TabStop = false;
//
// lblName
//
this.lblName.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblName.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblName.ForeColor = System.Drawing.Color.Black;
this.lblName.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblName.Location = new System.Drawing.Point(0, 0);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(287, 47);
this.lblName.TabIndex = 0;
this.lblName.Text = "#号车";
this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// panelAGVState
//
this.panelAGVState.Controls.Add(this.lblAGVState);
this.panelAGVState.Controls.Add(this.lblTask);
this.panelAGVState.Dock = System.Windows.Forms.DockStyle.Top;
this.panelAGVState.Location = new System.Drawing.Point(0, 47);
this.panelAGVState.Name = "panelAGVState";
this.panelAGVState.Size = new System.Drawing.Size(287, 50);
this.panelAGVState.TabIndex = 1;
//
// lblAGVState
//
this.lblAGVState.Dock = System.Windows.Forms.DockStyle.Right;
this.lblAGVState.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblAGVState.Image = global::AGV_UI.Properties.Resources.Unknown;
this.lblAGVState.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblAGVState.Location = new System.Drawing.Point(160, 0);
this.lblAGVState.Name = "lblAGVState";
this.lblAGVState.Size = new System.Drawing.Size(127, 50);
this.lblAGVState.TabIndex = 1;
this.lblAGVState.Text = "None";
this.lblAGVState.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblTask
//
this.lblTask.Dock = System.Windows.Forms.DockStyle.Left;
this.lblTask.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTask.Image = global::AGV_UI.Properties.Resources.task;
this.lblTask.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblTask.Location = new System.Drawing.Point(0, 0);
this.lblTask.Name = "lblTask";
this.lblTask.Size = new System.Drawing.Size(216, 50);
this.lblTask.TabIndex = 0;
this.lblTask.Text = "无任务";
this.lblTask.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// flowPanelMissionState
//
this.flowPanelMissionState.BackColor = System.Drawing.Color.LightBlue;
this.flowPanelMissionState.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowPanelMissionState.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowPanelMissionState.Location = new System.Drawing.Point(0, 97);
this.flowPanelMissionState.Name = "flowPanelMissionState";
this.flowPanelMissionState.Size = new System.Drawing.Size(287, 230);
this.flowPanelMissionState.TabIndex = 2;
//
// Status
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flowPanelMissionState);
this.Controls.Add(this.panelAGVState);
this.Controls.Add(this.panelTitle);
this.Name = "Status";
this.Size = new System.Drawing.Size(287, 327);
this.panelTitle.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picBxConn)).EndInit();
this.panelAGVState.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panelTitle;
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.PictureBox picBxConn;
private System.Windows.Forms.Label lblBattery;
private System.Windows.Forms.Panel panelAGVState;
private System.Windows.Forms.Label lblTask;
private System.Windows.Forms.Label lblAGVState;
private System.Windows.Forms.FlowLayoutPanel flowPanelMissionState;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGV_UI
{
public partial class Status : UserControl
{
public Status(string name, List<string> infos)
{
InitializeComponent();
AGVName = name;
missionShow = new Dictionary<string, Control>();
if (infos != null && infos.Count > 0)
{
foreach (var item in infos)
{
missionShow.Add(item, new Label() { Name = item,
Font = new Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))),
AutoSize = true
});
}
flowPanelMissionState.Controls.AddRange(missionShow.Values.ToArray());
}
}
public Status()
{
}
public void Init()
{
foreach (string item in missionShow.Keys)
{
ShowInfo(item, item);
}
SetTitle();
}
public int MaxBattery { get; set; } = 90;
public int MinBattery { get; set; } = 20;
public string AGVName { get; private set; }
#region 私有字段
private Dictionary<string, Control> missionShow;
#endregion
void SetTitle()
{
this.Invoke(new Action(() =>
{
lblName.Text = AGVName;
}
));
}
/// <summary>
/// 设置电量
/// </summary>
/// <param name="curBattery"></param>
/// <param name="isInCharge"></param>
public void SetBattery(int curBattery, bool isInCharge = false)
{
object[] objs = Manager.SetBattery(curBattery, isInCharge, MinBattery, MaxBattery);
try
{
this.Invoke(new Action(() =>
{
lblBattery.Text = objs[0] as string;
lblBattery.Image = objs[1] as Image;
}
));
}
catch { }
}
/// <summary>
/// 设置连接状态
/// </summary>
/// <param name="state"></param>
public void SetConnectState(bool state = false)
{
Image image = Manager.SetConnState(state);
this.Invoke(new Action(() =>
{
picBxConn.Image = image;
}
));
}
public void ShowInfo(string key, string info)
{
this.Invoke(new Action(() =>
{
if (missionShow.ContainsKey(key))
missionShow[key].Text = string.Format("{0}:{1}",key, info);
}
));
}
/// <summary>
/// 设置当前任务名称
/// </summary>
/// <param name="taskName"></param>
public void SetCurTask(string taskName)
{
this.Invoke(new Action(() =>
{
lblTask.Text = taskName;
}
));
}
/// <summary>
/// 设置agv当前状态
/// </summary>
/// <param name="curState"></param>
public void SetCurState(string curState)
{
object[] objs = Manager.SetAGVState(curState);
this.Invoke(new Action(() =>
{
lblAGVState.Text = objs[0] as string;
lblAGVState.Image = objs[1] as Image;
}
));
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lblBattery.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABGdBTUEAALGPC/xhBQAAAOZJREFUaEPt
ziEOw1AQxNBcrCT3v1NKDA0CxmrBtzRspbfX6XTadd/382ac/1/2rI3z32QPLQfTZehyMF2GLgfTZehy
MF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfT
ZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2GLgfTZehyMF2G
LgfTZehyMF2GLgfT9XyupxxMl6HLwXQZuhxMl6HLwXQZuhzM6XR61XV9AQQ5qN/xmUs6AAAAAElFTkSu
QmCC
</value>
</data>
</root>
\ No newline at end of file \ No newline at end of file
此文件类型无法预览
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BAFEAFE6-04E2-48EE-8845-BFC7EA3E3C21}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Common</RootNamespace>
<AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>.\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>.\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath>.\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="helpers\AppConfigHelper.cs" />
<Compile Include="helpers\IniFileHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingString.cs" />
<Compile Include="util\HttpHelper.cs" />
<Compile Include="util\JsonHelper.cs" />
<Compile Include="util\LogUtil.cs" />
<Compile Include="util\MyWebClient.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file \ No newline at end of file
此文件类型无法预览
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Common")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Common")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("bafeafe6-04e2-48ee-8845-bfc7ea3e3c21")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
此文件类型无法预览
此文件的差异太大,无法显示。
...@@ -5,14 +5,16 @@ using System.Text; ...@@ -5,14 +5,16 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace AGVControl namespace Common
{ {
public static class SettingString public static class SettingString
{ {
public const int AGVCNT = 4; public const int AGVCNT = 4;
//任务类型
public const string Move = "Move"; public const string Move = "Move";
public const string Dock = "Dock"; public const string Dock = "Dock";
//任务名称 //任务名称
public const string Init = "Init";
public const string Standby = "Standby"; public const string Standby = "Standby";
public const string CheckShelf = "CheckShelf"; public const string CheckShelf = "CheckShelf";
public const string DoorDToC = "DoorDToC"; public const string DoorDToC = "DoorDToC";
...@@ -109,5 +111,6 @@ namespace AGVControl ...@@ -109,5 +111,6 @@ namespace AGVControl
public const string D4 = "D4"; public const string D4 = "D4";
public const string LimitPoints = "LimitPoints"; public const string LimitPoints = "LimitPoints";
public const string LocalIP = "LocalIP";
} }
} }
using System; using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml; using System.Xml;
namespace AGVControl namespace Common
{ {
public class IniHelper
{
[DllImport("kernel32")]
//section:要读取的段落名
//key: 要读取的键点击打开链接点击打开链接
//defVal: 读取异常的情况下的缺省值
//retVal: key所对应的值,如果该key不存在则返回空值
//size: 值允许的大小
//filePath: INI文件的完整路径和文件名
private static extern int GetPrivateProfileString(string section, string key, string defVal, StringBuilder retVal, int size, string filePath);
[DllImport("kernel32")]
//section: 要写入的段落名
//key: 要写入的键,如果该key存在则覆盖写入
//val: key所对应的值
//filePath: INI文件的完整路径和文件名
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
/// <summary>
/// 读取INI文件
/// </summary>
/// <param name="section">项目名称(如 [section] )</param>
/// <param name="skey">键</param>
/// <param name="path">路径</param>
public static string ReadValue(string section, string skey, string path)
{
StringBuilder temp = new StringBuilder(500);
GetPrivateProfileString(section, skey, "", temp, 500, path);
return temp.ToString();
}
/// <summary>
/// 写入ini文件
/// </summary>
/// <param name="section">项目名称</param>
/// <param name="key">键</param>
/// <param name="value">值</param>
/// <param name="path">路径</param>
public static void WriteValue(string section, string key, string value, string path)
{
WritePrivateProfileString(section, key, value, path);
}
}
public class AppConfigHelper public class AppConfigHelper
{ {
public static System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); public static System.Configuration.Configuration config = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None);
public static string GetValue(string key) public static string GetValue(string key)
{ {
if (config.AppSettings.Settings[key] == null) if (config.AppSettings.Settings[key] == null)
{ {
Common.log.Error("未找到配置:" + key + ",请检查配置是否完整!"); LogUtil.info("未找到配置:" + key + ",请检查配置是否完整!");
return ""; return "";
} }
else else
...@@ -77,7 +27,7 @@ namespace AGVControl ...@@ -77,7 +27,7 @@ namespace AGVControl
//System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); //System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null) if (config.AppSettings.Settings[key] == null)
{ {
Common.log.Error("未找到配置:" + key + ",请检查配置是否完整!"); LogUtil.error("未找到配置:" + key + ",请检查配置是否完整!");
return a; return a;
} }
else else
...@@ -94,7 +44,7 @@ namespace AGVControl ...@@ -94,7 +44,7 @@ namespace AGVControl
//System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); //System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null) if (config.AppSettings.Settings[key] == null)
{ {
Common.log.Error("未找到配置:" + key + ",请检查配置是否完整!"); LogUtil.error("未找到配置:" + key + ",请检查配置是否完整!");
return a; return a;
} }
else else
...@@ -107,11 +57,11 @@ namespace AGVControl ...@@ -107,11 +57,11 @@ namespace AGVControl
} }
public static bool GetBoolValue(string key) public static bool GetBoolValue(string key)
{ {
bool a=false; bool a = false;
//System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); //System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null) if (config.AppSettings.Settings[key] == null)
{ {
Common.log.Error("未找到配置:" + key + ",请检查配置是否完整!"); LogUtil.error("未找到配置:" + key + ",请检查配置是否完整!");
return a; return a;
} }
else else
...@@ -151,7 +101,7 @@ namespace AGVControl ...@@ -151,7 +101,7 @@ namespace AGVControl
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error("SaveValue保存配置出错:AppKey=" + key + ",AppValue=" + value + "," + ex.StackTrace); LogUtil.error("SaveValue保存配置出错:AppKey=" + key + ",AppValue=" + value + "," + ex.StackTrace);
} }
} }
...@@ -173,7 +123,7 @@ namespace AGVControl ...@@ -173,7 +123,7 @@ namespace AGVControl
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error("UpdateConfig保存配置出错:name=" + name + ",Xvalue=" + Xvalue + "," + ex.StackTrace); LogUtil.error("UpdateConfig保存配置出错:name=" + name + ",Xvalue=" + Xvalue + "," + ex.StackTrace);
} }
} }
///<summary> ///<summary>
...@@ -205,11 +155,11 @@ namespace AGVControl ...@@ -205,11 +155,11 @@ namespace AGVControl
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error("SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + "," + ex.StackTrace); LogUtil.error("SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + "," + ex.StackTrace);
} }
} }
}
}
} }
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common
{
public class IniFileHelper
{
[System.Runtime.InteropServices.DllImport("kernel32")]
//section:要读取的段落名
//key: 要读取的键点击打开链接点击打开链接
//defVal: 读取异常的情况下的缺省值
//retVal: key所对应的值,如果该key不存在则返回空值
//size: 值允许的大小
//filePath: INI文件的完整路径和文件名
private static extern int GetPrivateProfileString(string section, string key, string defVal, StringBuilder retVal, int size, string filePath);
[System.Runtime.InteropServices.DllImport("kernel32")]
//section: 要写入的段落名
//key: 要写入的键,如果该key存在则覆盖写入
//val: key所对应的值
//filePath: INI文件的完整路径和文件名
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
/// <summary>
/// 读取INI文件
/// </summary>
/// <param name="section">项目名称(如 [section] )</param>
/// <param name="skey">键</param>
/// <param name="path">路径</param>
public static string ReadValue(string section, string skey, string path)
{
StringBuilder temp = new StringBuilder(500);
GetPrivateProfileString(section, skey, "", temp, 500, path);
return temp.ToString();
}
/// <summary>
/// 写入ini文件
/// </summary>
/// <param name="section">项目名称</param>
/// <param name="key">键</param>
/// <param name="value">值</param>
/// <param name="path">路径</param>
public static void WriteValue(string section, string key, string value, string path)
{
WritePrivateProfileString(section, key, value, path);
}
}
}
此文件类型无法预览
...@@ -12,10 +12,8 @@ using System.Security.Cryptography; ...@@ -12,10 +12,8 @@ using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Reflection; using System.Reflection;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using MiR;
using AGVControl;
namespace AGVControl namespace Common
{ {
public class HttpHelper public class HttpHelper
{ {
...@@ -140,11 +138,11 @@ namespace AGVControl ...@@ -140,11 +138,11 @@ namespace AGVControl
wc.Encoding = encoding; wc.Encoding = encoding;
result = wc.UploadString(url, "POST", paramData); result = wc.UploadString(url, "POST", paramData);
//Common.LogInfo(result); //LogUtil.info(result);
} }
catch (Exception e) catch (Exception e)
{ {
Common.log.Error("POST ERROR:" + e.ToString()); LogUtil.error("POST ERROR:" + e.ToString());
} }
if (!result.Contains("null") && result.Length != 0) if (!result.Contains("null") && result.Length != 0)
{ {
...@@ -166,19 +164,19 @@ namespace AGVControl ...@@ -166,19 +164,19 @@ namespace AGVControl
{ {
try try
{ {
Common.log.Debug("HTTP GET FROM: " + url); LogUtil.debug("HTTP GET FROM: " + url);
var wc = new WebClient { Encoding = encoding }; var wc = new WebClient { Encoding = encoding };
var readStream = wc.OpenRead(url); var readStream = wc.OpenRead(url);
using (var sr = new StreamReader(readStream, encoding)) using (var sr = new StreamReader(readStream, encoding))
{ {
var result = sr.ReadToEnd(); var result = sr.ReadToEnd();
Common.log.Debug("receive << " + result); LogUtil.debug("receive << " + result);
return result; return result;
} }
} }
catch (Exception e) catch (Exception e)
{ {
Common.log.Error("HTTP GET ERROR:" + e.Message); LogUtil.error("HTTP GET ERROR:" + e.Message);
} }
return ""; return "";
} }
......
using AGVControl; using Newtonsoft.Json;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
namespace AGVControl namespace Common
{ {
/// <summary> /// <summary>
/// Json帮助类 /// Json帮助类
...@@ -74,14 +73,14 @@ namespace AGVControl ...@@ -74,14 +73,14 @@ namespace AGVControl
{ {
try try
{ {
string path = Common.CONFIG_PATH + fileName + ".json"; string path = fileName + ".json";
string output = JsonConvert.SerializeObject(ts,Formatting.Indented); string output = JsonConvert.SerializeObject(ts,Formatting.Indented);
File.WriteAllText(path, output); File.WriteAllText(path, output);
} }
catch (Exception e) catch (Exception e)
{ {
Common.log.Error(e.Message + "/r/n" + e.StackTrace); LogUtil.error(e.Message + "/r/n" + e.StackTrace);
} }
} }
/// <summary> /// <summary>
...@@ -94,7 +93,7 @@ namespace AGVControl ...@@ -94,7 +93,7 @@ namespace AGVControl
{ {
try try
{ {
string path = Common.CONFIG_PATH + fileName + ".json"; string path =fileName + ".json";
StreamReader streamReader = new StreamReader(path); StreamReader streamReader = new StreamReader(path);
string jsonStr = streamReader.ReadToEnd(); string jsonStr = streamReader.ReadToEnd();
List<T> jsonObj = DeserializeJsonToList<T>(jsonStr); List<T> jsonObj = DeserializeJsonToList<T>(jsonStr);
...@@ -103,7 +102,7 @@ namespace AGVControl ...@@ -103,7 +102,7 @@ namespace AGVControl
} }
catch (Exception e) catch (Exception e)
{ {
Common.log.Error(e.Message + "/r/n" + e.StackTrace); LogUtil.error(e.Message + "/r/n" + e.StackTrace);
return null; return null;
} }
} }
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using System.Reflection;
using System.Drawing;
namespace Common
{
public class LogUtil
{
public static readonly ILog AIOLog = LogManager.GetLogger("AGV_3D_SMD");
private static LogUtil instance = new LogUtil();
public delegate void ShowLog(string msg,Color color);
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static Dictionary<int, DateTime> lastErrorLogTime = new Dictionary<int, DateTime>();
public static System.Windows.Forms.RichTextBox logBox = null;
public static int showCount = 20;
public static bool debug_opened = false;
public static void info(ILog log, string msg)
{
if (log == null)
{
return;
}
log.Info(msg);
AddToBox(msg, Color.Black);
//clear();
}
public static void info(ILog log, string msg, Color color)
{
log.Info(msg);
AddToBox(msg, color);
}
public static void debug(ILog log, string msg, Color color)
{
log.Debug(msg);
if (debug_opened)
{
AddToBox(msg, color);
}
}
public static void debug(ILog log, string msg)
{
log.Debug(msg);
if (debug_opened)
{
AddToBox(msg, Color.Gray);
}
}
public static void error(string errorMsg, int type)
{
if (lastErrorLogTime.ContainsKey(type))
{
TimeSpan span = DateTime.Now - lastErrorLogTime[type];
if (span.TotalSeconds > 10)
{
lastErrorLogTime.Remove(type);
lastErrorLogTime.Add(type, DateTime.Now);
error(LOGGER, errorMsg);
}
}
else
{
lastErrorLogTime.Add(type, DateTime.Now);
error(LOGGER, errorMsg);
}
}
public static void error(ILog log, string errorMsg, Exception ex = null)
{
if (errorMsg.Trim().Equals(""))
{
return;
}
if (ex == null)
{
log.Error(errorMsg);
}
else
{
log.Error(errorMsg, ex);
}
AddToBox(errorMsg, Color.Red);
}
private static void AddToBox(string msg, Color color)
{
try
{
ShowLogPro(msg, color);
}
catch (Exception ex)
{
LOGGER.Error("出错:", ex);
}
}
private static List<string> logList = new List<string>();
public static string LastText = "";
private static void ShowLogPro(string msg, Color color)
{
try
{
if (logList.Count > 0)
{
// logList.RemoveAt(0);
}
if (logList.Count >= showCount)
{
logList.RemoveAt(0);
}
string text = "";
foreach (string str in logList)
{
text += str;
}
System.DateTime now = System.DateTime.Now;
logList.Add(now.ToLongTimeString() + " " + msg + Environment.NewLine);
if (logBox == null)
{
return;
}
LastText = text;
if (logBox.Visible)
{
logBox.Text = text;
// logBox.Focus(); //使文本框获取焦点
logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本
TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 3000000)
{
lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
logBox.ScrollToCaret(); //滚动到控件光标处
}
}
}
catch (Exception ex)
{
LOGGER.Error("出错:" + ex.ToString());
}
}
private static DateTime lastTime = DateTime.Now;
public static void UpdateLogbox()
{
if (logBox != null && logBox.Visible)
{
logBox.Text = LastText;
TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 3000000)
{
lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
logBox.ScrollToCaret(); //滚动到控件光标处
}
}
}
public static void ClearLog()
{
if (logBox != null)
{
LastText = "";
logList.Clear();
logBox.Text = "";
}
}
public static void debug(string msg)
{
debug(LOGGER, msg);
}
public static void error(string errorMsg, Exception ex = null)
{
error(LOGGER, errorMsg, ex);
}
public static void info(string msg)
{
info(LOGGER, msg);
}
}
}
...@@ -4,7 +4,7 @@ using System.Linq; ...@@ -4,7 +4,7 @@ using System.Linq;
using System.Net; using System.Net;
using System.Text; using System.Text;
namespace MiR namespace Common
{ {
public class MyWebClient:WebClient public class MyWebClient:WebClient
{ {
......
using System; using Common;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using AGVControl;
namespace AGVControl namespace DeviceLibrary
{ {
public class AGVManager public class AGVManager
{ {
private static log4net.ILog log = log4net.LogManager.GetLogger("AGVManager");
/// <summary> /// <summary>
/// 小车从B区域离开前检查出库任务是否完成 /// 小车从B区域离开前检查出库任务是否完成
/// </summary> /// </summary>
...@@ -20,26 +20,26 @@ namespace AGVControl ...@@ -20,26 +20,26 @@ namespace AGVControl
taskCount = 0; taskCount = 0;
try try
{ {
//Common.log.Info("URL:" + Common.webService["URL"]); //CommonVar.log.Info("URL:" + CommonVar.webService["URL"]);
string url = AppConfigHelper.GetValue(SettingString.http_server) + "rest/api/qisda/device/shelfTaskCount?rfid=" + agv.RFID; string url = AppConfigHelper.GetValue(SettingString.http_server) + "rest/api/qisda/device/shelfTaskCount?rfid=" + agv.RFID;
var client = new RestSharp.RestClient(url) { Timeout = -1 }; var client = new RestSharp.RestClient(url) { Timeout = -1 };
var request = new RestSharp.RestRequest(RestSharp.Method.GET); var request = new RestSharp.RestRequest(RestSharp.Method.GET);
RestSharp.IRestResponse response = client.Execute(request); RestSharp.IRestResponse response = client.Execute(request);
string json = response.Content; string json = response.Content;
Common.log.Info(agv.Name + " [URL: " + url+"] [Return: " + json+"]"); log.Debug(agv.Name + " [URL: " + url+"] [Return: " + json+"]");
if (string.IsNullOrWhiteSpace(json)) return true; //可以离开 if (string.IsNullOrWhiteSpace(json)) return true; //可以离开
//{"code":0,"msg":"ok","data":{"taskCount":1,"rfid":"A14"}}不能搬运锁定的料架,到待机位等待 //{"code":0,"msg":"ok","data":{"taskCount":1,"rfid":"A14"}}不能搬运锁定的料架,到待机位等待
ShelfTaskCount serverResult = JsonHelper.DeserializeJsonToObject<ShelfTaskCount>(json); ShelfTaskCount serverResult = JsonHelper.DeserializeJsonToObject<ShelfTaskCount>(json);
if (serverResult == null) if (serverResult == null)
{ {
Common.log.Error(" 没有收到服务器反馈"); log.Error(" 没有收到服务器反馈");
return true; return true;
} }
if (serverResult.code != 0) return true; if (serverResult.code != 0) return true;
agv.LeftTaskCnt = serverResult.data.taskCount; agv.LeftTaskCnt = serverResult.data.taskCount;
if (serverResult.data.taskCount == 0) //该料架出库完成 if (serverResult.data.taskCount == 0) //该料架出库完成
{ {
Common.log.Info(agv.Name+" 料架【" + agv.RFID + "】 无剩余出库任务,serverResult.shelfTaskData.taskCount=" + serverResult.data.taskCount.ToString()); log.Info(agv.Name+" 料架【" + agv.RFID + "】 无剩余出库任务,serverResult.shelfTaskData.taskCount=" + serverResult.data.taskCount.ToString());
return true; return true;
} }
else //该料架的出库任务未完成 else //该料架的出库任务未完成
...@@ -47,14 +47,14 @@ namespace AGVControl ...@@ -47,14 +47,14 @@ namespace AGVControl
// foreach (ShelfLockData item in serverResult.data) // foreach (ShelfLockData item in serverResult.data)
// { // {
taskCount = serverResult.data.taskCount; taskCount = serverResult.data.taskCount;
Common.log.Info(agv.Name + " [RFID=" + serverResult.data.rfid + "] [taskCount=" + serverResult.data.taskCount + "]"); log.Info(agv.Name + " [RFID=" + serverResult.data.rfid + "] [taskCount=" + serverResult.data.taskCount + "]");
// } // }
return false; return false;
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error(ex); log.Error(ex);
return true; return true;
} }
...@@ -75,20 +75,20 @@ namespace AGVControl ...@@ -75,20 +75,20 @@ namespace AGVControl
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
Common.log.Info("节点【"+name+ "】 料架锁定状态 " + " 【" + server + "】【" + resultStr + "】"); log.Info("节点【"+name+ "】 料架锁定状态 " + " 【" + server + "】【" + resultStr + "】");
ShelfLockInfo serverResult = JsonHelper.DeserializeJsonToObject<ShelfLockInfo>(resultStr); ShelfLockInfo serverResult = JsonHelper.DeserializeJsonToObject<ShelfLockInfo>(resultStr);
if (serverResult == null) if (serverResult == null)
{ {
msg = "节点【" + name + "】没有收到服务器反馈"; msg = "节点【" + name + "】没有收到服务器反馈";
Common.log.Error(msg); log.Error(msg);
return false; return false;
} }
if (serverResult.data.Count == 0) //该料架未锁定 if (serverResult.data.Count == 0) //该料架未锁定
{ {
msg = "节点【" + name + "】 料架【" + rfid + "】 没有锁定库位的料"; msg = "节点【" + name + "】 料架【" + rfid + "】 没有锁定库位的料";
Common.log.Info(msg); log.Info(msg);
return false; return false;
} }
else //该料架存在锁定库位的料 else //该料架存在锁定库位的料
...@@ -96,7 +96,7 @@ namespace AGVControl ...@@ -96,7 +96,7 @@ namespace AGVControl
string nodes=""; string nodes="";
foreach (ShelfLockData item in serverResult.data) foreach (ShelfLockData item in serverResult.data)
{ {
Common.GetNodeNameByAliceName(item.cid,out string nodeName); CommonVar.GetNodeNameByAliceName(item.cid,out string nodeName);
int resInt = shelfLockNodeNames.FindIndex(s=>s !=null && s.Equals(nodeName)); int resInt = shelfLockNodeNames.FindIndex(s=>s !=null && s.Equals(nodeName));
if(resInt==-1) if(resInt==-1)
{ {
...@@ -104,13 +104,13 @@ namespace AGVControl ...@@ -104,13 +104,13 @@ namespace AGVControl
nodes+="锁定的CID=" + item.cid + ",节点名称=" + nodeName+";"; nodes+="锁定的CID=" + item.cid + ",节点名称=" + nodeName+";";
} }
} }
Common.log.Info("节点【" + name + "】获取" + rfid+"料仓锁定信息完成:"+nodes); log.Info("节点【" + name + "】获取" + rfid+"料仓锁定信息完成:"+nodes);
return true; return true;
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error(ex.Message); log.Error(ex.Message);
} }
return false; return false;
} }
...@@ -131,7 +131,7 @@ namespace AGVControl ...@@ -131,7 +131,7 @@ namespace AGVControl
string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap); string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap);
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
Common.log.Debug("updateDeviceAlarmMsg " + " 【" + server + "】【" + resultStr + "】"); log.Debug("updateDeviceAlarmMsg " + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr); RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
...@@ -147,7 +147,7 @@ namespace AGVControl ...@@ -147,7 +147,7 @@ namespace AGVControl
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error(ex); log.Error(ex);
} }
return msg; return msg;
} }
......
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Reflection; using Common;
using System.Threading; using System.Threading;
using AGVControl;
namespace AGVControl.BLL namespace DeviceLibrary
{ {
public class AgvServer public class AgvServer
{ {
...@@ -89,7 +88,7 @@ namespace AGVControl.BLL ...@@ -89,7 +88,7 @@ namespace AGVControl.BLL
idx = FindClient(nodeName); idx = FindClient(nodeName);
if (idx == -1) if (idx == -1)
{ {
Common.log.Error("Arrive: 没有找到" + nodeName); LogUtil.error("Arrive: 没有找到" + nodeName);
Thread.Sleep(500); Thread.Sleep(500);
n++; n++;
} }
...@@ -120,7 +119,7 @@ namespace AGVControl.BLL ...@@ -120,7 +119,7 @@ namespace AGVControl.BLL
idx = FindClient(nodeName); idx = FindClient(nodeName);
if (idx == -1) if (idx == -1)
{ {
Common.log.Error("Ready: 没有找到" + nodeName); LogUtil.error("Ready: 没有找到" + nodeName);
Thread.Sleep(500); Thread.Sleep(500);
n++; n++;
} }
...@@ -151,7 +150,7 @@ namespace AGVControl.BLL ...@@ -151,7 +150,7 @@ namespace AGVControl.BLL
idx = FindClient(nodeName); idx = FindClient(nodeName);
if (idx == -1) if (idx == -1)
{ {
Common.log.Error("CloseDoor: 没有找到" + nodeName); LogUtil.debug("CloseDoor: 没有找到" + nodeName);
Thread.Sleep(500); Thread.Sleep(500);
n++; n++;
} }
...@@ -219,7 +218,7 @@ namespace AGVControl.BLL ...@@ -219,7 +218,7 @@ namespace AGVControl.BLL
IPEndPoint ep = (IPEndPoint)socket.RemoteEndPoint; IPEndPoint ep = (IPEndPoint)socket.RemoteEndPoint;
Thread listen = new Thread(new ParameterizedThreadStart(ListenNet)); Thread listen = new Thread(new ParameterizedThreadStart(ListenNet));
string ip = ep.Address.ToString(); string ip = ep.Address.ToString();
if (ip == System.Configuration.ConfigurationManager.AppSettings["LocalIP"]) if (ip == Common.AppConfigHelper.GetValue(Common.SettingString.LocalIP))
ip += ":" + ep.Port; ip += ":" + ep.Port;
//新的客户端 //新的客户端
...@@ -290,7 +289,7 @@ namespace AGVControl.BLL ...@@ -290,7 +289,7 @@ namespace AGVControl.BLL
} }
else else
{ {
//Common.log.Info("Receive[" + client.IP + "] " + node.ToText()); //CommonVar.log.Info("Receive[" + client.IP + "] " + node.ToText());
int idx = client.nodeName.FindIndex(s => s == node.Name); int idx = client.nodeName.FindIndex(s => s == node.Name);
if (idx == -1) client.nodeName.Add(node.Name); if (idx == -1) client.nodeName.Add(node.Name);
UpdateNode(node); UpdateNode(node);
...@@ -386,21 +385,21 @@ namespace AGVControl.BLL ...@@ -386,21 +385,21 @@ namespace AGVControl.BLL
private void UpdateNode(ClientNode node) private void UpdateNode(ClientNode node)
{ {
int idx = Common.nodeInfo.FindIndex(s => s.Name == node.Name); int idx = CommonVar.nodeInfo.FindIndex(s => s.Name == node.Name);
if (idx == -1) if (idx == -1)
{ {
log.Error(node.Name + " 不存在"); log.Error(node.Name + " 不存在");
return; return;
} }
if (!Common.nodeInfo[idx].Online) if (!CommonVar.nodeInfo[idx].Online)
{ {
Common.nodeInfo[idx].Online = true; CommonVar.nodeInfo[idx].Online = true;
NodeOnline?.Invoke(idx); NodeOnline?.Invoke(idx);
NodeChanged?.Invoke(idx); NodeChanged?.Invoke(idx);
} }
if (Common.nodeInfo[idx].CheckNodeStateChanged(node)) if (CommonVar.nodeInfo[idx].CheckNodeStateChanged(node))
{ {
log.Info( "节点状态更新 " + node.StatetText()); log.Info( "节点状态更新 " + node.StatetText());
NodeChanged?.Invoke(idx); NodeChanged?.Invoke(idx);
...@@ -415,9 +414,9 @@ namespace AGVControl.BLL ...@@ -415,9 +414,9 @@ namespace AGVControl.BLL
for (int i = 0; i < client.nodeName.Count; i++) for (int i = 0; i < client.nodeName.Count; i++)
{ {
int idx = AGVControl.Common.nodeInfo.FindIndex(s => s.Name == client.nodeName[i]); int idx = CommonVar.nodeInfo.FindIndex(s => s.Name == client.nodeName[i]);
if (idx == -1) continue; if (idx == -1) continue;
AGVControl.Common.nodeInfo[idx].Offline(); CommonVar.nodeInfo[idx].Offline();
NodeChanged(idx); NodeChanged(idx);
NodeOnline(idx); NodeOnline(idx);
} }
......
using System; using Common;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AGVControl.BLL namespace DeviceLibrary
{ {
public class Charge public class Charge
{ {
...@@ -132,17 +133,26 @@ namespace AGVControl.BLL ...@@ -132,17 +133,26 @@ namespace AGVControl.BLL
} }
public bool HasEmptyChargeStation() public bool HasEmptyChargeStation(Agv_Info agv)
{ {
lock(loc) lock(loc)
{ {
foreach (string item in Station.Keys) if (SettingString.SingleMission_IP1.Equals(agv.IP))
return true;
else
{ {
if (Station[item].Equals("")) if (Station[AutoCharge2].Equals(""))
{ {
return true; return true;
} }
} }
//foreach (string item in Station.Keys)
//{
// if (Station[item].Equals(""))
// {
// return true;
// }
//}
} }
return false; return false;
} }
...@@ -162,20 +172,20 @@ namespace AGVControl.BLL ...@@ -162,20 +172,20 @@ namespace AGVControl.BLL
{ {
if (Station[chargeStation].Equals("")) if (Station[chargeStation].Equals(""))
{ {
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[chargeStation]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[chargeStation]);
if (rtn) if (rtn)
{ {
Station[chargeStation] = agv.Name; Station[chargeStation] = agv.Name;
agv.Place = SettingString.AutoCharge; agv.Place = SettingString.AutoCharge;
log = string.Format("{0} {1}", agv.Name, chargeStation); log = string.Format("{0} {1}", agv.Name, chargeStation);
Common.LogInfo(log); LogUtil.info(log);
Common.mir.State_Ready(agv); MiR_API.State_Ready(agv);
} }
else else
{ {
Station[chargeStation] = ""; Station[chargeStation] = "";
log = string.Format("{0} {1}失败", agv.Name, chargeStation); log = string.Format("{0} {1}失败", agv.Name, chargeStation);
Common.LogInfo(log); LogUtil.info(log);
} }
return true; return true;
} }
......
using AGVControl.BLL; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using System.Web.UI.WebControls;
using System.Windows.Forms; using System.Windows.Forms;
using Common;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 公共参数 /// 公共参数
/// </summary> /// </summary>
public static class Common public static class CommonVar
{ {
/// <summary> /// <summary>
/// 节点信息 /// 节点信息
...@@ -33,27 +26,23 @@ namespace AGVControl ...@@ -33,27 +26,23 @@ namespace AGVControl
/// </summary> /// </summary>
public static List<Agv_Info> agvInfo; public static List<Agv_Info> agvInfo;
public static System.Windows.Forms.TextBox logTextBox; public static AgvServer server;
public static BLL.AgvServer server;
public static MiR.API mir;
public static log4net.ILog log;
public static Dictionary<string, string> agvMission; public static Dictionary<string, string> agvMission;
public static Dictionary<string, string> showNameMissionName; public static Dictionary<string, string> showNameMissionName;
public static BLL.Control control; public static Control control;
private static List<string> msg = new List<string>(); private static List<string> msg = new List<string>();
private static string preLog = "";
public static readonly string CONFIG_PATH = AppDomain.CurrentDomain.BaseDirectory + "Config\\"; public static readonly string CONFIG_PATH = AppDomain.CurrentDomain.BaseDirectory + "Config\\";
public static Charge Charge; public static Charge Charge;
public static Standby Standby; public static Standby Standby;
public static string ReadIni(string section, string key) public static string ReadIni(string section, string key)
{ {
return IniHelper.ReadValue(section, key, CONFIG_PATH + SettingString.FileName_tempData); return IniFileHelper.ReadValue(section, key, CONFIG_PATH + SettingString.FileName_tempData);
} }
public static void WriteIni(string section, string key, string value) public static void WriteIni(string section, string key, string value)
{ {
IniHelper.WriteValue(section, key, value, CONFIG_PATH + SettingString.FileName_tempData); IniFileHelper.WriteValue(section, key, value, CONFIG_PATH + SettingString.FileName_tempData);
} }
public static bool GetNodeNameByAliceName(string aliceName, out string nodeName) public static bool GetNodeNameByAliceName(string aliceName, out string nodeName)
{ {
...@@ -91,7 +80,7 @@ namespace AGVControl ...@@ -91,7 +80,7 @@ namespace AGVControl
/// <returns></returns> /// <returns></returns>
public static int FindNode(string nodeName) public static int FindNode(string nodeName)
{ {
int idx = Common.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.IsUse); int idx = nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.IsUse);
return idx; return idx;
} }
...@@ -108,21 +97,21 @@ namespace AGVControl ...@@ -108,21 +97,21 @@ namespace AGVControl
agv.Place = ""; agv.Place = "";
//执行下一个任务 //执行下一个任务
int i = FindNode(nodeName); int i = FindNode(nodeName);
bool rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + nodeName]); bool rtn = MiR_API.Add_Mission_Fleet(agv, agvMission[SettingString.Move + nodeName]);
if (rtn) if (rtn)
{ {
agv.Place = nodeName; agv.Place = nodeName;
if (i > -1) if (i > -1)
log = string.Format("{0} {1} To Node {2} {3}", agv.Name, SettingString.Move, nodeName, Common.nodeInfo[i].GetState().ToString()); log = string.Format("{0} {1} To Node {2} {3}", agv.Name, SettingString.Move, nodeName,nodeInfo[i].GetState().ToString());
else else
log = string.Format("{0} {1} To Node {2}", agv.Name, SettingString.Move, nodeName); log = string.Format("{0} {1} To Node {2}", agv.Name, SettingString.Move, nodeName);
Common.LogInfo(log); LogUtil.info(log);
Common.mir.State_Ready(agv); MiR_API.State_Ready(agv);
} }
else else
{ {
log = string.Format("{0} {1} To Node {2} 失败", agv.Name, SettingString.Move, nodeName); log = string.Format("{0} {1} To Node {2} 失败", agv.Name, SettingString.Move, nodeName);
Common.LogInfo(log); LogUtil.info(log);
} }
return rtn; return rtn;
...@@ -141,18 +130,18 @@ namespace AGVControl ...@@ -141,18 +130,18 @@ namespace AGVControl
agv.Place = ""; agv.Place = "";
//执行下一个任务 //执行下一个任务
bool rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Dock + nodeName]); bool rtn = MiR_API.Add_Mission_Fleet(agv, agvMission[SettingString.Dock + nodeName]);
if (rtn) if (rtn)
{ {
agv.Place = nodeName; agv.Place = nodeName;
log = string.Format("{0} {1} To Node {2}", agv.Name, SettingString.Dock, nodeName); log = string.Format("{0} {1} To Node {2}", agv.Name, SettingString.Dock, nodeName);
Common.LogInfo(log); LogUtil.info(log);
Common.mir.State_Ready(agv); MiR_API.State_Ready(agv);
} }
else else
{ {
log = string.Format("{0} {1} To Node {2} 失败", agv.Name, SettingString.Dock, nodeName); log = string.Format("{0} {1} To Node {2} 失败", agv.Name, SettingString.Dock, nodeName);
Common.LogInfo(log); LogUtil.info(log);
} }
return rtn; return rtn;
...@@ -162,7 +151,7 @@ namespace AGVControl ...@@ -162,7 +151,7 @@ namespace AGVControl
public static bool DoorMission(Agv_Info agv, string doorName) public static bool DoorMission(Agv_Info agv, string doorName)
{ {
agv.Place = doorName; agv.Place = doorName;
return Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Move + doorName]); return MiR_API.Add_Mission_Fleet(agv, agvMission[SettingString.Move + doorName]);
} }
/// <summary> /// <summary>
...@@ -173,8 +162,8 @@ namespace AGVControl ...@@ -173,8 +162,8 @@ namespace AGVControl
/// <returns></returns> /// <returns></returns>
public static bool CheckTaskMoveFinished(Agv_Info agv, string nodeName, string curTaskState) public static bool CheckTaskMoveFinished(Agv_Info agv, string nodeName, string curTaskState)
{ {
log.Debug(agv.Name + " 检查当前任务是否结束: " + SettingString.Move + nodeName + " " + curTaskState); LogUtil.debug(agv.Name + " 检查当前任务是否结束: " + SettingString.Move + nodeName + " " + curTaskState);
return Common.agvMission[SettingString.Move + nodeName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done); return agvMission[SettingString.Move + nodeName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done);
} }
/// <summary> /// <summary>
/// 检查当前停靠任务是否结束 /// 检查当前停靠任务是否结束
...@@ -184,8 +173,8 @@ namespace AGVControl ...@@ -184,8 +173,8 @@ namespace AGVControl
/// <returns></returns> /// <returns></returns>
public static bool CheckTaskDockFinished(Agv_Info agv, string nodeName, string curTaskState) public static bool CheckTaskDockFinished(Agv_Info agv, string nodeName, string curTaskState)
{ {
log.Debug(agv.Name + " 检查当前任务是否结束: " + SettingString.Dock + nodeName + " " + curTaskState); LogUtil.debug(agv.Name + " 检查当前任务是否结束: " + SettingString.Dock + nodeName + " " + curTaskState);
return Common.agvMission[SettingString.Dock + nodeName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done); return agvMission[SettingString.Dock + nodeName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done);
} }
/// <summary> /// <summary>
/// 检查充电任务是否分配完成 /// 检查充电任务是否分配完成
...@@ -199,8 +188,8 @@ namespace AGVControl ...@@ -199,8 +188,8 @@ namespace AGVControl
public static bool CheckEnterOrLeaveFinished(Agv_Info agv, string actionName, string curTaskState) public static bool CheckEnterOrLeaveFinished(Agv_Info agv, string actionName, string curTaskState)
{ {
log.Debug(agv.Name + " 检查进出料是否结束: " + actionName + " " + curTaskState); LogUtil.debug(agv.Name + " 检查进出料是否结束: " + actionName + " " + curTaskState);
return Common.agvMission[actionName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done); return agvMission[actionName].Equals(agv.CurTaskGUID) && curTaskState.Equals(SettingString.Done);
} }
...@@ -213,7 +202,7 @@ namespace AGVControl ...@@ -213,7 +202,7 @@ namespace AGVControl
{ {
if (agv.Battery <= threshold) if (agv.Battery <= threshold)
{ {
Common.log.Debug(agv.Name + " 电量小于20%,不执行任务,等待充电"); LogUtil.debug(agv.Name + " 电量小于20%,不执行任务,等待充电");
return false; return false;
} }
...@@ -233,37 +222,6 @@ namespace AGVControl ...@@ -233,37 +222,6 @@ namespace AGVControl
return false; return false;
} }
public static void LogInfo(string text, bool isShow = true)
{
if (logTextBox == null) return;
if (logTextBox.InvokeRequired)
{
logTextBox.Invoke(new Action(() => LogInfo(text, isShow)));
return;
}
if (preLog.Equals(text))//连续重复的日志只打印一次
return;
preLog = text;
if (msg.Count > 255)
{
msg.RemoveRange(0, 10);
}
log.Info(text);
string tmpStr = "";
if (isShow)
{
msg.Add(string.Format("[{0}] {1}\r\n", DateTime.Now.ToString("HH:mm:ss"), text));
msg.ForEach(s => tmpStr += s);
logTextBox.Text = tmpStr;
//logTextBox.AppendText(string.Format("[{0}] {1}\r\n", DateTime.Now.ToString("HH:mm:ss"), text));
//logTextBox.ScrollToCaret();
}
}
/// <summary> /// <summary>
/// 获取Job任务状态 /// 获取Job任务状态
/// </summary> /// </summary>
...@@ -271,14 +229,14 @@ namespace AGVControl ...@@ -271,14 +229,14 @@ namespace AGVControl
/// <returns></returns> /// <returns></returns>
public static string GetTakJobState(int CurTaskID) public static string GetTakJobState(int CurTaskID)
{ {
if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string st)) if (!CurTaskID.Equals(-1) && MiR_API.Get_Task_State(CurTaskID, out string st))
return st; return st;
return SettingString.Wait; return SettingString.Wait;
} }
} }
public static class API public static class Window_API
{ {
[DllImport("user32.dll", EntryPoint = "ShowWindow", CharSet = CharSet.Auto)] [DllImport("user32.dll", EntryPoint = "ShowWindow", CharSet = CharSet.Auto)]
public static extern int ShowWindow(IntPtr hwnd, int nCmdShow); public static extern int ShowWindow(IntPtr hwnd, int nCmdShow);
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing.Text;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using AGVControl; using Common;
using AGVControl.bean.jobType;
using AGVControl_SMD_BOX.BLL;
using log4net.Util; using log4net.Util;
using MiR;
using RestSharp; using RestSharp;
namespace AGVControl.BLL namespace DeviceLibrary
{ {
public class Control public class Control
{ {
...@@ -51,14 +48,14 @@ namespace AGVControl.BLL ...@@ -51,14 +48,14 @@ namespace AGVControl.BLL
AgvStateTimer.Elapsed += AgvStateTimer_Elapsed; AgvStateTimer.Elapsed += AgvStateTimer_Elapsed;
string[] limitPoints = AppConfigHelper.GetValue(SettingString.LimitPoints).Split(';'); string[] limitPoints = AppConfigHelper.GetValue(SettingString.LimitPoints).Split(';');
List<Agv_Info.clsPosition> clsPositions = new List<Agv_Info.clsPosition>(); List<Agv_Info.AgvPosition> clsPositions = new List<Agv_Info.AgvPosition>();
string[] s1; string[] s1;
for (int i = 0; i < limitPoints.Length; i++) for (int i = 0; i < limitPoints.Length; i++)
{ {
s1 = limitPoints[i].Split(','); s1 = limitPoints[i].Split(',');
clsPositions.Add(new Agv_Info.clsPosition(double.Parse(s1[0]), double.Parse(s1[1]))); clsPositions.Add(new Agv_Info.AgvPosition(double.Parse(s1[0]), double.Parse(s1[1])));
} }
limitArea = new AGVControl_SMD_BOX.BLL.ScopeLimit(clsPositions); limitArea = new ScopeLimit(clsPositions);
} }
...@@ -86,21 +83,21 @@ namespace AGVControl.BLL ...@@ -86,21 +83,21 @@ namespace AGVControl.BLL
if (AgvStateInProcess) return; if (AgvStateInProcess) return;
AgvStateInProcess = true; AgvStateInProcess = true;
for (int i = 0; i < Common.agvInfo.Count; i++) for (int i = 0; i < CommonVar.agvInfo.Count; i++)
{ {
try try
{ {
// if (!CheckOnline(i)) continue; // if (!CheckOnline(i)) continue;
CheckOnline(i); CheckOnline(i);
bool change = false; bool change = false;
Common.mir.Get_Task_State(Common.agvInfo[i].CurTaskID, out string stateStr); MiR_API.Get_Task_State(CommonVar.agvInfo[i].CurTaskID, out string stateStr);
Thread.Sleep(50); Thread.Sleep(50);
//获取AGV状态 //获取AGV状态
rtn = Common.mir.Get_State(Common.agvInfo[i], out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.clsPosition position); rtn = MiR_API.Get_State(CommonVar.agvInfo[i], out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.AgvPosition position);
Thread.Sleep(50); Thread.Sleep(50);
rtn = Common.mir.Get_IO_Status(Common.agvInfo[i], out bool[] input, out bool[] output); rtn = MiR_API.Get_IO_Status(CommonVar.agvInfo[i], out bool[] input, out bool[] output);
Thread.Sleep(50); Thread.Sleep(50);
change = Common.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position); change = CommonVar.agvInfo[i].SetState(stateID, stateStr, battery, mission_text, position);
//更新状态stateID.Equals(eAGVState.Executing) //更新状态stateID.Equals(eAGVState.Executing)
if (change) if (change)
...@@ -111,7 +108,7 @@ namespace AGVControl.BLL ...@@ -111,7 +108,7 @@ namespace AGVControl.BLL
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error("AgvStateTimer_" + Common.agvInfo[i].Name + ex.Message + ex.StackTrace); LogUtil.error("AgvStateTimer_" + CommonVar.agvInfo[i].Name + ex.Message + ex.StackTrace);
} }
} }
...@@ -130,7 +127,7 @@ namespace AGVControl.BLL ...@@ -130,7 +127,7 @@ namespace AGVControl.BLL
{ {
lock(lockGetObj) lock(lockGetObj)
{ {
foreach (JobType find in Common.jobTypeInfo) foreach (JobType find in CommonVar.jobTypeInfo)
{ {
Job job = null; Job job = null;
...@@ -140,7 +137,7 @@ namespace AGVControl.BLL ...@@ -140,7 +137,7 @@ namespace AGVControl.BLL
if (job != null) if (job != null)
{ {
Common.log.Debug(agv_Info.Name + " GetJob OK " + job.ToString()); LogUtil.debug(agv_Info.Name + " GetJob OK " + job.ToString());
return job; return job;
} }
} }
...@@ -155,19 +152,19 @@ namespace AGVControl.BLL ...@@ -155,19 +152,19 @@ namespace AGVControl.BLL
{ {
if (AgvCallInProcess) return; if (AgvCallInProcess) return;
AgvCallInProcess = true; AgvCallInProcess = true;
for (int i = 0; i < Common.agvInfo.Count; i++) for (int i = 0; i < CommonVar.agvInfo.Count; i++)
{ {
try try
{ {
Agv_Info agv = Common.agvInfo[i]; Agv_Info agv = CommonVar.agvInfo[i];
if (!agv.IsCon) continue; //AGV网络连接 if (!agv.IsCon) continue; //AGV网络连接
if (!Common.agvInfo[i].IsUse) continue; //AGV是否可用 if (!CommonVar.agvInfo[i].IsUse) continue; //AGV是否可用
//Ready,Pause,Executing,Error //Ready,Pause,Executing,Error
if (!Common.agvInfo[i].StateID.Equals(eAGVState.Ready) && !Common.agvInfo[i].StateID.Equals(eAGVState.Pause) if (!CommonVar.agvInfo[i].StateID.Equals(eAGVState.Ready) && !CommonVar.agvInfo[i].StateID.Equals(eAGVState.Pause)
&& !Common.agvInfo[i].StateID.Equals(eAGVState.Executing) && !Common.agvInfo[i].StateID.Equals(eAGVState.Error)) && !CommonVar.agvInfo[i].StateID.Equals(eAGVState.Executing) && !CommonVar.agvInfo[i].StateID.Equals(eAGVState.Error))
{ {
Common.log.Error(Common.agvInfo[i].Name + " 不可调用 StateID=" + Common.agvInfo[i].StateID.ToString()); LogUtil.debug(CommonVar.agvInfo[i].Name + " 不可调用 StateID=" + CommonVar.agvInfo[i].StateID.ToString());
continue; continue;
} }
...@@ -187,7 +184,7 @@ namespace AGVControl.BLL ...@@ -187,7 +184,7 @@ namespace AGVControl.BLL
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error("AgvCall " + ex.Message + ex.StackTrace); LogUtil.error("AgvCall " + ex.Message + ex.StackTrace);
} }
} }
...@@ -198,33 +195,33 @@ namespace AGVControl.BLL ...@@ -198,33 +195,33 @@ namespace AGVControl.BLL
private bool CheckOnline(int idx) private bool CheckOnline(int idx)
{ {
bool rtn = Common.mir.CheckIP(Common.agvInfo[idx].IP); bool rtn = MiR_API.CheckIP(CommonVar.agvInfo[idx].IP);
if (rtn) if (rtn)
{ {
if (Common.agvInfo[idx].IsCon) if (CommonVar.agvInfo[idx].IsCon)
{ {
Common.log.Debug(Common.agvInfo[idx].Name + " Online"); LogUtil.debug(CommonVar.agvInfo[idx].Name + " Online");
} }
else else
{ {
Common.agvInfo[idx].IsCon = true; CommonVar.agvInfo[idx].IsCon = true;
Common.LogInfo(Common.agvInfo[idx].Name + " Online"); LogUtil.info(CommonVar.agvInfo[idx].Name + " Online");
AgvOnline?.Invoke(idx); AgvOnline?.Invoke(idx);
AgvChanged?.Invoke(idx); AgvChanged?.Invoke(idx);
} }
} }
else else
{ {
if (Common.agvInfo[idx].IsCon) if (CommonVar.agvInfo[idx].IsCon)
{ {
Common.agvInfo[idx].IsCon = false; CommonVar.agvInfo[idx].IsCon = false;
Common.LogInfo(Common.agvInfo[idx].Name + " Offline"); LogUtil.info(CommonVar.agvInfo[idx].Name + " Offline");
AgvOnline?.Invoke(idx); AgvOnline?.Invoke(idx);
AgvChanged?.Invoke(idx); AgvChanged?.Invoke(idx);
} }
else else
{ {
Common.log.Debug(Common.agvInfo[idx].Name + " Offline"); LogUtil.info(CommonVar.agvInfo[idx].Name + " Offline");
} }
} }
return rtn; return rtn;
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F9619F07-15F1-4E59-A383-3871952BBB79}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>.\log4net.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath>.\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AGVManager.cs" />
<Compile Include="AgvServer.cs" />
<Compile Include="bean\Agv_Info.cs" />
<Compile Include="bean\Job.cs" />
<Compile Include="bean\JobStep.cs" />
<Compile Include="bean\JobType.cs" />
<Compile Include="bean\jobType\ChargeJobType.cs" />
<Compile Include="bean\jobType\PackingJobType.cs" />
<Compile Include="bean\jobType\ReelStringJobType.cs" />
<Compile Include="bean\jobType\ReturnJobType.cs" />
<Compile Include="bean\job\ChargeJob.cs" />
<Compile Include="bean\job\EnterLeaveShelfJob.cs" />
<Compile Include="bean\job\GetShelfJob.cs" />
<Compile Include="bean\job\PackingJob_GetShelf.cs" />
<Compile Include="bean\job\PackingJob_SendShelf.cs" />
<Compile Include="bean\job\PackingJob_TransferShelf.cs" />
<Compile Include="bean\job\RecycleEmptyShelf.cs" />
<Compile Include="bean\job\SendShelfJob.cs" />
<Compile Include="bean\job\StandyJob.cs" />
<Compile Include="bean\node\ClientNode.cs" />
<Compile Include="bean\node\Node.cs" />
<Compile Include="Charge.cs" />
<Compile Include="CommonVar.cs" />
<Compile Include="Control.cs" />
<Compile Include="DisplayBoard.cs" />
<Compile Include="bean\MiR_API.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ScopeLimit.cs" />
<Compile Include="Standby.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AGV_UI\AGV_UI.csproj">
<Project>{c6d2fc09-46f7-4ec5-a877-15ea06342e4f}</Project>
<Name>AGV_UI</Name>
</ProjectReference>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{bafeafe6-04e2-48ee-8845-bfc7ea3e3c21}</Project>
<Name>Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ using System.Linq; ...@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AGVControl.bean namespace DeviceLibrary
{ {
public class DisplayBoard public class DisplayBoard
{ {
......
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("DeviceLibrary")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DeviceLibrary")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("f9619f07-15f1-4e59-a383-3871952bbb79")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
此文件类型无法预览
...@@ -4,15 +4,14 @@ using System.Linq; ...@@ -4,15 +4,14 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Threading; using System.Threading;
using AGVControl;
namespace AGVControl_SMD_BOX.BLL namespace DeviceLibrary
{ {
public class ScopeLimit public class ScopeLimit
{ {
List<string> agvIPs; List<string> agvIPs;
//不规则图像坐标 //不规则图像坐标
List<Agv_Info.clsPosition> positions; List<Agv_Info.AgvPosition> positions;
Thread threadPoll;//监控线程 Thread threadPoll;//监控线程
/// <summary> /// <summary>
/// 区域是否可用 /// 区域是否可用
...@@ -20,7 +19,7 @@ namespace AGVControl_SMD_BOX.BLL ...@@ -20,7 +19,7 @@ namespace AGVControl_SMD_BOX.BLL
public bool Available { get; private set; } = true; public bool Available { get; private set; } = true;
public delegate void ScopeLimitStateChangedEventHandler(string ip, bool state); public delegate void ScopeLimitStateChangedEventHandler(string ip, bool state);
public event ScopeLimitStateChangedEventHandler ScopeLimitStateChangedEvent; public event ScopeLimitStateChangedEventHandler ScopeLimitStateChangedEvent;
public ScopeLimit(List<Agv_Info.clsPosition> positions) public ScopeLimit(List<Agv_Info.AgvPosition> positions)
{ {
agvIPs = new List<string>(); agvIPs = new List<string>();
agvIPs.AddRange(new string[] agvIPs.AddRange(new string[]
...@@ -51,7 +50,7 @@ namespace AGVControl_SMD_BOX.BLL ...@@ -51,7 +50,7 @@ namespace AGVControl_SMD_BOX.BLL
foreach (string ip in agvIPs) foreach (string ip in agvIPs)
{ {
Thread.Sleep(1000); Thread.Sleep(1000);
rtn = Common.mir.Get_Position(ip, Common.agvInfo[0].Authorization, out Agv_Info.clsPosition position); rtn = MiR_API.Get_Position(ip, CommonVar.agvInfo[0].Authorization, out Agv_Info.AgvPosition position);
if (rtn) if (rtn)
{ {
if (IsInPolygon(position, positions)) if (IsInPolygon(position, positions))
...@@ -85,11 +84,11 @@ namespace AGVControl_SMD_BOX.BLL ...@@ -85,11 +84,11 @@ namespace AGVControl_SMD_BOX.BLL
/// <param name="checkPoint">要判断的点</param> /// <param name="checkPoint">要判断的点</param>
/// <param name="polygonPoints">多边形的顶点</param> /// <param name="polygonPoints">多边形的顶点</param>
/// <returns></returns> /// <returns></returns>
bool IsInPolygon(Agv_Info.clsPosition checkPoint, List<Agv_Info.clsPosition> polygonPoints) bool IsInPolygon(Agv_Info.AgvPosition checkPoint, List<Agv_Info.AgvPosition> polygonPoints)
{ {
bool inside = false; bool inside = false;
int pointCount = polygonPoints.Count; int pointCount = polygonPoints.Count;
Agv_Info.clsPosition p1, p2; Agv_Info.AgvPosition p1, p2;
for (int i = 0, j = pointCount - 1; i < pointCount; j = i, i++)//第一个点和最后一个点作为第一条线,之后是第一个点和第二个点作为第二条线,之后是第二个点与第三个点,第三个点与第四个点... for (int i = 0, j = pointCount - 1; i < pointCount; j = i, i++)//第一个点和最后一个点作为第一条线,之后是第一个点和第二个点作为第二条线,之后是第二个点与第三个点,第三个点与第四个点...
{ {
p1 = polygonPoints[i]; p1 = polygonPoints[i];
......
...@@ -4,7 +4,7 @@ using System.Linq; ...@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AGVControl.BLL namespace DeviceLibrary
{ {
public class Standby public class Standby
{ {
......
using AGVControl.bean; using System;
using AGVControl_SMD_BOX.BLL;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using Common;
using System.Threading.Tasks;
namespace AGVControl namespace DeviceLibrary
{ {
public class Agv_Info public class Agv_Info
{ {
...@@ -17,7 +14,7 @@ namespace AGVControl ...@@ -17,7 +14,7 @@ namespace AGVControl
/// <summary> /// <summary>
/// 小车在FLEET中的ID号 /// 小车在FLEET中的ID号
/// </summary> /// </summary>
public string ID { private set; get; } public string Fleet_IP { private set; get; }
/// <summary> /// <summary>
/// IP地址 /// IP地址
/// </summary> /// </summary>
...@@ -45,6 +42,9 @@ namespace AGVControl ...@@ -45,6 +42,9 @@ namespace AGVControl
/// </summary> /// </summary>
private bool _IsUse = true; private bool _IsUse = true;
/// <summary>
/// 是否调用
/// </summary>
public bool IsUse public bool IsUse
{ {
set set
...@@ -52,7 +52,7 @@ namespace AGVControl ...@@ -52,7 +52,7 @@ namespace AGVControl
if (!value.Equals(_IsUse)) if (!value.Equals(_IsUse))
{ {
_IsUse = value; _IsUse = value;
Common.WriteIni(Name, SettingString.IsUse, _IsUse.ToString()); CommonVar.WriteIni(Name, SettingString.IsUse, _IsUse.ToString());
} }
} }
get { return _IsUse; } get { return _IsUse; }
...@@ -72,6 +72,10 @@ namespace AGVControl ...@@ -72,6 +72,10 @@ namespace AGVControl
public eAGVState StateID { private set; get; } public eAGVState StateID { private set; get; }
/// <summary> /// <summary>
/// 是否使用Fleet发任务
/// </summary>
public bool Use_Fleet { get; set; } = false;
/// <summary>
/// 负载 /// 负载
/// </summary> /// </summary>
public bool IsExistShelf { set; get; } = false; public bool IsExistShelf { set; get; } = false;
...@@ -83,17 +87,17 @@ namespace AGVControl ...@@ -83,17 +87,17 @@ namespace AGVControl
/// <summary> /// <summary>
/// 当前任务文本,(从小车获取) /// 当前任务文本,(从小车获取)
/// </summary> /// </summary>
public string MissionText { set; get; } public string MissionText { set; get; } = "";
public class clsPosition public class AgvPosition
{ {
public double orientation { get; set; } public double orientation { get; set; }
public double x { get; set; } public double x { get; set; }
public double y { get; set; } public double y { get; set; }
public clsPosition() { } public AgvPosition() { }
public clsPosition(double x,double y) public AgvPosition(double x, double y)
{ {
this.x = x; this.x = x;
this.y = y; this.y = y;
...@@ -102,7 +106,7 @@ namespace AGVControl ...@@ -102,7 +106,7 @@ namespace AGVControl
/// <summary> /// <summary>
/// 当前位置 /// 当前位置
/// </summary> /// </summary>
public clsPosition Position; public AgvPosition Position;
/// <summary> /// <summary>
/// 任务内容 /// 任务内容
...@@ -137,19 +141,6 @@ namespace AGVControl ...@@ -137,19 +141,6 @@ namespace AGVControl
/// </summary> /// </summary>
private DisplayBoard displayBoard; private DisplayBoard displayBoard;
public string RunInfo()
{
if (CurJob != null)
{
return string.Format("设备:{1}{0}当前步骤:{2}{0}执行信息:{3}",
"\r\n", Name, CurJob.RunInfo, MissionText);
}
else
return string.Format("设备:{1}{0}执行信息:{2}",
"\r\n", Name, MissionText);
}
/// <summary> /// <summary>
/// 任务重发 /// 任务重发
/// </summary> /// </summary>
...@@ -169,9 +160,11 @@ namespace AGVControl ...@@ -169,9 +160,11 @@ namespace AGVControl
/// 离线超时 /// 离线超时
/// </summary> /// </summary>
private bool offlineTimeOut = false; private bool offlineTimeOut = false;
public AGV_UI.Status StateKanban;
public Agv_Info(string id, string name, string ip, string authorization, string ioID, bool isUse, string rfid) public Agv_Info(string id, string name, string ip, string authorization, string ioID, bool isUse, string rfid)
{ {
ID = id; Fleet_IP = id;
Name = name; Name = name;
IP = ip; IP = ip;
Authorization = authorization; Authorization = authorization;
...@@ -181,9 +174,13 @@ namespace AGVControl ...@@ -181,9 +174,13 @@ namespace AGVControl
_IsUse = isUse; _IsUse = isUse;
Place = ""; Place = "";
Msg = ""; Msg = "";
Position = new Agv_Info.clsPosition(); Position = new Agv_Info.AgvPosition();
displayBoard = new DisplayBoard(); displayBoard = new DisplayBoard();
RunInfos = new List<string>() { "目的地", "RFID", "负载", "运行模式","任务信息", "AGV运行信息" };
StateKanban = new AGV_UI.Status(name, RunInfos);
} }
public List<string> RunInfos;
DateTime IoStartTime = DateTime.MaxValue; DateTime IoStartTime = DateTime.MaxValue;
int IoLastTime = 5000; int IoLastTime = 5000;
...@@ -200,11 +197,11 @@ namespace AGVControl ...@@ -200,11 +197,11 @@ namespace AGVControl
/// <param name="missionText"></param> /// <param name="missionText"></param>
/// <param name="position"></param> /// <param name="position"></param>
/// <returns></returns> /// <returns></returns>
public bool SetState(eAGVState stateID, string stateText, int battery, string missionText, clsPosition position) public bool SetState(eAGVState stateID, string stateText, int battery, string missionText, AgvPosition position)
{ {
bool isChange = false; bool isChange = false;
bool preShelfState = IsExistShelf; bool preShelfState = IsExistShelf;
Common.mir.Get_IO_Status(this, out bool[] input, out bool[] output); MiR_API.Get_IO_Status(this, out bool[] input, out bool[] output);
if (input != null && input.Length == 4) if (input != null && input.Length == 4)
{ {
bool reachIoValue = input[3].Equals(true);//input[2] && bool reachIoValue = input[3].Equals(true);//input[2] &&
...@@ -235,13 +232,46 @@ namespace AGVControl ...@@ -235,13 +232,46 @@ namespace AGVControl
IsExistShelf = input[3]; IsExistShelf = input[3];
} }
} }
if (!StateID.Equals(stateID) || !CurTaskState.Equals(stateText) || !Battery.Equals(battery) if (!StateID.Equals(stateID) || !CurTaskState.Equals(stateText) || !Battery.Equals(battery)
|| !MissionText.Equals(missionText) || !IsExistShelf.Equals(preShelfState)) || !MissionText.Equals(missionText) || !IsExistShelf.Equals(preShelfState))
isChange = true; isChange = true;
StateID = stateID;
CurTaskState = stateText; if (!CurTaskState.Equals(stateText))
Battery = battery; {
MissionText = missionText; CurTaskState = stateText;
StateKanban.SetCurState(stateText);
}
if (!Battery.Equals(battery))
{
Battery = battery;
StateKanban.SetBattery(battery);
}
//"目的地", "RFID", "负载", "运行模式","任务信息", "AGV运行信息"
if (CommonVar.nodeInfo != null && CommonVar.nodeInfo.Count != 0)
{
ClientNode node = CommonVar.nodeInfo.Find(ss => ss.Name == Place);
if (node != null)
PlaceAliceName = node.AliceName;
else
PlaceAliceName = Place;
}
StateKanban.ShowInfo("目的地", PlaceAliceName);
StateKanban.ShowInfo("RFID", RFID);
if (!IsExistShelf.Equals(preShelfState))
{
StateKanban.ShowInfo("负载", IsExistShelf ? "满载" : "空载");
}
StateKanban.ShowInfo("运行模式", IsUse ? "自动" : "手动");
StateKanban.ShowInfo("任务信息", Msg);
if (!MissionText.Equals(missionText))
{
MissionText = missionText;
StateKanban.ShowInfo("AGV运行信息", missionText);
}
CheckOfflineTimeOut(); CheckOfflineTimeOut();
CheckStandTimeOut(position); CheckStandTimeOut(position);
UpdateDisplayBoard(); UpdateDisplayBoard();
...@@ -263,9 +293,9 @@ namespace AGVControl ...@@ -263,9 +293,9 @@ namespace AGVControl
bool isAlarm = false; bool isAlarm = false;
try try
{ {
int nodeIdx = Common.FindNode(SettingString.G24_Out); int nodeIdx = CommonVar.FindNode(SettingString.G24_Out);
if (nodeIdx > -1) if (nodeIdx > -1)
displayBoard.Add("退料线出口状态", "doubleLine.ReturnLine",Common.nodeInfo[nodeIdx].GetState().ToString(),1); displayBoard.Add("退料线出口状态", "doubleLine.ReturnLine", CommonVar.nodeInfo[nodeIdx].GetState().ToString(), 1);
if (offlineTimeOut) if (offlineTimeOut)
{ {
isAlarm = true; isAlarm = true;
...@@ -301,7 +331,7 @@ namespace AGVControl ...@@ -301,7 +331,7 @@ namespace AGVControl
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error(Name + "上报小车信息失败" + ex.Message + ex.StackTrace); LogUtil.error(Name + "上报小车信息失败" + ex.Message + ex.StackTrace);
} }
} }
/// <summary> /// <summary>
...@@ -324,7 +354,7 @@ namespace AGVControl ...@@ -324,7 +354,7 @@ namespace AGVControl
{ {
offlineTimeOut = false; offlineTimeOut = false;
if ((DateTime.Now - offlineStartTime).TotalSeconds > OfflineLastTimeSeconds) if ((DateTime.Now - offlineStartTime).TotalSeconds > OfflineLastTimeSeconds)
Common.log.Error(string.Format("{0} 在{1}离线{2}秒", Name, PlaceAliceName, (DateTime.Now - offlineStartTime).TotalSeconds.ToString("f2"))); LogUtil.error(string.Format("{0} 在{1}离线{2}秒", Name, PlaceAliceName, (DateTime.Now - offlineStartTime).TotalSeconds.ToString("f2")));
offlineStartTime = DateTime.Now; offlineStartTime = DateTime.Now;
} }
} }
...@@ -332,7 +362,7 @@ namespace AGVControl ...@@ -332,7 +362,7 @@ namespace AGVControl
/// 检查小车是否在原地停留超时 /// 检查小车是否在原地停留超时
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private void CheckStandTimeOut(clsPosition position) private void CheckStandTimeOut(AgvPosition position)
{ {
if (IsUse && CurJob != null && !(CurJob is ChargeJob) && if (IsUse && CurJob != null && !(CurJob is ChargeJob) &&
(!CurTaskName.Contains(SettingString.Standby)))//!CurTaskName.Contains(SettingString.AutoCharge) || (!CurTaskName.Contains(SettingString.Standby)))//!CurTaskName.Contains(SettingString.AutoCharge) ||
...@@ -367,39 +397,6 @@ namespace AGVControl ...@@ -367,39 +397,6 @@ namespace AGVControl
} }
Position = position; Position = position;
} }
//public void GetPlace(int value)
//{
// // Common.log.Debug(Name + " PLC20=" + value);
// if (value == 0)
// {
// Place = "";
// PlaceState = ePlaceState.None;
// }
// else if (value > 0 && value < 1000)
// {
// //Place = "";
// //PlaceState = PlaceState.None;
// //TaskSend = "";
// }
// else if (value >= 1000)
// {
// int a = value / 1000;
// int b = (value - a * 1000) / 10;
// int c = value - a * 1000 - b * 10;
// //if (c.Equals(1) || c.Equals(3) || c.Equals(5))//Move,Enter,Leave
// // TaskSend = "";
// Place = (char)(64 + a) + b.ToString();
// if (Common.nodeInfo != null && Common.nodeInfo.Count != 0)
// {
// ClientNode node = Common.nodeInfo.Find(s => s.Name == Place);
// if (node != null)
// PlaceAliceName = node.AliceName;
// else
// PlaceAliceName = Place;
// }
// PlaceState = (ePlaceState)c;
// }
//}
public string[] ToRow() public string[] ToRow()
{ {
...@@ -413,9 +410,9 @@ namespace AGVControl ...@@ -413,9 +410,9 @@ namespace AGVControl
s.Add(CurTaskState); s.Add(CurTaskState);
//s.Add(Msg); //s.Add(Msg);
// s.Add(MissionText); // s.Add(MissionText);
if (Common.nodeInfo != null && Common.nodeInfo.Count != 0) if (CommonVar.nodeInfo != null && CommonVar.nodeInfo.Count != 0)
{ {
ClientNode node = Common.nodeInfo.Find(ss => ss.Name == Place); ClientNode node = CommonVar.nodeInfo.Find(ss => ss.Name == Place);
if (node != null) if (node != null)
PlaceAliceName = node.AliceName; PlaceAliceName = node.AliceName;
else else
...@@ -430,6 +427,44 @@ namespace AGVControl ...@@ -430,6 +427,44 @@ namespace AGVControl
return s.ToArray(); return s.ToArray();
} }
/// <summary>
/// 给小车分配任务
/// </summary>
public void AssignTask(string taskName)
{
bool rtn;
if (Use_Fleet)
{
rtn = MiR_API.Add_Mission_Fleet(this, CommonVar.agvMission[taskName]);
}
else
{
rtn = MiR_API.Add_Mission(this, CommonVar.agvMission[taskName]);
}
if (rtn)
{
LogUtil.info(string.Format("{0} 分配{1}任务完成", Name, taskName));
}
else
{
LogUtil.info(string.Format("{0} 分配{1}任务失败", Name, taskName));
}
}
/// <summary>
/// 删除当前小车所有任务/Fleet任务里的尽快任务
/// </summary>
/// <param name="id">删除fleet任务时用到,删除尽快里面的任务</param>
public void DeleteAllTask(string id = "")
{
if (Use_Fleet)
{
MiR_API.Del_Mission_Fleet(this, id);
}
else
{
MiR_API.Del_Mission(this);
}
}
} }
/// <summary> /// <summary>
......
using AGVControl; using Common;
using System; namespace DeviceLibrary
using System.Collections.Generic;
namespace AGVControl
{ {
public abstract class Job public abstract class Job
{ {
...@@ -41,7 +38,7 @@ namespace AGVControl ...@@ -41,7 +38,7 @@ namespace AGVControl
CurTaskID = curTaskId; CurTaskID = curTaskId;
CurTaskName = curTaskName; CurTaskName = curTaskName;
//CurTaskState = SettingString.Wait; //CurTaskState = SettingString.Wait;
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
} }
/// <summary> /// <summary>
/// 任务重发 /// 任务重发
...@@ -50,11 +47,11 @@ namespace AGVControl ...@@ -50,11 +47,11 @@ namespace AGVControl
public bool ResendTask(Agv_Info agv) public bool ResendTask(Agv_Info agv)
{ {
bool rtn = false; bool rtn = false;
if (!CurTaskID.Equals(-1) && Common.mir.Get_Task_State(CurTaskID, out string stateStr)) if (!CurTaskID.Equals(-1) && MiR_API.Get_Task_State(CurTaskID, out string stateStr))
{ {
if (stateStr.Equals(SettingString.Aborted) || stateStr.Equals(SettingString.Invalid)) if (stateStr.Equals(SettingString.Aborted) || stateStr.Equals(SettingString.Invalid))
{ {
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[CurTaskName]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[CurTaskName]);
if (rtn) if (rtn)
{ {
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
...@@ -63,9 +60,9 @@ namespace AGVControl ...@@ -63,9 +60,9 @@ namespace AGVControl
} }
} }
else if (!CurTaskName.Equals("") && !Common.agvMission[CurTaskName].Equals(agv.CurTaskGUID))//Job的当前任务与agv最新任务不一致 else if (!CurTaskName.Equals("") && !CommonVar.agvMission[CurTaskName].Equals(agv.CurTaskGUID))//Job的当前任务与agv最新任务不一致
{ {
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[CurTaskName]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[CurTaskName]);
if (rtn) if (rtn)
{ {
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
...@@ -74,7 +71,7 @@ namespace AGVControl ...@@ -74,7 +71,7 @@ namespace AGVControl
} }
else if (CurTaskID.Equals(-1))//任务发送失败,重新发送 else if (CurTaskID.Equals(-1))//任务发送失败,重新发送
{ {
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[CurTaskName]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[CurTaskName]);
if (rtn) if (rtn)
{ {
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
......
using AGVControl; 
using Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AGVControl namespace DeviceLibrary
{ {
public class JobStep<T> where T : Enum public class JobStep<T> where T : Enum
{ {
...@@ -22,7 +23,7 @@ namespace AGVControl ...@@ -22,7 +23,7 @@ namespace AGVControl
//不为空,且与上一个消息不一样才打印 //不为空,且与上一个消息不一样才打印
if (!value.Equals(msg)) if (!value.Equals(msg))
{ {
Common.LogInfo(value); LogUtil.info(value);
} }
} }
msg = value; msg = value;
......
using AGVControl.bean; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace AGVControl namespace DeviceLibrary
{ {
public class JobType public class JobType
{ {
......
...@@ -2,27 +2,24 @@ ...@@ -2,27 +2,24 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using AGVControl; using Common;
using Microsoft.SqlServer.Server; using Microsoft.SqlServer.Server;
using RestSharp; using RestSharp;
namespace MiR namespace DeviceLibrary
{ {
public class API public class MiR_API
{ {
private const int httpTimeout = 5000; private const int httpTimeout = 5000;
private static log4net.ILog log = log4net.LogManager.GetLogger("MiR_API"); private static log4net.ILog log = log4net.LogManager.GetLogger("MiR_API");
public API() public static bool IsDebug { get; set; } = false;
{
}
public bool IsDebug { get; set; } = false;
/// <summary> /// <summary>
/// 获取IO模块guid列表 /// 获取IO模块guid列表
/// </summary> /// </summary>
/// <param name="info"></param> /// <param name="info"></param>
/// <param name="guid"></param> /// <param name="guid"></param>
/// <returns></returns> /// <returns></returns>
public bool Get_IO_Modules(AGVControl.Agv_Info info, out string[] guid) public static bool Get_IO_Modules(Agv_Info info, out string[] guid)
{ {
try try
{ {
...@@ -64,7 +61,7 @@ namespace MiR ...@@ -64,7 +61,7 @@ namespace MiR
/// <param name="input"></param> /// <param name="input"></param>
/// <param name="output"></param> /// <param name="output"></param>
/// <returns></returns> /// <returns></returns>
public bool Get_IO_Status(Agv_Info info, out bool[] input, out bool[] output) public static bool Get_IO_Status(Agv_Info info, out bool[] input, out bool[] output)
{ {
try try
{ {
...@@ -110,7 +107,7 @@ namespace MiR ...@@ -110,7 +107,7 @@ namespace MiR
/// <param name="reg"></param> /// <param name="reg"></param>
/// <param name="regValue"></param> /// <param name="regValue"></param>
/// <returns></returns> /// <returns></returns>
public bool Get_Register(Agv_Info info, int reg, out int regValue) public static bool Get_Register(Agv_Info info, int reg, out int regValue)
{ {
try try
{ {
...@@ -148,7 +145,7 @@ namespace MiR ...@@ -148,7 +145,7 @@ namespace MiR
/// <param name="reg"></param> /// <param name="reg"></param>
/// <param name="regValue"></param> /// <param name="regValue"></param>
/// <returns></returns> /// <returns></returns>
public bool Set_Register(Agv_Info info, int reg, int regValue) public static bool Set_Register(Agv_Info info, int reg, int regValue)
{ {
try try
{ {
...@@ -186,11 +183,11 @@ namespace MiR ...@@ -186,11 +183,11 @@ namespace MiR
/// <param name="info"></param> /// <param name="info"></param>
/// <param name="mission_id"></param> /// <param name="mission_id"></param>
/// <returns></returns> /// <returns></returns>
public bool Add_Mission(Agv_Info info, string mission_id, bool isRemovePreMission = true) public static bool Add_Mission(Agv_Info info, string mission_id, bool isRemovePreMission = true)
{ {
try try
{ {
Common.LogInfo(string.Format("{0} Add_Mission [{1}]", info.Name, mission_id)); log.Debug(string.Format("{0} Add_Mission [{1}]", info.Name, mission_id));
//删除上一任务 //删除上一任务
Del_Mission(info); Del_Mission(info);
...@@ -216,13 +213,13 @@ namespace MiR ...@@ -216,13 +213,13 @@ namespace MiR
{ {
info.CurTaskID = Convert.ToInt32(id); info.CurTaskID = Convert.ToInt32(id);
info.CurTaskGUID = mission_id; info.CurTaskGUID = mission_id;
var key = Common.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key); var key = CommonVar.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key);
info.CurTaskName = key.ToList()[0]; info.CurTaskName = key.ToList()[0];
log.Info(string.Format("{0} Add_Mission [{1}]", info.Name, key.ToList()[0])); log.Debug(string.Format("{0} Add_Mission [{1}]", info.Name, key.ToList()[0]));
} }
catch catch
{ {
log.Info(string.Format("{0} Add_Mission [{1}]", info.Name, mission_id)); log.Error(string.Format("{0} Add_Mission [{1}]", info.Name, mission_id));
info.CurTaskName = ""; info.CurTaskName = "";
} }
...@@ -244,7 +241,7 @@ namespace MiR ...@@ -244,7 +241,7 @@ namespace MiR
/// <param name="info"></param> /// <param name="info"></param>
/// <param name="mission_id"></param> /// <param name="mission_id"></param>
/// <returns></returns> /// <returns></returns>
public bool Add_Mission_Fleet(Agv_Info info, string mission_id, bool isRemovePreMission = true) public static bool Add_Mission_Fleet(Agv_Info info, string mission_id, bool isRemovePreMission = true)
{ {
try try
{ {
...@@ -257,7 +254,7 @@ namespace MiR ...@@ -257,7 +254,7 @@ namespace MiR
string ip = AppConfigHelper.GetValue(SettingString.FLEET); string ip = AppConfigHelper.GetValue(SettingString.FLEET);
string url = "http://" + ip + "/api/v2.0.0/mission_scheduler"; string url = "http://" + ip + "/api/v2.0.0/mission_scheduler";
string body = "{\"mission_id\":\"" + mission_id + "\",\"robot_id\":" + info.ID + "}"; string body = "{\"mission_id\":\"" + mission_id + "\",\"robot_id\":" + info.Fleet_IP + "}";
string json = HttpPost(url, info.IP, info.Authorization, body); string json = HttpPost(url, info.IP, info.Authorization, body);
if (string.IsNullOrWhiteSpace(json)) return false; if (string.IsNullOrWhiteSpace(json)) return false;
...@@ -277,7 +274,7 @@ namespace MiR ...@@ -277,7 +274,7 @@ namespace MiR
{ {
info.CurTaskID = Convert.ToInt32(id); info.CurTaskID = Convert.ToInt32(id);
info.CurTaskGUID = mission_id; info.CurTaskGUID = mission_id;
var key = Common.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key); var key = CommonVar.agvMission.Where(qq => qq.Value == mission_id).Select(qq => qq.Key);
info.CurTaskName = key.ToList()[0]; info.CurTaskName = key.ToList()[0];
log.Info(string.Format("{0} Add_Mission_Fleet [{1}]", info.Name, key.ToList()[0])); log.Info(string.Format("{0} Add_Mission_Fleet [{1}]", info.Name, key.ToList()[0]));
} }
...@@ -304,7 +301,7 @@ namespace MiR ...@@ -304,7 +301,7 @@ namespace MiR
/// <param name="info"></param> /// <param name="info"></param>
/// <param name="mission">任务(名称,guid)</param> /// <param name="mission">任务(名称,guid)</param>
/// <returns></returns> /// <returns></returns>
public bool Get_Mission(Agv_Info info, out Dictionary<string, string> mission) public static bool Get_Mission(Agv_Info info, out Dictionary<string, string> mission)
{ {
mission = null; mission = null;
try try
...@@ -339,7 +336,7 @@ namespace MiR ...@@ -339,7 +336,7 @@ namespace MiR
/// <param name="info"></param> /// <param name="info"></param>
/// <param name="mission"></param> /// <param name="mission"></param>
/// <returns></returns> /// <returns></returns>
public bool Get_Mission_Queue(Agv_Info info, out List<string> mission) public static bool Get_Mission_Queue(Agv_Info info, out List<string> mission)
{ {
mission = null; mission = null;
try try
...@@ -383,7 +380,7 @@ namespace MiR ...@@ -383,7 +380,7 @@ namespace MiR
/// 删除当前所有任务 /// 删除当前所有任务
/// </summary> /// </summary>
/// <param name="info"></param> /// <param name="info"></param>
public void Del_Mission(Agv_Info info) public static void Del_Mission(Agv_Info info)
{ {
try try
{ {
...@@ -401,7 +398,7 @@ namespace MiR ...@@ -401,7 +398,7 @@ namespace MiR
/// </summary> /// </summary>
/// <param name="authorization"></param> /// <param name="authorization"></param>
/// <param name="id"></param> /// <param name="id"></param>
public void Del_Mission_Fleet(Agv_Info agv, string id) public static void Del_Mission_Fleet(Agv_Info agv, string id)
{ {
try try
{ {
...@@ -423,13 +420,13 @@ namespace MiR ...@@ -423,13 +420,13 @@ namespace MiR
/// <param name="battery"></param> /// <param name="battery"></param>
/// <param name="mission_text"></param> /// <param name="mission_text"></param>
/// <returns></returns> /// <returns></returns>
public bool Get_State(Agv_Info info, out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.clsPosition position) public static bool Get_State(Agv_Info info, out eAGVState stateID, out string stateText, out int battery, out string mission_text, out Agv_Info.AgvPosition position)
{ {
stateID = eAGVState.UNKNOWN; stateID = eAGVState.UNKNOWN;
stateText = ""; stateText = "";
battery = 0; battery = 0;
mission_text = ""; mission_text = "";
position = new Agv_Info.clsPosition(); position = new Agv_Info.AgvPosition();
try try
{ {
string url = "http://" + info.IP + "/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text,position"; string url = "http://" + info.IP + "/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text,position";
...@@ -476,9 +473,9 @@ namespace MiR ...@@ -476,9 +473,9 @@ namespace MiR
/// <param name="author">授权码</param> /// <param name="author">授权码</param>
/// <param name="position">输出位置</param> /// <param name="position">输出位置</param>
/// <returns></returns> /// <returns></returns>
public bool Get_Position(string ip,string author, out Agv_Info.clsPosition position) public static bool Get_Position(string ip,string author, out Agv_Info.AgvPosition position)
{ {
position = new Agv_Info.clsPosition(); position = new Agv_Info.AgvPosition();
try try
{ {
string url = "http://" + ip + "/api/v2.0.0/status?whitelist=position"; string url = "http://" + ip + "/api/v2.0.0/status?whitelist=position";
...@@ -502,7 +499,7 @@ namespace MiR ...@@ -502,7 +499,7 @@ namespace MiR
} }
} }
public bool Get_Task_State(int CurTaskID, out string stateStr) public static bool Get_Task_State(int CurTaskID, out string stateStr)
{ {
stateStr = SettingString.Wait; stateStr = SettingString.Wait;
try try
...@@ -512,8 +509,8 @@ namespace MiR ...@@ -512,8 +509,8 @@ namespace MiR
string ip = AppConfigHelper.GetValue(SettingString.FLEET); string ip = AppConfigHelper.GetValue(SettingString.FLEET);
//http://10.85.199.3/api/v2.0.0/mission_scheduler //http://10.85.199.3/api/v2.0.0/mission_scheduler
string url = "http://" + ip + "/api/v2.0.0/mission_scheduler/" + CurTaskID; string url = "http://" + ip + "/api/v2.0.0/mission_scheduler/" + CurTaskID;
string json = HttpGet(url, ip, Common.agvInfo[0].Authorization); string json = HttpGet(url, ip, CommonVar.agvInfo[0].Authorization);
Common.log.Debug("URL: " + url + "\n" + "Return: " + json); log.Debug("URL: " + url + "\n" + "Return: " + json);
if (string.IsNullOrWhiteSpace(json)) return false; if (string.IsNullOrWhiteSpace(json)) return false;
JavaScriptSerializer serializer = new JavaScriptSerializer(); JavaScriptSerializer serializer = new JavaScriptSerializer();
...@@ -544,7 +541,7 @@ namespace MiR ...@@ -544,7 +541,7 @@ namespace MiR
/// </summary> /// </summary>
/// <param name="info"></param> /// <param name="info"></param>
/// <returns></returns> /// <returns></returns>
public bool State_Ready(Agv_Info info) public static bool State_Ready(Agv_Info info)
{ {
try try
{ {
...@@ -575,7 +572,7 @@ namespace MiR ...@@ -575,7 +572,7 @@ namespace MiR
/// </summary> /// </summary>
/// <param name="info"></param> /// <param name="info"></param>
/// <returns></returns> /// <returns></returns>
public bool State_Pause(Agv_Info info) public static bool State_Pause(Agv_Info info)
{ {
try try
{ {
...@@ -606,7 +603,7 @@ namespace MiR ...@@ -606,7 +603,7 @@ namespace MiR
/// </summary> /// </summary>
/// <param name="info"></param> /// <param name="info"></param>
/// <returns></returns> /// <returns></returns>
public bool Clear_Error(Agv_Info info) public static bool Clear_Error(Agv_Info info)
{ {
try try
{ {
...@@ -629,7 +626,7 @@ namespace MiR ...@@ -629,7 +626,7 @@ namespace MiR
/// </summary> /// </summary>
/// <param name="ip"></param> /// <param name="ip"></param>
/// <returns></returns> /// <returns></returns>
public bool CheckIP(string ip) public static bool CheckIP(string ip)
{ {
//IP合法 //IP合法
string pattern = @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$"; string pattern = @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$";
...@@ -661,8 +658,8 @@ namespace MiR ...@@ -661,8 +658,8 @@ namespace MiR
} }
#region HTTP GET POST PUT DEL
private string HttpGet(string url, string ip, string authorization) private static string HttpGet(string url, string ip, string authorization)
{ {
RestClient client = new RestClient(url) { Timeout = httpTimeout }; RestClient client = new RestClient(url) { Timeout = httpTimeout };
RestRequest request = new RestRequest(Method.GET); RestRequest request = new RestRequest(Method.GET);
...@@ -681,7 +678,7 @@ namespace MiR ...@@ -681,7 +678,7 @@ namespace MiR
return s; return s;
} }
private string HttpPost(string url, string ip, string authorization, string body) private static string HttpPost(string url, string ip, string authorization, string body)
{ {
var client = new RestClient(url) { Timeout = httpTimeout }; var client = new RestClient(url) { Timeout = httpTimeout };
var request = new RestRequest(Method.POST); var request = new RestRequest(Method.POST);
...@@ -701,7 +698,7 @@ namespace MiR ...@@ -701,7 +698,7 @@ namespace MiR
return s; return s;
} }
private string HttpPut(string url, string ip, string authorization, string body) private static string HttpPut(string url, string ip, string authorization, string body)
{ {
RestClient client = new RestClient(url) { Timeout = httpTimeout }; RestClient client = new RestClient(url) { Timeout = httpTimeout };
RestRequest request = new RestRequest(Method.PUT); RestRequest request = new RestRequest(Method.PUT);
...@@ -721,7 +718,7 @@ namespace MiR ...@@ -721,7 +718,7 @@ namespace MiR
return s; return s;
} }
private void HttpDel(string url, string ip, string authorization) private static void HttpDel(string url, string ip, string authorization)
{ {
RestClient client = new RestClient(url) { Timeout = httpTimeout }; RestClient client = new RestClient(url) { Timeout = httpTimeout };
RestRequest request = new RestRequest(Method.DELETE); RestRequest request = new RestRequest(Method.DELETE);
...@@ -736,6 +733,6 @@ namespace MiR ...@@ -736,6 +733,6 @@ namespace MiR
if (IsDebug) if (IsDebug)
log.Debug("HttpDel URL: " + url); log.Debug("HttpDel URL: " + url);
} }
#endregion
} }
} }
 using Common;
using AGVControl;
using System; namespace DeviceLibrary
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl
{ {
/// <summary> /// <summary>
/// 充电任务 /// 充电任务
...@@ -51,25 +43,25 @@ namespace AGVControl ...@@ -51,25 +43,25 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = ""; agv.Msg = "";
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (ChargeStep.IsStep(CHARGE_STEP.NONE)) if (ChargeStep.IsStep(CHARGE_STEP.NONE))
{ {
if (agvPlace.StartsWith(SettingString.C4_Name_Prefix)) if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))
{ {
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR); ChargeStep.ToNextStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR);
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.Charge.BatteryMax + "%],从当前位置" + agvPlace + "回到充电位,先到4D门"; runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + CommonVar.Charge.BatteryMax + "%],从当前位置" + agvPlace + "回到充电位,先到4D门";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD); CommonVar.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
{ {
if (!Common.Charge.StartCharge(agv)) if (!CommonVar.Charge.StartCharge(agv))
{ {
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.Charge.BatteryMax + "%],由于充电桩有小车,从当前位置" + agvPlace + "回到待机位"; runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + CommonVar.Charge.BatteryMax + "%],由于充电桩有小车,从当前位置" + agvPlace + "回到待机位";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
return new StandyJob(agv.Place); return new StandyJob(agv.Place);
...@@ -77,7 +69,7 @@ namespace AGVControl ...@@ -77,7 +69,7 @@ namespace AGVControl
else else
{ {
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION); ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION);
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.Charge.BatteryMax + "%],从当前位置" + agvPlace + "去到充电位"; runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + CommonVar.Charge.BatteryMax + "%],从当前位置" + agvPlace + "去到充电位";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
...@@ -87,9 +79,9 @@ namespace AGVControl ...@@ -87,9 +79,9 @@ namespace AGVControl
else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR)) else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_AGV_REACH_4D_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
if (agv.Battery > Common.Charge.BatteryMax) if (agv.Battery > CommonVar.Charge.BatteryMax)
{ {
runInfo = "电量充足[" + agv.Battery + "%],从当前位置" + agvPlace + "去到待机位"; runInfo = "电量充足[" + agv.Battery + "%],从当前位置" + agvPlace + "去到待机位";
msg += runInfo; msg += runInfo;
...@@ -98,9 +90,9 @@ namespace AGVControl ...@@ -98,9 +90,9 @@ namespace AGVControl
} }
else else
{ {
if (!Common.Charge.StartCharge(agv)) if (!CommonVar.Charge.StartCharge(agv))
{ {
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.Charge.BatteryMax + "%],充电桩有小车,从当前位置" + agvPlace + "回到待机位"; runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + CommonVar.Charge.BatteryMax + "%],充电桩有小车,从当前位置" + agvPlace + "回到待机位";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
...@@ -109,7 +101,7 @@ namespace AGVControl ...@@ -109,7 +101,7 @@ namespace AGVControl
else else
{ {
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION); ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION);
runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + Common.Charge.BatteryMax + "%],从当前位置" + agvPlace + "去到充电位"; runInfo = "电量[" + agv.Battery + "%]小于最大电量[" + CommonVar.Charge.BatteryMax + "%],从当前位置" + agvPlace + "去到充电位";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
...@@ -120,7 +112,7 @@ namespace AGVControl ...@@ -120,7 +112,7 @@ namespace AGVControl
} }
else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION)) else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_REACH_CHARGE_STATION))
{ {
if (Common.CheckTaskFinished(agv, CurTaskName)) if (CommonVar.CheckTaskFinished(agv, CurTaskName))
{ {
ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_OK); ChargeStep.ToNextStep(CHARGE_STEP.WAIT_REACH_CHARGE_OK);
runInfo = "充电任务分配完成,去充电且等待任务"; runInfo = "充电任务分配完成,去充电且等待任务";
...@@ -130,23 +122,23 @@ namespace AGVControl ...@@ -130,23 +122,23 @@ namespace AGVControl
} }
else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_REACH_CHARGE_OK)) else if (ChargeStep.IsStep(CHARGE_STEP.WAIT_REACH_CHARGE_OK))
{ {
if (agv.Battery > Common.Charge.BatteryMax) if (agv.Battery > CommonVar.Charge.BatteryMax)
{ {
runInfo = "充电完成,回待机位"; runInfo = "充电完成,回待机位";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
Common.Charge.DelOccupyInfoByAGV(agv); CommonVar.Charge.DelOccupyInfoByAGV(agv);
return new StandyJob(agv.Place); return new StandyJob(agv.Place);
} }
else if(agv.Battery > Common.Charge.BatteryMin) else if(agv.Battery > CommonVar.Charge.BatteryMin)
{ {
Job job = Common.control.GetJob(agv); Job job = CommonVar.control.GetJob(agv);
if (job != null && !(job is ChargeJob) && !(job is StandyJob)) if (job != null && !(job is ChargeJob) && !(job is StandyJob))
{ {
runInfo = "在充电位检测到任务,电量[" + agv.Battery + " %]大于最小电量[" + Common.Charge.BatteryMin + " %],可执行任务"; runInfo = "在充电位检测到任务,电量[" + agv.Battery + " %]大于最小电量[" + CommonVar.Charge.BatteryMin + " %],可执行任务";
msg += runInfo; msg += runInfo;
ChargeStep.Msg = msg; ChargeStep.Msg = msg;
Common.Charge.DelOccupyInfoByAGV(agv); CommonVar.Charge.DelOccupyInfoByAGV(agv);
return job; return job;
} }
} }
......
 using System.Threading.Tasks;
using AGVControl;
using MiR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 小车进出料类型 /// 小车进出料类型
...@@ -79,7 +71,7 @@ namespace AGVControl ...@@ -79,7 +71,7 @@ namespace AGVControl
runInfo += "小车链条运行"; runInfo += "小车链条运行";
msg += runInfo; msg += runInfo;
EnterLeaveShelfStep.Msg = msg; EnterLeaveShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Leave"]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission["Leave"]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if(ActionType.Equals(eEnterLeaveType.Enter)) else if(ActionType.Equals(eEnterLeaveType.Enter))
...@@ -88,14 +80,14 @@ namespace AGVControl ...@@ -88,14 +80,14 @@ namespace AGVControl
runInfo +="小车链条运行"; runInfo +="小车链条运行";
msg += runInfo; msg += runInfo;
EnterLeaveShelfStep.Msg = msg; EnterLeaveShelfStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Enter"]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission["Enter"]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT__SHELF_IN_LINE)) else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT__SHELF_IN_LINE))
{ {
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Leave", CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, "Leave", CurTaskState))
{ {
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END); //EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
...@@ -116,8 +108,8 @@ namespace AGVControl ...@@ -116,8 +108,8 @@ namespace AGVControl
} }
else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT__SHELF_OUT_LINE)) else if (EnterLeaveShelfStep.IsStep(ENTER_LEAVE_SHELF_STEP.WAIT__SHELF_OUT_LINE))
{ {
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (Common.CheckEnterOrLeaveFinished(agv, "Enter", CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, "Enter", CurTaskState))
{ {
//EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END); //EnterLeaveShelfStep.ToNextStep(ENTER_LEAVE_SHELF_STEP.END);
......
using AGVControl; using Common;
using AGVControl.bean.jobType;
using System; namespace DeviceLibrary
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl
{ {
/// <summary> /// <summary>
/// 取料串 /// 取料串
...@@ -53,16 +44,16 @@ namespace AGVControl ...@@ -53,16 +44,16 @@ namespace AGVControl
{ {
get get
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("取{5}料串任务[RFID={4}]: {0}[目的地={1}][任务名称={2}][任务状态={3}]", runInfo,to, CurTaskName, CurTaskState, RFID, isFullShelf ? "满" : "空"); return string.Format("取{5}料串任务[RFID={4}]: {0}[目的地={1}][任务名称={2}][任务状态={3}]", runInfo,to, CurTaskName, CurTaskState, RFID, isFullShelf ? "满" : "空");
...@@ -73,16 +64,16 @@ namespace AGVControl ...@@ -73,16 +64,16 @@ namespace AGVControl
private string GetShowInfo() private string GetShowInfo()
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("取料串任务[RFID={3}]: {0}[{1}->{2}]", runInfo, from, to, RFID); ; return string.Format("取料串任务[RFID={3}]: {0}[{1}->{2}]", runInfo, from, to, RFID); ;
...@@ -97,7 +88,7 @@ namespace AGVControl ...@@ -97,7 +88,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = GetShowInfo(); agv.Msg = GetShowInfo();
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
...@@ -107,7 +98,7 @@ namespace AGVControl ...@@ -107,7 +98,7 @@ namespace AGVControl
runInfo = "待机位/充电位收到任务,开始执行"; runInfo = "待机位/充电位收到任务,开始执行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix) && !TargetPlace.StartsWith(SettingString.C4_Name_Prefix))//C D else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix) && !TargetPlace.StartsWith(SettingString.C4_Name_Prefix))//C D
...@@ -116,7 +107,7 @@ namespace AGVControl ...@@ -116,7 +107,7 @@ namespace AGVControl
runInfo = "4C车间收到任务,先到4D门"; runInfo = "4C车间收到任务,先到4D门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD); CommonVar.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (!agvPlace.StartsWith(SettingString.C4_Name_Prefix) && TargetPlace.StartsWith(SettingString.C4_Name_Prefix))// D C else if (!agvPlace.StartsWith(SettingString.C4_Name_Prefix) && TargetPlace.StartsWith(SettingString.C4_Name_Prefix))// D C
...@@ -125,7 +116,7 @@ namespace AGVControl ...@@ -125,7 +116,7 @@ namespace AGVControl
runInfo = "4D车间收到任务,先到4C门"; runInfo = "4D车间收到任务,先到4C门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorDToC); CommonVar.DoorMission(agv, SettingString.DoorDToC);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -135,52 +126,52 @@ namespace AGVControl ...@@ -135,52 +126,52 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4D_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4D_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_SHELF_PLACE); curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_SHELF_PLACE);
runInfo = "到达4D门,去料架处" + TargetPlace; runInfo = "到达4D门,去料架处" + TargetPlace;
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4C_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4C_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorDToC, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorDToC, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_SHELF_PLACE); curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_SHELF_PLACE);
runInfo = "到达4C门,去料架处" + TargetPlace; runInfo = "到达4C门,去料架处" + TargetPlace;
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_SHELF_PLACE)) else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_SHELF_PLACE))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE);
runInfo = "到达料架处" + TargetPlace + ",并向线体发送出料请求"; runInfo = "到达料架处" + TargetPlace + ",并向线体发送出料请求";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, ""); CommonVar.server.Ready(TargetPlace, "");
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayLeave)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayLeave));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV); curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV);
...@@ -189,9 +180,9 @@ namespace AGVControl ...@@ -189,9 +180,9 @@ namespace AGVControl
curJobStep.Msg = msg; curJobStep.Msg = msg;
if (IsPlace(SettingString.A1) || IsPlace(SettingString.A7))//两位置出的架子需判断类型 if (IsPlace(SettingString.A1) || IsPlace(SettingString.A7))//两位置出的架子需判断类型
{ {
RFID = Common.nodeInfo[i].RFID; RFID = CommonVar.nodeInfo[i].RFID;
} }
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Enter]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Enter]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (curJobStep.IsTimeOut(15000, out double timeOutTime)) else if (curJobStep.IsTimeOut(15000, out double timeOutTime))
...@@ -215,9 +206,9 @@ namespace AGVControl ...@@ -215,9 +206,9 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV)) else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
if (IsPlace(SettingString.A1) || IsPlace(SettingString.A7))//两位置出的架子需判断类型 if (IsPlace(SettingString.A1) || IsPlace(SettingString.A7))//两位置出的架子需判断类型
{ {
string tarNodeName1 = TargetPlace.Equals(SettingString.A1) ? SettingString.A2 : SettingString.A8; string tarNodeName1 = TargetPlace.Equals(SettingString.A1) ? SettingString.A2 : SettingString.A8;
...@@ -245,7 +236,7 @@ namespace AGVControl ...@@ -245,7 +236,7 @@ namespace AGVControl
runInfo = "在4C车间,去待机位先到4D门"; runInfo = "在4C车间,去待机位先到4D门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD); CommonVar.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -255,7 +246,7 @@ namespace AGVControl ...@@ -255,7 +246,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby); CommonVar.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
...@@ -273,20 +264,20 @@ namespace AGVControl ...@@ -273,20 +264,20 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P7_WAIT_REACH_4D_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.P7_WAIT_REACH_4D_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P6_WAIT_REACH_STANDBY); curJobStep.ToNextStep(EXECUTE_STEP.P6_WAIT_REACH_STANDBY);
runInfo = "到达4D门,待机位"; runInfo = "到达4D门,待机位";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby); CommonVar.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P6_WAIT_REACH_STANDBY)) else if (curJobStep.IsStep(EXECUTE_STEP.P6_WAIT_REACH_STANDBY))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState))
{ {
runInfo = "到达待机位并搜索任务"; runInfo = "到达待机位并搜索任务";
msg += runInfo; msg += runInfo;
...@@ -316,7 +307,7 @@ namespace AGVControl ...@@ -316,7 +307,7 @@ namespace AGVControl
//检查入料口1的C5是否需要满料串 //检查入料口1的C5是否需要满料串
if (isFullShelf) if (isFullShelf)
{ {
if (!Common.control.limitArea.Available) if (!CommonVar.control.limitArea.Available)
return false; return false;
if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.C5)) if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.C5))
{ {
......
 
using AGVControl;
using AGVControl.bean.jobType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl using Common;
namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 包装仓任务:取包装料架 /// 包装仓任务:取包装料架
...@@ -60,16 +53,16 @@ namespace AGVControl ...@@ -60,16 +53,16 @@ namespace AGVControl
{ {
get get
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("取包装料架任务:{0} [Mark={2}][目的地={1}][任务名称={3}][任务状态={4}]", runInfo,to, mark, CurTaskName, CurTaskState); return string.Format("取包装料架任务:{0} [Mark={2}][目的地={1}][任务名称={3}][任务状态={4}]", runInfo,to, mark, CurTaskName, CurTaskState);
...@@ -88,7 +81,7 @@ namespace AGVControl ...@@ -88,7 +81,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = runInfo; agv.Msg = runInfo;
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
...@@ -98,7 +91,7 @@ namespace AGVControl ...@@ -98,7 +91,7 @@ namespace AGVControl
runInfo = "待机位/充电位收到任务,开始执行"; runInfo = "待机位/充电位收到任务,开始执行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix)) else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix))
...@@ -107,7 +100,7 @@ namespace AGVControl ...@@ -107,7 +100,7 @@ namespace AGVControl
runInfo = "4C车间收到任务,先到4D门"; runInfo = "4C车间收到任务,先到4D门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD); CommonVar.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -117,26 +110,26 @@ namespace AGVControl ...@@ -117,26 +110,26 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P1_1_WAIT_REACH_4D_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.P1_1_WAIT_REACH_4D_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_SHELF_PLACE); curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_SHELF_PLACE);
runInfo = "到达4D门,去包装料架处" + TargetPlace; runInfo = "到达4D门,去包装料架处" + TargetPlace;
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_SHELF_PLACE)) else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_SHELF_PLACE))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
if (PackingJobType.IsInStoreMark(mark)) if (PackingJobType.IsInStoreMark(mark))
{ {
...@@ -145,7 +138,7 @@ namespace AGVControl ...@@ -145,7 +138,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, ""); CommonVar.server.Ready(TargetPlace, "");
} }
else else
{ {
...@@ -166,7 +159,7 @@ namespace AGVControl ...@@ -166,7 +159,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, ""); CommonVar.server.Ready(TargetPlace, "");
} }
else// else//
{ {
...@@ -181,7 +174,7 @@ namespace AGVControl ...@@ -181,7 +174,7 @@ namespace AGVControl
} }
else if (nodeId > -1) else if (nodeId > -1)
{ {
mark = Common.nodeInfo[nodeId].Mark; mark = CommonVar.nodeInfo[nodeId].Mark;
//修改mark状态 //修改mark状态
PackingJobType.ChangeMarkState(mark, eMarkState.Assigned); PackingJobType.ChangeMarkState(mark, eMarkState.Assigned);
curJobStep.ToNextStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE);
...@@ -189,30 +182,30 @@ namespace AGVControl ...@@ -189,30 +182,30 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, ""); CommonVar.server.Ready(TargetPlace, "");
} }
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_LINE_RESPONSE))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV); curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV);
runInfo = "线体" + TargetPlace + "允许出料,链条运行"; runInfo = "线体" + TargetPlace + "允许出料,链条运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
RFID = Common.nodeInfo[i].RFID; RFID = CommonVar.nodeInfo[i].RFID;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Enter]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Enter]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV)) else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_AGV))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
if (PackingJobType.IsInStoreMark(mark)) if (PackingJobType.IsInStoreMark(mark))
{ {
if (RFID.StartsWith(SettingString.ReelString_RFID_Prefix) || RFID.StartsWith("0")) if (RFID.StartsWith(SettingString.ReelString_RFID_Prefix) || RFID.StartsWith("0"))
...@@ -260,11 +253,11 @@ namespace AGVControl ...@@ -260,11 +253,11 @@ namespace AGVControl
{ {
packPlace = SettingString.A2;// packPlace = SettingString.A2;//
rfid = "A#"; rfid = "A#";
int i = Common.nodeInfo.FindIndex(s => s.Mark.Equals("0") && s.StateEquals(eNodeStatus.NeedEnter) && s.IsUse); int i = CommonVar.nodeInfo.FindIndex(s => s.Mark.Equals("0") && s.StateEquals(eNodeStatus.NeedEnter) && s.IsUse);
if (i > -1) if (i > -1)
{ {
packPlace = Common.nodeInfo[i].Name; packPlace = CommonVar.nodeInfo[i].Name;
Common.log.Info(string.Format("{0} 查找包装仓目的地{1}[Mark={2}][Marks={3}]", agv.Name, packPlace, mark, PackingJobType.GetMarks())); LogUtil.info(string.Format("{0} 查找包装仓目的地{1}[Mark={2}][Marks={3}]", agv.Name, packPlace, mark, PackingJobType.GetMarks()));
return true; return true;
} }
else else
...@@ -273,11 +266,11 @@ namespace AGVControl ...@@ -273,11 +266,11 @@ namespace AGVControl
//int nodeIdx = PackingJobType.CheckOutStroePackingJob(); //int nodeIdx = PackingJobType.CheckOutStroePackingJob();
//if (nodeIdx > -1) //if (nodeIdx > -1)
//{ //{
// string _mark = Common.nodeInfo[nodeIdx].Mark; // string _mark = CommonVar.nodeInfo[nodeIdx].Mark;
// //PackingJobType.ChangeMarkState(_mark, eMarkState.Executing); // //PackingJobType.ChangeMarkState(_mark, eMarkState.Executing);
// packPlace = Common.nodeInfo[nodeIdx].Name; // packPlace = CommonVar.nodeInfo[nodeIdx].Name;
// rfid = Common.nodeInfo[nodeIdx].RFID; // rfid = CommonVar.nodeInfo[nodeIdx].RFID;
// Common.log.Info(string.Format("{0} 找不到Mark={1}任务,切换为包装仓{2}的Mark={3}的任务[Marks={4}]", agv.Name, mark, packPlace, _mark, PackingJobType.GetMarks())); // CommonVar.log.Info(string.Format("{0} 找不到Mark={1}任务,切换为包装仓{2}的Mark={3}的任务[Marks={4}]", agv.Name, mark, packPlace, _mark, PackingJobType.GetMarks()));
// mark = _mark; // mark = _mark;
// return true; // return true;
//} //}
...@@ -287,11 +280,11 @@ namespace AGVControl ...@@ -287,11 +280,11 @@ namespace AGVControl
{ {
packPlace = SettingString.A3;//默认为回收料架处 packPlace = SettingString.A3;//默认为回收料架处
rfid = "00"; rfid = "00";
int i = Common.nodeInfo.FindIndex(s => s.Mark.Equals(mark) && s.StateEquals(eNodeStatus.NeedEnter) && s.IsUse); int i = CommonVar.nodeInfo.FindIndex(s => s.Mark.Equals(mark) && s.StateEquals(eNodeStatus.NeedEnter) && s.IsUse);
if (i > -1) if (i > -1)
{ {
packPlace = Common.nodeInfo[i].Name; packPlace = CommonVar.nodeInfo[i].Name;
Common.log.Info(string.Format("{0} 查找包装仓目的地{1}[Mark={2}][Marks={3}]", agv.Name, packPlace, mark, PackingJobType.GetMarks())); LogUtil.info(string.Format("{0} 查找包装仓目的地{1}[Mark={2}][Marks={3}]", agv.Name, packPlace, mark, PackingJobType.GetMarks()));
return true; return true;
} }
else else
...@@ -300,17 +293,17 @@ namespace AGVControl ...@@ -300,17 +293,17 @@ namespace AGVControl
int nodeIdx = PackingJobType.CheckOutStroePackingJob(); int nodeIdx = PackingJobType.CheckOutStroePackingJob();
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
string _mark = Common.nodeInfo[nodeIdx].Mark; string _mark = CommonVar.nodeInfo[nodeIdx].Mark;
//PackingJobType.ChangeMarkState(_mark, eMarkState.Executing); //PackingJobType.ChangeMarkState(_mark, eMarkState.Executing);
packPlace = Common.nodeInfo[nodeIdx].Name; packPlace = CommonVar.nodeInfo[nodeIdx].Name;
Common.log.Info(string.Format("{0} 找不到Mark={1}任务,切换为包装仓{2}的Mark={3}的任务[Marks={4}]", agv.Name, mark, packPlace, _mark, PackingJobType.GetMarks())); LogUtil.info(string.Format("{0} 找不到Mark={1}任务,切换为包装仓{2}的Mark={3}的任务[Marks={4}]", agv.Name, mark, packPlace, _mark, PackingJobType.GetMarks()));
mark = _mark; mark = _mark;
return true; return true;
} }
} }
} }
Common.log.Info(string.Format("{0} 找不到Mark={1}任务及其他包装任务,将该料架送往回收处。[{2}]", agv.Name, mark, PackingJobType.GetMarks())); LogUtil.info(string.Format("{0} 找不到Mark={1}任务及其他包装任务,将该料架送往回收处。[{2}]", agv.Name, mark, PackingJobType.GetMarks()));
return false; return false;
} }
/// <summary> /// <summary>
......
 using Common;
using AGVControl;
using AGVControl.bean.jobType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 包装仓任务:将包装料架送往包装仓 /// 包装仓任务:将包装料架送往包装仓
...@@ -62,16 +53,16 @@ namespace AGVControl ...@@ -62,16 +53,16 @@ namespace AGVControl
{ {
get get
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("送包装料架任务:{0} [RFID={5}][Mark={2}][目的地={1}][任务名称={3}][任务状态={4}]", runInfo, to, mark,CurTaskName,CurTaskState,RFID); return string.Format("送包装料架任务:{0} [RFID={5}][Mark={2}][目的地={1}][任务名称={3}][任务状态={4}]", runInfo, to, mark,CurTaskName,CurTaskState,RFID);
...@@ -90,7 +81,7 @@ namespace AGVControl ...@@ -90,7 +81,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = runInfo; agv.Msg = runInfo;
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
...@@ -98,13 +89,13 @@ namespace AGVControl ...@@ -98,13 +89,13 @@ namespace AGVControl
runInfo = "收到任务,向包装仓" + TargetPlace + "运行"; runInfo = "收到任务,向包装仓" + TargetPlace + "运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_STATION)) else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_STATION))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
if (PackingJobType.IsInStoreMark(mark)) if (PackingJobType.IsInStoreMark(mark))
{ {
...@@ -112,7 +103,7 @@ namespace AGVControl ...@@ -112,7 +103,7 @@ namespace AGVControl
runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号"; runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Arrive(TargetPlace, RFID); CommonVar.server.Arrive(TargetPlace, RFID);
} }
else else
{ {
...@@ -132,7 +123,7 @@ namespace AGVControl ...@@ -132,7 +123,7 @@ namespace AGVControl
runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号"; runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Arrive(TargetPlace, RFID); CommonVar.server.Arrive(TargetPlace, RFID);
} }
else else
{ {
...@@ -155,7 +146,7 @@ namespace AGVControl ...@@ -155,7 +146,7 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_PACKING_STATION_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_PACKING_STATION_RESPONSE))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH); curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH);
...@@ -163,7 +154,7 @@ namespace AGVControl ...@@ -163,7 +154,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DockToNode(agv, TargetPlace); CommonVar.DockToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (curJobStep.IsTimeOut(6000, out double timeOutTime)) else if (curJobStep.IsTimeOut(6000, out double timeOutTime))
...@@ -176,24 +167,24 @@ namespace AGVControl ...@@ -176,24 +167,24 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH)) else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH))
{ {
if (Common.CheckTaskDockFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskDockFinished(agv, TargetPlace, CurTaskState))
{ {
Common.server.Ready(TargetPlace); CommonVar.server.Ready(TargetPlace);
curJobStep.ToNextStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_STATION); curJobStep.ToNextStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_STATION);
runInfo = "停靠包装仓完成,链条运行"; runInfo = "停靠包装仓完成,链条运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Leave]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Leave]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_STATION)) else if (curJobStep.IsStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_STATION))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
//int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.FinishEnter)); //int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.FinishEnter));
//if (i > -1) //if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P7_END); curJobStep.ToNextStep(EXECUTE_STEP.P7_END);
...@@ -205,7 +196,7 @@ namespace AGVControl ...@@ -205,7 +196,7 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P7_END)) else if (curJobStep.IsStep(EXECUTE_STEP.P7_END))
{ {
//Job job = Common.control.GetJob(agv); //Job job = CommonVar.control.GetJob(agv);
//if (job != null) //if (job != null)
//{ //{
// runInfo = "送料架任务完成,检测到任务,开始执行"; // runInfo = "送料架任务完成,检测到任务,开始执行";
......
 using Common;
using AGVControl;
using AGVControl.bean.jobType;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 包装仓任务:在包装仓间转移包装料架, /// 包装仓任务:在包装仓间转移包装料架,
...@@ -54,16 +46,16 @@ namespace AGVControl ...@@ -54,16 +46,16 @@ namespace AGVControl
{ {
get get
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("包装料架转移任务:{0} [RFID={1}][Mark={2}][目的地={3}][任务名称={4}][任务状态={5}]", runInfo, RFID, mark,to,CurTaskName,CurTaskState); return string.Format("包装料架转移任务:{0} [RFID={1}][Mark={2}][目的地={3}][任务名称={4}][任务状态={5}]", runInfo, RFID, mark,to,CurTaskName,CurTaskState);
...@@ -82,7 +74,7 @@ namespace AGVControl ...@@ -82,7 +74,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = runInfo; agv.Msg = runInfo;
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
agv.RFID = RFID; agv.RFID = RFID;
...@@ -90,13 +82,13 @@ namespace AGVControl ...@@ -90,13 +82,13 @@ namespace AGVControl
runInfo = "收到任务,向包装仓" + TargetPlace + "运行"; runInfo = "收到任务,向包装仓" + TargetPlace + "运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_STATION)) else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_PACKING_STATION))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P3_CHECK_PACKING_STATION_STATE); curJobStep.ToNextStep(EXECUTE_STEP.P3_CHECK_PACKING_STATION_STATE);
runInfo = "到达包装仓" + TargetPlace; runInfo = "到达包装仓" + TargetPlace;
...@@ -112,7 +104,7 @@ namespace AGVControl ...@@ -112,7 +104,7 @@ namespace AGVControl
runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号"; runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Arrive(TargetPlace, RFID); CommonVar.server.Arrive(TargetPlace, RFID);
} }
else else
{ {
...@@ -122,7 +114,7 @@ namespace AGVControl ...@@ -122,7 +114,7 @@ namespace AGVControl
runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号"; runInfo = "到达包装仓" + TargetPlace + ",并发送到达信号";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Arrive(TargetPlace, RFID); CommonVar.server.Arrive(TargetPlace, RFID);
} }
else else
{ {
...@@ -135,7 +127,7 @@ namespace AGVControl ...@@ -135,7 +127,7 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_PACKING_STATION_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_PACKING_STATION_RESPONSE))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayLeave)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayLeave));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH); curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH);
...@@ -143,7 +135,7 @@ namespace AGVControl ...@@ -143,7 +135,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DockToNode(agv, TargetPlace); CommonVar.DockToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
//else if (curJobStep.IsTimeOut(6000, out double timeOutTime)) //else if (curJobStep.IsTimeOut(6000, out double timeOutTime))
...@@ -155,24 +147,24 @@ namespace AGVControl ...@@ -155,24 +147,24 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH)) else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_AGV_DOCK_FINISH))
{ {
if (Common.CheckTaskDockFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskDockFinished(agv, TargetPlace, CurTaskState))
{ {
Common.server.Ready(TargetPlace); CommonVar.server.Ready(TargetPlace);
curJobStep.ToNextStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_AGV); curJobStep.ToNextStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_AGV);
runInfo = "停靠包装仓完成,链条运行"; runInfo = "停靠包装仓完成,链条运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Enter]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Enter]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_AGV)) else if (curJobStep.IsStep(EXECUTE_STEP.P6_WAIT_SHELF_IN_AGV))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.FinishLeave)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.FinishLeave));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P7_FIND_LEFT_TASK); curJobStep.ToNextStep(EXECUTE_STEP.P7_FIND_LEFT_TASK);
...@@ -196,7 +188,7 @@ namespace AGVControl ...@@ -196,7 +188,7 @@ namespace AGVControl
curJobStep.Msg = msg; curJobStep.Msg = msg;
agvPlace = agv.Place; agvPlace = agv.Place;
TargetPlace = SettingString.Standby; TargetPlace = SettingString.Standby;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else//有锁定节点 else//有锁定节点
...@@ -207,7 +199,7 @@ namespace AGVControl ...@@ -207,7 +199,7 @@ namespace AGVControl
curJobStep.Msg = msg; curJobStep.Msg = msg;
agvPlace = agv.Place; agvPlace = agv.Place;
TargetPlace = nodeName; TargetPlace = nodeName;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
...@@ -220,7 +212,7 @@ namespace AGVControl ...@@ -220,7 +212,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
PackingJobType.DelMark(mark); PackingJobType.DelMark(mark);
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
...@@ -235,8 +227,8 @@ namespace AGVControl ...@@ -235,8 +227,8 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
agvPlace = agv.Place; agvPlace = agv.Place;
TargetPlace = Common.nodeInfo[nodeIdx].Name; TargetPlace = CommonVar.nodeInfo[nodeIdx].Name;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else //pack任务还有剩余,但目前包装仓还未生成任务,去待机位 else //pack任务还有剩余,但目前包装仓还未生成任务,去待机位
...@@ -247,7 +239,7 @@ namespace AGVControl ...@@ -247,7 +239,7 @@ namespace AGVControl
curJobStep.Msg = msg; curJobStep.Msg = msg;
agvPlace = agv.Place; agvPlace = agv.Place;
TargetPlace = SettingString.Standby; TargetPlace = SettingString.Standby;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
...@@ -269,7 +261,7 @@ namespace AGVControl ...@@ -269,7 +261,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
PackingJobType.DelMark(mark); PackingJobType.DelMark(mark);
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
...@@ -277,19 +269,19 @@ namespace AGVControl ...@@ -277,19 +269,19 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P8_TRANSFER_SHELF)) else if (curJobStep.IsStep(EXECUTE_STEP.P8_TRANSFER_SHELF))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P9_WAIT_LINE_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.P9_WAIT_LINE_RESPONSE);
runInfo = "到达包装仓,发送到达信号"; runInfo = "到达包装仓,发送到达信号";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Arrive(TargetPlace, RFID); CommonVar.server.Arrive(TargetPlace, RFID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P9_WAIT_LINE_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P9_WAIT_LINE_RESPONSE))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P10_WAIT_AGV_DOCK_FINISH); curJobStep.ToNextStep(EXECUTE_STEP.P10_WAIT_AGV_DOCK_FINISH);
...@@ -297,7 +289,7 @@ namespace AGVControl ...@@ -297,7 +289,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DockToNode(agv, TargetPlace); CommonVar.DockToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (curJobStep.IsTimeOut(6000, out double timeOutTime)) else if (curJobStep.IsTimeOut(6000, out double timeOutTime))
...@@ -309,24 +301,24 @@ namespace AGVControl ...@@ -309,24 +301,24 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P10_WAIT_AGV_DOCK_FINISH)) else if (curJobStep.IsStep(EXECUTE_STEP.P10_WAIT_AGV_DOCK_FINISH))
{ {
if (Common.CheckTaskDockFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskDockFinished(agv, TargetPlace, CurTaskState))
{ {
Common.server.Ready(TargetPlace, RFID); CommonVar.server.Ready(TargetPlace, RFID);
curJobStep.ToNextStep(EXECUTE_STEP.P11_WAIT_SHELF_IN_LINE); curJobStep.ToNextStep(EXECUTE_STEP.P11_WAIT_SHELF_IN_LINE);
runInfo = "停靠包装仓完成,链条运行"; runInfo = "停靠包装仓完成,链条运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Leave]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Leave]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P11_WAIT_SHELF_IN_LINE)) else if (curJobStep.IsStep(EXECUTE_STEP.P11_WAIT_SHELF_IN_LINE))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
//int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.FinishEnter)); //int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.FinishEnter));
//if (i > -1) //if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P15_END); curJobStep.ToNextStep(EXECUTE_STEP.P15_END);
...@@ -339,19 +331,19 @@ namespace AGVControl ...@@ -339,19 +331,19 @@ namespace AGVControl
else if (curJobStep.IsStep(EXECUTE_STEP.P12_SEND_FULL_SHELF)) else if (curJobStep.IsStep(EXECUTE_STEP.P12_SEND_FULL_SHELF))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P13_WAIT_TARGET_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.P13_WAIT_TARGET_RESPONSE);
runInfo = "到达目的地" + TargetPlace + ",并发送准备信号"; runInfo = "到达目的地" + TargetPlace + ",并发送准备信号";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, RFID); CommonVar.server.Ready(TargetPlace, RFID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P13_WAIT_TARGET_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P13_WAIT_TARGET_RESPONSE))
{ {
//int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter)); //int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter));
//if (i > -1) //if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P11_WAIT_SHELF_IN_LINE); curJobStep.ToNextStep(EXECUTE_STEP.P11_WAIT_SHELF_IN_LINE);
...@@ -359,7 +351,7 @@ namespace AGVControl ...@@ -359,7 +351,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Leave]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Leave]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
//else if (curJobStep.IsTimeOut(6000, out double timeOutTime)) //else if (curJobStep.IsTimeOut(6000, out double timeOutTime))
...@@ -372,7 +364,7 @@ namespace AGVControl ...@@ -372,7 +364,7 @@ namespace AGVControl
else if (curJobStep.IsStep(EXECUTE_STEP.P14_WAIT_REACH_STANDBY)) else if (curJobStep.IsStep(EXECUTE_STEP.P14_WAIT_REACH_STANDBY))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState))
{ {
if (FindNextTask(agv, out int nodeIdx)) if (FindNextTask(agv, out int nodeIdx))
{ {
...@@ -382,9 +374,9 @@ namespace AGVControl ...@@ -382,9 +374,9 @@ namespace AGVControl
runInfo = "任务Mark=" + mark + "到下一包装仓执行任务"; runInfo = "任务Mark=" + mark + "到下一包装仓执行任务";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
TargetPlace = Common.nodeInfo[nodeIdx].Name; TargetPlace = CommonVar.nodeInfo[nodeIdx].Name;
agvPlace = agv.Place; agvPlace = agv.Place;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
...@@ -394,7 +386,7 @@ namespace AGVControl ...@@ -394,7 +386,7 @@ namespace AGVControl
{ {
agv.RFID = ""; agv.RFID = "";
return null; return null;
//Job job = Common.control.GetJob(agv); //Job job = CommonVar.control.GetJob(agv);
//if (job != null) //if (job != null)
//{ //{
// runInfo = "包装仓转移料架任务完成,检测到任务,开始执行"; // runInfo = "包装仓转移料架任务完成,检测到任务,开始执行";
...@@ -413,7 +405,7 @@ namespace AGVControl ...@@ -413,7 +405,7 @@ namespace AGVControl
private bool FindNextTask(Agv_Info agv, out int nodeIdx) private bool FindNextTask(Agv_Info agv, out int nodeIdx)
{ {
//寻找下一个任务点 //寻找下一个任务点
nodeIdx = Common.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) && s.Mark == mark && s.AgvName == "" && s.IsUse); nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) && s.Mark == mark && s.AgvName == "" && s.IsUse);
if (nodeIdx > -1) if (nodeIdx > -1)
return true; return true;
else else
...@@ -421,7 +413,7 @@ namespace AGVControl ...@@ -421,7 +413,7 @@ namespace AGVControl
if (!mark.Split(',')[1].Equals("pack")) if (!mark.Split(',')[1].Equals("pack"))
{ {
string log = " [Mark=" + mark + "] 出库任务完成"; string log = " [Mark=" + mark + "] 出库任务完成";
Common.LogInfo(log); LogUtil.info(log);
return false; return false;
} }
bool rtn = AGVManager.LeaveCheck(agv, out int taskCount); bool rtn = AGVManager.LeaveCheck(agv, out int taskCount);
...@@ -429,13 +421,13 @@ namespace AGVControl ...@@ -429,13 +421,13 @@ namespace AGVControl
if (!rtn)//出库任务还未完成 if (!rtn)//出库任务还未完成
{ {
string log = agv.Name + " [Mark=" + mark + "] 出库任务未完成,[taskCount=" + taskCount.ToString() + "]"; string log = agv.Name + " [Mark=" + mark + "] 出库任务未完成,[taskCount=" + taskCount.ToString() + "]";
Common.LogInfo(log); LogUtil.info(log);
return true; return true;
} }
else else
{ {
string log = agv.Name + " [Mark=" + mark + "] [taskCount = " + taskCount.ToString() + "] 出库任务完成"; string log = agv.Name + " [Mark=" + mark + "] [taskCount = " + taskCount.ToString() + "] 出库任务完成";
Common.LogInfo(log); LogUtil.info(log);
return false; return false;
} }
} }
...@@ -454,7 +446,7 @@ namespace AGVControl ...@@ -454,7 +446,7 @@ namespace AGVControl
{ {
foreach (string item in shelfLockedNodeNames) foreach (string item in shelfLockedNodeNames)
{ {
int nodeIdx = Common.nodeInfo.FindIndex(s => s.Name == item && s.StateEquals(eNodeStatus.NeedEnter) && s.Mark.Equals("") && (s.AgvName == "" || s.AgvName == agv.Name) && s.IsUse); int nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.Name == item && s.StateEquals(eNodeStatus.NeedEnter) && s.Mark.Equals("") && (s.AgvName == "" || s.AgvName == agv.Name) && s.IsUse);
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
nodeName = item; nodeName = item;
......
 
using AGVControl;
using AGVControl.bean.jobType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl using Common;
namespace DeviceLibrary
{ {
public enum ShelfType public enum ShelfType
...@@ -68,16 +61,16 @@ namespace AGVControl ...@@ -68,16 +61,16 @@ namespace AGVControl
{ {
get get
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("回收空料架任务:{0} [ShelfType={1}][任务名称={2}][任务状态={3}]", runInfo, shelfType.ToString(),CurTaskName,CurTaskState); return string.Format("回收空料架任务:{0} [ShelfType={1}][任务名称={2}][任务状态={3}]", runInfo, shelfType.ToString(),CurTaskName,CurTaskState);
...@@ -96,7 +89,7 @@ namespace AGVControl ...@@ -96,7 +89,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = runInfo; agv.Msg = runInfo;
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.R1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.R1_NONE))
{ {
if(hasLoad) if(hasLoad)
...@@ -107,7 +100,7 @@ namespace AGVControl ...@@ -107,7 +100,7 @@ namespace AGVControl
runInfo = "车上已有空料架,向" + RecycleStation + "运行"; runInfo = "车上已有空料架,向" + RecycleStation + "运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, RecycleStation); CommonVar.MoveToNode(agv, RecycleStation);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -117,7 +110,7 @@ namespace AGVControl ...@@ -117,7 +110,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby); CommonVar.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
...@@ -129,7 +122,7 @@ namespace AGVControl ...@@ -129,7 +122,7 @@ namespace AGVControl
runInfo = "待机位/充电位收到任务,开始执行"; runInfo = "待机位/充电位收到任务,开始执行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -139,25 +132,25 @@ namespace AGVControl ...@@ -139,25 +132,25 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R2_WAIT_REACH_EMPTY_SHELF_PLACE)) else if (curJobStep.IsStep(EXECUTE_STEP.R2_WAIT_REACH_EMPTY_SHELF_PLACE))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.R3_WAIT_LINE_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.R3_WAIT_LINE_RESPONSE);
runInfo = "到达空料架处"+TargetPlace+",向线体发送出料请求"; runInfo = "到达空料架处"+TargetPlace+",向线体发送出料请求";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, ""); CommonVar.server.Ready(TargetPlace, "");
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R3_WAIT_LINE_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.R3_WAIT_LINE_RESPONSE))
{ {
//int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayLeave)); //int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayLeave));
//if (i > -1) //if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.R4_WAIT_SHELF_IN_AGV); curJobStep.ToNextStep(EXECUTE_STEP.R4_WAIT_SHELF_IN_AGV);
...@@ -165,7 +158,7 @@ namespace AGVControl ...@@ -165,7 +158,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Enter]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Enter]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
//else if(curJobStep.IsTimeOut(6000,out double timeOutTime)) //else if(curJobStep.IsTimeOut(6000,out double timeOutTime))
...@@ -177,16 +170,16 @@ namespace AGVControl ...@@ -177,16 +170,16 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R4_WAIT_SHELF_IN_AGV)) else if (curJobStep.IsStep(EXECUTE_STEP.R4_WAIT_SHELF_IN_AGV))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
if (FindRecycleStation()) if (FindRecycleStation())
{ {
curJobStep.ToNextStep(EXECUTE_STEP.R5_WAIT_REACH_RECYCLE_STATION); curJobStep.ToNextStep(EXECUTE_STEP.R5_WAIT_REACH_RECYCLE_STATION);
runInfo = "空料架进入小车完成,向"+TargetPlace+"运行"; runInfo = "空料架进入小车完成,向"+TargetPlace+"运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, RecycleStation); CommonVar.MoveToNode(agv, RecycleStation);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -196,25 +189,25 @@ namespace AGVControl ...@@ -196,25 +189,25 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby); CommonVar.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R5_WAIT_REACH_RECYCLE_STATION)) else if (curJobStep.IsStep(EXECUTE_STEP.R5_WAIT_REACH_RECYCLE_STATION))
{ {
if (Common.CheckTaskMoveFinished(agv, RecycleStation, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, RecycleStation, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.R6_WAIT_RECYCLE_STATION_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.R6_WAIT_RECYCLE_STATION_RESPONSE);
runInfo = "到达"+TargetPlace+",发送入料请求"; runInfo = "到达"+TargetPlace+",发送入料请求";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(RecycleStation,"00"); CommonVar.server.Ready(RecycleStation,"00");
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R6_WAIT_RECYCLE_STATION_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.R6_WAIT_RECYCLE_STATION_RESPONSE))
{ {
//int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(RecycleStation) && s.StateEquals(eNodeStatus.MayEnter)); //int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(RecycleStation) && s.StateEquals(eNodeStatus.MayEnter));
//if (i > -1) //if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.R7_WAIT_SHELF_IN_LINE); curJobStep.ToNextStep(EXECUTE_STEP.R7_WAIT_SHELF_IN_LINE);
...@@ -222,7 +215,7 @@ namespace AGVControl ...@@ -222,7 +215,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Leave]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Leave]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
//else if (curJobStep.IsTimeOut(6000, out double timeOutTime)) //else if (curJobStep.IsTimeOut(6000, out double timeOutTime))
...@@ -234,10 +227,10 @@ namespace AGVControl ...@@ -234,10 +227,10 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R7_WAIT_SHELF_IN_LINE)) else if (curJobStep.IsStep(EXECUTE_STEP.R7_WAIT_SHELF_IN_LINE))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState))
{ {
Common.server.CloseDoor(RecycleStation); CommonVar.server.CloseDoor(RecycleStation);
//int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(RecycleStation) && s.StateEquals(eNodeStatus.FinishEnter)); //int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(RecycleStation) && s.StateEquals(eNodeStatus.FinishEnter));
//if (i > -1) //if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.R9_END); curJobStep.ToNextStep(EXECUTE_STEP.R9_END);
...@@ -249,7 +242,7 @@ namespace AGVControl ...@@ -249,7 +242,7 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R8_WAIT_REACH_STANDY)) else if (curJobStep.IsStep(EXECUTE_STEP.R8_WAIT_REACH_STANDY))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState))
{ {
if (FindRecycleStation()) if (FindRecycleStation())
{ {
...@@ -257,14 +250,14 @@ namespace AGVControl ...@@ -257,14 +250,14 @@ namespace AGVControl
runInfo = "检测到"+RecycleStation+"需要空料架,向" + RecycleStation + "运行"; runInfo = "检测到"+RecycleStation+"需要空料架,向" + RecycleStation + "运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, RecycleStation); CommonVar.MoveToNode(agv, RecycleStation);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.R9_END)) else if (curJobStep.IsStep(EXECUTE_STEP.R9_END))
{ {
//Job job = Common.control.GetJob(agv); //Job job = CommonVar.control.GetJob(agv);
//if (job != null) //if (job != null)
//{ //{
// runInfo = "回收空料架任务完成,检测到任务,开始执行"; // runInfo = "回收空料架任务完成,检测到任务,开始执行";
...@@ -285,24 +278,24 @@ namespace AGVControl ...@@ -285,24 +278,24 @@ namespace AGVControl
{ {
if(shelfType.Equals(ShelfType.ReelString)) if(shelfType.Equals(ShelfType.ReelString))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.C7) && s.StateEquals(eNodeStatus.NeedEnter)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.C7) && s.StateEquals(eNodeStatus.NeedEnter));
if(i==-1) i = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.D1) && s.StateEquals(eNodeStatus.NeedEnter)); if(i==-1) i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.D1) && s.StateEquals(eNodeStatus.NeedEnter));
if (i == -1) i = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A2) && s.StateEquals(eNodeStatus.NeedEnter)); if (i == -1) i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A2) && s.StateEquals(eNodeStatus.NeedEnter));
if(i>-1) if(i>-1)
{ {
RecycleStation = Common.nodeInfo[i].Name; RecycleStation = CommonVar.nodeInfo[i].Name;
return true; return true;
} }
} }
else if(shelfType.Equals(ShelfType.PackingShelf)) else if(shelfType.Equals(ShelfType.PackingShelf))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A3) && s.StateEquals(eNodeStatus.NeedEnter)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A3) && s.StateEquals(eNodeStatus.NeedEnter));
if (i == -1) i = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A2) && s.StateEquals(eNodeStatus.NeedEnter)); if (i == -1) i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A2) && s.StateEquals(eNodeStatus.NeedEnter));
if (i == -1) i = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A8) && s.StateEquals(eNodeStatus.NeedEnter)); if (i == -1) i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A8) && s.StateEquals(eNodeStatus.NeedEnter));
if (i > -1) if (i > -1)
{ {
RecycleStation = Common.nodeInfo[i].Name; RecycleStation = CommonVar.nodeInfo[i].Name;
return true; return true;
} }
} }
......
 using Common;
using AGVControl;
using AGVControl.bean.jobType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
///送料串 ///送料串
...@@ -47,16 +38,16 @@ namespace AGVControl ...@@ -47,16 +38,16 @@ namespace AGVControl
{ {
get get
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("送料串任务[RFID={4}]:{0} [目的地={1}][任务名称={2}][任务状态={3}]", runInfo, to, CurTaskName, CurTaskState, RFID); return string.Format("送料串任务[RFID={4}]:{0} [目的地={1}][任务名称={2}][任务状态={3}]", runInfo, to, CurTaskName, CurTaskState, RFID);
...@@ -67,16 +58,16 @@ namespace AGVControl ...@@ -67,16 +58,16 @@ namespace AGVControl
private string GetShowInfo() private string GetShowInfo()
{ {
int t1 = Common.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace)); int t1 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(agvPlace));
string from = ""; string from = "";
if (t1 > -1) if (t1 > -1)
from = Common.nodeInfo[t1].AliceName; from = CommonVar.nodeInfo[t1].AliceName;
else else
from = agvPlace; from = agvPlace;
int t2 = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace)); int t2 = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace));
string to = ""; string to = "";
if (t2 > -1) if (t2 > -1)
to = Common.nodeInfo[t2].AliceName; to = CommonVar.nodeInfo[t2].AliceName;
else else
to = TargetPlace; to = TargetPlace;
return string.Format("取料串任务[RFID={3}]: {0}[{1}->{2}]", runInfo, from, to, RFID); return string.Format("取料串任务[RFID={3}]: {0}[{1}->{2}]", runInfo, from, to, RFID);
...@@ -91,7 +82,7 @@ namespace AGVControl ...@@ -91,7 +82,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = GetShowInfo(); agv.Msg = GetShowInfo();
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE)) if (curJobStep.IsStep(EXECUTE_STEP.P1_NONE))
{ {
if (!agvPlace.StartsWith(SettingString.C4_Name_Prefix) && TargetPlace.StartsWith(SettingString.C4_Name_Prefix))//D C if (!agvPlace.StartsWith(SettingString.C4_Name_Prefix) && TargetPlace.StartsWith(SettingString.C4_Name_Prefix))//D C
...@@ -100,7 +91,7 @@ namespace AGVControl ...@@ -100,7 +91,7 @@ namespace AGVControl
runInfo = "收到任务,在4D车间,向" + TargetPlace + "运行,先过门"; runInfo = "收到任务,在4D车间,向" + TargetPlace + "运行,先过门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorDToC); CommonVar.DoorMission(agv, SettingString.DoorDToC);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix) && !TargetPlace.StartsWith(SettingString.C4_Name_Prefix))//C D else if (agvPlace.StartsWith(SettingString.C4_Name_Prefix) && !TargetPlace.StartsWith(SettingString.C4_Name_Prefix))//C D
...@@ -109,7 +100,7 @@ namespace AGVControl ...@@ -109,7 +100,7 @@ namespace AGVControl
runInfo = "收到任务,在4C车间,向" + TargetPlace + "运行,先过门"; runInfo = "收到任务,在4C车间,向" + TargetPlace + "运行,先过门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD); CommonVar.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else//DD CC else//DD CC
...@@ -118,51 +109,51 @@ namespace AGVControl ...@@ -118,51 +109,51 @@ namespace AGVControl
runInfo = "收到任务,向" + TargetPlace + "运行"; runInfo = "收到任务,向" + TargetPlace + "运行";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_STATION)) else if (curJobStep.IsStep(EXECUTE_STEP.P2_WAIT_REACH_STATION))
{ {
if (Common.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, TargetPlace, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P4_WAIT_STATION_RESPONSE); curJobStep.ToNextStep(EXECUTE_STEP.P4_WAIT_STATION_RESPONSE);
runInfo = "到达" + TargetPlace + ",并发送进料请求"; runInfo = "到达" + TargetPlace + ",并发送进料请求";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.server.Ready(TargetPlace, RFID); CommonVar.server.Ready(TargetPlace, RFID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4D_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4D_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_STATION); curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_STATION);
runInfo = "到达4D门,去料架处" + TargetPlace; runInfo = "到达4D门,去料架处" + TargetPlace;
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4C_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.P3_WAIT_REACH_4C_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorDToC, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorDToC, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_STATION); curJobStep.ToNextStep(EXECUTE_STEP.P2_WAIT_REACH_STATION);
runInfo = "到达4C门,去料架处" + TargetPlace; runInfo = "到达4C门,去料架处" + TargetPlace;
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, TargetPlace); CommonVar.MoveToNode(agv, TargetPlace);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_STATION_RESPONSE)) else if (curJobStep.IsStep(EXECUTE_STEP.P4_WAIT_STATION_RESPONSE))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(TargetPlace) && s.StateEquals(eNodeStatus.MayEnter));
if (i > -1) if (i > -1)
{ {
curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_STATION); curJobStep.ToNextStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_STATION);
...@@ -170,7 +161,7 @@ namespace AGVControl ...@@ -170,7 +161,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission[SettingString.Leave]); rtn = MiR_API.Add_Mission_Fleet(agv, CommonVar.agvMission[SettingString.Leave]);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else if (curJobStep.IsTimeOut(15000, out double timeOutTime)) else if (curJobStep.IsTimeOut(15000, out double timeOutTime))
...@@ -183,9 +174,9 @@ namespace AGVControl ...@@ -183,9 +174,9 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_STATION)) else if (curJobStep.IsStep(EXECUTE_STEP.P5_WAIT_SHELF_IN_STATION))
{ {
if (Common.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState)) if (CommonVar.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState))
{ {
Common.server.CloseDoor(TargetPlace); CommonVar.server.CloseDoor(TargetPlace);
if (IsPlace(SettingString.G23_In) && FindReturnShelf(agv)) if (IsPlace(SettingString.G23_In) && FindReturnShelf(agv))
{ {
runInfo = "料架进入" + TargetPlace + "完成,去退料线出口取一个料串回点料机"; runInfo = "料架进入" + TargetPlace + "完成,去退料线出口取一个料串回点料机";
...@@ -197,7 +188,7 @@ namespace AGVControl ...@@ -197,7 +188,7 @@ namespace AGVControl
{ {
if(agv.IP.Equals(SettingString.SingleMission_IP1)) if(agv.IP.Equals(SettingString.SingleMission_IP1))
{ {
if (IsPlace(SettingString.A2) && !Common.control.limitArea.Available) if (IsPlace(SettingString.A2) && !CommonVar.control.limitArea.Available)
{ {
runInfo = "料架进入" + TargetPlace + "完成,等待限制区域无车"; runInfo = "料架进入" + TargetPlace + "完成,等待限制区域无车";
msg += runInfo; msg += runInfo;
...@@ -246,7 +237,7 @@ namespace AGVControl ...@@ -246,7 +237,7 @@ namespace AGVControl
{ {
if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.D3)) if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.D3))
{ {
Common.LogInfo(string.Format("{0} 在退料线生成任务(D3需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid)); LogUtil.info(string.Format("{0} 在退料线生成任务(D3需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid));
return true; return true;
} }
} }
...@@ -254,7 +245,7 @@ namespace AGVControl ...@@ -254,7 +245,7 @@ namespace AGVControl
{ {
if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.G23_In)) if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.G23_In))
{ {
Common.LogInfo(string.Format("{0} 在退料线生成任务(D4需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D4, rfid)); LogUtil.info(string.Format("{0} 在退料线生成任务(D4需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D4, rfid));
return true; return true;
} }
} }
......
 using Common;
using AGVControl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.PeerResolvers;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 待机任务 /// 待机任务
...@@ -51,7 +43,7 @@ namespace AGVControl ...@@ -51,7 +43,7 @@ namespace AGVControl
bool rtn = false; bool rtn = false;
agv.Msg = ""; agv.Msg = "";
CurTaskState = Common.GetTakJobState(CurTaskID); CurTaskState = CommonVar.GetTakJobState(CurTaskID);
if (curJobStep.IsStep(EXECUTE_STEP.NONE)) if (curJobStep.IsStep(EXECUTE_STEP.NONE))
{ {
if (agvPlace.Equals(SettingString.Standby))//在待机位不操作 if (agvPlace.Equals(SettingString.Standby))//在待机位不操作
...@@ -68,7 +60,7 @@ namespace AGVControl ...@@ -68,7 +60,7 @@ namespace AGVControl
runInfo = "从当前位置" + agvPlace + "回到待机位,先到4D门"; runInfo = "从当前位置" + agvPlace + "回到待机位,先到4D门";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.DoorMission(agv, SettingString.DoorCToD); CommonVar.DoorMission(agv, SettingString.DoorCToD);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
else else
...@@ -78,7 +70,7 @@ namespace AGVControl ...@@ -78,7 +70,7 @@ namespace AGVControl
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby); CommonVar.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
...@@ -86,20 +78,20 @@ namespace AGVControl ...@@ -86,20 +78,20 @@ namespace AGVControl
else if (curJobStep.IsStep(EXECUTE_STEP.WAIT_AGV_REACH_4D_DOOR)) else if (curJobStep.IsStep(EXECUTE_STEP.WAIT_AGV_REACH_4D_DOOR))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.DoorCToD, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.WAIT_REACH_STANDBY); curJobStep.ToNextStep(EXECUTE_STEP.WAIT_REACH_STANDBY);
runInfo = "从4D门回到待机位"; runInfo = "从4D门回到待机位";
msg += runInfo; msg += runInfo;
curJobStep.Msg = msg; curJobStep.Msg = msg;
Common.MoveToNode(agv, SettingString.Standby); CommonVar.MoveToNode(agv, SettingString.Standby);
UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID); UpdateJobTaskInfo(agv.CurTaskName, agv.CurTaskID);
} }
} }
else if (curJobStep.IsStep(EXECUTE_STEP.WAIT_REACH_STANDBY)) else if (curJobStep.IsStep(EXECUTE_STEP.WAIT_REACH_STANDBY))
{ {
if (Common.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState)) if (CommonVar.CheckTaskMoveFinished(agv, SettingString.Standby, CurTaskState))
{ {
curJobStep.ToNextStep(EXECUTE_STEP.END); curJobStep.ToNextStep(EXECUTE_STEP.END);
runInfo = "到达待机位"; runInfo = "到达待机位";
...@@ -109,7 +101,7 @@ namespace AGVControl ...@@ -109,7 +101,7 @@ namespace AGVControl
} }
else if (curJobStep.IsStep(EXECUTE_STEP.END)) else if (curJobStep.IsStep(EXECUTE_STEP.END))
{ {
Job job = Common.control.GetJob(agv); Job job = CommonVar.control.GetJob(agv);
if (job != null && !(job is StandyJob)) if (job != null && !(job is StandyJob))
{ {
runInfo = "在待机位检测到任务,执行任务"; runInfo = "在待机位检测到任务,执行任务";
......
using MiR; 
using log4net.Util; namespace DeviceLibrary
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGVControl.bean.jobType
{ {
/// <summary> /// <summary>
/// 待机任务 /// 待机任务
...@@ -21,7 +14,7 @@ namespace AGVControl.bean.jobType ...@@ -21,7 +14,7 @@ namespace AGVControl.bean.jobType
/// <returns></returns> /// <returns></returns>
public override Job GetNewJob(Agv_Info currentAgv) public override Job GetNewJob(Agv_Info currentAgv)
{ {
if (currentAgv.Battery < Common.Charge.BatteryMax - 10 && Common.Charge.HasEmptyChargeStation()) if (currentAgv.Battery < CommonVar.Charge.BatteryMax - 10 && CommonVar.Charge.HasEmptyChargeStation(currentAgv))
{ {
return new ChargeJob(currentAgv.Place); return new ChargeJob(currentAgv.Place);
} }
......
using System; using Common;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.Management; using System.Web.Management;
namespace AGVControl.bean.jobType namespace DeviceLibrary
{ {
public enum eMarkState public enum eMarkState
{ {
...@@ -112,9 +113,9 @@ namespace AGVControl.bean.jobType ...@@ -112,9 +113,9 @@ namespace AGVControl.bean.jobType
{ {
if (currentAgv.IP.Equals(SettingString.SingleMission_IP1)) if (currentAgv.IP.Equals(SettingString.SingleMission_IP1))
return null; return null;
if (!Common.CheckCanExecuteMission(currentAgv)) if (!CommonVar.CheckCanExecuteMission(currentAgv))
return null; return null;
if (!Common.CheckAGVStatusNone(currentAgv)) if (!CommonVar.CheckAGVStatusNone(currentAgv))
return null; return null;
SearchMarks(); SearchMarks();
return FindPackingJob(currentAgv); return FindPackingJob(currentAgv);
...@@ -122,23 +123,23 @@ namespace AGVControl.bean.jobType ...@@ -122,23 +123,23 @@ namespace AGVControl.bean.jobType
private void SearchMarks() private void SearchMarks()
{ {
//Mark.Length>1防止Mark为0的情况,Mark=0是VMI的进料 //Mark.Length>1防止Mark为0的情况,Mark=0是VMI的进料
int nodeIdx = Common.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) int nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter)
&& s.Mark.Length > 1 && !Marks.ContainsKey(s.Mark) && s.IsUse); && s.Mark.Length > 1 && !Marks.ContainsKey(s.Mark) && s.IsUse);
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
string mark = Common.nodeInfo[nodeIdx].Mark; string mark = CommonVar.nodeInfo[nodeIdx].Mark;
AddMark(mark); AddMark(mark);
Common.LogInfo(string.Format("包装仓出库任务生成:{0}={1}", mark, Marks[mark].ToString())); LogUtil.info(string.Format("包装仓出库任务生成:{0}={1}", mark, Marks[mark].ToString()));
} }
else else
{ {
nodeIdx = Common.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter)
&& s.Mark.Equals("0") && !Marks.ContainsKey(SettingString.InStore_Mark) && s.IsUse); && s.Mark.Equals("0") && !Marks.ContainsKey(SettingString.InStore_Mark) && s.IsUse);
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
string mark = SettingString.InStore_Mark; string mark = SettingString.InStore_Mark;
AddMark(mark); AddMark(mark);
Common.LogInfo(string.Format("包装仓入库任务生成:{0}={1}", mark, Marks[mark].ToString())); LogUtil.info(string.Format("包装仓入库任务生成:{0}={1}", mark, Marks[mark].ToString()));
} }
} }
} }
...@@ -151,7 +152,7 @@ namespace AGVControl.bean.jobType ...@@ -151,7 +152,7 @@ namespace AGVControl.bean.jobType
{ {
if (nodeName.Equals("")) if (nodeName.Equals(""))
{ {
int i = Common.nodeInfo.FindIndex(s => s.Mark.Equals(mark)); int i = CommonVar.nodeInfo.FindIndex(s => s.Mark.Equals(mark));
if (i == -1) if (i == -1)
return false; return false;
else else
...@@ -159,7 +160,7 @@ namespace AGVControl.bean.jobType ...@@ -159,7 +160,7 @@ namespace AGVControl.bean.jobType
} }
else else
{ {
int i = Common.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.Mark.Equals(mark)); int i = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.Mark.Equals(mark));
if (i == -1) if (i == -1)
return false; return false;
else else
...@@ -176,7 +177,7 @@ namespace AGVControl.bean.jobType ...@@ -176,7 +177,7 @@ namespace AGVControl.bean.jobType
{ {
lock (checkObj) lock (checkObj)
{ {
return Common.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) return CommonVar.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter)
&& Marks.ContainsKey(s.Mark) && Marks[s.Mark].Equals(eMarkState.None) && s.IsUse); && Marks.ContainsKey(s.Mark) && Marks[s.Mark].Equals(eMarkState.None) && s.IsUse);
} }
} }
...@@ -188,9 +189,9 @@ namespace AGVControl.bean.jobType ...@@ -188,9 +189,9 @@ namespace AGVControl.bean.jobType
{ {
lock (checkObj) lock (checkObj)
{ {
int id = Common.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) && s.Mark.Equals("0") && s.IsUse); int id = CommonVar.nodeInfo.FindIndex(s => s.StateEquals(eNodeStatus.NeedEnter) && s.Mark.Equals("0") && s.IsUse);
if (id > -1) if (id > -1)
return Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A1) && s.RFID.StartsWith(SettingString.Packing_RFID_Prefix)); return CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A1) && s.RFID.StartsWith(SettingString.Packing_RFID_Prefix));
else else
return id; return id;
} }
...@@ -206,21 +207,21 @@ namespace AGVControl.bean.jobType ...@@ -206,21 +207,21 @@ namespace AGVControl.bean.jobType
{ {
taskMark = SettingString.InStore_Mark; taskMark = SettingString.InStore_Mark;
tarNode = null; tarNode = null;
int id = Common.nodeInfo.FindIndex(s => s.Name.StartsWith(SettingString.Packing_Box_Prefix) && s.StateEquals(eNodeStatus.NeedLeave) && s.RFID.StartsWith(SettingString.Packing_RFID_Prefix) && s.Mark.Equals("0") && s.IsUse); int id = CommonVar.nodeInfo.FindIndex(s => s.Name.StartsWith(SettingString.Packing_Box_Prefix) && s.StateEquals(eNodeStatus.NeedLeave) && s.RFID.StartsWith(SettingString.Packing_RFID_Prefix) && s.Mark.Equals("0") && s.IsUse);
if (id > -1) if (id > -1)
{ {
taskMark = SettingString.InStore_Mark; taskMark = SettingString.InStore_Mark;
tarNode = Common.nodeInfo[id]; tarNode = CommonVar.nodeInfo[id];
return id; return id;
} }
else else
{ {
id = Common.nodeInfo.FindIndex(s => s.Name.StartsWith(SettingString.Packing_Box_Prefix) && s.StateEquals(eNodeStatus.NeedLeave) id = CommonVar.nodeInfo.FindIndex(s => s.Name.StartsWith(SettingString.Packing_Box_Prefix) && s.StateEquals(eNodeStatus.NeedLeave)
&& s.RFID.StartsWith(SettingString.Packing_RFID_Prefix) && Marks.ContainsKey(s.Mark) && s.IsUse); && s.RFID.StartsWith(SettingString.Packing_RFID_Prefix) && Marks.ContainsKey(s.Mark) && s.IsUse);
if (id > -1) if (id > -1)
{ {
taskMark = Common.nodeInfo[id].Mark; taskMark = CommonVar.nodeInfo[id].Mark;
tarNode = Common.nodeInfo[id]; tarNode = CommonVar.nodeInfo[id];
return id; return id;
} }
} }
...@@ -237,7 +238,7 @@ namespace AGVControl.bean.jobType ...@@ -237,7 +238,7 @@ namespace AGVControl.bean.jobType
int nodeIdx = CheckPackingOutShelf(out ClientNode tarNode, out string taskMark); int nodeIdx = CheckPackingOutShelf(out ClientNode tarNode, out string taskMark);
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
int agvId = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob is PackingJob_TransferShelf && ((PackingJob_TransferShelf)s.CurJob).TargetPlace.Equals(tarNode.Name)); int agvId = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob is PackingJob_TransferShelf && ((PackingJob_TransferShelf)s.CurJob).TargetPlace.Equals(tarNode.Name));
if (agvId == -1) if (agvId == -1)
return new PackingJob_TransferShelf(agv.Place, tarNode.Name, "", taskMark);// tarNode.RFID return new PackingJob_TransferShelf(agv.Place, tarNode.Name, "", taskMark);// tarNode.RFID
} }
...@@ -245,16 +246,16 @@ namespace AGVControl.bean.jobType ...@@ -245,16 +246,16 @@ namespace AGVControl.bean.jobType
nodeIdx = CheckOutStroePackingJob(); nodeIdx = CheckOutStroePackingJob();
if (nodeIdx == -1) //搜索包装仓入库任务 if (nodeIdx == -1) //搜索包装仓入库任务
{ {
Common.log.Debug("B区没有找到需要出库的节点"); LogUtil.debug("B区没有找到需要出库的节点");
nodeIdx = CheckInStroePackingJob(); nodeIdx = CheckInStroePackingJob();
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
//检查是否有小车去同一个目的地 //检查是否有小车去同一个目的地
int agvId = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is PackingJob_GetShelf && ((PackingJob_GetShelf)s.CurJob).TargetPlace.Equals(Common.nodeInfo[nodeIdx].Name)); int agvId = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is PackingJob_GetShelf && ((PackingJob_GetShelf)s.CurJob).TargetPlace.Equals(CommonVar.nodeInfo[nodeIdx].Name));
if (agvId == -1) if (agvId == -1)
{ {
string Place = Common.nodeInfo[nodeIdx].Name; string Place = CommonVar.nodeInfo[nodeIdx].Name;
Common.LogInfo(string.Format("{0} 任务生成:Place={1},Type={2}", agv.Name, Place, SettingString.InStore_Mark)); LogUtil.info(string.Format("{0} 任务生成:Place={1},Type={2}", agv.Name, Place, SettingString.InStore_Mark));
return new PackingJob_GetShelf(agv.Place, Place, SettingString.InStore_Mark); return new PackingJob_GetShelf(agv.Place, Place, SettingString.InStore_Mark);
} }
...@@ -263,34 +264,34 @@ namespace AGVControl.bean.jobType ...@@ -263,34 +264,34 @@ namespace AGVControl.bean.jobType
else//B区域需要出库,寻找空料架 else//B区域需要出库,寻找空料架
{ {
//检查是否有小车去同一个包装仓 //检查是否有小车去同一个包装仓
int agvId = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is PackingJob_GetShelf && ((PackingJob_GetShelf)s.CurJob).TargetPlace.Equals(Common.nodeInfo[nodeIdx].Name)); int agvId = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob != null && s.CurJob is PackingJob_GetShelf && ((PackingJob_GetShelf)s.CurJob).TargetPlace.Equals(CommonVar.nodeInfo[nodeIdx].Name));
if (agvId > -1) if (agvId > -1)
return null; return null;
int n = Common.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A7) && s.StateEquals(eNodeStatus.NeedLeave) && int n = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(SettingString.A7) && s.StateEquals(eNodeStatus.NeedLeave) &&
s.RFID.StartsWith(SettingString.Packing_RFID_Prefix) && s.IsUse); s.RFID.StartsWith(SettingString.Packing_RFID_Prefix) && s.IsUse);
if (n > -1) if (n > -1)
{ {
string Place = Common.nodeInfo[n].Name; string Place = CommonVar.nodeInfo[n].Name;
string Mark = Common.nodeInfo[nodeIdx].Mark; string Mark = CommonVar.nodeInfo[nodeIdx].Mark;
Common.LogInfo(string.Format("{0} 任务生成:Place={1},Type={2}", agv.Name, Place, Mark)); LogUtil.info(string.Format("{0} 任务生成:Place={1},Type={2}", agv.Name, Place, Mark));
return new PackingJob_GetShelf(agv.Place, Place, Mark); return new PackingJob_GetShelf(agv.Place, Place, Mark);
} }
else else
{ {
//A4没有被占用 //A4没有被占用
n = Common.nodeInfo.FindIndex(s => s.Name == SettingString.A4 && s.StateEquals(eNodeStatus.NeedLeave) n = CommonVar.nodeInfo.FindIndex(s => s.Name == SettingString.A4 && s.StateEquals(eNodeStatus.NeedLeave)
&& s.IsUse); && s.IsUse);
if (n == -1) if (n == -1)
{ {
nodeIdx = -1; nodeIdx = -1;
Common.log.Error("A7,A4不是NeedLeave或被占用"); LogUtil.error("A7,A4不是NeedLeave或被占用");
agv.AddDisplayBoard("包装料架", "PackingShelf", "分盘线出口A7、包装线出口A4均无包装料架,请检查!"); agv.AddDisplayBoard("包装料架", "PackingShelf", "分盘线出口A7、包装线出口A4均无包装料架,请检查!");
} }
else else
{ {
string Place = Common.nodeInfo[n].Name; string Place = CommonVar.nodeInfo[n].Name;
string Mark = Common.nodeInfo[nodeIdx].Mark; string Mark = CommonVar.nodeInfo[nodeIdx].Mark;
Common.LogInfo(string.Format("{0} 任务生成:Place={1},Type={2}", agv.Name, Place, Mark)); LogUtil.info(string.Format("{0} 任务生成:Place={1},Type={2}", agv.Name, Place, Mark));
return new PackingJob_GetShelf(agv.Place, Place, Mark); return new PackingJob_GetShelf(agv.Place, Place, Mark);
} }
} }
......
using MiR; 
using log4net.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGVControl.bean.jobType using Common;
namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 料仓料串任务 /// 料仓料串任务
...@@ -21,26 +17,26 @@ namespace AGVControl.bean.jobType ...@@ -21,26 +17,26 @@ namespace AGVControl.bean.jobType
/// <returns></returns> /// <returns></returns>
public override Job GetNewJob(Agv_Info currentAgv) public override Job GetNewJob(Agv_Info currentAgv)
{ {
if (!Common.CheckCanExecuteMission(currentAgv)) if (!CommonVar.CheckCanExecuteMission(currentAgv))
return null; return null;
if (!Common.CheckAGVStatusNone(currentAgv)) if (!CommonVar.CheckAGVStatusNone(currentAgv))
return null; return null;
string rfid = ""; string rfid = "";
if (currentAgv.IP.Equals(SettingString.SingleMission_IP1)) if (currentAgv.IP.Equals(SettingString.SingleMission_IP1))
{ {
if (!Common.control.limitArea.Available) if (!CommonVar.control.limitArea.Available)
return null; return null;
//检查入料口1的C5是否需要满料串 //检查入料口1的C5是否需要满料串
if (FindNeedEnterMission(currentAgv, SettingString.C5)) if (FindNeedEnterMission(currentAgv, SettingString.C5))
{ {
if (FindNeedLeaveMission(currentAgv, SettingString.D2, out rfid)) if (FindNeedLeaveMission(currentAgv, SettingString.D2, out rfid))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.D2, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.D2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.D2, "B#", true); return new GetShelfJob(currentAgv.Place, SettingString.D2, "B#", true);
} }
if (FindNeedLeaveMission(currentAgv, SettingString.A1, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.A1, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.A1, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.A1, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.A1, rfid, true); return new GetShelfJob(currentAgv.Place, SettingString.A1, rfid, true);
} }
} }
...@@ -49,7 +45,7 @@ namespace AGVControl.bean.jobType ...@@ -49,7 +45,7 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2)) if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C6, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C6, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C6, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C6, rfid);
} }
} }
...@@ -61,7 +57,7 @@ namespace AGVControl.bean.jobType ...@@ -61,7 +57,7 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedEnterMission(currentAgv, SettingString.A8)) if (FindNeedEnterMission(currentAgv, SettingString.A8))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C8, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C8, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C8, rfid, true); return new GetShelfJob(currentAgv.Place, SettingString.C8, rfid, true);
} }
} }
...@@ -70,18 +66,18 @@ namespace AGVControl.bean.jobType ...@@ -70,18 +66,18 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedLeaveMission(currentAgv, SettingString.A7, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.A7, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.A7, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.A7, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.A7, rfid); return new GetShelfJob(currentAgv.Place, SettingString.A7, rfid);
} }
if (FindNeedLeaveMission(currentAgv, SettingString.C2, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.C2, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C2, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C2, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C2, rfid);
} }
if (FindNeedLeaveMission(currentAgv, SettingString.C4, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.C4, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C4, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C4, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C4, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C4, rfid);
} }
} }
...@@ -90,12 +86,12 @@ namespace AGVControl.bean.jobType ...@@ -90,12 +86,12 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedLeaveMission(currentAgv, SettingString.C2, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.C2, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C2, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C2, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C2, rfid);
} }
if (FindNeedLeaveMission(currentAgv, SettingString.C4, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.C4, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C4, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C4, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C4, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C4, rfid);
} }
} }
...@@ -105,7 +101,7 @@ namespace AGVControl.bean.jobType ...@@ -105,7 +101,7 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2)) if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C2, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C2, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C2, rfid);
} }
} }
...@@ -114,7 +110,7 @@ namespace AGVControl.bean.jobType ...@@ -114,7 +110,7 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2)) if (FindNeedEnterMission(currentAgv, SettingString.D1) || FindNeedEnterMission(currentAgv, SettingString.A2))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C4, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.C4, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.C4, rfid); return new GetShelfJob(currentAgv.Place, SettingString.C4, rfid);
} }
} }
...@@ -123,12 +119,12 @@ namespace AGVControl.bean.jobType ...@@ -123,12 +119,12 @@ namespace AGVControl.bean.jobType
{ {
if (FindNeedLeaveMission(currentAgv, SettingString.D2, out rfid)) if (FindNeedLeaveMission(currentAgv, SettingString.D2, out rfid))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.D2, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.D2, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.D2, "B#", true); return new GetShelfJob(currentAgv.Place, SettingString.D2, "B#", true);
} }
if (FindNeedLeaveMission(currentAgv, SettingString.A1, out rfid, SettingString.ReelString_RFID_Prefix)) if (FindNeedLeaveMission(currentAgv, SettingString.A1, out rfid, SettingString.ReelString_RFID_Prefix))
{ {
Common.LogInfo(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.A1, rfid)); LogUtil.info(string.Format("{0} 任务生成:Place={1},rfid={2}", currentAgv.Name, SettingString.A1, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.A1, rfid, true); return new GetShelfJob(currentAgv.Place, SettingString.A1, rfid, true);
} }
} }
...@@ -142,25 +138,25 @@ namespace AGVControl.bean.jobType ...@@ -142,25 +138,25 @@ namespace AGVControl.bean.jobType
public static bool FindNeedLeave(Agv_Info agv, string nodeName, out string RFID, string RFID_Prefix = "") public static bool FindNeedLeave(Agv_Info agv, string nodeName, out string RFID, string RFID_Prefix = "")
{ {
int nodeIdx = Common.FindNode(nodeName); int nodeIdx = CommonVar.FindNode(nodeName);
RFID = ""; RFID = "";
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
if (RFID_Prefix.Equals("")) if (RFID_Prefix.Equals(""))
{ {
nodeIdx = Common.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedLeave)); nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedLeave));
} }
else if (RFID_Prefix.Trim().Length == 1) else if (RFID_Prefix.Trim().Length == 1)
{ {
nodeIdx = Common.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedLeave) && s.RFID.StartsWith(RFID_Prefix)); nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedLeave) && s.RFID.StartsWith(RFID_Prefix));
} }
else else
{ {
nodeIdx = Common.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedLeave)); nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedLeave));
} }
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
RFID = Common.nodeInfo[nodeIdx].RFID; RFID = CommonVar.nodeInfo[nodeIdx].RFID;
return true; return true;
} }
} }
...@@ -172,10 +168,10 @@ namespace AGVControl.bean.jobType ...@@ -172,10 +168,10 @@ namespace AGVControl.bean.jobType
} }
public static bool FindNeedEnter(Agv_Info agv, string nodeName) public static bool FindNeedEnter(Agv_Info agv, string nodeName)
{ {
int nodeIdx = Common.FindNode(nodeName); int nodeIdx = CommonVar.FindNode(nodeName);
if (nodeIdx > -1) if (nodeIdx > -1)
{ {
nodeIdx = Common.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedEnter)); nodeIdx = CommonVar.nodeInfo.FindIndex(s => s.Name.Equals(nodeName) && s.StateEquals(eNodeStatus.NeedEnter));
if (nodeIdx > -1) if (nodeIdx > -1)
return true; return true;
} }
...@@ -202,24 +198,24 @@ namespace AGVControl.bean.jobType ...@@ -202,24 +198,24 @@ namespace AGVControl.bean.jobType
//} //}
//else //else
{ {
int idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob !=null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(nodeName))); int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob !=null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(nodeName)));
if (idx == -1) if (idx == -1)
{ {
Common.log.Debug(string.Format("{0} FindNeedEnterMission ", agv.Name)); LogUtil.debug(string.Format("{0} FindNeedEnterMission ", agv.Name));
return true; return true;
} }
//int idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && (s.CurJob == null || !(s.CurJob is SendShelfJob))); //int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && (s.CurJob == null || !(s.CurJob is SendShelfJob)));
//if(idx>-1) //if(idx>-1)
//{ //{
// Common.log.Debug(string.Format("{0} FindNeedEnterMission 1", agv.Name)); // CommonVar.log.Debug(string.Format("{0} FindNeedEnterMission 1", agv.Name));
// return true; // return true;
//} //}
//else //else
//{ //{
// idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob is SendShelfJob && !(((SendShelfJob)s.CurJob).TargetPlace.Equals(nodeName))); // idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob is SendShelfJob && !(((SendShelfJob)s.CurJob).TargetPlace.Equals(nodeName)));
// if (idx > -1) // if (idx > -1)
// { // {
// Common.log.Debug(string.Format("{0} FindNeedEnterMission 2", agv.Name)); // CommonVar.log.Debug(string.Format("{0} FindNeedEnterMission 2", agv.Name));
// return true; // return true;
// } // }
//} //}
...@@ -247,27 +243,27 @@ namespace AGVControl.bean.jobType ...@@ -247,27 +243,27 @@ namespace AGVControl.bean.jobType
//} //}
//else //else
{ {
int idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob !=null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(nodeName))); int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob !=null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(nodeName)));
if (idx == -1) if (idx == -1)
{ {
RFID = rfid; RFID = rfid;
Common.log.Debug(string.Format("{0} FindNeedLeaveMission", agv.Name)); LogUtil.debug(string.Format("{0} FindNeedLeaveMission", agv.Name));
return true; return true;
} }
//int idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && (s.CurJob == null || !(s.CurJob is GetShelfJob))); //int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && (s.CurJob == null || !(s.CurJob is GetShelfJob)));
//if(idx>-1) //if(idx>-1)
//{ //{
// RFID = rfid; // RFID = rfid;
// Common.log.Debug(string.Format("{0} FindNeedLeaveMission 1", agv.Name)); // CommonVar.log.Debug(string.Format("{0} FindNeedLeaveMission 1", agv.Name));
// return true; // return true;
//} //}
//else //else
//{ //{
// idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob is GetShelfJob && !(((GetShelfJob)s.CurJob).TargetPlace.Equals(nodeName))); // idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(agv.IP) && s.CurJob is GetShelfJob && !(((GetShelfJob)s.CurJob).TargetPlace.Equals(nodeName)));
// if (idx > -1) // if (idx > -1)
// { // {
// RFID = rfid; // RFID = rfid;
// Common.log.Debug(string.Format("{0} FindNeedLeaveMission 2", agv.Name)); // CommonVar.log.Debug(string.Format("{0} FindNeedLeaveMission 2", agv.Name));
// return true; // return true;
// } // }
//} //}
......
using MiR; using Common;
using log4net.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGVControl.bean.jobType namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 退料任务 /// 退料任务
...@@ -23,9 +17,9 @@ namespace AGVControl.bean.jobType ...@@ -23,9 +17,9 @@ namespace AGVControl.bean.jobType
{ {
if (currentAgv.IP.Equals(SettingString.SingleMission_IP1)) if (currentAgv.IP.Equals(SettingString.SingleMission_IP1))
return null; return null;
if (!Common.CheckCanExecuteMission(currentAgv)) if (!CommonVar.CheckCanExecuteMission(currentAgv))
return null; return null;
if (!Common.CheckAGVStatusNone(currentAgv)) if (!CommonVar.CheckAGVStatusNone(currentAgv))
return null; return null;
string rfid=""; string rfid="";
//查找退料线出满料架且点料机需要架子 //查找退料线出满料架且点料机需要架子
...@@ -33,26 +27,26 @@ namespace AGVControl.bean.jobType ...@@ -33,26 +27,26 @@ namespace AGVControl.bean.jobType
{ {
if (ReelStringJobType.FindNeedEnter(currentAgv, SettingString.D3) ) if (ReelStringJobType.FindNeedEnter(currentAgv, SettingString.D3) )
{ {
int idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G23_In))); int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G23_In)));
if (idx == -1) idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D3))); if (idx == -1) idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D3)));
if (idx == -1) idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D3))); if (idx == -1) idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D3)));
if (idx==-1) idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G24_Out))); if (idx==-1) idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G24_Out)));
if (idx == -1) if (idx == -1)
{ {
Common.LogInfo(string.Format("{0} 退料任务生成(D3需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid)); LogUtil.info(string.Format("{0} 退料任务生成(D3需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.G24_Out, "B#",true); return new GetShelfJob(currentAgv.Place, SettingString.G24_Out, "B#",true);
} }
} }
if (ReelStringJobType.FindNeedEnter(currentAgv, SettingString.D4)) if (ReelStringJobType.FindNeedEnter(currentAgv, SettingString.D4))
{ {
int idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G23_In))); int idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G23_In)));
if (idx == -1) idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D4))); if (idx == -1) idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is SendShelfJob && (((SendShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D4)));
if (idx == -1) idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D4))); if (idx == -1) idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.D4)));
if (idx == -1) idx = Common.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G24_Out))); if (idx == -1) idx = CommonVar.agvInfo.FindIndex(s => !s.IP.Equals(currentAgv.IP) && s.CurJob != null && s.CurJob is GetShelfJob && (((GetShelfJob)s.CurJob).TargetPlace.Equals(SettingString.G24_Out)));
if (idx == -1) if (idx == -1)
{ {
Common.LogInfo(string.Format("{0} 退料任务生成(D4需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid)); LogUtil.info(string.Format("{0} 退料任务生成(D4需要满料串,G24出满料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.G24_Out, "B#",true); return new GetShelfJob(currentAgv.Place, SettingString.G24_Out, "B#",true);
} }
...@@ -64,7 +58,7 @@ namespace AGVControl.bean.jobType ...@@ -64,7 +58,7 @@ namespace AGVControl.bean.jobType
{ {
if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.G23_In)) if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.G23_In))
{ {
Common.LogInfo(string.Format("{0} 退料任务生成(D3出空料串,G23需要空料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid)); LogUtil.info(string.Format("{0} 退料任务生成(D3出空料串,G23需要空料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D3, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.D3, "B#"); return new GetShelfJob(currentAgv.Place, SettingString.D3, "B#");
} }
} }
...@@ -72,7 +66,7 @@ namespace AGVControl.bean.jobType ...@@ -72,7 +66,7 @@ namespace AGVControl.bean.jobType
{ {
if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.G23_In)) if (ReelStringJobType.FindNeedEnterMission(currentAgv, SettingString.G23_In))
{ {
Common.LogInfo(string.Format("{0} 退料任务生成(D4出空料串,G23需要空料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D4, rfid)); LogUtil.info(string.Format("{0} 退料任务生成(D4出空料串,G23需要空料串):Place={1},rfid={2}", currentAgv.Name, SettingString.D4, rfid));
return new GetShelfJob(currentAgv.Place, SettingString.D4, "B#"); return new GetShelfJob(currentAgv.Place, SettingString.D4, "B#");
} }
} }
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AGVControl namespace DeviceLibrary
{ {
/// <summary> /// <summary>
/// 客户端的节点 /// 客户端的节点
...@@ -125,22 +122,21 @@ namespace AGVControl ...@@ -125,22 +122,21 @@ namespace AGVControl
} }
catch (Exception ex) catch (Exception ex)
{ {
Common.log.Error(Name + "上报节点信息失败" + ex.Message + ex.StackTrace); Common.LogUtil.error(Name + "上报节点信息失败" + ex.Message + ex.StackTrace);
} }
} }
public string[] ToRow() public string[] ToRow()
{ {
//节点,IP,动作,RFID,AGV名称,在线,调用,清除AGV //节点,IP,动作,RFID,AGV名称,在线,调用,清除AGV
string[] s = new string[7]; List<string> list = new List<string>();
s[0] = LineName; list.Add(LineName);
s[1] = nodeStatus.ToString(); list.Add(nodeStatus.ToString());
s[2] = Level.ToString(); list.Add(Level.ToString());
s[3] = Mark; list.Add(RFID);
s[4] = RFID; list.Add(Online ? "在线" : "离线");
s[5] = Online ? "在线" : "离线"; list.Add(IsUse ? "是" : "否");
s[6] = IsUse ? "是" : "否"; return list.ToArray();
return s;
} }
/// <summary> /// <summary>
......
using AGVControl.bean; 
using System; namespace DeviceLibrary
using System.Collections.Generic;
using System.Windows.Forms;
namespace AGVControl
{ {
public abstract class Node public abstract class Node
{ {
......
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!