Commit 07aa8107 张东亮

agv临时点改为充电桩-手动加密码

1 个父辈 40fdf150
正在显示 71 个修改的文件 包含 283 行增加18 行删除
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView> <ProjectView>ProjectFiles</ProjectView>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file \ No newline at end of file
[2022-12-16 18:56:02,609][1]INFO AGVServer 【12000】服务启动 [2023-01-06 11:39:00,996][1]INFO AGVServer 【12000】服务启动
[2022-12-16 18:56:02,610][1]INFO Server start listen : 12000 [2023-01-06 11:39:01,000][1]INFO Server start listen : 12000
[2022-12-16 18:56:02,621][1]INFO 本机IP:[ 192.168.0.102 192.168.64.1 192.168.153.1 172.17.144.1] [2023-01-06 11:39:01,009][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2022-12-16 19:10:41,769][1]INFO AGVServer 【12000】服务启动 [2023-01-06 11:39:41,082][1]INFO AGVServer 【12000】服务启动
[2022-12-16 19:10:41,773][1]INFO Server start listen : 12000 [2023-01-06 11:39:41,085][1]INFO Server start listen : 12000
[2022-12-16 19:10:41,782][1]INFO 本机IP:[ 192.168.0.102 192.168.64.1 192.168.153.1 172.17.144.1] [2023-01-06 11:39:41,092][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2022-12-16 19:14:05,135][1]INFO AGVServer 【12000】服务启动 [2023-01-06 11:43:31,836][1]INFO AGVServer 【12000】服务启动
[2022-12-16 19:14:05,138][1]INFO Server start listen : 12000 [2023-01-06 11:43:31,839][1]INFO Server start listen : 12000
[2022-12-16 19:14:05,146][1]INFO 本机IP:[ 192.168.0.102 192.168.64.1 192.168.153.1 172.17.144.1] [2023-01-06 11:43:31,846][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2023-01-06 11:47:21,760][1]INFO AGVServer 【12000】服务启动
[2023-01-06 11:47:21,763][1]INFO Server start listen : 12000
[2023-01-06 11:47:21,770][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2023-01-06 11:49:27,332][1]INFO AGVServer 【12000】服务启动
[2023-01-06 11:49:27,335][1]INFO Server start listen : 12000
[2023-01-06 11:49:27,342][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2023-01-06 11:52:08,876][1]INFO AGVServer 【12000】服务启动
[2023-01-06 11:52:08,879][1]INFO Server start listen : 12000
[2023-01-06 11:52:08,887][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2023-01-06 11:54:42,837][1]INFO AGVServer 【12000】服务启动
[2023-01-06 11:54:42,840][1]INFO Server start listen : 12000
[2023-01-06 11:54:42,847][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2023-01-06 11:58:47,244][1]INFO AGVServer 【12000】服务启动
[2023-01-06 11:58:47,248][1]INFO Server start listen : 12000
[2023-01-06 11:58:47,257][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
[2023-01-06 12:43:22,867][1]INFO AGVServer 【12000】服务启动
[2023-01-06 12:43:22,870][1]INFO Server start listen : 12000
[2023-01-06 12:43:22,877][1]INFO 本机IP:[ 192.168.101.37 192.168.64.1 192.168.153.1 172.30.48.1 172.25.240.1]
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup> </startup>
<appSettings> <appSettings>
<add key="ProName" value="AGVDispatch-在共享通道冲突问题及出料口箱子冲突优化" /> <add key="ProName" value="AGVDispatch-手动清除料箱问题" />
</appSettings> </appSettings>
</configuration> </configuration>
\ No newline at end of file \ No newline at end of file
...@@ -52,5 +52,7 @@ namespace Common ...@@ -52,5 +52,7 @@ namespace Common
public const string SharedLine = "SharedLine"; public const string SharedLine = "SharedLine";
public const string OpenBigShelf = "OpenBigShelf"; public const string OpenBigShelf = "OpenBigShelf";
public const string OpenCheckLoadIO = "OpenCheckLoadIO"; public const string OpenCheckLoadIO = "OpenCheckLoadIO";
public const string Config_Pwd = "Config_Pwd";
public const string TmpPlaceIsCharge = "TmpPlaceIsCharge";
} }
} }
...@@ -19,7 +19,7 @@ namespace Common ...@@ -19,7 +19,7 @@ namespace Common
public static event ShowMsg ShowInfo; public static event ShowMsg ShowInfo;
public static event ShowMsg ShowWarn; public static event ShowMsg ShowWarn;
public static event ShowMsg ShowError; public static event ShowMsg ShowError;
static readonly LogBean defaultLog = new LogBean(Setting_Str.AppLog); public static readonly LogBean defaultLog = new LogBean(Setting_Str.AppLog);
static LogBean getLogBean(string logname) static LogBean getLogBean(string logname)
{ {
if (LogMap.ContainsKey(logname)) if (LogMap.ContainsKey(logname))
......
using DeviceLib.Model.AGV; using Common;
using DeviceLib.Model.AGV;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -19,10 +20,20 @@ namespace DeviceLib.BLL ...@@ -19,10 +20,20 @@ namespace DeviceLib.BLL
switch (JobRunStep.CurStep) switch (JobRunStep.CurStep)
{ {
case RunStep.None: case RunStep.None:
ToNextStep(RunStep.TmpPlace_01_Start, "去临时点任务开始"); if (!AppConfigSetting.GetBoolVal(Setting_Str.TmpPlaceIsCharge, true))
MoveToNode(robot, NodeManager.GetTmpPlace(JobParam.LineNode)); {
ToNextStep(RunStep.TmpPlace_01_Start, "去临时点任务开始");
MoveToNode(robot, NodeManager.GetTmpPlace(JobParam.LineNode));
}
else
{
ToNextStep(RunStep.TmpPlace_01_Start, "充电桩作为临时点任务开始");
StartCharge(robot);
}
break; break;
case RunStep.TmpPlace_01_Start: case RunStep.TmpPlace_01_Start:
if (AppConfigSetting.GetBoolVal(Setting_Str.TmpPlaceIsCharge, true))
ToNextStep(RunStep.TmpPlace_04_WaitDstIdle, "在充电桩等待目标点空闲");
if (MissionIsOk()) if (MissionIsOk())
ToNextStep(RunStep.TmpPlace_04_WaitDstIdle, "检查目标点是否空闲"); ToNextStep(RunStep.TmpPlace_04_WaitDstIdle, "检查目标点是否空闲");
break; break;
......
...@@ -5,7 +5,7 @@ namespace DeviceLib.Model.AGV ...@@ -5,7 +5,7 @@ namespace DeviceLib.Model.AGV
{ {
public abstract class Job public abstract class Job
{ {
public static LogBean Log = new LogBean(Setting_Str.JobLog); public static LogBean Log =LogUtil.defaultLog;
public Job(JobParam jobParam) public Job(JobParam jobParam)
{ {
JobParam = jobParam; JobParam = jobParam;
...@@ -82,7 +82,7 @@ namespace DeviceLib.Model.AGV ...@@ -82,7 +82,7 @@ namespace DeviceLib.Model.AGV
JobParam.MissionState.run_id = robot.mission_state.run_id; JobParam.MissionState.run_id = robot.mission_state.run_id;
JobParam.MissionState.node_name = robot.mission_state.node_name; JobParam.MissionState.node_name = robot.mission_state.node_name;
JobParam.MissionState.description = robot.mission_state.description; JobParam.MissionState.description = robot.mission_state.description;
Log.Info($"{robot.name} 自动模式任务:{mission}"); Log.Info($"{robot.name} 自动模式任务发送:{mission}");
} }
} }
} }
namespace Dolen.Forms
{
partial class FrmPwd
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmPwd));
this.label1 = new System.Windows.Forms.Label();
this.btnNext = new System.Windows.Forms.Button();
this.btnBack = new System.Windows.Forms.Button();
this.txtPwd = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(153, 61);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(126, 25);
this.label1.TabIndex = 0;
this.label1.Text = "请输入密码:";
//
// btnNext
//
this.btnNext.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.btnNext.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNext.Location = new System.Drawing.Point(221, 163);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(120, 45);
this.btnNext.TabIndex = 275;
this.btnNext.Text = "确定";
this.btnNext.UseVisualStyleBackColor = false;
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// btnBack
//
this.btnBack.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBack.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBack.Location = new System.Drawing.Point(95, 163);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(120, 45);
this.btnBack.TabIndex = 274;
this.btnBack.Text = "返回";
this.btnBack.UseVisualStyleBackColor = false;
this.btnBack.Click += new System.EventHandler(this.btnBack_Click);
//
// txtPwd
//
this.txtPwd.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPwd.Location = new System.Drawing.Point(112, 97);
this.txtPwd.Name = "txtPwd";
this.txtPwd.PasswordChar = '*';
this.txtPwd.Size = new System.Drawing.Size(215, 33);
this.txtPwd.TabIndex = 276;
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPwd_KeyDown);
//
// FrmPwd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(437, 268);
this.Controls.Add(this.txtPwd);
this.Controls.Add(this.btnNext);
this.Controls.Add(this.btnBack);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmPwd";
this.Text = "请输入密码";
this.Load += new System.EventHandler(this.FrmPwd_Load);
this.Shown += new System.EventHandler(this.FrmPwd_Shown);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmPwd_KeyDown);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnBack;
private System.Windows.Forms.TextBox txtPwd;
}
}
\ No newline at end of file \ No newline at end of file

using Common;
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;
using UIControl.Forms;
namespace Dolen.Forms
{
internal partial class FrmPwd : FrmBase
{
internal delegate void PwdOK(int type);
internal event PwdOK PwdOKFun;
private int OpenType = 0;
internal FrmPwd(int type)
{
OpenType = type;
InitializeComponent();
}
private void FrmPwd_Load(object sender, EventArgs e)
{
this.DialogResult = DialogResult.None;
txtPwd.Text = "";
}
private void btnNext_Click(object sender, EventArgs e)
{
string pwd = txtPwd.Text;
string configPwd = AppConfigSetting.GetStrVal(Setting_Str.Config_Pwd);
if (configPwd.Equals(""))
{
configPwd = "123456";
AppConfigSetting.SetStrVal(Setting_Str.Config_Pwd,configPwd);
}
if (pwd.Equals(configPwd))
{
this.DialogResult = DialogResult.OK;
PwdOKFun?.Invoke(OpenType);
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
// this.DialogResult = DialogResult.No;
MessageBox.Show("请输入正确的密码");
txtPwd.Focus();
}
}
private void btnBack_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
this.Close();
}
private void FrmPwd_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode.Equals(Keys.Enter))
{
btnNext_Click(null, null);
}
}
private void txtPwd_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode.Equals(Keys.Enter))
{
btnNext_Click(null, null);
}else if (e.KeyCode.Equals(Keys.Escape))
{
btnBack_Click(null, null);
}
}
private void FrmPwd_Shown(object sender, EventArgs e)
{
txtPwd.Focus();
}
}
}
using Common; using Common;
using DeviceLib.BLL; using DeviceLib.BLL;
using DeviceLib.Model.AGV; using DeviceLib.Model.AGV;
using Dolen.Forms;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
...@@ -578,5 +579,28 @@ namespace UControl.UC ...@@ -578,5 +579,28 @@ namespace UControl.UC
{ {
RobotManager.SetRobot(robot); RobotManager.SetRobot(robot);
} }
private void robotSetting_DropDownClosed(object sender, EventArgs e)
{
canSettting(false);
}
private void robotSetting_DropDownOpening(object sender, EventArgs e)
{
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
{
LogUtil.Warn($"打开机器人{robot.name}设置时,没有正确输入密码");
canSettting(false);
return;
}
canSettting(true);
}
void canSettting(bool can)
{
自动ToolStripMenuItem.Enabled = can;
调试ToolStripMenuItem.Enabled = can;
}
} }
} }
...@@ -50,6 +50,12 @@ ...@@ -50,6 +50,12 @@
<Compile Include="Forms\FrmBase.Designer.cs"> <Compile Include="Forms\FrmBase.Designer.cs">
<DependentUpon>FrmBase.cs</DependentUpon> <DependentUpon>FrmBase.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\FrmPwd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\FrmPwd.Designer.cs">
<DependentUpon>FrmPwd.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resource.Designer.cs"> <Compile Include="Properties\Resource.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
...@@ -107,6 +113,9 @@ ...@@ -107,6 +113,9 @@
<EmbeddedResource Include="Forms\FrmBase.resx"> <EmbeddedResource Include="Forms\FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon> <DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\FrmPwd.resx">
<DependentUpon>FrmPwd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resource.resx"> <EmbeddedResource Include="Properties\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput> <LastGenOutput>Resource.Designer.cs</LastGenOutput>
......
95805b0f55fc1a9e75fa9c9572e5899161a5110a f43df26cf06b55ad3afe1f8f4a52229c3d5781de
...@@ -181,3 +181,4 @@ C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Deb ...@@ -181,3 +181,4 @@ C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Deb
C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Debug\UIControl.csproj.CopyComplete C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Debug\UIControl.csproj.CopyComplete
C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Debug\UIControl.dll C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Debug\UIControl.dll
C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Debug\UIControl.pdb C:\Users\acc\Desktop\20221105程序\SO1131-AGVDispatch\Source\UIControls\obj\Debug\UIControl.pdb
E:\Codes\Neotel\SO1131-AGVDispatch\Source\UIControls\obj\Debug\Dolen.Forms.FrmPwd.resources
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!