Initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.FleetManager.Shared.DTOs.Robot;
|
||||
|
||||
/// <summary>
|
||||
/// Request to create a new robot
|
||||
/// </summary>
|
||||
public class CreateRobotRequest
|
||||
{
|
||||
[Required(ErrorMessage = "RobotId is required")]
|
||||
[StringLength(64, ErrorMessage = "RobotId must not exceed 64 characters")]
|
||||
public string RobotId { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Name is required")]
|
||||
[StringLength(256, ErrorMessage = "Name must not exceed 256 characters")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "ModelId is required")]
|
||||
public Guid ModelId { get; set; }
|
||||
|
||||
public Guid? MapId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
namespace RobotNet10.FleetManager.Shared.DTOs.Robot;
|
||||
|
||||
/// <summary>
|
||||
/// Robot data transfer object
|
||||
/// </summary>
|
||||
public class RobotDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string RobotId { get; set; } = string.Empty;
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public Guid ModelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Robot model name (from navigation property)
|
||||
/// </summary>
|
||||
public string? ModelName { get; set; }
|
||||
|
||||
public Guid? MapId { get; set; }
|
||||
|
||||
public string? MapName { get; set; }
|
||||
|
||||
public DateTime CreatedDate { get; set; }
|
||||
|
||||
public DateTime? UpdatedDate { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using RobotNet.VDA5050.State;
|
||||
using RobotNet.VDA5050.Visualization;
|
||||
|
||||
namespace RobotNet10.FleetManager.Shared.DTOs.Robot;
|
||||
|
||||
public class RobotMonitorBoardcastData
|
||||
{
|
||||
public string RobotId { get; set; } = string.Empty;
|
||||
public Load[] Loads { get; set; } = [];
|
||||
public BatteryState Battery { get; set; } = new();
|
||||
public Error[] Errors { get; set; } = [];
|
||||
public Information[] Infomations { get; set; } = [];
|
||||
public AgvPosition AgvPosition { get; set; } = new();
|
||||
public Velocity AgvVelocity { get; set; } = new();
|
||||
public NavigationPath Path { get; set; } = new();
|
||||
public DateTime LastUpdateTime { get; set; }
|
||||
}
|
||||
|
||||
public class NavigationPath
|
||||
{
|
||||
public string NavigationState { get; set; } = string.Empty;
|
||||
public NavigationPathEdge[] RobotPath { get; set; } = [];
|
||||
public NavigationPathEdge[] RobotBasePath { get; set; } = [];
|
||||
}
|
||||
|
||||
public class NavigationPathEdge()
|
||||
{
|
||||
public double StartX { get; set; }
|
||||
public double StartY { get; set; }
|
||||
public double EndX { get; set; }
|
||||
public double EndY { get; set; }
|
||||
public double ControlPoint1X { get; set; }
|
||||
public double ControlPoint1Y { get; set; }
|
||||
public double ControlPoint2X { get; set; }
|
||||
public double ControlPoint2Y { get; set; }
|
||||
public int Degree { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet10.FleetManager.Shared.DTOs.Robot;
|
||||
|
||||
/// <summary>
|
||||
/// Request to update an existing robot
|
||||
/// </summary>
|
||||
public class UpdateRobotRequest
|
||||
{
|
||||
[StringLength(64, ErrorMessage = "RobotId must not exceed 64 characters")]
|
||||
public string? RobotId { get; set; }
|
||||
|
||||
[StringLength(256, ErrorMessage = "Name must not exceed 256 characters")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
public Guid? ModelId { get; set; }
|
||||
|
||||
public Guid? MapId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user