..
This commit is contained in:
33
Cs_HMI/SubProject/AGVControl/Models/RFIDConnection.cs
Normal file
33
Cs_HMI/SubProject/AGVControl/Models/RFIDConnection.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using AGVControl.Models;
|
||||
|
||||
namespace AGVControl
|
||||
{
|
||||
public class RFIDConnection
|
||||
{
|
||||
public RFIDPoint P1 { get; set; }
|
||||
public RFIDPoint P2 { get; set; }
|
||||
public bool DisableP1_to_P2 { get; set; }
|
||||
public bool DisableP2_to_P1 { get; set; }
|
||||
public float Distance { get; set; }
|
||||
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is RFIDConnection other)
|
||||
{
|
||||
return (P1 == other.P1 && P2 == other.P2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return P1.GetHashCode() ^ P2.GetHashCode();
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
//연결정보를 확인
|
||||
return $"{P1.Value} ↔ {P2.Value},P1-2:{(DisableP1_to_P2 ? "X" : "O")},P2-1:{(DisableP2_to_P1 ? "X" : "O")}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user