Files
ENIG/Cs_HMI/SubProject/AGVControl/Models/RFIDPoint.cs
backuppc 4a45ae15d6 ..
2025-07-14 16:32:56 +09:00

59 lines
1.9 KiB
C#

using System.Drawing;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace AGVControl.Models
{
public class RFIDPoint
{
public Point Location { get; set; }
public ushort Value { get; set; }
public string NextRFID { get; set; } // 다음 RFID 포인트의 값
public bool IsBidirectional { get; set; } // 양방향 연결 여부
public bool IsRotatable { get; set; } // 회전 가능 여부
public AgvDir? FixedDirection { get; set; } // 고정 방향(없으면 null)
public bool IsTerminal { get; set; } // 종단 여부
public bool NeedTurn { get; set; }
public bool TurnStop { get; set; }
public bool TurnOK { get; set; }
public DateTime TurnStart { get; set; }
public DateTime TurnEnd { get; set; }
[Browsable(false)]
public RectangleF Bounds { get; set; }
public void Clear()
{
this.Location = Point.Empty;
this.Value = 0;
TurnStop = false;
TurnOK = false;
TurnStart = new DateTime(1982, 11, 23);
TurnEnd = new DateTime(1982, 11, 23);
}
public bool IsEmpty
{
get
{
//RFID값이나 위치 값이 없으면 비어있는 것으로 한다.
if (this.Location.IsEmpty) return true;
if ((this.Value < 1)) return true;
return false;
}
}
public RFIDPoint()
{
IsRotatable = false; // 기본값은 회전 불가능
IsBidirectional = true; // 기본값은 양방향
FixedDirection = null;
IsTerminal = false; // 기본값은 종단 아님
Clear();
}
public override string ToString()
{
return $"[RFIDPoint] {Value},P:{Location.X},{Location.Y}";
}
}
}