Dummy data 생성 및 Callback 데이터 받을 때, \0,\n,\r등.. 삭제
This commit is contained in:
parent
20b846c9a6
commit
2bda9c5f9c
@ -146,5 +146,17 @@ namespace AuroraCellTracker
|
||||
|
||||
_CellTracker.SetIPConfig();
|
||||
}
|
||||
public void getDummyData(out string lotId, out string cellId)
|
||||
{
|
||||
lotId = string.Empty;
|
||||
cellId = string.Empty;
|
||||
|
||||
if (!IsActivated) {
|
||||
return;
|
||||
}
|
||||
if (_CellTracker != null && _CellTracker is CellTrackerDaekhon core) {
|
||||
core.CalcCellInfo("", out lotId, out cellId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -392,7 +392,7 @@ namespace AuroraCellTracker.DaekhonCoporation
|
||||
/// Cell 추적 API에서 받은 문자열에서, Cell ID와 Lot ID를 Parsing 하는 함수
|
||||
/// </summary>
|
||||
/// <param name="str">Cell 추적 API에서 받은 문자열. Callback 방식일 때와 Queue 방식일 때 각각 다르다</param>
|
||||
private void CalcCellInfo(string str, out string lotId, out string cellId)
|
||||
public void CalcCellInfo(string str, out string lotId, out string cellId)
|
||||
{
|
||||
lotId = cellId = "";
|
||||
|
||||
|
||||
@ -348,7 +348,7 @@ namespace AuroraLBAD.Service
|
||||
}
|
||||
string LotID_string = new string(LotID);
|
||||
string CellID_string = new string(CellID);
|
||||
Log.I($"StreamLight LBAD Report Data : LotID({LotID_string.Replace("\0", "").Trim()}) / LotID({CellID_string.Replace("\0", "").Trim()})");
|
||||
Log.I($"StreamLight LBAD Report Data : LotID({LotID_string}) / CellID({CellID_string})");
|
||||
Log.I($"StreamLight LBAD Report Data : HeadNum {replyParsed_LBAD.HeadNum}");
|
||||
Log.I($"StreamLight LBAD Report Data : LaserPower_AVG {replyParsed_LBAD.AVG}");
|
||||
if (replyParsed_LBAD.HeadNum > 0)
|
||||
|
||||
@ -132,7 +132,7 @@ namespace ILSOS_CCW_H52A.Data
|
||||
// GetReportCellResult_SeqResult 성공 시 호출.
|
||||
public void CompleteReport()
|
||||
{
|
||||
_log.I($"Report >> CellId{ReportTarget.CellId}, JigNo{ReportTarget.JigNo}");
|
||||
_log.I($"Report >> CellId({ReportTarget.CellId}), JigNo({ReportTarget.JigNo})");
|
||||
ReportTarget?.SetReportComplete(true);
|
||||
ReportTarget = null;
|
||||
_pendingSlot.Clear();
|
||||
|
||||
@ -72,8 +72,10 @@ namespace ILSOS_CCW_H52A.Sequences.ProcessObjects
|
||||
|
||||
private void OnCellReceived(string lotId, string cellId)
|
||||
{
|
||||
lotId = lotId.Replace("\0", "").Trim();
|
||||
cellId = cellId.Replace("\0", "").Trim();
|
||||
ReceivedCellInfoQueue.Enqueue((lotId, cellId));
|
||||
_log.I($"Cell Tracker CallBack Received >> [LotId({lotId.Replace("\0", "").Trim()})] [CellId({cellId.Replace("\0", "").Trim()})]");
|
||||
_log.I($"Cell Tracker CallBack Received >> [LotId({lotId})] [CellId({cellId})]");
|
||||
}
|
||||
|
||||
public IEnumerable<bool> CheckRotaryState()
|
||||
|
||||
@ -734,9 +734,15 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
_CellScheduler.Prefetch2.CellId = cell.CellId;
|
||||
Status.GetProcessingWeldingData().WorkLotId = cell.LotId;
|
||||
Status.GetProcessingWeldingData().WorkCellId = cell.CellId;
|
||||
} else {
|
||||
_CellTracker.getDummyData(out string lotId, out string cellId);
|
||||
_CellScheduler.Prefetch2.LotId = lotId;
|
||||
_CellScheduler.Prefetch2.CellId = cellId;
|
||||
Status.GetProcessingWeldingData().WorkLotId = lotId;
|
||||
Status.GetProcessingWeldingData().WorkCellId = cellId;
|
||||
}
|
||||
|
||||
if(_CellScheduler.Prefetch2 != null)
|
||||
if (_CellScheduler.Prefetch2 != null)
|
||||
Log.I($"상태 시프트(Rotate) >> 용접 전전셀({_CellScheduler.Prefetch2.CellId}) [CanExist({_CellScheduler.Prefetch2.IsCanExist})] [JigNo({_CellScheduler.Prefetch2.JigNo})] " +
|
||||
$"[ListNo({_CellScheduler.Prefetch2.ListNo})] [WeldingCount({_CellScheduler.Prefetch2.WeldingCount})]" +
|
||||
$"[StartAngle(Y)({_CellScheduler.Prefetch2.StartAngle})]");
|
||||
@ -1101,29 +1107,26 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
|
||||
private SequenceActionResult SetReportCellResult_SeqParams(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
Status.SetWorkingPosition(eWorkingPosition.REPORTING_RESULT);
|
||||
//private SequenceActionResult SetReportCellResult_SeqParams(SequenceContext context, string id, SequenceActionResult param)
|
||||
//{
|
||||
// Status.SetWorkingPosition(eWorkingPosition.REPORTING_RESULT);
|
||||
|
||||
SeqReportCellResult_InitParam seqParams = new SeqReportCellResult_InitParam() {
|
||||
EDC_Interface = new EDC(),
|
||||
};
|
||||
// SeqReportCellResult_InitParam seqParams = new SeqReportCellResult_InitParam() {
|
||||
// EDC_Interface = new EDC(),
|
||||
// };
|
||||
|
||||
return SequenceAction.Ok(seqParams);
|
||||
}
|
||||
// return SequenceAction.Ok(seqParams);
|
||||
//}
|
||||
|
||||
private SequenceActionResult GetReportCellResult_SeqResult(SequenceContext context, string id, SequenceActionResult param)
|
||||
{
|
||||
var resultOutParam = param.Param as SeqReportCellResult_OutParam;
|
||||
if (resultOutParam.Success == false) {
|
||||
return null;
|
||||
}
|
||||
//private SequenceActionResult GetReportCellResult_SeqResult(SequenceContext context, string id, SequenceActionResult param)
|
||||
//{
|
||||
// var resultOutParam = param.Param as SeqReportCellResult_OutParam;
|
||||
// if (resultOutParam.Success == false) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// 보고 완료: ReportTarget.ReportComplete=true 설정 + pendingSlot 클리어
|
||||
_CellScheduler.CompleteReport();
|
||||
|
||||
return SequenceAction.Ok();
|
||||
}
|
||||
// return SequenceAction.Ok();
|
||||
//}
|
||||
|
||||
private static string CheckCycleStop(SequenceContext context, string id, ICollection<string> branches, SequenceActionResult param)
|
||||
{
|
||||
@ -1297,7 +1300,7 @@ namespace ILSOS_CCW_H52A.Sequences
|
||||
Status.EquipmentMode = eEquipmentMode.MANUAL;
|
||||
|
||||
foreach (var info in ProcessManager.Instance.ReceivedCellInfoQueue.Select((value, index) => (value, index))) {
|
||||
Log.I($"[{info.index}]Queue >> CellId({info.value.CellId.Replace("\0", "").Trim()}) LotId({info.value.LotId.Replace("\0", "").Trim()})");
|
||||
Log.I($"[{info.index}]Queue >> CellId({info.value.CellId}) LotId({info.value.LotId})");
|
||||
}
|
||||
|
||||
// 정지 시점 파이프라인 상태 로그 (재시작 후 복원 여부 사전 확인용)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user