This commit is contained in:
chi
2025-06-17 17:34:26 +09:00
parent 4aee057726
commit 461a083a06
15 changed files with 614 additions and 165 deletions

View File

@@ -8,11 +8,22 @@ namespace AGVControl.Models
{
public Point CurrentPosition { get; set; }
public uint CurrentRFID { get; set; }
public float BatteryLevel { get; set; } = 0f;
/// <summary>
/// AGV에서 방향값이 수산됩니다.
/// </summary>
public Direction CurrentDirection { get; set; }
/// <summary>
/// 현재위치가 수산되면 목적지까지의 방향값이 계산됩니다.
/// </summary>
public Direction TargetDirection { get; set; }
public bool IsMoving { get; set; }
public List<Point> CurrentPath { get; set; }
public List<Point> PlannedPath { get; set; }
public List<string> PathRFIDs { get; set; }
public Point TargetPosition { get; set; }
public uint TargetRFID { get; set; }
public AGV()
{
@@ -20,6 +31,9 @@ namespace AGVControl.Models
PlannedPath = new List<Point>();
PathRFIDs = new List<string>();
CurrentDirection = Direction.Forward;
TargetPosition = Point.Empty;
TargetRFID = 0;
TargetDirection = Direction.Forward;
}
public void Move()
@@ -31,16 +45,6 @@ namespace AGVControl.Models
}
}
public void SetNewPath(List<Point> path)
{
CurrentPath = new List<Point>(path);
}
public void ClearPlannedPath()
{
PlannedPath.Clear();
PathRFIDs.Clear();
}
}
public enum Direction

View File

@@ -1,6 +1,6 @@
using System.Drawing;
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace AGVControl.Models
{
public class RFIDPoint
@@ -9,6 +9,15 @@ namespace AGVControl.Models
public uint RFIDValue { get; set; }
public string NextRFID { get; set; } // 다음 RFID 포인트의 값
public bool IsBidirectional { get; set; } // 양방향 연결 여부
public bool IsRotatable { get; set; } // 회전 가능 여부
public Direction? FixedDirection { get; set; } // 고정 방향(없으면 null)
public RectangleF Bounds { get; set; }
public RFIDPoint()
{
IsRotatable = false; // 기본값은 회전 불가능
IsBidirectional = true; // 기본값은 양방향
FixedDirection = null;
}
}
}