..
This commit is contained in:
@@ -39,9 +39,17 @@ namespace Project
|
||||
//대상디바이스
|
||||
var TargetID = data[0];
|
||||
|
||||
//해당 패킷의 대상이 나라면 처리한다.
|
||||
//해당 패킷의 대상이 내가아니면 처리하지 않는다
|
||||
if (PUB.setting.XBE_ID != TargetID) return;
|
||||
|
||||
|
||||
//자동실행모드가 아니라면 무조건 에러를 반환한다
|
||||
if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false)
|
||||
{
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.ManualMode, "현재 자동실행 모드가 아닙니다");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
|
||||
@@ -56,8 +64,8 @@ namespace Project
|
||||
var node = PUB._mapCanvas.Nodes.FirstOrDefault(t => t.RfidId == currtagValue);
|
||||
if (node == null)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-SetCurrent] 노드정보를 찾을 수 없습니다 RFID:{currTag}");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.EmptyNode, $"{currTag}");
|
||||
var ermsg = ($"[{logPrefix}-SetCurrent] 노드정보를 찾을 수 없습니다 RFID:{currTag}");
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.EmptyNode, ermsg);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -83,16 +91,16 @@ namespace Project
|
||||
var currNode = PUB._virtualAGV.CurrentNode;
|
||||
if (currNode == null)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-{cmd}] 현재 노드를 알 수 없습니다");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.EmptyNode, "Unknown Current Node");
|
||||
var msg = $"[{logPrefix}-{cmd}] 현재 노드를 알 수 없습니다";
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.EmptyNode, msg);
|
||||
return;
|
||||
}
|
||||
|
||||
var targetNode = PUB._virtualAGV.TargetNode;
|
||||
if (targetNode == null)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-{cmd}] 목표 노드를 알 수 없습니다");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.EmptyNode, "Unknown Target Node");
|
||||
var msg = $"[{logPrefix}-{cmd}] 목표 노드를 알 수 없습니다";
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.EmptyNode, msg);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -119,7 +127,7 @@ namespace Project
|
||||
PUB.sm.SetNewRunStep(nextStep);
|
||||
}
|
||||
break;
|
||||
case ENIGProtocol.AGVCommandHE.PickOnExit:
|
||||
case ENIGProtocol.AGVCommandHE.PickOnExit:
|
||||
case ENIGProtocol.AGVCommandHE.PickOffExit:
|
||||
{
|
||||
Resultclear();
|
||||
@@ -129,16 +137,16 @@ namespace Project
|
||||
var currNode = PUB._virtualAGV.CurrentNode;
|
||||
if (currNode == null)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-{cmd}] 현재 노드를 알 수 없습니다");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.EmptyNode, "Unknown Current Node");
|
||||
var msg = $"[{logPrefix}-{cmd}] 현재 노드를 알 수 없습니다";
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.EmptyNode, msg);
|
||||
return;
|
||||
}
|
||||
|
||||
var targetNode = PUB._virtualAGV.TargetNode;
|
||||
if (targetNode == null)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-{cmd}] 목표 노드를 알 수 없습니다");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.EmptyNode, "Unknown Target Node");
|
||||
var msg = $"[{logPrefix}-{cmd}] 목표 노드를 알 수 없습니다";
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.EmptyNode, msg);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,8 +206,7 @@ namespace Project
|
||||
//자동상태가아니라면 처리하지 않는다.
|
||||
if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-Goto] 자동실행상태가 아닙니다");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.ManualMode, $"{currTag}");
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.ManualMode, $"[{logPrefix}-Goto] 자동실행상태가 아닙니다");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,8 +214,7 @@ namespace Project
|
||||
PUB._virtualAGV.TargetNode = targetNode;
|
||||
if (targetNode == null)
|
||||
{
|
||||
PUB.log.AddE($"[{logPrefix}-Goto] 노드정보를 찾을 수 없습니다 RFID:{currTag}");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.EmptyNode, $"{currTag}");
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.EmptyNode, $"[{logPrefix}-Goto] 노드정보를 찾을 수 없습니다 RFID:{currTag}");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -348,8 +354,7 @@ namespace Project
|
||||
break;
|
||||
|
||||
default:
|
||||
PUB.logagv.AddE($"Unknown Command : {cmd} Sender:{e.ReceivedPacket.ID}, Target:{data[0]}");
|
||||
PUB.XBE.SendError(ENIGProtocol.AGVErrorCode.UnknownCommand, $"{cmd}");
|
||||
SetRunStepError(ENIGProtocol.AGVErrorCode.UnknownCommand, $"Unknown Command : {cmd} Sender:{e.ReceivedPacket.ID}, Target:{data[0]}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user