Commit 3c66cc7b 张东亮

修改产线名前缀为MP

1 个父辈 3803ecbd
......@@ -44,8 +44,8 @@
<Reference Include="Agv.Server">
<HintPath>dll\Agv.Server.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>dll\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......
......@@ -44,6 +44,14 @@
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
......@@ -58,14 +66,6 @@
this.lblStandy3 = new System.Windows.Forms.Label();
this.lblStandy4 = new System.Windows.Forms.Label();
this.lblLimit = new System.Windows.Forms.Label();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.tableLayoutPanel3.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
......@@ -73,13 +73,13 @@
this.panelNode.SuspendLayout();
this.groupBoxNode.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.tabPage3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tableLayoutPanel4.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox4.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel3
......@@ -248,6 +248,94 @@
this.Column16.Name = "Column16";
this.Column16.ReadOnly = true;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.groupBox4, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(736, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 46.1165F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53.8835F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(431, 412);
this.tableLayoutPanel1.TabIndex = 1;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.label2);
this.groupBox3.Controls.Add(this.label1);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(425, 183);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "云仓出料口信息";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(3, 36);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 19);
this.label2.TabIndex = 1;
this.label2.Text = "出料口2";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(3, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 19);
this.label1.TabIndex = 0;
this.label1.Text = "出料口1";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.label3);
this.groupBox4.Controls.Add(this.button1);
this.groupBox4.Controls.Add(this.textBox1);
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox4.Location = new System.Drawing.Point(3, 192);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(425, 217);
this.groupBox4.TabIndex = 1;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "料架缓存清理";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(137, 47);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 2;
this.label3.Text = "清理结果";
//
// button1
//
this.button1.Location = new System.Drawing.Point(7, 71);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(85, 69);
this.button1.TabIndex = 1;
this.button1.Text = "清理料架缓存";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(7, 29);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(85, 21);
this.textBox1.TabIndex = 0;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupBox1);
......@@ -395,94 +483,6 @@
this.lblLimit.Size = new System.Drawing.Size(35, 12);
this.lblLimit.TabIndex = 6;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.groupBox3, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.groupBox4, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(736, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 46.1165F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53.8835F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(431, 412);
this.tableLayoutPanel1.TabIndex = 1;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.label2);
this.groupBox3.Controls.Add(this.label1);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(425, 183);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "云仓出料口信息";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(3, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 19);
this.label1.TabIndex = 0;
this.label1.Text = "出料口1";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(3, 36);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 19);
this.label2.TabIndex = 1;
this.label2.Text = "出料口2";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.label3);
this.groupBox4.Controls.Add(this.button1);
this.groupBox4.Controls.Add(this.textBox1);
this.groupBox4.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox4.Location = new System.Drawing.Point(3, 192);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(425, 217);
this.groupBox4.TabIndex = 1;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "料架缓存清理";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(7, 29);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(85, 21);
this.textBox1.TabIndex = 0;
//
// button1
//
this.button1.Location = new System.Drawing.Point(7, 71);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(85, 69);
this.button1.TabIndex = 1;
this.button1.Text = "清理料架缓存";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(137, 47);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 2;
this.label3.Text = "清理结果";
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -504,15 +504,15 @@
this.panelNode.ResumeLayout(false);
this.groupBoxNode.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).EndInit();
this.tabPage3.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.tabPage3.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.tableLayoutPanel4.ResumeLayout(false);
this.ResumeLayout(false);
}
......
......@@ -31,15 +31,15 @@ namespace AGVControl
/// 限制区域有小车
/// </summary>
/// <param name="ip"></param>
private void LimitArea_ScopeLimitStateChangedEvent(string ip,bool state)
private void LimitArea_ScopeLimitStateChangedEvent(string ip, bool state)
{
Invoke(new Action(()=>
Invoke(new Action(() =>
{
if (DeviceLibrary.Context.control.limitArea.Available)
lblLimit.Text = "限制区域车辆:";
else
{
lblLimit.Text = "限制区域车辆:"+ ip;
lblLimit.Text = "限制区域车辆:" + ip;
}
}
));
......@@ -53,16 +53,16 @@ namespace AGVControl
if (input != null && input.Length == 4)
DeviceLibrary.Context.agvInfo[i].IsExistShelf = input[3];
flowPanelKanBan.Controls.Add(DeviceLibrary.Context.agvInfo[i].StateKanban);
AddForm(DeviceLibrary.Context.agvInfo[i].Name,new Manual(DeviceLibrary.Context.agvInfo[i]));
AddForm(DeviceLibrary.Context.agvInfo[i].Name, new Manual(DeviceLibrary.Context.agvInfo[i]));
DeviceLibrary.Context.agvInfo[i].StateKanban.Init();
}
for (int i = 0; i < DeviceLibrary.Context.nodeInfo.Count; i++)
{
Agv.ClientNode node = DeviceLibrary.Context.nodeInfo[i];
if (node.Name.StartsWith("S"))
if (node.Name.StartsWith("MP"))
continue;
n = DgvNode.Rows.Add(node.AliceName, node.Action, node.Shelf, node.RFID, node.Online, node.IsUse);
n = DgvNode.Rows.Add(node.LineName, node.Action, node.Shelf, node.RFID, node.Online, node.IsUse);
DgvNode.Rows[n].HeaderCell.Value = (n + 1).ToString();
if (i % 2 == 0)
DgvNode.Rows[n].DefaultCellStyle.BackColor = Color.LightBlue;
......@@ -118,21 +118,20 @@ namespace AGVControl
string ip = AppConfigHelper.GetValue(SettingString.AGVServerIp);
int port = AppConfigHelper.GetIntValue(SettingString.AGVServerPort);
DeviceLibrary.Context.server.Start(ip, port);
LogUtil.logBox= richTextBox1;
LogUtil.logBox = richTextBox1;
}
private void Server_NodeOnline(string nodeName, bool online)
{
this.Invoke(new Action(()=>
this.Invoke(new Action(() =>
{
int idx = DeviceLibrary.Context.nodeInfo.FindIndex(s=> s.Name.Equals(nodeName));
int idx = DeviceLibrary.Context.nodeInfo.FindIndex(s => s.Name.Equals(nodeName));
if (idx > -1)
{
DeviceLibrary.Context.nodeInfo[idx].Online = online;
if (!online)
DeviceLibrary.Context.nodeInfo[idx].Action = Agv.ClientAction.None;
DeviceLibrary.Context.nodeInfo[idx].IsUse = online;
DgvNode.Rows[idx].DefaultCellStyle.ForeColor = online ? Color.Black : Color.Red;
DgvNode.Rows[idx].SetValues(DeviceLibrary.Context.nodeInfo[idx].AliceName, DeviceLibrary.Context.nodeInfo[idx].Action, DeviceLibrary.Context.nodeInfo[idx].Shelf, DeviceLibrary.Context.nodeInfo[idx].RFID, DeviceLibrary.Context.nodeInfo[idx].Online, DeviceLibrary.Context.nodeInfo[idx].IsUse);
DgvNode.Rows[idx].SetValues(DeviceLibrary.Context.nodeInfo[idx].LineName, DeviceLibrary.Context.nodeInfo[idx].Action, DeviceLibrary.Context.nodeInfo[idx].Shelf, DeviceLibrary.Context.nodeInfo[idx].RFID, DeviceLibrary.Context.nodeInfo[idx].Online, DeviceLibrary.Context.nodeInfo[idx].IsUse);
}
}
));
......@@ -146,8 +145,8 @@ namespace AGVControl
DeviceLibrary.Context.nodeInfo[idx].Action = clientNode.Action;
DeviceLibrary.Context.nodeInfo[idx].Shelf = clientNode.Shelf;
DeviceLibrary.Context.nodeInfo[idx].RFID = clientNode.RFID;
DgvNode.Rows[idx].SetValues(DeviceLibrary.Context.nodeInfo[idx].AliceName, DeviceLibrary.Context.nodeInfo[idx].Action, DeviceLibrary.Context.nodeInfo[idx].Shelf, DeviceLibrary.Context.nodeInfo[idx].RFID, DeviceLibrary.Context.nodeInfo[idx].Online, DeviceLibrary.Context.nodeInfo[idx].IsUse);
}
DgvNode.Rows[idx].SetValues(DeviceLibrary.Context.nodeInfo[idx].LineName, DeviceLibrary.Context.nodeInfo[idx].Action, DeviceLibrary.Context.nodeInfo[idx].Shelf, DeviceLibrary.Context.nodeInfo[idx].RFID, DeviceLibrary.Context.nodeInfo[idx].Online, DeviceLibrary.Context.nodeInfo[idx].IsUse);
}
}
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
......@@ -179,7 +178,7 @@ namespace AGVControl
DgvNode.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = DeviceLibrary.Context.nodeInfo[e.RowIndex].IsUse.ToString();
DeviceLibrary.Context.WriteIni(DeviceLibrary.Context.nodeInfo[e.RowIndex].Name, SettingString.IsUse, DeviceLibrary.Context.nodeInfo[e.RowIndex].IsUse.ToString());
Agv.ClientNode node = DeviceLibrary.Context.nodeInfo[e.RowIndex];
DgvNode.Rows[e.RowIndex].SetValues(node.AliceName, node.Action, node.Shelf, node.RFID, node.Online, node.IsUse);
DgvNode.Rows[e.RowIndex].SetValues(node.LineName, node.Action, node.Shelf, node.RFID, node.Online, node.IsUse);
}
}
......@@ -286,9 +285,9 @@ namespace AGVControl
label3.Text = "";
if (textBox1.Text.Equals(""))
return;
if(RequestManager.AgvRemoveRfid(textBox1.Text.ToUpper()))
if (RequestManager.AgvRemoveRfid(textBox1.Text.ToUpper()))
{
LogUtil.info("手动清理料架缓存:"+ textBox1.Text.ToUpper());
LogUtil.info("手动清理料架缓存:" + textBox1.Text.ToUpper());
label3.Text = "清理料架缓存成功:" + textBox1.Text.ToUpper();
label3.BackColor = Color.Green;
}
......
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
......@@ -8,7 +8,7 @@
</startup>
<log4net>
<appender name="AGVDispatch" type="log4net.Appender.RollingFileAppender">
<file value="logs/AGVDispatch.log"/>
<file value="logs/AGVDispatch/AGVDispatch.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
......@@ -18,7 +18,7 @@
</layout>
</appender>
<appender name="MiR_API" type="log4net.Appender.RollingFileAppender">
<file value="logs/MiR_API.log"/>
<file value="logs/MiR_API/MiR_API.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<param name="MaxSizeRollBackups" value="30"/>
......@@ -39,6 +39,21 @@
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/>
</layout>
</appender>
<appender name="Agv" type="log4net.Appender.RollingFileAppender">
<file value="logs/Agv/Agv.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<param name="MaxSizeRollBackups" value="30"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/>
</layout>
</appender>
<logger name="Agv">
<level value="Info"/>
<appender-ref ref="Agv"/>
</logger>
<logger name="MiR_API">
<level value="Error"/>
<appender-ref ref="MiR_API"/>
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net472" />
<package id="RestSharp" version="106.11.4" targetFramework="net461" />
</packages>
\ No newline at end of file
......@@ -31,8 +31,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>.\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......@@ -67,5 +67,8 @@
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net472" />
</packages>
\ No newline at end of file
......@@ -37,13 +37,14 @@
<Reference Include="Agv.Server">
<HintPath>..\AGVDispatch\dll\Agv.Server.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>.\log4net.dll</HintPath>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.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.Web" />
<Reference Include="System.Web.Extensions" />
......@@ -100,6 +101,7 @@
<None Include="Config\AgvProductionLine.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -173,7 +173,7 @@ namespace DeviceLibrary
{
if (Context.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{
Context.server.CloseDoor(TargetPlace);
//Context.server.CloseDoor(TargetPlace);
if (recyMark)
{
......
......@@ -160,7 +160,7 @@ namespace DeviceLibrary
{
if (Context.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{
Context.server.CloseDoor(TargetPlace);
//Context.server.CloseDoor(TargetPlace);
if (FindShelfTarget(agv, out string tarNodeName))
{
runInfo = "料串进入小车完成,任务结束";
......
......@@ -171,7 +171,7 @@ namespace DeviceLibrary
{
if (Context.CheckEnterOrLeaveFinished(agv, SettingString.Enter, CurTaskState))
{
Context.server.CloseDoor(TargetPlace);
//Context.server.CloseDoor(TargetPlace);
if (FindRecycleStation(agv))
{
curJobStep.ToNextStep(EXECUTE_STEP.R5_WAIT_REACH_RECYCLE_STATION);
......
......@@ -127,7 +127,7 @@ namespace DeviceLibrary
{
if (Context.CheckEnterOrLeaveFinished(agv, SettingString.Leave, CurTaskState))
{
Context.server.CloseDoor(TargetPlace);
//Context.server.CloseDoor(TargetPlace);
curJobStep.ToNextStep(EXECUTE_STEP.P5_END);
runInfo = "料架进入" + TargetPlace + "完成";
msg += runInfo;
......
using Agv;
using Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceLibrary
{
public class NodeManager
{
/// <summary>
/// 节点信息
/// </summary>
public List<Agv.ClientNode> nodeInfo;
public NodeManager()
{
InitNodes();
}
/// <summary>
/// 初始化节点
/// </summary>
public void InitNodes()
{
nodeInfo = new List<Agv.ClientNode>();
string path = DeviceLibrary.Context.CONFIG_PATH + SettingString.FileName_AgvProductionLine;
string[] line = System.IO.File.ReadAllLines(path, Encoding.GetEncoding("gb2312"));
string[] temp;
for (int i = 1; i < line.Length; i++)
{
temp = line[i].Split(',');
if (temp.Length != 3) continue;
bool.TryParse(DeviceLibrary.Context.ReadIni(temp[0], SettingString.IsUse), out bool isUse);
nodeInfo.Add(new Agv.ClientNode(temp[0], temp[1], temp[2], isUse));
}
}
/// <summary>
/// 根据alicename获取节点名
/// </summary>
/// <param name="aliceName"></param>
/// <param name="nodeName"></param>
/// <returns></returns>
public bool GetNodeNameByAliceName(string aliceName, out string nodeName)
{
nodeName = "";
int id = nodeInfo.FindIndex(s => s.AliceName.Equals(aliceName));
if (id > -1)
{
nodeName = nodeInfo[id].Name;
return true;
}
else
{
return false;
}
}
/// <summary>
/// 根据节点名获取alicename
/// </summary>
/// <param name="nodeName"></param>
/// <param name="lineName"></param>
/// <returns></returns>
public bool GetLineNameByNodeName(string nodeName, out string lineName)
{
lineName = "";
int id = nodeInfo.FindIndex(s => s.Name.Equals(nodeName));
if (id > -1)
{
lineName = nodeInfo[id].LineName;
return true;
}
else
{
return false;
}
}
/// <summary>
/// 查找节点是否存在以及是否调用
/// </summary>
/// <param name="nodeName">节点名称</param>
/// <returns></returns>
public bool FindNodeByName(string nodeName,out Agv.ClientNode node)
{
node = nodeInfo.Find(s => s.Name.Equals(nodeName) && s.IsUse);
if (node == null)
return false;
else
return true;
}
/// <summary>
/// 查找节点是否存在以及是否调用
/// </summary>
/// <param name="nodeName">节点名称</param>
/// <returns></returns>
public bool FindNodeByName(string nodeName)
{
Agv.ClientNode node = nodeInfo.Find(s => s.Name.Equals(nodeName) && s.IsUse);
if (node == null)
return false;
else
return true;
}
public bool CheckNodeLevel(string nodeName,Agv.ClientLevel level)
{
ClientNode node;
bool find=FindNodeByName(nodeName,out node);
if(find)
{
if (node.Level.Equals(level))
return true;
}
return false;
}
}
}
......@@ -75,7 +75,7 @@ namespace DeviceLibrary
string resultStr = HttpHelper.Get(server);
log.Debug("清理料架的缓存信息【" + server + "】【" + resultStr + "】");
RfidData rfidData = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
AgvRemoveData rfidData = JsonHelper.DeserializeJsonToObject<AgvRemoveData>(resultStr);
if (rfidData == null)
{
......@@ -206,4 +206,13 @@ namespace DeviceLibrary
public Dictionary<string, string> data { get; set; }
}
public class AgvRemoveData
{
//{"code":0,"msg":"ok","data":"7"}
public int code { get; set; }
public string msg { get; set; }
public string data { get; set; }
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net472" />
</packages>
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!