77 lines
2.5 KiB
C#
77 lines
2.5 KiB
C#
using RobotNet10.FleetManager.Services.TrafficControl.ACS;
|
|
|
|
namespace RobotNet10.FleetManager.Services.TrafficControl.Models;
|
|
|
|
/// <summary>
|
|
/// State information for an order managed by ACS Order Control
|
|
/// </summary>
|
|
public class OrderACSState
|
|
{
|
|
/// <summary>
|
|
/// Robot ID
|
|
/// </summary>
|
|
public string RobotId { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Order status
|
|
/// </summary>
|
|
public OrderStatus Status { get; set; } = OrderStatus.IsProccessing;
|
|
|
|
/// <summary>
|
|
/// Full route (Base + Horizon)
|
|
/// </summary>
|
|
public RobotRoute Route { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Set of zone IDs that have been successfully requested (RequestIn completed)
|
|
/// </summary>
|
|
public HashSet<string> ZoneRequestInCompleted { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Set of zone IDs that have been successfully requested (RequestOut completed)
|
|
/// </summary>
|
|
public HashSet<string> ZoneRequestOutCompleted { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Set of region IDs needs to be successfully requested. (IN)
|
|
/// </summary>
|
|
public HashSet<string> ZoneRequestInCompleting { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Set of region IDs needs to be successfully requested. (OUT)
|
|
/// </summary>
|
|
public HashSet<string> ZoneRequestOutCompleting { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Error message if status is IsError
|
|
/// </summary>
|
|
public string? Error { get; set; }
|
|
|
|
/// <summary>
|
|
/// List of nodes that are mapped to ACS zones for RequestIn (in order of appearance in route)
|
|
/// Each entry contains: (NodeIdString, ZoneId)
|
|
/// </summary>
|
|
public List<(string NodeIdString, string ZoneId)> InMappedNodes { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// List of nodes that are mapped to ACS zones for RequestOut (in order of appearance in route)
|
|
/// Each entry contains: (NodeIdString, ZoneId)
|
|
/// </summary>
|
|
public List<(string NodeIdString, string ZoneId)> OutMappedNodes { get; set; } = [];
|
|
|
|
/// <summary>
|
|
/// Index of the current IN mapped node being processed
|
|
/// </summary>
|
|
public int CurrentInMappedNodeIndex { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Timestamp when order was created
|
|
/// </summary>
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>
|
|
/// Last update timestamp
|
|
/// </summary>
|
|
public DateTime LastUpdated { get; set; } = DateTime.UtcNow;
|
|
}
|