Initial commit

This commit is contained in:
2026-07-03 16:31:37 +07:00
commit 899c7c637d
1939 changed files with 641750 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
namespace RobotNet10.FleetManager.Services.RobotManager.Models;
/// <summary>
/// Order status enumeration
/// </summary>
//public enum OrderStatus
//{
// Pending, // Order đã tạo nhưng chưa gửi
// Sent, // Order đã gửi qua MQTT
// Accepted, // Robot đã accept order
// Rejected, // Robot reject order
// Completed, // Order hoàn thành
// Failed // Order failed
//}

View File

@@ -0,0 +1,55 @@
using RobotNet.VDA5050.Connection;
using RobotNet.VDA5050.Factsheet;
using RobotNet.VDA5050.Order;
using RobotNet.VDA5050.State;
using RobotNet.VDA5050.Type;
using RobotNet.VDA5050.Visualization;
namespace RobotNet10.FleetManager.Services.RobotManager.Models;
/// <summary>
/// RobotData chứa tất cả thông tin liên quan đến 1 robot
/// </summary>
public class RobotData
{
/// <summary>
/// Robot ID (SerialNumber)
/// </summary>
public string RobotId { get; set; } = string.Empty;
/// <summary>
/// Latest State message
/// </summary>
public StateMsg? State { get; set; }
/// <summary>
/// Latest Connection state
/// </summary>
public ConnectionState ConnectionState { get; set; }
/// <summary>
/// Latest Order message
/// </summary>
public OrderMsg? Order { get; set; }
/// <summary>
/// Latest Factsheet message
/// </summary>
public FactSheetMsg? Factsheet { get; set; }
/// <summary>
/// Latest Visualization message
/// </summary>
public VisualizationMsg? Visualization { get; set; }
/// <summary>
/// Last updated timestamp
/// </summary>
public DateTime LastUpdated { get; set; }
/// <summary>
/// When order state was cleared by cancel (so new order can be accepted before robot reports empty state).
/// Used to avoid overwriting with stale state from robot; cleared when robot sends empty NodeStates/EdgeStates or after timeout.
/// </summary>
public DateTime? OrderClearedByCancelAt { get; set; }
}