RobotApp/RobotApp.VDA5050/State/StateMsg.cs
Đăng Nguyễn d6fe1d9d52 update
2025-09-26 08:48:50 +07:00

59 lines
1.8 KiB
C#

using RobotApp.VDA5050.Visualization;
using System.ComponentModel.DataAnnotations;
namespace RobotApp.VDA5050.State;
public enum OperatingMode
{
AUTOMATIC,
SEMIAUTOMATIC,
MANUAL,
SERVICE,
TEACHIN,
}
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 Version { get; set; } = "1.0.0";
[Required]
public string Manufacturer { get; set; } = "PhenikaaX";
[Required]
public string SerialNumber { get; set; } = string.Empty;
public Map[] Maps { get; set; } = [];
[Required]
public string OrderId { get; set; } = string.Empty;
[Required]
public int OrderUpdateId { get; set; }
public string ZoneSetId { get; set; } = string.Empty;
[Required]
public string LastNodeId { get; set; } = string.Empty;
[Required]
public int LastNodeSequenceId { get; set; }
[Required]
public bool Driving { get; set; }
public bool Paused { get; set; }
public bool NewBaseRequest { get; set; }
public double DistanceSinceLastNode { get; set; }
[Required]
public string OperatingMode { get; set; } = string.Empty;
[Required]
public NodeState[] NodeStates { get; set; } = [];
[Required]
public EdgeState[] EdgeStates { get; set; } = [];
public AgvPosition AgvPosition { get; set; } = new();
public Velocity Velocity { get; set; } = new();
public Load[] Loads { get; set; } = [];
[Required]
public ActionState[] ActionStates { get; set; } = [];
[Required]
public BatteryState BatteryState { get; set; } = new();
[Required]
public Error[] Errors { get; set; } = [];
public Information[] Information { get; set; } = [];
[Required]
public SafetyState SafetyState { get; set; } = new();
}