Commit dfd0a30a 张东亮

更新端口9500

1 个父辈 dac976ba
正在显示 51 个修改的文件 包含 1199 行增加580 行删除
此文件类型无法预览
......@@ -40,6 +40,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>dll\Newtonsoft.Json.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>
......@@ -63,9 +67,16 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BLL\AGVManager.cs" />
<Compile Include="BLL\AgvServer.cs" />
<Compile Include="BLL\Common.cs" />
<Compile Include="BLL\ConfigAppSettings.cs" />
<Compile Include="BLL\Control.cs" />
<Compile Include="BLL\HttpHelper.cs" />
<Compile Include="BLL\JsonHelper.cs" />
<Compile Include="BLL\MyWebClient.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="FrmMain.cs">
<SubType>Form</SubType>
</Compile>
......
......@@ -24,7 +24,8 @@
</log4net>
<appSettings>
<add key="ITS" value="http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIGetBoxDestInfo?boxRFID=" />
<add key="WebService" value="http://127.0.0.1/Webservice/AGVService/"/>
<add key="WebService" value="http://10.85.199.1/Webservice/AGVService/"/>
<add key="http.server" value="http://10.85.199.25/myproject/" />
<add key="FLEET" value="10.85.199.3"/>
<!--<add key="LocalIP" value="192.168.103.12"/>
<add key="AutoCharge" value="false"/>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AGVControl;
namespace BLL
{
public class AGVManager
{
/// <summary>
/// 小车从B区域离开前检查出库任务是否完成
/// </summary>
/// <param name="rfid"></param>
/// <returns>true:可以离开</returns>
//public static bool LeaveCheck(Agv_Info agv, out int taskCount)
//{
// taskCount = 0;
// try
// {
// //Common.LogInfo("URL:" + Common.webService["URL"]);
// string url = ConfigAppSettings.GetValue(Setting_Init.http_server) + "rest/api/qisda/device/shelfTaskCount? rfid =" + agv.RFID;
// var client = new RestSharp.RestClient(url) { Timeout = -1 };
// var request = new RestSharp.RestRequest(RestSharp.Method.GET);
// RestSharp.IRestResponse response = client.Execute(request);
// string json = response.Content;
// Common.LogInfo(agv.Name + " [URL: " + url+"] [Return: " + json+"]");
// if (string.IsNullOrWhiteSpace(json)) return true; //可以离开
// ShelfTaskCount serverResult = JsonHelper.DeserializeJsonToObject<ShelfTaskCount>(json);
// if (serverResult == null)
// {
// Common.LogInfo(" 没有收到服务器反馈");
// return true;
// }
// if (serverResult.code != 0) return true;
// if (serverResult.shelfTaskData.taskCount == 0) //该料架出库完成
// {
// Common.LogInfo(agv.Name+" 料架【" + agv.RFID + "】 无剩余出库任务,serverResult.shelfTaskData.taskCount=" + serverResult.shelfTaskData.taskCount.ToString());
// return true;
// }
// else //该料架的出库任务未完成
// {
// // foreach (ShelfLockData item in serverResult.data)
// // {
// taskCount = serverResult.shelfTaskData.taskCount;
// Common.LogInfo(agv.Name + " [RFID=" + serverResult.shelfTaskData.rfid + "] [taskCount=" + serverResult.shelfTaskData.taskCount + "]");
// // }
// return false;
// }
// }
// catch (Exception ex)
// {
// Common.log.OutError(ex);
// return true;
// }
//}
//private static string Addr_getShelfLockInfo = "/rest/api/qisda/device/getShelfLockInfo"; //包装仓获取料架锁定状态地址
//public static bool GetShelfLockInfo(string name,string rfid, List<string> shelfLockNodeNames)
//{
// string msg = "";
// try
// {
// Dictionary<string, string> paramMap = new Dictionary<string, string>();
// paramMap.Add("rfid", rfid);
// string server = GetAddr(Addr_getShelfLockInfo, paramMap);
// DateTime startTime = DateTime.Now;
// string resultStr = HttpHelper.Post(server, "");
// Common.LogInfo("节点【"+name+ "】 料架锁定状态 " + " 【" + server + "】【" + resultStr + "】");
// ShelfLockInfo serverResult = JsonHelper.DeserializeJsonToObject<ShelfLockInfo>(resultStr);
// if (serverResult == null)
// {
// msg = "节点【" + name + "】没有收到服务器反馈";
// Common.LogInfo(msg);
// return false;
// }
// if (serverResult.data.Count == 0) //该料架未锁定
// {
// msg = "节点【" + name + "】 料架【" + rfid + "】 没有锁定库位的料";
// Common.LogInfo(msg);
// return false;
// }
// else //该料架存在锁定库位的料
// {
// foreach (ShelfLockData item in serverResult.data)
// {
// if (!shelfLockNodeNames.Contains(Common.webService[item.cid]))
// {
// shelfLockNodeNames.Add(Common.webService[item.cid]);
// Common.LogInfo("锁定的CID=" + item.cid + ";节点名称=" + Common.webService[item.cid]);
// }
// }
// Common.LogInfo("节点【" + name + "】"+rfid+"获取料架上的锁定料仓信息完成");
// return true;
// }
// }
// catch (Exception ex)
// {
// Common.LogInfo(ex.Message);
// }
// return false;
//}
private static string Addr_updateDeviceAlarmMsg = "/updateDeviceAlarmMsg";
/// <summary>
/// 异常看板
/// </summary>
/// <param name="msgList"></param>
/// <returns></returns>
public static string updateDeviceAlarmMsg(List<AlarmMsg> msgList)
{
string msg = "";
try
{
Dictionary<string, string> paramMap = new Dictionary<string, string>();
string msgListStr = JsonHelper.SerializeObject(msgList);
paramMap.Add("deviceAlarmList", msgListStr);
string server = GetAddr(Addr_updateDeviceAlarmMsg, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "");
Common.LogInfo("updateDeviceAlarmMsg " + " 【" + server + "】【" + resultStr + "】");
RfidData data = JsonHelper.DeserializeJsonToObject<RfidData>(resultStr);
if (data == null)
{
return msg = " updateDeviceAlarmMsg 没有收到服务器反馈";
}
else if (data.code.Equals(0).Equals(false))
{
return msg = " updateDeviceAlarmMsg 【" + server + "】【" + resultStr + "】" + data.msg;
}
return "";
}
catch (Exception ex)
{
Common.log.Error(ex);
}
return msg;
}
private static string GetAddr(string addr, Dictionary<string, string> paramsMap)
{
string server = ConfigAppSettings.GetValue("http.server");
if (server.EndsWith("/"))
{
server = server.Substring(0, server.Length - 1);
}
string path = server + addr.Trim() + "?";
foreach (string paramName in paramsMap.Keys)
{
string par = System.Web.HttpUtility.UrlEncode(paramsMap[paramName], System.Text.Encoding.UTF8);
path += paramName + "=" + par + "&";
}
path = path.Substring(0, path.Length - 1);
return path;
}
}
public class ShelfLockInfo
{
//返回: {"code":0,"msg":"ok","data":
//[{"barcode":"S20052301213","cid":"packing-20","rfid":"A12","rfidLoc":"3","lockPos":"4D2001AA0006","lockPosId":"1231"}]}
/// <summary>
/// 返回码,0为正常,其他为异常
/// </summary>
public int code { get; set; }
/// <summary>
/// 消息
/// </summary>
public string msg { get; set; }
public List<ShelfLockData> data { get; set; }
}
public class ShelfLockData
{
/// <summary>
/// 库位中料盘的条码
/// </summary>
public string barcode { get; set; }
/// <summary>
/// 库位中料盘的锁定库位对应的料仓编
/// </summary>
public string cid { get; set; }
/// <summary>
/// 料架RFID
/// </summary>
public string rfid { get; set; }
/// <summary>
/// 料架的库位
/// </summary>
public int rfidLoc { get; set; }
/// <summary>
/// 库位中料盘的锁定库位
/// </summary>
public string lockPos { get; set; }
/// <summary>
/// 料架出库的剩余数量
/// </summary>
public int taskCount { get; set; }
}
/// <summary>
/// 获取料架中的任务数
/// </summary>
public class ShelfTaskCount
{
// {"code":0,"msg":"ok","data":{"taskCount":0,"rfid":"A2"}}
/// <summary>
/// 0为正常,其他为异常
/// </summary>
public int code { get; set; }
/// <summary>
/// 消息
/// </summary>
public string msg { get; set; }
public ShelfTaskData shelfTaskData { get; set; }
}
public struct ShelfTaskData
{
/// <summary>
/// 当前料架剩余任务数(即还有几盘料没放上去)
/// </summary>
public int taskCount { get; set; }
/// <summary>
/// 料架RFID
/// </summary>
public string rfid { get; set; }
}
public class AlarmMsg
{
//>>>name : 异常位置名称
public string name = "";
//>>>msgKey : 异常信息唯一标识
public string msgKey = "";
//>>>msgValue : 异常信息
public string msgValue = "";
/// <summary>
/// 异常信息
/// </summary>
/// <param name="name">异常位置名称</param>
/// <param name="key">异常信息唯一标识</param>
/// <param name="value">异常信息</param>
public AlarmMsg(string name, string key, string value)
{
this.name = name;
this.msgKey = key;
this.msgValue = value;
}
}
public class RfidData
{
//{"code":0,"msg":"ok","data":"7"}
public int code { get; set; }
public string msg { get; set; }
public Dictionary<string, string> data { get; set; }
}
}
......@@ -16,7 +16,8 @@ namespace BLL
private Socket _server; //服务端
private List<Client> _client; //所有客户端
private Thread tListenClient; //监听客户端连接
private const int PORT = 12001; //端口
private const int PORT = 9500; //端口
private Thread tPingClient; //ping
/// <summary>
/// 节点改变事件
......@@ -37,7 +38,7 @@ namespace BLL
/// </summary>
public AgvServer()
{
}
/// <summary>
......@@ -57,6 +58,8 @@ namespace BLL
_client = new List<Client>();
tListenClient = new Thread(new ThreadStart(ListenClient));
tListenClient.Start();
tPingClient = new Thread(new ThreadStart(PingClient));
tPingClient.Start();
}
catch (Exception ex)
{
......@@ -115,6 +118,60 @@ namespace BLL
}
private void PingClient()
{
while (_loop)
{
Thread.Sleep(3000);
for (int i = 0; i < Common.nodeInfo.Count; i++)
{
try
{
if (!Common.nodeInfo[i].IP.Equals(""))
Common.nodeInfo[i].Online = CheckIP(Common.nodeInfo[i].Name, Common.nodeInfo[i].IP);
NodeOnline?.Invoke(i);
NodeChanged?.Invoke(i);
}
catch (Exception e)
{
Common.log.Error("PingClient", e);
}
}
}
}
private bool CheckIP(string name, string 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?)$";
bool rtn = System.Text.RegularExpressions.Regex.IsMatch(ip, pattern);
if (!rtn)
{
Common.LogInfo("非法的IP地址" + ip);
return false;
}
//Ping服务端
try
{
System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
System.Net.NetworkInformation.PingReply result = ping.Send(ip, 2000);
ping.Dispose();
if (result.Status != System.Net.NetworkInformation.IPStatus.Success)
{
Common.LogInfo(name + " Ping " + ip + " 请求没有响应",false);
return false;
}
return true;
}
catch (Exception ex)
{
Common.log.Error("CheckIP", ex);
return false;
}
}
/// <summary>
/// 监听客户端
......@@ -210,10 +267,10 @@ namespace BLL
else
{
time += sleep;
if (time > 5000)
if (time > 30000)
{
Offline(client);
Common.LogInfo("[" + client.IP + "] 超过5s没有收到数据,关闭连接");
Common.LogInfo("[" + client.IP + "] 超过30s没有收到数据,关闭连接");
}
}
}
......
......@@ -33,20 +33,29 @@ namespace AGVControl
public static Dictionary<string, string> agvProductionLine;
public static System.Configuration.Configuration appConfig;
public static readonly string CONFIG_PATH = AppDomain.CurrentDomain.BaseDirectory + "Config\\";
public static int logCnt = 0;
public static void LogInfo(string text)
private static string msg="";
private static int logCnt = 0;
public static void LogInfo(string text, bool isShow = true)
{
if (logTextBox.InvokeRequired)
{
logTextBox.Invoke(new Action(() => LogInfo(text)));
return;
}
logCnt++;
if (logCnt > 200)
logTextBox.Text = "";
logTextBox.Text += string.Format("[{0}] {1}\r\n",DateTime.Now.ToString("HH:mm:ss") ,text);
if (msg.Equals(text))//连续重复的日志只打印一次
return;
logCnt++;
if(logCnt>100)
{
logCnt = 0;
msg = "";
}
log.Info(msg);
if (isShow)
msg+= string.Format("[{0}] {1}\r\n", DateTime.Now.ToString("HH:mm:ss"), text);
logTextBox.Text = msg;
}
public static void ReadLinePlace()
{
......@@ -57,7 +66,7 @@ namespace AGVControl
linePlace.AddRange(s);
}
public static bool AddLinePlace(string nodeName)
{
int idx = Common.nodeInfo.FindIndex(s => s.Name == nodeName);
......@@ -73,7 +82,7 @@ namespace AGVControl
return true;
}
else
{
{
log.Error("AddLinePlace 失败 节点" + nodeName + "不存在");
return false;
}
......@@ -332,7 +341,7 @@ namespace AGVControl
/// <summary>
/// 当前任务文本,(从小车获取)
/// </summary>
public string MissionText { private set; get; }
public string MissionText { set; get; }
/// <summary>
/// 下一个地点
/// </summary>
......@@ -355,6 +364,15 @@ namespace AGVControl
/// 临时待机位,用于执行一次
/// </summary>
//public bool StandbyTemp { set; get; }
public struct DockingStru
{
public DateTime startTime;
public bool IsDocking;
}
/// <summary>
/// 停靠信息
/// </summary>
public DockingStru DockingInfo;
public Agv_Info(string id, string name, string ip, string authorization, bool isUse)
{
......@@ -368,11 +386,13 @@ namespace AGVControl
Place = "";
TaskSend = "";
NextPlace = "";
DockingInfo.IsDocking = false;
DockingInfo.startTime = DateTime.Now;
}
public bool SetState(int stateID, string stateText, int battery, string missionText)
{
bool isChange=false;
bool isChange = false;
if (!StateID.Equals(stateID) || !StateText.Equals(stateText) || !Battery.Equals(battery) || !MissionText.Equals(missionText))
isChange = true;
StateID = stateID;
......@@ -417,7 +437,7 @@ namespace AGVControl
}
else
{
s.AddRange(new List<string> { "" ,"","",""});
s.AddRange(new List<string> { "", "", "", "" });
}
s.Add(IsCon.ToString());
s.Add(Battery + "%");
......@@ -426,7 +446,7 @@ namespace AGVControl
return s.ToArray();
}
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Threading;
using System.Xml;
using System.Windows.Forms;
using AGVControl;
namespace BLL
{
public class ConfigAppSettings
{
public static string GetValue(string key)
{
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
Common.LogInfo("未找到配置:" + key + ",请检查配置是否完整!");
return "";
}
else
{
return config.AppSettings.Settings[key].Value;
}
}
public static decimal GetNumValue(string key)
{
decimal a = 0;
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
Common.log.Error("未找到配置:" + key + ",请检查配置是否完整!");
return a;
}
else
{
{
Decimal.TryParse(config.AppSettings.Settings[key].Value, out a);
}
}
return a;
}
public static int GetIntValue(string key)
{
int a = 0;
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
Common.log.Info("未找到配置:" + key + ",请检查配置是否完整!");
return a;
}
else
{
{
Int32.TryParse(config.AppSettings.Settings[key].Value, out a);
}
} return a;
}
public static void SaveValue(string key, int value)
{
SaveValue(key, value.ToString());
}
public static void SaveValue(string key, string value)
{
try
{
if (key.Equals("") || value.Equals(""))
{
return;
}
//增加的内容写在appSettings段下 <add key="RegCode" value="0"/>
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings[key] == null)
{
SetValue(key, value);
}
else
{
UpdateConfig(key, value);
}
}
catch (Exception ex)
{
Common.log.Error( "SaveValue保存配置出错:AppKey=" + key + ",AppValue=" + value + "," + ex.StackTrace);
}
}
/// <summary>
/// 更新配置文件信息
/// </summary>
/// <param name="name">配置文件字段名称</param>
/// <param name="Xvalue">值</param>
private static void UpdateConfig(string name, string Xvalue)
{
try
{
XmlDocument doc = new XmlDocument();
doc.Load(Application.ExecutablePath + ".config");
XmlNode node = doc.SelectSingleNode(@"//add[@key='" + name + "']");
XmlElement ele = (XmlElement)node;
ele.SetAttribute("value", Xvalue);
doc.Save(Application.ExecutablePath + ".config");
}
catch (Exception ex)
{
Common.log.Error( "UpdateConfig保存配置出错:name=" + name + ",Xvalue=" + Xvalue + "," + ex.StackTrace);
}
}
///<summary>
///向.config文件的appKey结写入信息AppValue 保存设置
///</summary>
///<param name="AppKey">节点名</param>
///<param name="AppValue">值</param>
private static void SetValue(String AppKey, String AppValue)
{
try
{
XmlDocument xDoc = new XmlDocument();
xDoc.Load(System.Windows.Forms.Application.ExecutablePath + ".config");
XmlNode xNode;
XmlElement xElem1;
XmlElement xElem2;
xNode = xDoc.SelectSingleNode("//appSettings");
xElem1 = (XmlElement)xNode.SelectSingleNode("//add[@key='" + AppKey + "']");
if (xElem1 != null)
xElem1.SetAttribute("value", AppValue);
else
{
xElem2 = xDoc.CreateElement("add");
xElem2.SetAttribute("key", AppKey);
xElem2.SetAttribute("value", AppValue);
xNode.AppendChild(xElem2);
}
xDoc.Save(System.Windows.Forms.Application.ExecutablePath + ".config");
}
catch (Exception ex)
{
Common.log.Error( "SetValue保存配置出错:AppKey=" + AppKey + ",AppValue=" + AppValue + "," + ex.StackTrace);
}
}
}
}
......@@ -60,6 +60,38 @@ namespace BLL
bool change = false;
if (rtn) change = Common.agvInfo[i].SetState(stateID, stateText, battery, mission_text);
//上报异常
if (Common.agvInfo[i].MissionText != mission_text)
{
Common.agvInfo[i].MissionText = mission_text;
if (mission_text.Equals("停靠") || mission_text.ToLower().Equals("DOCKING"))
{
Common.agvInfo[i].DockingInfo.startTime = DateTime.Now;
Common.agvInfo[i].DockingInfo.IsDocking = true;
}
}
bool isAlarm = false;
List<AlarmMsg> msglist = new List<AlarmMsg>();
if (Common.agvInfo[i].DockingInfo.IsDocking && (DateTime.Now - Common.agvInfo[i].DockingInfo.startTime).TotalMinutes.Equals(2))
{
isAlarm = true;
Common.agvInfo[i].DockingInfo.IsDocking = false;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "agv.Docking", mission_text));
}
if (battery <= 10)
{
isAlarm = true;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "agv.battery", battery.ToString()));
}
if (stateText.Equals("Error") || stateText.Equals("EmergencyStop"))
{
isAlarm = true;
msglist.Add(new AlarmMsg(Common.agvInfo[i].Name, "agv.Error.EmergencyStop", "agv状态" + stateText));
}
if (isAlarm)
BLL.AGVManager.updateDeviceAlarmMsg(msglist);
//获取地点任务状态
Thread.Sleep(50);
rtn = Common.mir.Get_Register(Common.agvInfo[i], REG_STATUS, out int regValue);
......@@ -99,8 +131,7 @@ namespace BLL
{
while (loop)
{
Thread.Sleep(1000);
Thread.Sleep(1000);
for (int i = 0; i < Common.agvInfo.Count; i++)
{
if (!loop) break;
......@@ -238,7 +269,7 @@ namespace BLL
for (int i = 0; i < Common.linePlace.Count; i++)
{
string name = Common.linePlace[i];
index = Common.nodeInfo.FindIndex(s => s.Name.Equals(name) && s.Action == ClientAction.NeedLeave && s.IsUse);
index = Common.nodeInfo.FindIndex(s => s.Name.Equals(name) && s.IsUse);
if (index > -1)
{
rtn = Common.mir.Add_Mission_Fleet(agv, Common.agvMission["Move" + name]);
......@@ -470,10 +501,10 @@ namespace BLL
if (idx == -1) return false;
bool rtn = true;//FindA6Destination(Common.nodeInfo[idx].RFID, out string dest);
string dest = "E1";
string dest = "E2";
if (!rtn) return false;
idx = Common.nodeInfo.FindIndex(s => s.Name.Equals(dest) && s.Action == ClientAction.NeedEnter && s.IsUse);
idx = Common.nodeInfo.FindIndex(s => s.Name.Equals(dest)&& s.IsUse);
if (idx == -1)
{
return false;
......
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Collections;
using System.Net;
using System.Net.Security;
using System.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Reflection;
using System.Net.NetworkInformation;
using BLL;
using AGVControl;
namespace BLL
{
public class HttpHelper
{
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static string Post(string url, string paramData)
{
return Post(url, paramData, Encoding.UTF8);
}
//public static bool PingURLIP(string url, int ms=100)
//{
// string[] urlArray = url.Split('/');
// if (urlArray.Length > 3)
// {
// string ip = urlArray[2];
// Ping pingSender = new Ping();
// PingReply reply = pingSender.Send(ip, ms);//第一个参数为ip地址,第二个参数为ping的时间
// if (reply.Status == IPStatus.Success)
// {
// //通
// return true;
// }
// else
// {
// //不通
// return false;
// }
// }
// return true;
//}
/// <summary>
///
/// </summary>
/// <param name="url"></param>
/// <param name="operation"></param>
/// <param name="simulate">是否模拟服务器返回结果</param>
/// <returns></returns>
//public static Operation Post(string url, Operation operation, bool simulate)
//{
// try
// {
// ////如果Op=0或者Op=5,先拼Ip,不通不发送
// //if (operation.op < 0 || operation.op.Equals(5))
// //{
// // if (PingURLIP(url, 100).Equals(false))
// // {
// // return null;
// // }
// //}
// if (simulate)
// {//模拟服务器返回
// operation.status = 200;
// operation.data.Clear();
// operation.data.Add("posId", "A001");
// string pos = "D100-111#D102-222#D104-333";
// operation.data.Add("pos", pos);
// if (operation.op == 1 || operation.op == 2)
// {//入库或出库
// string json = JsonHelper.SerializeObject(operation);
// LogUtil.error("模拟HTTP服务器返回出库入库信息:" + json);
// return operation;
// }
// }
// else
// {
// string json = "";
// try
// {
// json = JsonHelper.SerializeObject(operation);
// }
// catch (Exception ex)
// {
// LogUtil.error("JsonHelper.SerializeObject(operation) 出错【operation.op=" + operation.op + "】" + ex);
// }
// string result = Post(url, json);
// if (!string.IsNullOrEmpty(result))
// {
// try
// {
// return JsonHelper.DeserializeJsonToObject<Operation>(result);
// }
// catch (Exception ex)
// {
// LogUtil.error("JsonHelper.DeserializeJsonToObject 出错【result=" + result + "】" + ex);
// }
// }
// }
// }
// catch (Exception ex)
// {
// LogUtil.error("Post 出错【operation.op=" + operation.op + "】:" + ex);
// }
// return null;
//}
public static string LastServerMsg = "";
public static string Post(string url, string paramData, Encoding encoding)
{
//if (PingURLIP(url, 100).Equals(false))
//{
// return null;
//}
if (paramData != "null" && paramData != null)
{
// LogUtil.debug(LOGGER, "HTTP POST to " + url + " \n\t >> " + paramData);
}
string result = "";
if (url.ToLower().IndexOf("https", System.StringComparison.Ordinal) > -1)
{
ServicePointManager.ServerCertificateValidationCallback =
new RemoteCertificateValidationCallback((sender, certificate, chain, errors) => { return true; });
}
try
{
var wc = new MyWebClient(5000);
if (string.IsNullOrEmpty(wc.Headers["Content-Type"]))
wc.Headers.Add("Content-Type", "application/json;charset=UTF-8");
wc.Encoding = encoding;
result = wc.UploadString(url, "POST", paramData);
//LogUtil.info(result);
}
catch (Exception e)
{
Common.log.Error("POST ERROR:" + e.ToString());
}
if (!result.Contains("null") && result.Length != 0)
{
//LogUtil.debug(LOGGER,"receive << " + result);
}
LastServerMsg = DateTime.Now.ToLongTimeString() + " URL:" + url + "\r\n"
+ "发送:" + paramData + "\r\n"
+ "接收:" + result + "\r\n"
;
Common.LogInfo(LastServerMsg);
return result;
}
//public static string Get(string url)
//{
// return Get(url, Encoding.UTF8);
//}
//public static string Get(string url, Encoding encoding)
//{
// try
// {
// LogUtil.info("HTTP GET FROM: " + url);
// var wc = new WebClient { Encoding = encoding };
// var readStream = wc.OpenRead(url);
// using (var sr = new StreamReader(readStream, encoding))
// {
// var result = sr.ReadToEnd();
// LogUtil.info("receive << " + result);
// return result;
// }
// }
// catch (Exception e)
// {
// LogUtil.error("HTTP GET ERROR:" + e.Message, 2);
// }
// return "";
//}
}
}
\ No newline at end of file
using Newtonsoft.Json;
using System.Collections.Generic;
using System.IO;
namespace BLL
{
/// <summary>
/// Json帮助类
/// </summary>
public class JsonHelper
{
/// <summary>
/// 将对象序列化为JSON格式
/// </summary>
/// <param name="o">对象</param>
/// <returns>json字符串</returns>
public static string SerializeObject(object o)
{
string json = JsonConvert.SerializeObject(o);
return json;
}
/// <summary>
/// 解析JSON字符串生成对象实体
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="json">json字符串(eg.{"ID":"112","Name":"石子儿"})</param>
/// <returns>对象实体</returns>
public static T DeserializeJsonToObject<T>(string json) where T : class
{
JsonSerializer serializer = new JsonSerializer();
StringReader sr = new StringReader(json);
object o = serializer.Deserialize(new JsonTextReader(sr), typeof(T));
T t = o as T;
return t;
}
/// <summary>
/// 解析JSON数组生成对象实体集合
/// </summary>
/// <typeparam name="T">对象类型</typeparam>
/// <param name="json">json数组字符串(eg.[{"ID":"112","Name":"石子儿"}])</param>
/// <returns>对象实体集合</returns>
public static List<T> DeserializeJsonToList<T>(string json) where T : class
{
JsonSerializer serializer = new JsonSerializer();
StringReader sr = new StringReader(json);
object o = serializer.Deserialize(new JsonTextReader(sr), typeof(List<T>));
List<T> list = o as List<T>;
return list;
}
/// <summary>
/// 反序列化JSON到给定的匿名对象.
/// </summary>
/// <typeparam name="T">匿名对象类型</typeparam>
/// <param name="json">json字符串</param>
/// <param name="anonymousTypeObject">匿名对象</param>
/// <returns>匿名对象</returns>
public static T DeserializeAnonymousType<T>(string json, T anonymousTypeObject)
{
T t = JsonConvert.DeserializeAnonymousType(json, anonymousTypeObject);
return t;
}
}
///// <summary>
///// 与服务器通信用对象
///// </summary>
//public class Operation
//{
// private string _cid = "";
// public string cid
// {
// get { return _cid; }
// set { _cid = value; }
// }
// public int seq { get; set; }
// public int op { get; set; }
// public int status { get; set; }
// private string _error = "";
// public string error
// {
// get { return _error; }
// set { _error = value; }
// }
// private Dictionary<string, string> _data = new Dictionary<string,string>();
// public Dictionary<string, string> data {
// get { return _data; }
// set { _data = value; }
// }
//}
}
......@@ -28,7 +28,7 @@ namespace BLL
// string url = "http://" + info.IP + "/api/v2.0.0/status?whitelist=state_id,state_text";
// string json = HttpGet(url, info.IP, info.Authorization);
// //log.OutInfo("URL: " + url+"\n"+"Return: " + json);
// //LogInfo("URL: " + url+"\n"+"Return: " + json);
// if (string.IsNullOrWhiteSpace(json)) return false;
// JavaScriptSerializer serializer = new JavaScriptSerializer();
......@@ -68,7 +68,7 @@ namespace BLL
// string url = "http://" + info.IP + "/api/v2.0.0/io_modules/" + info.IOID + "/status";
// string json = HttpGet(url, info.IP, info.Authorization);
// //log.OutInfo("URL: " + url + "\n" + "Return: " + json);
// //LogInfo("URL: " + url + "\n" + "Return: " + json);
// if (string.IsNullOrWhiteSpace(json)) return false;
// JavaScriptSerializer serializer = new JavaScriptSerializer();
......@@ -482,7 +482,7 @@ namespace BLL
ping.Dispose();
if (result.Status != System.Net.NetworkInformation.IPStatus.Success)
{
Common.LogInfo("Ping " + ip + " 请求没有响应");
Common.LogInfo("Ping " + ip + " 请求没有响应",false);
return false;
}
return true;
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
namespace BLL
{
public class MyWebClient:WebClient
{
private int _timeout;
/// <summary>
/// 超时时间(毫秒)
/// </summary>
public int Timeout
{
get
{
return _timeout;
}
set
{
_timeout = value;
}
}
public MyWebClient()
{
this._timeout = 60000;
}
public MyWebClient(int timeout)
{
this._timeout = timeout;
}
protected override WebRequest GetWebRequest(Uri address)
{
var result = base.GetWebRequest(address);
result.Timeout = this._timeout;
return result;
}
}
}
......@@ -30,6 +30,16 @@
{
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.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = 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.Column17 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.DgvNode = new System.Windows.Forms.DataGridView();
......@@ -42,10 +52,13 @@
this.Column16 = new System.Windows.Forms.DataGridViewButtonColumn();
this.Column15 = new System.Windows.Forms.DataGridViewButtonColumn();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.btnReadlinePlace = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.dgvLinePlace = new System.Windows.Forms.DataGridView();
this.btnDeletelinePlace = new System.Windows.Forms.Button();
this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.btnAddlinePlace = new System.Windows.Forms.Button();
this.btnReadlinePlace = new System.Windows.Forms.Button();
this.btnDeletelinePlace = new System.Windows.Forms.Button();
this.BtnClearError = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
......@@ -63,28 +76,15 @@
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.TxtLog = new System.Windows.Forms.TextBox();
this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = 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.Column17 = new System.Windows.Forms.DataGridViewButtonColumn();
this.groupBox1 = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).BeginInit();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).BeginInit();
this.tabPage3.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvLinePlace)).BeginInit();
this.tabPage2.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// DgvAgv
......@@ -108,7 +108,7 @@
this.Column11,
this.Column17});
this.DgvAgv.Location = new System.Drawing.Point(16, 15);
this.DgvAgv.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.DgvAgv.Margin = new System.Windows.Forms.Padding(4);
this.DgvAgv.Name = "DgvAgv";
this.DgvAgv.ReadOnly = true;
this.DgvAgv.RowHeadersVisible = false;
......@@ -118,6 +118,93 @@
this.DgvAgv.TabIndex = 3;
this.DgvAgv.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvAgv_CellClick);
//
// Column1
//
this.Column1.HeaderText = "AGV名称";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column1.Width = 80;
//
// 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;
this.Column2.Width = 125;
//
// Column3
//
this.Column3.HeaderText = "AGV状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column3.Width = 125;
//
// Column14
//
this.Column14.HeaderText = "任务内容";
this.Column14.MinimumWidth = 6;
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column14.Width = 120;
//
// Column18
//
this.Column18.HeaderText = "目标地点";
this.Column18.MinimumWidth = 6;
this.Column18.Name = "Column18";
this.Column18.ReadOnly = true;
this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column18.Width = 80;
//
// Column4
//
this.Column4.HeaderText = "后续任务";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column4.Width = 80;
//
// Column13
//
this.Column13.HeaderText = "在线";
this.Column13.MinimumWidth = 6;
this.Column13.Name = "Column13";
this.Column13.ReadOnly = true;
this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column13.Width = 60;
//
// Column19
//
this.Column19.HeaderText = "电量";
this.Column19.MinimumWidth = 6;
this.Column19.Name = "Column19";
this.Column19.ReadOnly = true;
this.Column19.Width = 60;
//
// Column11
//
this.Column11.HeaderText = "调用";
this.Column11.MinimumWidth = 6;
this.Column11.Name = "Column11";
this.Column11.ReadOnly = true;
this.Column11.Width = 60;
//
// Column17
//
this.Column17.HeaderText = "清除缓存";
this.Column17.MinimumWidth = 6;
this.Column17.Name = "Column17";
this.Column17.ReadOnly = true;
this.Column17.Width = 80;
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -127,7 +214,7 @@
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(16, 180);
this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabControl1.Margin = new System.Windows.Forms.Padding(4);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1198, 579);
......@@ -137,9 +224,9 @@
//
this.tabPage1.Controls.Add(this.DgvNode);
this.tabPage1.Location = new System.Drawing.Point(4, 25);
this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabPage1.Margin = new System.Windows.Forms.Padding(4);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabPage1.Padding = new System.Windows.Forms.Padding(4);
this.tabPage1.Size = new System.Drawing.Size(1190, 550);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "节点";
......@@ -165,7 +252,7 @@
this.Column16,
this.Column15});
this.DgvNode.Location = new System.Drawing.Point(8, 8);
this.DgvNode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.DgvNode.Margin = new System.Windows.Forms.Padding(4);
this.DgvNode.Name = "DgvNode";
this.DgvNode.ReadOnly = true;
this.DgvNode.RowHeadersVisible = false;
......@@ -263,24 +350,27 @@
this.tabPage3.Controls.Add(this.BtnMissionReady);
this.tabPage3.Controls.Add(this.LstAgvPlace);
this.tabPage3.Location = new System.Drawing.Point(4, 25);
this.tabPage3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabPage3.Margin = new System.Windows.Forms.Padding(4);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabPage3.Padding = new System.Windows.Forms.Padding(4);
this.tabPage3.Size = new System.Drawing.Size(1190, 550);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "任务";
this.tabPage3.UseVisualStyleBackColor = true;
//
// btnReadlinePlace
// groupBox1
//
this.btnReadlinePlace.Location = new System.Drawing.Point(163, 63);
this.btnReadlinePlace.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnReadlinePlace.Name = "btnReadlinePlace";
this.btnReadlinePlace.Size = new System.Drawing.Size(148, 38);
this.btnReadlinePlace.TabIndex = 29;
this.btnReadlinePlace.Text = "读取任务";
this.btnReadlinePlace.UseVisualStyleBackColor = true;
this.btnReadlinePlace.Click += new System.EventHandler(this.btnReadlinePlace_Click);
this.groupBox1.Controls.Add(this.dgvLinePlace);
this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Controls.Add(this.btnAddlinePlace);
this.groupBox1.Controls.Add(this.btnReadlinePlace);
this.groupBox1.Controls.Add(this.btnDeletelinePlace);
this.groupBox1.Location = new System.Drawing.Point(687, 199);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(319, 219);
this.groupBox1.TabIndex = 31;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "空料架任务";
//
// dgvLinePlace
//
......@@ -297,21 +387,25 @@
this.dgvLinePlace.Size = new System.Drawing.Size(132, 150);
this.dgvLinePlace.TabIndex = 28;
//
// btnDeletelinePlace
// Column8
//
this.btnDeletelinePlace.Location = new System.Drawing.Point(163, 153);
this.btnDeletelinePlace.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnDeletelinePlace.Name = "btnDeletelinePlace";
this.btnDeletelinePlace.Size = new System.Drawing.Size(149, 38);
this.btnDeletelinePlace.TabIndex = 27;
this.btnDeletelinePlace.Text = "删除任务";
this.btnDeletelinePlace.UseVisualStyleBackColor = true;
this.btnDeletelinePlace.Click += new System.EventHandler(this.btnDeletelinePlace_Click);
this.Column8.HeaderText = "ITS任务";
this.Column8.MinimumWidth = 6;
this.Column8.Name = "Column8";
this.Column8.Width = 80;
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(179, 33);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 23);
this.comboBox1.TabIndex = 30;
//
// btnAddlinePlace
//
this.btnAddlinePlace.Location = new System.Drawing.Point(163, 107);
this.btnAddlinePlace.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnAddlinePlace.Margin = new System.Windows.Forms.Padding(4);
this.btnAddlinePlace.Name = "btnAddlinePlace";
this.btnAddlinePlace.Size = new System.Drawing.Size(148, 38);
this.btnAddlinePlace.TabIndex = 26;
......@@ -319,10 +413,32 @@
this.btnAddlinePlace.UseVisualStyleBackColor = true;
this.btnAddlinePlace.Click += new System.EventHandler(this.btnAddlinePlace_Click);
//
// btnReadlinePlace
//
this.btnReadlinePlace.Location = new System.Drawing.Point(163, 63);
this.btnReadlinePlace.Margin = new System.Windows.Forms.Padding(4);
this.btnReadlinePlace.Name = "btnReadlinePlace";
this.btnReadlinePlace.Size = new System.Drawing.Size(148, 38);
this.btnReadlinePlace.TabIndex = 29;
this.btnReadlinePlace.Text = "读取任务";
this.btnReadlinePlace.UseVisualStyleBackColor = true;
this.btnReadlinePlace.Click += new System.EventHandler(this.btnReadlinePlace_Click);
//
// btnDeletelinePlace
//
this.btnDeletelinePlace.Location = new System.Drawing.Point(163, 153);
this.btnDeletelinePlace.Margin = new System.Windows.Forms.Padding(4);
this.btnDeletelinePlace.Name = "btnDeletelinePlace";
this.btnDeletelinePlace.Size = new System.Drawing.Size(149, 38);
this.btnDeletelinePlace.TabIndex = 27;
this.btnDeletelinePlace.Text = "删除任务";
this.btnDeletelinePlace.UseVisualStyleBackColor = true;
this.btnDeletelinePlace.Click += new System.EventHandler(this.btnDeletelinePlace_Click);
//
// BtnClearError
//
this.BtnClearError.Location = new System.Drawing.Point(216, 142);
this.BtnClearError.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnClearError.Margin = new System.Windows.Forms.Padding(4);
this.BtnClearError.Name = "BtnClearError";
this.BtnClearError.Size = new System.Drawing.Size(128, 38);
this.BtnClearError.TabIndex = 19;
......@@ -353,7 +469,7 @@
// BtnWriteCharge2
//
this.BtnWriteCharge2.Location = new System.Drawing.Point(639, 108);
this.BtnWriteCharge2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnWriteCharge2.Margin = new System.Windows.Forms.Padding(4);
this.BtnWriteCharge2.Name = "BtnWriteCharge2";
this.BtnWriteCharge2.Size = new System.Drawing.Size(128, 38);
this.BtnWriteCharge2.TabIndex = 16;
......@@ -363,7 +479,7 @@
// BtnReadCharge2
//
this.BtnReadCharge2.Location = new System.Drawing.Point(639, 62);
this.BtnReadCharge2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnReadCharge2.Margin = new System.Windows.Forms.Padding(4);
this.BtnReadCharge2.Name = "BtnReadCharge2";
this.BtnReadCharge2.Size = new System.Drawing.Size(128, 38);
this.BtnReadCharge2.TabIndex = 15;
......@@ -373,7 +489,7 @@
// TxtCharge2
//
this.TxtCharge2.Location = new System.Drawing.Point(639, 29);
this.TxtCharge2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtCharge2.Margin = new System.Windows.Forms.Padding(4);
this.TxtCharge2.Name = "TxtCharge2";
this.TxtCharge2.Size = new System.Drawing.Size(127, 25);
this.TxtCharge2.TabIndex = 14;
......@@ -381,7 +497,7 @@
// BtnWriteCharge1
//
this.BtnWriteCharge1.Location = new System.Drawing.Point(503, 108);
this.BtnWriteCharge1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnWriteCharge1.Margin = new System.Windows.Forms.Padding(4);
this.BtnWriteCharge1.Name = "BtnWriteCharge1";
this.BtnWriteCharge1.Size = new System.Drawing.Size(128, 38);
this.BtnWriteCharge1.TabIndex = 13;
......@@ -391,7 +507,7 @@
// BtnReadCharge1
//
this.BtnReadCharge1.Location = new System.Drawing.Point(503, 62);
this.BtnReadCharge1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnReadCharge1.Margin = new System.Windows.Forms.Padding(4);
this.BtnReadCharge1.Name = "BtnReadCharge1";
this.BtnReadCharge1.Size = new System.Drawing.Size(128, 38);
this.BtnReadCharge1.TabIndex = 12;
......@@ -401,7 +517,7 @@
// TxtCharge1
//
this.TxtCharge1.Location = new System.Drawing.Point(503, 29);
this.TxtCharge1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtCharge1.Margin = new System.Windows.Forms.Padding(4);
this.TxtCharge1.Name = "TxtCharge1";
this.TxtCharge1.Size = new System.Drawing.Size(127, 25);
this.TxtCharge1.TabIndex = 11;
......@@ -410,7 +526,7 @@
//
this.ChkAutoCharge.AutoSize = true;
this.ChkAutoCharge.Location = new System.Drawing.Point(367, 29);
this.ChkAutoCharge.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ChkAutoCharge.Margin = new System.Windows.Forms.Padding(4);
this.ChkAutoCharge.Name = "ChkAutoCharge";
this.ChkAutoCharge.Size = new System.Drawing.Size(89, 19);
this.ChkAutoCharge.TabIndex = 10;
......@@ -420,7 +536,7 @@
// BtnMissionAdd
//
this.BtnMissionAdd.Location = new System.Drawing.Point(216, 98);
this.BtnMissionAdd.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnMissionAdd.Margin = new System.Windows.Forms.Padding(4);
this.BtnMissionAdd.Name = "BtnMissionAdd";
this.BtnMissionAdd.Size = new System.Drawing.Size(128, 38);
this.BtnMissionAdd.TabIndex = 3;
......@@ -431,7 +547,7 @@
// BtnMissionPause
//
this.BtnMissionPause.Location = new System.Drawing.Point(216, 52);
this.BtnMissionPause.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnMissionPause.Margin = new System.Windows.Forms.Padding(4);
this.BtnMissionPause.Name = "BtnMissionPause";
this.BtnMissionPause.Size = new System.Drawing.Size(128, 38);
this.BtnMissionPause.TabIndex = 2;
......@@ -442,7 +558,7 @@
// BtnMissionReady
//
this.BtnMissionReady.Location = new System.Drawing.Point(216, 8);
this.BtnMissionReady.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnMissionReady.Margin = new System.Windows.Forms.Padding(4);
this.BtnMissionReady.Name = "BtnMissionReady";
this.BtnMissionReady.Size = new System.Drawing.Size(128, 38);
this.BtnMissionReady.TabIndex = 1;
......@@ -458,7 +574,7 @@
this.LstAgvPlace.IntegralHeight = false;
this.LstAgvPlace.ItemHeight = 15;
this.LstAgvPlace.Location = new System.Drawing.Point(8, 8);
this.LstAgvPlace.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstAgvPlace.Margin = new System.Windows.Forms.Padding(4);
this.LstAgvPlace.Name = "LstAgvPlace";
this.LstAgvPlace.Size = new System.Drawing.Size(199, 530);
this.LstAgvPlace.TabIndex = 0;
......@@ -467,10 +583,10 @@
//
this.tabPage2.Controls.Add(this.tableLayoutPanel1);
this.tabPage2.Location = new System.Drawing.Point(4, 25);
this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabPage2.Margin = new System.Windows.Forms.Padding(4);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tabPage2.Size = new System.Drawing.Size(1082, 550);
this.tabPage2.Padding = new System.Windows.Forms.Padding(4);
this.tabPage2.Size = new System.Drawing.Size(1190, 550);
this.tabPage2.TabIndex = 3;
this.tabPage2.Text = "日志";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -483,11 +599,11 @@
this.tableLayoutPanel1.Controls.Add(this.TxtLog, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 4);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(1074, 542);
this.tableLayoutPanel1.Size = new System.Drawing.Size(1182, 542);
this.tableLayoutPanel1.TabIndex = 5;
//
// TxtLog
......@@ -496,129 +612,13 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtLog.Location = new System.Drawing.Point(4, 4);
this.TxtLog.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtLog.Margin = new System.Windows.Forms.Padding(4);
this.TxtLog.Multiline = true;
this.TxtLog.Name = "TxtLog";
this.TxtLog.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.TxtLog.Size = new System.Drawing.Size(368, 534);
this.TxtLog.Size = new System.Drawing.Size(406, 534);
this.TxtLog.TabIndex = 4;
//
// Column8
//
this.Column8.HeaderText = "ITS任务";
this.Column8.MinimumWidth = 6;
this.Column8.Name = "Column8";
this.Column8.Width = 80;
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(179, 33);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 23);
this.comboBox1.TabIndex = 30;
//
// Column1
//
this.Column1.HeaderText = "AGV名称";
this.Column1.MinimumWidth = 6;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column1.Width = 80;
//
// 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;
this.Column2.Width = 125;
//
// Column3
//
this.Column3.HeaderText = "AGV状态";
this.Column3.MinimumWidth = 6;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column3.Width = 125;
//
// Column14
//
this.Column14.HeaderText = "任务内容";
this.Column14.MinimumWidth = 6;
this.Column14.Name = "Column14";
this.Column14.ReadOnly = true;
this.Column14.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column14.Width = 120;
//
// Column18
//
this.Column18.HeaderText = "目标地点";
this.Column18.MinimumWidth = 6;
this.Column18.Name = "Column18";
this.Column18.ReadOnly = true;
this.Column18.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column18.Width = 80;
//
// Column4
//
this.Column4.HeaderText = "后续任务";
this.Column4.MinimumWidth = 6;
this.Column4.Name = "Column4";
this.Column4.ReadOnly = true;
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column4.Width = 80;
//
// Column13
//
this.Column13.HeaderText = "在线";
this.Column13.MinimumWidth = 6;
this.Column13.Name = "Column13";
this.Column13.ReadOnly = true;
this.Column13.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.Column13.Width = 60;
//
// Column19
//
this.Column19.HeaderText = "电量";
this.Column19.MinimumWidth = 6;
this.Column19.Name = "Column19";
this.Column19.ReadOnly = true;
this.Column19.Width = 60;
//
// Column11
//
this.Column11.HeaderText = "调用";
this.Column11.MinimumWidth = 6;
this.Column11.Name = "Column11";
this.Column11.ReadOnly = true;
this.Column11.Width = 60;
//
// Column17
//
this.Column17.HeaderText = "清除缓存";
this.Column17.MinimumWidth = 6;
this.Column17.Name = "Column17";
this.Column17.ReadOnly = true;
this.Column17.Width = 80;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.dgvLinePlace);
this.groupBox1.Controls.Add(this.comboBox1);
this.groupBox1.Controls.Add(this.btnAddlinePlace);
this.groupBox1.Controls.Add(this.btnReadlinePlace);
this.groupBox1.Controls.Add(this.btnDeletelinePlace);
this.groupBox1.Location = new System.Drawing.Point(687, 199);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(319, 219);
this.groupBox1.TabIndex = 31;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "空料架任务";
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
......@@ -627,9 +627,9 @@
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.DgvAgv);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmMain";
this.Text = "Form1";
this.Text = "AGV产线调度";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMain_FormClosing);
this.Load += new System.EventHandler(this.FrmMain_Load);
((System.ComponentModel.ISupportInitialize)(this.DgvAgv)).EndInit();
......@@ -638,11 +638,11 @@
((System.ComponentModel.ISupportInitialize)(this.DgvNode)).EndInit();
this.tabPage3.ResumeLayout(false);
this.tabPage3.PerformLayout();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvLinePlace)).EndInit();
this.tabPage2.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
......
......@@ -54,11 +54,13 @@ namespace AGVControl
{
DgvNode.Rows[nodeIndex].SetValues(Common.nodeInfo[nodeIndex].ToRow());
}));
System.GC.Collect();
}
private void Server_NodeOnline(int nodeIndex)
{
Invoke(new Action(() => { DgvNode.Rows[nodeIndex].DefaultCellStyle.ForeColor = Common.nodeInfo[nodeIndex].Online ? Color.Black : Color.Red; }));
System.GC.Collect();
}
private void Control_AgvChanged(int agvIndex)
......@@ -67,11 +69,13 @@ namespace AGVControl
{
DgvAgv.Rows[agvIndex].SetValues(Common.agvInfo[agvIndex].ToRow());
}));
System.GC.Collect();
}
private void Control_AgvOnline(int agvIndex)
{
Invoke(new Action(() => { DgvAgv.Rows[agvIndex].DefaultCellStyle.ForeColor = Common.agvInfo[agvIndex].IsCon ? Color.Black : Color.Red; }));
System.GC.Collect();
}
private void ItemShow_Click(object sender, EventArgs e)
......
......@@ -24,7 +24,8 @@
</log4net>
<appSettings>
<add key="ITS" value="http://10.85.17.233/ESMTCommonInterface/CommonService.asmx/VMIGetBoxDestInfo?boxRFID=" />
<add key="WebService" value="http://127.0.0.1/Webservice/AGVService/"/>
<add key="WebService" value="http://10.85.199.1/Webservice/AGVService/"/>
<add key="http.server" value="http://10.85.199.25/myproject/" />
<add key="FLEET" value="10.85.199.3"/>
<!--<add key="LocalIP" value="192.168.103.12"/>
<add key="AutoCharge" value="false"/>
......
[2020-06-24 15:50:36,271][1]INFO =====程序开始=====
[2020-06-24 15:50:41,870][1]DEBUG HttpGet URL: http://192.168.12.20/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-24 15:50:41,871][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-24 15:50:46,943][1]DEBUG HttpGet URL: http://10.85.199.56/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-24 15:50:46,943][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-24 15:50:52,015][1]DEBUG HttpGet URL: http://10.85.199.57/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-24 15:50:52,015][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-24 15:50:57,088][1]DEBUG HttpGet URL: http://10.85.199.58/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-24 15:50:57,088][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-24 15:50:57,102][1]INFO Server Start
[2020-06-24 15:50:58,155][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 81
[2020-06-24 15:51:00,061][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-24 15:51:02,062][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-24 15:51:04,061][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-24 15:51:06,062][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:22:53,292][1]INFO =====程序开始=====
[2020-06-29 09:22:58,623][1]DEBUG HttpGet URL: http://192.168.12.20/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 09:22:58,623][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 09:23:03,693][1]DEBUG HttpGet URL: http://10.85.199.56/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 09:23:03,693][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 09:23:08,763][1]DEBUG HttpGet URL: http://10.85.199.57/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 09:23:08,764][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 09:23:13,832][1]DEBUG HttpGet URL: http://10.85.199.58/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 09:23:13,833][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 09:23:13,837][1]INFO Server Start
[2020-06-29 09:23:14,590][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 81
[2020-06-29 09:23:16,415][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:23:18,415][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:23:20,415][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:23:22,415][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:23:25,415][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:23:27,415][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:23:29,415][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:23:31,415][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:23:34,414][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:23:36,414][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:23:38,415][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:23:40,415][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:23:43,415][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:23:45,415][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:23:47,414][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:23:49,414][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:23:52,415][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:23:54,415][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:23:56,415][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:23:58,414][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:24:01,415][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:24:03,415][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:24:05,414][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:24:07,415][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 09:24:10,414][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 09:24:12,416][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 09:24:14,415][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 09:24:16,415][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 11:04:47,487][1]INFO =====程序开始=====
[2020-06-29 11:04:52,904][1]DEBUG HttpGet URL: http://192.168.12.20/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 11:04:52,904][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 11:04:57,976][1]DEBUG HttpGet URL: http://10.85.199.56/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 11:04:57,976][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 11:05:03,051][1]DEBUG HttpGet URL: http://10.85.199.57/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 11:05:03,051][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 11:05:08,121][1]DEBUG HttpGet URL: http://10.85.199.58/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-29 11:05:08,121][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-29 11:05:08,136][1]INFO Server Start
[2020-06-29 11:05:09,876][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 81
[2020-06-29 11:05:10,915][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 11:05:12,915][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 11:05:14,915][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 11:05:16,915][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 11:05:19,915][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 11:05:21,916][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 11:05:23,916][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 11:05:25,916][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-29 11:05:28,915][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-29 11:05:30,915][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-29 11:05:32,916][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-29 11:05:34,916][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 14:22:09,041][1]INFO =====程序开始=====
[2020-06-30 14:22:14,478][1]DEBUG HttpGet URL: http://192.168.12.20/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 14:22:14,478][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 14:22:19,557][1]DEBUG HttpGet URL: http://10.85.199.56/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 14:22:19,557][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 14:22:24,651][1]DEBUG HttpGet URL: http://10.85.199.57/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 14:22:24,651][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 14:22:29,744][1]DEBUG HttpGet URL: http://10.85.199.58/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 14:22:29,744][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 14:22:29,744][1]INFO Server Start
[2020-06-30 14:22:30,166][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 81
[2020-06-30 14:22:32,728][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 14:22:34,713][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 14:22:36,715][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 14:22:38,731][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 14:22:41,731][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 14:22:43,715][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 14:22:45,716][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 14:22:47,716][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 14:22:50,718][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 14:22:52,718][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 14:22:54,719][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 14:22:56,719][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 14:22:59,718][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 14:23:01,718][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 14:23:03,718][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 14:23:05,719][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 14:23:08,719][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 14:23:10,719][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 14:23:12,718][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 14:23:14,718][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 14:23:17,718][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 14:23:19,718][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 14:23:21,718][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 14:23:21,952][9]INFO 服务端关闭连接,退出阻塞Accept
[2020-06-30 14:23:22,000][1]INFO Server Stop
[2020-06-30 14:23:22,015][1]ERROR Close
System.ServiceModel.CommunicationObjectFaultedException: 通信对象 System.ServiceModel.Web.WebServiceHost 无法用于通信,因为其处于“出错”状态。
在 System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Close()
在 BLL.WebService.Close() 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 94
[2020-06-30 14:23:22,015][1]INFO =====程序结束=====
[2020-06-30 14:23:23,718][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 15:04:47,173][1]INFO =====程序开始=====
[2020-06-30 15:04:52,488][1]DEBUG HttpGet URL: http://192.168.12.20/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:04:52,488][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:04:57,566][1]DEBUG HttpGet URL: http://10.85.199.56/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:04:57,566][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:05:02,645][1]DEBUG HttpGet URL: http://10.85.199.57/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:05:02,645][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:05:07,738][1]DEBUG HttpGet URL: http://10.85.199.58/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:05:07,738][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:05:07,738][1]INFO Server Start
[2020-06-30 15:05:07,956][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 77
[2020-06-30 15:05:10,707][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 15:05:12,707][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 15:05:14,707][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 15:05:16,707][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 15:05:19,707][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 15:05:21,707][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 15:05:23,707][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 15:05:25,707][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 15:05:28,581][9]INFO 服务端关闭连接,退出阻塞Accept
[2020-06-30 15:05:28,644][1]INFO Server Stop
[2020-06-30 15:05:28,644][1]ERROR Close
System.ServiceModel.CommunicationObjectFaultedException: 通信对象 System.ServiceModel.Web.WebServiceHost 无法用于通信,因为其处于“出错”状态。
在 System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Close()
在 BLL.WebService.Close() 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 90
[2020-06-30 15:05:28,644][1]INFO =====程序结束=====
[2020-06-30 15:05:28,706][7]INFO Ping 192.168.12.20 请求没有响应
[2020-06-30 15:05:30,707][7]INFO Ping 10.85.199.56 请求没有响应
[2020-06-30 15:05:32,707][7]INFO Ping 10.85.199.57 请求没有响应
[2020-06-30 15:05:34,707][7]INFO Ping 10.85.199.58 请求没有响应
[2020-06-30 15:18:47,595][1]INFO =====程序开始=====
[2020-06-30 15:18:52,845][1]DEBUG HttpGet URL: http://10.85.199.71/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:18:52,845][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:18:57,940][1]DEBUG HttpGet URL: http://10.85.199.72/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:18:57,940][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:19:03,018][1]DEBUG HttpGet URL: http://10.85.199.73/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:19:03,018][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:19:08,098][1]DEBUG HttpGet URL: http://10.85.199.74/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:19:08,098][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:19:08,098][1]INFO Server Start
[2020-06-30 15:19:08,238][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 77
[2020-06-30 15:19:10,708][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:19:12,708][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:19:14,723][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:19:16,708][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:19:19,708][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:19:21,708][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:19:23,708][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:19:25,707][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:19:28,708][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:19:30,707][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:19:32,708][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:19:34,708][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:19:37,709][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:19:39,709][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:19:41,710][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:19:43,709][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:19:46,710][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:19:48,710][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:19:50,712][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:19:52,712][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:19:55,712][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:19:57,712][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:19:59,711][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:20:01,712][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:20:02,133][9]INFO 服务端关闭连接,退出阻塞Accept
[2020-06-30 15:20:02,181][1]INFO Server Stop
[2020-06-30 15:20:02,181][1]ERROR Close
System.ServiceModel.CommunicationObjectFaultedException: 通信对象 System.ServiceModel.Web.WebServiceHost 无法用于通信,因为其处于“出错”状态。
在 System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Close()
在 BLL.WebService.Close() 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 90
[2020-06-30 15:20:02,181][1]INFO =====程序结束=====
[2020-06-30 15:20:04,712][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:20:06,712][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:20:08,712][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:20:10,712][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:22:04,646][1]INFO =====程序开始=====
[2020-06-30 15:22:09,851][1]DEBUG HttpGet URL: http://10.85.199.71/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:22:09,851][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:22:14,945][1]DEBUG HttpGet URL: http://10.85.199.72/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:22:14,945][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:22:20,024][1]DEBUG HttpGet URL: http://10.85.199.73/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:22:20,024][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:22:25,102][1]DEBUG HttpGet URL: http://10.85.199.74/api/v2.0.0/registers/20?whitelist=value Return:
[2020-06-30 15:22:25,102][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-06-30 15:22:25,102][1]INFO Server Start
[2020-06-30 15:22:25,242][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 77
[2020-06-30 15:22:27,712][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:22:29,727][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:22:31,712][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:22:33,711][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:22:36,730][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:22:38,713][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:22:40,730][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:22:42,730][7]INFO Ping 10.85.199.74 请求没有响应
[2020-06-30 15:22:45,713][7]INFO Ping 10.85.199.71 请求没有响应
[2020-06-30 15:22:47,166][9]INFO 服务端关闭连接,退出阻塞Accept
[2020-06-30 15:22:47,229][1]INFO Server Stop
[2020-06-30 15:22:47,229][1]ERROR Close
System.ServiceModel.CommunicationObjectFaultedException: 通信对象 System.ServiceModel.Web.WebServiceHost 无法用于通信,因为其处于“出错”状态。
在 System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Close()
在 BLL.WebService.Close() 位置 D:\OneDrive - 上海挚锦科技有限公司\SMD\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 90
[2020-06-30 15:22:47,229][1]INFO =====程序结束=====
[2020-06-30 15:22:47,730][7]INFO Ping 10.85.199.72 请求没有响应
[2020-06-30 15:22:49,714][7]INFO Ping 10.85.199.73 请求没有响应
[2020-06-30 15:22:51,715][7]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:17:57,270][1]INFO =====程序开始=====
[2020-07-01 15:18:02,937][1]DEBUG HttpGet URL: http://10.85.199.71/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:18:02,937][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:18:08,008][1]DEBUG HttpGet URL: http://10.85.199.72/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:18:08,008][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:18:13,080][1]DEBUG HttpGet URL: http://10.85.199.73/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:18:13,081][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:18:18,152][1]DEBUG HttpGet URL: http://10.85.199.74/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:18:18,152][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:18:18,166][1]INFO Server Start
[2020-07-01 15:18:27,967][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 85
[2020-07-01 15:18:28,454][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:18:52,567][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:18:53,730][1]INFO Ping 10.85.199.73 请求没有响应
[2020-07-01 15:18:55,898][1]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:18:59,901][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:19:04,477][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:19:05,366][1]INFO 非法的IP地址
[2020-07-01 15:19:06,185][1]INFO Ping 10.85.199.73 请求没有响应
[2020-07-01 15:19:07,796][1]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:20:21,519][1]INFO =====程序开始=====
[2020-07-01 15:20:26,898][1]DEBUG HttpGet URL: http://10.85.199.71/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:20:26,899][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:20:31,971][1]DEBUG HttpGet URL: http://10.85.199.72/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:20:31,971][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:20:37,043][1]DEBUG HttpGet URL: http://10.85.199.73/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:20:37,043][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:20:42,114][1]DEBUG HttpGet URL: http://10.85.199.74/api/v2.0.0/registers/20?whitelist=value Return:
[2020-07-01 15:20:42,114][1]ERROR CheckAGVMissionState 获取PLC20失败
[2020-07-01 15:20:42,130][1]INFO Server Start
[2020-07-01 15:20:43,518][1]ERROR Open
System.ServiceModel.AddressAccessDeniedException: HTTP 无法注册 URL http://+:80/Webservice/AGVService/。进程不具有此命名空间的访问权限(有关详细信息,请参见 http://go.microsoft.com/fwlink/?LinkId=70353)。 ---> System.Net.HttpListenerException: 拒绝访问。
在 System.Net.HttpListener.AddAllPrefixes()
在 System.Net.HttpListener.Start()
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()
在 System.ServiceModel.Channels.TransportManager.Open(TransportChannelListener channelListener)
在 System.ServiceModel.Channels.TransportManagerContainer.Open(SelectTransportManagersCallback selectTransportManagerCallback)
在 System.ServiceModel.Channels.TransportChannelListener.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.HttpChannelListener`1.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
在 System.ServiceModel.Channels.CommunicationObject.Open()
在 BLL.WebService.Open(String url) 位置 C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\BLL\WebService.cs:行号 85
[2020-07-01 15:20:44,062][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:20:57,156][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:21:08,635][1]INFO Ping 10.85.199.73 请求没有响应
[2020-07-01 15:21:10,070][1]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:21:17,748][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:21:23,544][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:21:26,315][1]INFO E1 Ping 10.85.199.42 请求没有响应
[2020-07-01 15:21:27,872][1]INFO Ping 10.85.199.73 请求没有响应
[2020-07-01 15:21:34,744][1]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:21:36,669][1]INFO E2 Ping 10.85.199.90 请求没有响应
[2020-07-01 15:21:37,670][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:21:37,749][1]INFO E3 Ping 10.85.199.91 请求没有响应
[2020-07-01 15:21:37,749][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:21:39,671][1]INFO Ping 10.85.199.73 请求没有响应
[2020-07-01 15:21:39,696][1]INFO E4 Ping 10.85.199.92 请求没有响应
[2020-07-01 15:21:40,748][1]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:21:40,754][1]INFO E5 Ping 10.85.199.93 请求没有响应
[2020-07-01 15:21:42,670][1]INFO E6 Ping 10.85.199.94 请求没有响应
[2020-07-01 15:21:43,669][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:21:43,758][1]INFO E8 Ping 10.85.199.95 请求没有响应
[2020-07-01 15:21:43,763][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:21:45,670][1]INFO E9 Ping 10.85.199.180 请求没有响应
[2020-07-01 15:21:45,677][1]INFO Ping 10.85.199.73 请求没有响应
[2020-07-01 15:21:46,767][1]INFO E10 Ping 10.85.199.181 请求没有响应
[2020-07-01 15:21:46,773][1]INFO Ping 10.85.199.74 请求没有响应
[2020-07-01 15:21:48,669][1]INFO E11 Ping 10.85.199.182 请求没有响应
[2020-07-01 15:21:49,670][1]INFO Ping 10.85.199.71 请求没有响应
[2020-07-01 15:21:49,783][1]INFO E12 Ping 10.85.199.183 请求没有响应
[2020-07-01 15:21:49,794][1]INFO Ping 10.85.199.72 请求没有响应
[2020-07-01 15:34:39,078][1]INFO =====程序开始=====
[2020-07-01 15:34:44,529][1]ERROR CheckAGVMissionState 获取PLC20失败
......@@ -25,10 +25,11 @@ C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\AGVControl-ProductionLine.pdb
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\RestSharp.dll
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\RestSharp.xml
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl.FrmMain.resources
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl.Properties.Resources.resources
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.GenerateResource.cache
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csproj.CopyComplete
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.exe
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.pdb
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\obj\Debug\AGVControl-ProductionLine.csprojAssemblyReference.cache
C:\ZDL\Gitee\AGVControl-Qisda-ProductionLine\AGVControl-ProductionLine\bin\Debug\Newtonsoft.Json.dll
......@@ -22,7 +22,7 @@ namespace AsaPL
private readonly log4net.ILog LOG;
private readonly string IP; //远程IP地址
private const int PORT = 12001; //端口
private const int PORT = 9500; //端口
private const int SEND_INTERVAL = 2000; //客户端发送所有节点后的间隔
/// <summary>
......@@ -77,7 +77,7 @@ namespace AsaPL
tRecon.Start();
tListen.Start();
tSend.Start();
LogInfo("Connect");
LOG.Info("Connect");
}
/// <summary>
......@@ -93,7 +93,7 @@ namespace AsaPL
_client.Close();
_client = null;
}
LogInfo("Close");
LOG.Info("Close");
}
/// <summary>
......@@ -118,7 +118,7 @@ namespace AsaPL
_node[idx].Action = action;
_node[idx].Level = level;
}
LogInfo("SetStatus " + _node[idx].ToText());
LOG.Info("SetStatus " + _node[idx].ToText());
}
/// <summary>
......@@ -127,7 +127,7 @@ namespace AsaPL
/// <param name="name"></param>
public void MayEnter(string name)
{
LogInfo(name + " MayEnter");
LOG.Info(name + " MayEnter");
ClientNode node = new ClientNode(name, "", ClientAction.MayEnter, ClientLevel.High);
byte[] buff = Encode(node);
bool bln = Send(buff);
......@@ -139,7 +139,7 @@ namespace AsaPL
/// <param name="name"></param>
public void MayLeave(string name)
{
LogInfo(name + " MayLeave");
LOG.Info(name + " MayLeave");
ClientNode node = new ClientNode(name, "", ClientAction.MayLeave, ClientLevel.High);
byte[] buff = Encode(node);
bool bln = Send(buff);
......@@ -151,7 +151,7 @@ namespace AsaPL
/// <param name="name"></param>
public void FinishEnter(string name)
{
LogInfo(name + " FinishEnter");
LOG.Info(name + " FinishEnter");
ClientNode node = new ClientNode(name, "", ClientAction.FinishEnter, ClientLevel.High);
byte[] buff = Encode(node);
bool bln = Send(buff);
......@@ -163,7 +163,7 @@ namespace AsaPL
/// <param name="name"></param>
public void FinishLeave(string name)
{
LogInfo(name + " FinishLeave");
LOG.Info(name + " FinishLeave");
ClientNode node = new ClientNode(name, "", ClientAction.FinishLeave, ClientLevel.High);
byte[] buff = Encode(node);
bool bln = Send(buff);
......@@ -184,11 +184,11 @@ namespace AsaPL
if (IsConn)
{
countRecon = 0;
LogInfo("Server connection successful");
LOG.Info("Server connection successful");
}
else
{
LogInfo("Server connection failed " + ++countRecon + " times");
LOG.Info("Server connection failed " + ++countRecon + " times");
}
}
Thread.Sleep(1000);
......@@ -202,7 +202,7 @@ namespace AsaPL
{
try
{
LogInfo("Connect " + IP + ":" + PORT);
LOG.Info("Connect " + IP + ":" + PORT);
if (CheckIP(IP))
{
_client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
......@@ -212,7 +212,7 @@ namespace AsaPL
_client.Connect(IPAddress.Parse(IP), PORT);
if (!_loop) return;
IsConn = true;
LogInfo("Connect OK");
LOG.Info("Connect OK");
}
}
catch (Exception ex)
......@@ -246,11 +246,11 @@ namespace AsaPL
ClientNode node = Decode(_buffer);
if (node == null)
{
LogInfo("Command decoding failed: " + HexBuff(_buffer));
LOG.Info("Command decoding failed: " + HexBuff(_buffer));
}
else
{
LogInfo("From server: " + node.ToText());
LOG.Info("From server: " + node.ToText());
Resolve(node);
}
}
......@@ -273,12 +273,12 @@ namespace AsaPL
{
if (result.Action == ClientAction.ReadyEnter)
{
LogInfo("Trigger ReadyEnter Event");
LOG.Info("Trigger ReadyEnter Event");
ReadyEnter?.Invoke(result.Name);
}
else if (result.Action == ClientAction.ReadyLeave)
{
LogInfo("Trigger ReadyLeave Event");
LOG.Info("Trigger ReadyLeave Event");
ReadyLeave?.Invoke(result.Name);
}
}
......@@ -324,7 +324,7 @@ namespace AsaPL
{
if (!IsConn)
{
LogInfo("服务器没有连接");
LOG.Info("服务器没有连接");
return false;
}
......@@ -418,7 +418,7 @@ namespace AsaPL
bool rtn = System.Text.RegularExpressions.Regex.IsMatch(ip, pattern);
if (!rtn)
{
LogInfo("Illegal IP address " + ip);
LOG.Info("Illegal IP address " + ip);
return false;
}
......@@ -430,7 +430,7 @@ namespace AsaPL
ping.Dispose();
if (result.Status != System.Net.NetworkInformation.IPStatus.Success)
{
LogInfo("Ping " + ip + " request timeout");
LOG.Info("Ping " + ip + " request timeout");
return false;
}
return true;
......
......@@ -25,7 +25,7 @@ namespace AgvClientTest
comboBox1.Items.Add((AsaPL.ClientAction)i);
comboBox1.SelectedIndex = 0;
comboBox2.SelectedIndex = 0;
client = new AsaPL.AgvClient("127.0.0.1");
client = new AsaPL.AgvClient("10.85.199.1");
client.SetStatus("E1", "C6", AsaPL.ClientAction.None);
client.Connect();
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!