This commit is contained in:
backuppc
2025-12-15 17:34:43 +09:00
parent 9db88e5d6b
commit a7f938ff19
29 changed files with 535 additions and 1556 deletions

View File

@@ -83,7 +83,7 @@ namespace AGVNavigationCore.Models
[Category("RFID 정보")]
[Description("물리적 RFID 태그 ID입니다.")]
public string RfidId { get; set; } = string.Empty;
public UInt16 RfidId { get; set; } = 0;
[Category("노드 텍스트"), DisplayName("TextColor")]
@@ -161,7 +161,7 @@ namespace AGVNavigationCore.Models
public bool HasRfid()
{
return !string.IsNullOrEmpty(RfidId);
return RfidId > 0;
}
}
}

View File

@@ -611,18 +611,7 @@ namespace AGVNavigationCore.Models
PositionChanged?.Invoke(this, (_currentPosition, _currentDirection, _currentNode));
}
/// <summary>
/// 현재 RFID 시뮬레이션 (현재 위치 기준)
/// </summary>
public string SimulateRfidReading(List<MapNode> mapNodes)
{
var closestNode = FindClosestNode(_currentPosition, mapNodes);
if (closestNode == null)
return null;
return closestNode.HasRfid() ? closestNode.RfidId : null;
}
#endregion
@@ -630,10 +619,11 @@ namespace AGVNavigationCore.Models
/// <summary>
/// 노드 ID를 RFID 값으로 변환 (NodeResolver 사용)
/// </summary>
public string GetRfidByNodeId(List<MapNode> _mapNodes, string nodeId)
public ushort GetRfidByNodeId(List<MapNode> _mapNodes, string nodeId)
{
var node = _mapNodes?.FirstOrDefault(n => n.Id == nodeId);
return node?.HasRfid() == true ? node.RfidId : nodeId;
if ((node?.HasRfid() ?? false) == false) return 0;
return node.RfidId;
}