Commit cca55a28 顾剑亮

上传

0 个父辈
正在显示 59 个修改的文件 包含 1538 行增加0 行删除
此文件类型无法预览
{
"CurrentProjectSetting": null
}
\ No newline at end of file
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
\ No newline at end of file
此文件类型无法预览

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGVControl_Steel", "AGVControl_Steel\AGVControl_Steel.csproj", "{BE830571-6737-4FA7-A75B-0242B07E011C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BE830571-6737-4FA7-A75B-0242B07E011C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BE830571-6737-4FA7-A75B-0242B07E011C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE830571-6737-4FA7-A75B-0242B07E011C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE830571-6737-4FA7-A75B-0242B07E011C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8EDAF68F-DD77-4DBD-8A82-C0ED3BEE3D27}
EndGlobalSection
EndGlobal
<?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>{BE830571-6737-4FA7-A75B-0242B07E011C}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>AGVControl_Steel</RootNamespace>
<AssemblyName>AGVControl_Steel</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>bin\Debug\AGVControl_Steel.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<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>..\..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.11.4.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.11.4\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BLL\Control.cs" />
<Compile Include="BLL\Common.cs" />
<Compile Include="Model\MiR_API.cs" />
<Compile Include="Model\job\4CFlowJob.cs" />
<Compile Include="Model\job\4DFlowJob.cs" />
<Compile Include="Model\job\ChargeJob.cs" />
<Compile Include="Model\AgvInfo.cs" />
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="Model\job\JobStep.cs" />
<Compile Include="Model\job\Job.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Model\job\StandbyJob.cs" />
<EmbeddedResource Include="FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AGVControl_Steel" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AGVControl_Steel.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/>
</layout>
</appender>
<appender name="MiR_API" type="log4net.Appender.RollingFileAppender">
<file value="Logs/MiR_API.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<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="AGVControl_Steel">
<level value="Debug"/>
<appender-ref ref="AGVControl_Steel"/>
</logger>
<logger name="MiR_API">
<level value="Debug"/>
<appender-ref ref="MiR_API"/>
</logger>
</log4net>
<appSettings>
<add key="FLEET_IP" value="10.85.199.3" />
</appSettings>
</configuration>
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace AGVControl_Steel
{
/// <summary>
/// 公共类
/// </summary>
public static class Common
{
public static List<Model.AgvInfo> agvInfos;
public static BLL.Control control;
public static Model.MiR_API mir;
public static System.Configuration.Configuration appConfig;
public static log4net.ILog log;
public static readonly string CONFIG_AGV_NAME = Environment.CurrentDirectory + "\\Config\\AgvName.csv";
public static readonly string CONFIG_AGV_MISSION = Environment.CurrentDirectory + "\\Config\\AgvMission.csv";
}
}
using System;
using System.Collections.Generic;
using System.Threading;
using AGVControl_Steel;
using Model;
namespace BLL
{
/// <summary>
/// 控制类
/// </summary>
public class Control
{
private Timer timerState;
private Timer timerCall;
private bool[] agvState; //agv状态是否获取完成
public delegate void AgvChangedEvent(int agvIndex);
//public delegate void AgvMissionEvent();
public event AgvChangedEvent AgvChanged;
public event AgvChangedEvent AgvOnline;
//public event AgvMissionEvent AgvMissionChanged;
/// <summary>
/// 控制类
/// </summary>
public Control()
{
Dictionary<string, string> mission = new Dictionary<string, string>();
string[] lines = System.IO.File.ReadAllLines(Common.CONFIG_AGV_MISSION, System.Text.Encoding.UTF8);
for (int i = 0; i < lines.Length; i++)
{
string[] str = lines[i].Split(',');
if (str.Length != 2) continue;
mission.Add(str[0], str[1]);
}
Common.log.Info("读取配置文件 " + Common.CONFIG_AGV_MISSION);
Common.mir = new MiR_API
{
FleetIP = Common.appConfig.AppSettings.Settings["FLEET_IP"].Value,
MissionList = mission
};
agvState = new bool[Common.agvInfos.Count];
ThreadPool.SetMaxThreads(5, 5); //线程池最大数量
}
/// <summary>
/// 打开服务
/// </summary>
public void Start()
{
agvState = new bool[Common.agvInfos.Count];
timerState = new Timer(StateProcess, null, 0, 2000);
timerCall = new Timer(CallProcess, null, 0, 100);
}
/// <summary>
/// 关闭服务
/// </summary>
public void Stop()
{
timerState.Dispose();
timerCall.Dispose();
}
private void StateProcess(object obj)
{
for (int i = 0; i < agvState.Length; i++)
{
if (agvState[i]) continue;
agvState[i] = true;
AgvInfo info = Common.agvInfos[i];
bool rtn = CheckOnline(ref info);
if (!rtn) continue;
rtn = Common.mir.Get_State(info.IP, info.Authorization, out int stateID, out string stateText, out int battery, out string missionText);
Common.log.Debug(string.Format("{0}[{1}] Get_State{6} stateID={2}, stateText={3}, battery={4}, missionText={5}", info.Name, info.IP, stateID, stateText, battery, missionText, rtn));
if (rtn)
{
info.StateID = stateID;
info.StateText = stateText;
info.Battery = battery;
info.MissionText = missionText;
AgvChanged?.Invoke(i);
}
agvState[i] = false;
}
}
private void CallProcess(object obj)
{
}
private bool CheckOnline(ref AgvInfo info)
{
bool rtn = Common.mir.CheckIP(info.IP);
if (rtn)
{
if (!info.IsOnline)
{
info.IsOnline = true;
string ip = info.IP;
int idx = Common.agvInfos.FindIndex(s => s.IP == ip);
if (idx > -1) AgvOnline?.Invoke(idx);
rtn = Common.mir.Get_IO_Modules(info.IP, info.Authorization, out string[] guid);
if (rtn) info.IOGuid = guid[0];
}
Common.log.Debug(string.Format("{0}[{1}] 在线", info.Name, info.IP));
}
else
{
if (info.IsOnline)
{
info.IsOnline = false;
string ip = info.IP;
int idx = Common.agvInfos.FindIndex(s => s.IP == ip);
if (idx > -1) AgvOnline?.Invoke(idx);
}
Common.log.Debug(string.Format("{0}[{1}] 脱机", info.Name, info.IP));
}
return rtn;
}
}
}
\ No newline at end of file
namespace AGVControl_Steel
{
partial class FrmMain
{
/// <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 Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.DgvName = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
((System.ComponentModel.ISupportInitialize)(this.DgvName)).BeginInit();
this.tabControl1.SuspendLayout();
this.SuspendLayout();
//
// DgvName
//
this.DgvName.AllowUserToAddRows = false;
this.DgvName.AllowUserToDeleteRows = false;
this.DgvName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.DgvName.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DgvName.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column5,
this.Column6,
this.Column3,
this.Column7,
this.Column4});
this.DgvName.Location = new System.Drawing.Point(12, 12);
this.DgvName.Name = "DgvName";
this.DgvName.ReadOnly = true;
this.DgvName.RowTemplate.Height = 23;
this.DgvName.Size = new System.Drawing.Size(722, 80);
this.DgvName.TabIndex = 0;
this.DgvName.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvName_CellContentClick);
//
// Column1
//
this.Column1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column1.HeaderText = "名称";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column1.Width = 80;
//
// Column2
//
this.Column2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column2.HeaderText = "地点";
this.Column2.Name = "Column2";
this.Column2.ReadOnly = true;
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column2.Width = 80;
//
// Column5
//
this.Column5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column5.HeaderText = "小车状态";
this.Column5.Name = "Column5";
this.Column5.ReadOnly = true;
this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column5.Width = 80;
//
// Column6
//
this.Column6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.Column6.HeaderText = "任务文本";
this.Column6.Name = "Column6";
this.Column6.ReadOnly = true;
this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column3
//
this.Column3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column3.HeaderText = "电量";
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column3.Width = 50;
//
// Column7
//
this.Column7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column7.HeaderText = "在线";
this.Column7.Name = "Column7";
this.Column7.ReadOnly = true;
this.Column7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column7.Width = 50;
//
// Column4
//
this.Column4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
this.Column4.HeaderText = "自动";
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
//
// tabControl1
//
this.tabControl1.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.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(12, 98);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(722, 340);
this.tabControl1.TabIndex = 1;
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(714, 314);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(746, 450);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.DgvName);
this.Name = "FrmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "钢网AGV调度";
this.Load += new System.EventHandler(this.FrmMain_Load);
((System.ComponentModel.ISupportInitialize)(this.DgvName)).EndInit();
this.tabControl1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView DgvName;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.DataGridViewButtonColumn Column4;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage2;
}
}
using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AGVControl_Steel
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
}
private void Control_AgvChanged(int agvIndex)
{
DgvName.Rows[agvIndex].SetValues(Common.agvInfos[agvIndex].ToRow());
}
private void Control_AgvOnline(int agvIndex)
{
DgvName.Rows[agvIndex].DefaultCellStyle.ForeColor = Common.agvInfos[agvIndex].IsOnline ? Color.Black : Color.Red;
DgvName.Rows[agvIndex].SetValues(Common.agvInfos[agvIndex].ToRow());
}
private void FrmMain_Load(object sender, EventArgs e)
{
for (int i = 0; i < Common.agvInfos.Count; i++)
{
DgvName.Rows.Add(Common.agvInfos[i].ToRow());
DgvName.Rows[i].DefaultCellStyle.ForeColor = Color.Red;
DgvName.Rows[i].HeaderCell.Value = (i + 1).ToString();
}
Common.control.AgvChanged += Control_AgvChanged;
Common.control.AgvOnline += Control_AgvOnline;
Common.control.Start();
}
private void DgvName_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex == -1) return;
AgvInfo info = Common.agvInfos[e.RowIndex];
if (e.ColumnIndex == DgvName.Columns.Count - 1) //最后一列,自动/手动
{
info.IsUse = !info.IsUse;
DgvName.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = info.IsUse.ToString();
Common.appConfig.AppSettings.Settings[info.FleetID].Value = info.IsUse.ToString();
Common.appConfig.Save();
System.Configuration.ConfigurationManager.RefreshSection("appSettings");
Common.log.Info("手动修改 " + info.Name + " IsUse=" + info.IsUse);
}
}
}
}
<?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>
<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="Column5.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">
<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="Column7.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="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="Column5.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">
<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="Column7.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>
</root>
\ No newline at end of file
using System;
namespace Model
{
/// <summary>
/// 小车信息
/// </summary>
public class AgvInfo
{
/// <summary>
/// 小车名称
/// </summary>
public string Name { set; get; } = "";
/// <summary>
/// 在Fleet中的ID
/// </summary>
public string FleetID { set; get; } = "";
/// <summary>
/// 小车IP地址
/// </summary>
public string IP { set; get; } = "";
/// <summary>
/// 授权码
/// </summary>
public string Authorization { set; get; } = "";
/// <summary>
/// 地点
/// </summary>
public string Place { set; get; } = "";
/// <summary>
/// 是否使用
/// </summary>
public bool IsUse { set; get; } = false;
/// <summary>
/// 是否在线
/// </summary>
public bool IsOnline { set; get; } = false;
/// <summary>
/// 电量百分比
/// </summary>
public int Battery { set; get; } = 0;
/// <summary>
/// 任务发送
/// </summary>
public string TaskSend { set; get; } = "";
/// <summary>
/// 状态ID号
/// </summary>
public int StateID { set; get; } = -1;
/// <summary>
/// 状态文本
/// </summary>
public string StateText { set; get; } = "";
/// <summary>
/// 任务文本
/// </summary>
public string MissionText { set; get; } = "";
/// <summary>
/// IO模块的guid
/// </summary>
public string IOGuid { set; get; } = "";
/// <summary>
/// 当前的工作
/// </summary>
public IJob CurrentJob { set; get; }
/// <summary>
/// 表格行显示
/// </summary>
/// <returns></returns>
public string[] ToRow()
{
string[] arr = new string[] { Name, Place, StateText, MissionText, Battery.ToString(), IsOnline.ToString(), IsUse.ToString() };
return arr;
}
}
}
\ No newline at end of file

\ No newline at end of file

\ No newline at end of file
using System;
using AGVControl_Steel;
namespace Model
{
/// <summary>
/// 充电工作
/// </summary>
public class ChargeJob : IJob
{
private bool _mayBreak;
private string id;
//private bool sendFailed;
private JobStep<CHARGE_STEP> chargeStep = new JobStep<CHARGE_STEP>(CHARGE_STEP.NONE);
/// <summary>
/// 充电工作
/// </summary>
public ChargeJob()
{
_mayBreak = false;
}
/// <summary>
/// 任务是否执行
/// </summary>
public bool IsProcess { get; }
/// <summary>
/// 任务是否结束
/// </summary>
public bool IsEnd
{
get
{
return chargeStep.IsEqual(CHARGE_STEP.END);
}
}
/// <summary>
/// 任务运行信息
/// </summary>
public string RunInfo { get => throw new NotImplementedException(); }
/// <summary>
/// 任务能否中断
/// </summary>
public bool MayBreak
{
get
{
return _mayBreak;
}
}
/// <summary>
/// 任务执行
/// </summary>
/// <param name="info"></param>
public void Execute(AgvInfo info)
{
bool rtn;
if (chargeStep.IsEqual(CHARGE_STEP.NONE))
{
_mayBreak = false;
chargeStep.NextStep(CHARGE_STEP.SEND_MISSION);
}
else if (chargeStep.IsEqual(CHARGE_STEP.SEND_MISSION))
{
if (info.Place.StartsWith("4C")) //4C车间需要到4D车间充电
{
rtn = Common.mir.Add_Mission_Fleet(info.FleetID, info.Authorization, "MoveDoor-4C-4D", out id);
if (rtn) chargeStep.NextStep(CHARGE_STEP.MOVE_WORKSHOP_DOOR);
}
else if (info.Place.StartsWith("4D"))
{
rtn = Common.mir.Add_Mission_Fleet(info.FleetID, info.Authorization, "ChargeSteel", out id);
if (rtn) chargeStep.NextStep(CHARGE_STEP.MOVE_CHARGE_STATION);
}
else
{
Common.log.Error(string.Format("ChargeJob Error {0} Place={1}", info.Name, info.Place));
}
}
else if (chargeStep.IsEqual(CHARGE_STEP.MOVE_WORKSHOP_DOOR))
{
rtn = Common.mir.Get_MissionState_Fleet(info.Authorization, id, out string state);
if (rtn)
{
if (state == MissionState.Done.ToString())
{
rtn = Common.mir.Add_Mission_Fleet(info.FleetID, info.Authorization, "ChargeSteel", out string value);
if (rtn)
{
id = value;
chargeStep.NextStep(CHARGE_STEP.MOVE_CHARGE_STATION);
}
}
}
}
else if (chargeStep.IsEqual(CHARGE_STEP.MOVE_CHARGE_STATION))
{
}
else if (chargeStep.IsEqual(CHARGE_STEP.CHARGING))
{
}
else if (chargeStep.IsEqual(CHARGE_STEP.MOVE_STANDBY))
{
}
else if (chargeStep.IsEqual(CHARGE_STEP.END))
{
}
}
/// <summary>
/// 充电步骤
/// </summary>
private enum CHARGE_STEP
{
/// <summary>
/// 无
/// </summary>
NONE,
/// <summary>
/// 充电结束
/// </summary>
END,
/// <summary>
/// 移动到车间门口
/// </summary>
MOVE_WORKSHOP_DOOR,
/// <summary>
/// 移动到充电位置
/// </summary>
MOVE_CHARGE_STATION,
/// <summary>
/// 移动到待机位
/// </summary>
MOVE_STANDBY,
/// <summary>
/// 充电中
/// </summary>
CHARGING,
/// <summary>
/// 发送任务
/// </summary>
SEND_MISSION
}
private enum MissionState
{
Aborted,
Executing,
Done
}
}
}
\ No newline at end of file
using System;
namespace Model
{
/// <summary>
/// 小车的工作
/// </summary>
public interface IJob
{
/// <summary>
/// 任务是否执行
/// </summary>
public bool IsProcess { get; }
/// <summary>
/// 任务是否结束
/// </summary>
public bool IsEnd { get; }
/// <summary>
/// 任务能否中断
/// </summary>
public bool MayBreak { get; }
/// <summary>
/// 任务运行信息
/// </summary>
public string RunInfo { get; }
/// <summary>
/// 任务执行
/// </summary>
/// <param name="info"></param>
public void Execute(AgvInfo info);
}
}
using System;
namespace Model
{
/// <summary>
/// 小车工作步骤
/// </summary>
/// <typeparam name="T"></typeparam>
public class JobStep<T>
{
private T _step;
private DateTime _time;
/// <summary>
/// 小车工作步骤
/// </summary>
/// <param name="step"></param>
public JobStep(T step)
{
_step = step;
_time = DateTime.Now;
}
/// <summary>
/// 步骤是否相等
/// </summary>
/// <param name="step"></param>
/// <returns></returns>
public bool IsEqual(T step)
{
return _step.Equals(step);
}
/// <summary>
/// 是否超时
/// </summary>
/// <param name="timeOutMilliseconds"></param>
/// <returns></returns>
public bool IsTimeOut(int timeOutMilliseconds)
{
TimeSpan span = DateTime.Now - _time;
if (span.TotalMilliseconds > timeOutMilliseconds)
return true;
else
return false;
}
/// <summary>
/// 下一个步骤
/// </summary>
/// <param name="step"></param>
public void NextStep(T step)
{
_step = step;
_time = DateTime.Now;
}
}
}
\ No newline at end of file

\ No newline at end of file
using System;
using System.Windows.Forms;
namespace AGVControl_Steel
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
log4net.Config.XmlConfigurator.Configure();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Common.appConfig = System.Configuration.ConfigurationManager.OpenExeConfiguration(System.Configuration.ConfigurationUserLevel.None);
Common.log = log4net.LogManager.GetLogger("AGVControl_Steel");
Common.log.Info("=====程序开始=====");
ReadConfig();
Common.control = new BLL.Control();
Application.Run(new FrmMain());
Common.control.Stop();
Common.log.Info("=====程序结束=====\r\n");
}
private static void ReadConfig()
{
try
{
//AGV小车信息
Common.agvInfos = new System.Collections.Generic.List<Model.AgvInfo>();
string[] lines = System.IO.File.ReadAllLines(Common.CONFIG_AGV_NAME, System.Text.Encoding.UTF8);
for (int i = 0; i < lines.Length; i++)
{
string[] str = lines[i].Split(',');
if (str.Length != 4) continue;
string isUse = "false";
if (Common.appConfig.AppSettings.Settings[str[0]] == null)
{
Common.appConfig.AppSettings.Settings.Add(str[0], "false");
Common.appConfig.Save();
System.Configuration.ConfigurationManager.RefreshSection("appSettings");
}
else
{
isUse = Common.appConfig.AppSettings.Settings[str[0]].Value;
}
Model.AgvInfo info = new Model.AgvInfo
{
FleetID = str[0],
Name = str[1],
IP = str[2],
Authorization = str[3],
IsUse = Convert.ToBoolean(isUse)
};
Common.agvInfos.Add(info);
}
Common.log.Info("读取配置文件 " + Common.CONFIG_AGV_NAME);
}
catch (Exception ex)
{
Common.log.Error("ReadConfig()", ex);
}
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("AGVControl_Steel")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AGVControl_Steel")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("be830571-6737-4fa7-a75b-0242b07e011c")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [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 AGVControl_Steel.Properties
{
/// <summary>
/// 强类型资源类,用于查找本地化字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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 ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AGVControl_Steel.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 覆盖当前线程的 CurrentUICulture 属性
/// 使用此强类型的资源类的资源查找。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}
<?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.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: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" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AGVControl_Steel.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<log4net>
<appender name="AGVControl_Steel" type="log4net.Appender.RollingFileAppender">
<file value="Logs/AGVControl_Steel.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t][%c:%L]%-5p %m%n"/>
</layout>
</appender>
<appender name="MiR_API" type="log4net.Appender.RollingFileAppender">
<file value="Logs/MiR_API.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<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="AGVControl_Steel">
<level value="Debug"/>
<appender-ref ref="AGVControl_Steel"/>
</logger>
<logger name="MiR_API">
<level value="Debug"/>
<appender-ref ref="MiR_API"/>
</logger>
</log4net>
<appSettings>
<add key="FLEET_IP" value="10.85.199.3" />
<add key="32" value="false" />
<add key="25" value="false" />
</appSettings>
</configuration>
\ No newline at end of file
MoveA1,eec1eed4-2a04-11ea-9c84-94c691a734f1
MoveA2,f68f18db-2f89-11ea-9ee4-94c691a734f1
MoveA3,979d10eb-2f9d-11ea-9ee4-94c691a734f1
MoveA4,df6d991a-2f9d-11ea-9ee4-94c691a734f1
MoveA5,
MoveA6,
MoveDoor-4C-4D,
ChargeSteel,
\ No newline at end of file
32,11号_1762,10.85.199.82,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==
25,13号_1766,10.85.199.84,Basic ZGlzdHJpYnV0b3I6NjJmMmYwZjFlZmYxMGQzMTUyYzk1ZjZmMDU5NjU3NmU0ODJiYjhlNDQ4MDY0MzNmNGNmOTI5NzkyODM0YjAxNA==
\ No newline at end of file
[2020-09-01 19:14:29,921][1][AGVControl_Steel:20]INFO =====程序开始=====
[2020-09-01 19:14:29,952][1][AGVControl_Steel:63]INFO 读取配置文件 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\Config\AgvName.csv
[2020-09-01 19:14:29,953][1][AGVControl_Steel:38]INFO 读取配置文件 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\Config\AgvMission.csv
[2020-09-01 19:14:29,974][5][AGVControl_Steel:114]DEBUG 11号_1762[10.85.199.82] 在线
[2020-09-01 19:14:30,436][5][AGVControl_Steel:84]DEBUG 11号_1762[10.85.199.82] Get_StateTrue stateID=5, stateText=Executing, battery=33, missionText=正在移动至 '4cshelf8'(距离目标 19.899999999999999 米)
[2020-09-01 19:14:30,442][5][AGVControl_Steel:114]DEBUG 13号_1766[10.85.199.84] 在线
[2020-09-01 19:14:30,536][5][AGVControl_Steel:84]DEBUG 13号_1766[10.85.199.84] Get_StateTrue stateID=12, stateText=Error, battery=38, missionText=正在移动至 '4DshelfE'(距离目标 6.9 米)
[2020-09-01 19:14:31,976][4][AGVControl_Steel:114]DEBUG 11号_1762[10.85.199.82] 在线
[2020-09-01 19:14:32,004][4][AGVControl_Steel:84]DEBUG 11号_1762[10.85.199.82] Get_StateTrue stateID=5, stateText=Executing, battery=33, missionText=正在移动至 '4cshelf8'(距离目标 19.399999999999999 米)
[2020-09-01 19:14:32,289][4][AGVControl_Steel:114]DEBUG 13号_1766[10.85.199.84] 在线
[2020-09-01 19:14:32,474][4][AGVControl_Steel:84]DEBUG 13号_1766[10.85.199.84] Get_StateTrue stateID=12, stateText=Error, battery=38, missionText=正在移动至 '4DshelfE'(距离目标 6.9 米)
[2020-09-01 19:14:33,986][7][AGVControl_Steel:114]DEBUG 11号_1762[10.85.199.82] 在线
[2020-09-01 19:14:34,033][7][AGVControl_Steel:84]DEBUG 11号_1762[10.85.199.82] Get_StateTrue stateID=5, stateText=Executing, battery=33, missionText=正在移动至 '4cshelf8'(距离目标 18.699999999999999 米)
[2020-09-01 19:14:34,132][7][AGVControl_Steel:114]DEBUG 13号_1766[10.85.199.84] 在线
[2020-09-01 19:14:34,327][7][AGVControl_Steel:84]DEBUG 13号_1766[10.85.199.84] Get_StateTrue stateID=12, stateText=Error, battery=38, missionText=正在移动至 '4DshelfE'(距离目标 6.9 米)
[2020-09-01 19:14:35,997][4][AGVControl_Steel:114]DEBUG 11号_1762[10.85.199.82] 在线
[2020-09-01 19:14:36,022][4][AGVControl_Steel:84]DEBUG 11号_1762[10.85.199.82] Get_StateTrue stateID=5, stateText=Executing, battery=33, missionText=正在移动至 '4cshelf8'(距离目标 18 米)
[2020-09-01 19:14:36,026][4][AGVControl_Steel:114]DEBUG 13号_1766[10.85.199.84] 在线
[2020-09-01 19:14:36,049][4][AGVControl_Steel:84]DEBUG 13号_1766[10.85.199.84] Get_StateTrue stateID=12, stateText=Error, battery=38, missionText=正在移动至 '4DshelfE'(距离目标 6.9 米)
[2020-09-01 19:14:36,280][1][AGVControl_Steel:28]INFO =====程序结束=====
[2020-09-01 19:14:30,013][5][MiR_API:677]INFO [GET]URL:http://10.85.199.82/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:30,429][5][MiR_API:699]INFO Return:{ "battery_percentage": 33.0, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4cshelf8'\uff08\u8ddd\u79bb\u76ee\u6807 19.899999999999999 \u7c73\uff09", "state_id": 5, "state_text": "Executing", "user_prompt": null}
[2020-09-01 19:14:30,442][5][MiR_API:677]INFO [GET]URL:http://10.85.199.84/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:30,535][5][MiR_API:699]INFO Return:{ "battery_percentage": 38.400001525878906, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4DshelfE'\uff08\u8ddd\u79bb\u76ee\u6807 6.9 \u7c73\uff09", "state_id": 12, "state_text": "Error", "user_prompt": null}
[2020-09-01 19:14:31,976][4][MiR_API:677]INFO [GET]URL:http://10.85.199.82/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:32,003][4][MiR_API:699]INFO Return:{ "battery_percentage": 33.0, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4cshelf8'\uff08\u8ddd\u79bb\u76ee\u6807 19.399999999999999 \u7c73\uff09", "state_id": 5, "state_text": "Executing", "user_prompt": null}
[2020-09-01 19:14:32,289][4][MiR_API:677]INFO [GET]URL:http://10.85.199.84/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:32,474][4][MiR_API:699]INFO Return:{ "battery_percentage": 38.400001525878906, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4DshelfE'\uff08\u8ddd\u79bb\u76ee\u6807 6.9 \u7c73\uff09", "state_id": 12, "state_text": "Error", "user_prompt": null}
[2020-09-01 19:14:33,986][7][MiR_API:677]INFO [GET]URL:http://10.85.199.82/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:34,033][7][MiR_API:699]INFO Return:{ "battery_percentage": 32.900001525878906, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4cshelf8'\uff08\u8ddd\u79bb\u76ee\u6807 18.699999999999999 \u7c73\uff09", "state_id": 5, "state_text": "Executing", "user_prompt": null}
[2020-09-01 19:14:34,132][7][MiR_API:677]INFO [GET]URL:http://10.85.199.84/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:34,326][7][MiR_API:699]INFO Return:{ "battery_percentage": 38.400001525878906, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4DshelfE'\uff08\u8ddd\u79bb\u76ee\u6807 6.9 \u7c73\uff09", "state_id": 12, "state_text": "Error", "user_prompt": null}
[2020-09-01 19:14:35,997][4][MiR_API:677]INFO [GET]URL:http://10.85.199.82/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:36,022][4][MiR_API:699]INFO Return:{ "battery_percentage": 32.900001525878906, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4cshelf8'\uff08\u8ddd\u79bb\u76ee\u6807 18 \u7c73\uff09", "state_id": 5, "state_text": "Executing", "user_prompt": null}
[2020-09-01 19:14:36,026][4][MiR_API:677]INFO [GET]URL:http://10.85.199.84/api/v2.0.0/status?whitelist=state_id,state_text,battery_percentage,mission_text
[2020-09-01 19:14:36,049][4][MiR_API:699]INFO Return:{ "battery_percentage": 38.400001525878906, "mission_text": "\u6b63\u5728\u79fb\u52a8\u81f3 '4DshelfE'\uff08\u8ddd\u79bb\u76ee\u6807 6.9 \u7c73\uff09", "state_id": 12, "state_text": "Error", "user_prompt": null}
此文件类型无法预览
此文件的差异太大,无法显示。
此文件类型无法预览
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\AGVControl_Steel.exe.config
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\AGVControl_Steel.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\AGVControl_Steel.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\AGVControl_Steel.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.FrmMain.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.Properties.Resources.resources
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.csproj.GenerateResource.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.exe
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\RestSharp.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\bin\Debug\RestSharp.xml
D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl_Steel\AGVControl_Steel\obj\Debug\AGVControl_Steel.csproj.CopyComplete
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="106.11.4" targetFramework="net461" />
</packages>
\ No newline at end of file
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!