This commit is contained in:
Đăng Nguyễn
2025-09-26 08:48:50 +07:00
parent 0d97684f70
commit d6fe1d9d52
53 changed files with 1232 additions and 111 deletions

View File

@@ -2,8 +2,6 @@
namespace RobotApp.VDA5050.State;
#nullable disable
public enum ActionStatus
{
WAITING,
@@ -15,11 +13,11 @@ public enum ActionStatus
}
public class ActionState
{
public string ActionType { get; set; }
public string ActionType { get; set; } = string.Empty;
[Required]
public string ActionId { get; set; }
public string ActionDescription { get; set; }
public string ActionId { get; set; } = string.Empty;
public string ActionDescription { get; set; } = string.Empty;
[Required]
public string ActionStatus { get; set; }
public string ResultDescription { get; set; }
public string ActionStatus { get; set; } = string.Empty;
public string ResultDescription { get; set; } = string.Empty;
}

View File

@@ -3,17 +3,15 @@ using System.ComponentModel.DataAnnotations;
namespace RobotApp.VDA5050.State;
#nullable disable
public class EdgeState
{
[Required]
public string EdgeId { get; set; }
public string EdgeId { get; set; } = string.Empty;
[Required]
public int SequenceId { get; set; }
public string EdgeDescription { get; set; }
public string EdgeDescription { get; set; } = string.Empty;
[Required]
public bool Released { get; set; }
public Trajectory Trajectory { get; set; }
public Trajectory Trajectory { get; set; } = new();
}

View File

@@ -2,28 +2,33 @@
namespace RobotApp.VDA5050.State;
#nullable disable
public enum ErrorLevel
{
NONE,
WARNING,
FATAL
}
public class ErrorReferences
{
[Required]
public string ReferenceKey { get; set; }
public string ReferenceKey { get; set; } = string.Empty;
[Required]
public string ReferenceValue { get; set; }
public string ReferenceValue { get; set; } = string.Empty;
}
public enum ErrorType
{
INITIALIZE_ORDER,
}
public class Error
{
[Required]
public string ErrorType { get; set; }
public ErrorReferences[] ErrorReferences { get; set; }
public string ErrorDescription { get; set; }
public string ErrorHint { get; set; }
public string ErrorType { get; set; } = string.Empty;
public ErrorReferences[] ErrorReferences { get; set; } = [];
public string ErrorDescription { get; set; } = string.Empty;
public string ErrorHint { get; set; } = string.Empty;
[Required]
public string ErrorLevel { get; set; }
public string ErrorLevel { get; set; } = string.Empty;
}

View File

@@ -2,7 +2,6 @@
namespace RobotApp.VDA5050.State;
#nullable disable
public enum InfoLevel
{
@@ -12,16 +11,16 @@ public enum InfoLevel
public class InfomationReferences
{
[Required]
public string ReferenceKey { get; set; }
public string ReferenceKey { get; set; } = string.Empty;
[Required]
public string ReferenceValue { get; set; }
public string ReferenceValue { get; set; } = string.Empty;
}
public class Information
{
[Required]
public string InfoType { get; set; }
public InfomationReferences[] InfoReferences { get; set; }
public string InfoDescription { get; set; }
public string InfoType { get; set; } = string.Empty;
public InfomationReferences[] InfoReferences { get; set; } = [];
public string InfoDescription { get; set; } = string.Empty;
[Required]
public string InfoLevel { get; set; }
public string InfoLevel { get; set; } = string.Empty;
}

View File

@@ -2,15 +2,13 @@
namespace RobotApp.VDA5050.State;
#nullable disable
public class Load
{
public string LoadId { get; set; }
public string LoadType { get; set; }
public string LoadPosition { get; set; }
public BoundingBoxReference BoundingBoxReference { get; set; }
public LoadDimensions LoadDimensions { get; set; }
public double Weight { get; set; }
public string LoadId { get; set; } = string.Empty;
public string LoadType { get; set; } = string.Empty;
public string LoadPosition { get; set; } = string.Empty;
public BoundingBoxReference BoundingBoxReference { get; set; } = new();
public LoadDimensions LoadDimensions { get; set; } = new();
public double Weight { get; set; }
}

View File

@@ -1,20 +1,18 @@
using RobotApp.VDA5050.Order;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations;
namespace RobotApp.VDA5050.State;
#nullable disable
public class NodeState
{
[Required]
public string NodeId { get; set; }
public string NodeId { get; set; } = string.Empty;
[Required]
public int SequenceId { get; set; }
public string NodeDescription { get; set; }
public string NodeDescription { get; set; } = string.Empty;
[Required]
public bool Released { get; set; }
public NodePosition NodePosition { get; set; }
public NodePosition NodePosition { get; set; } = new();
}
public class NodePosition
@@ -25,6 +23,6 @@ public class NodePosition
public double Y { get; set; }
public double Theta { get; set; }
[Required]
public string MapId { get; set; } = "";
public string MapId { get; set; } = string.Empty;
}

View File

@@ -3,8 +3,6 @@ using System.ComponentModel.DataAnnotations;
namespace RobotApp.VDA5050.State;
#nullable disable
public enum OperatingMode
{
AUTOMATIC,
@@ -17,22 +15,21 @@ public class StateMsg
{
[Required]
public uint HeaderId { get; set; }
public string Timestamp { get; set; } = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
[Required]
public string Timestamp { get; set; }
public string Version { get; set; } = "1.0.0";
[Required]
public string Version { get; set; }
public string Manufacturer { get; set; } = "PhenikaaX";
[Required]
public string Manufacturer { get; set; }
[Required]
public string SerialNumber { get; set; }
public string SerialNumber { get; set; } = string.Empty;
public Map[] Maps { get; set; } = [];
[Required]
public string OrderId { get; set; }
public string OrderId { get; set; } = string.Empty;
[Required]
public int OrderUpdateId { get; set; }
public string ZoneSetId { get; set; }
public string ZoneSetId { get; set; } = string.Empty;
[Required]
public string LastNodeId { get; set; }
public string LastNodeId { get; set; } = string.Empty;
[Required]
public int LastNodeSequenceId { get; set; }
[Required]
@@ -41,7 +38,7 @@ public class StateMsg
public bool NewBaseRequest { get; set; }
public double DistanceSinceLastNode { get; set; }
[Required]
public string OperatingMode { get; set; }
public string OperatingMode { get; set; } = string.Empty;
[Required]
public NodeState[] NodeStates { get; set; } = [];
[Required]

View File

@@ -2,8 +2,6 @@
namespace RobotApp.VDA5050.Visualization;
#nullable disable
public class AgvPosition
{
[Required]
@@ -11,7 +9,7 @@ public class AgvPosition
[Required]
public double Y { get; set; }
[Required]
public string MapId { get; set; }
public string MapId { get; set; } = string.Empty;
[Required]
public double Theta { get; set; }
[Required]

View File

@@ -1,16 +1,16 @@
namespace RobotApp.VDA5050.Visualization;
using System.ComponentModel.DataAnnotations;
#nullable disable
namespace RobotApp.VDA5050.Visualization;
public class VisualizationMsg
{
public uint HeaderId { get; set; }
public string Timestamp { get; set; }
public string Version { get; set; }
public string Manufacturer { get; set; }
public string SerialNumber { get; set; }
public string MapId { get; set; }
public string MapDescription { get; set; }
public string Timestamp { get; set; } = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
public string Version { get; set; } = "1.0.0";
public string Manufacturer { get; set; } = "PhenikaaX";
public string SerialNumber { get; set; } = string.Empty;
public string MapId { get; set; } = string.Empty;
public string MapDescription { get; set; } = string.Empty;
public AgvPosition AgvPosition { get; set; } = new();
public Velocity Velocity { get; set; } = new();
}