first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
using RobotNet.RobotShares.VDA5050.State;
namespace RobotNet.RobotShares.Dtos;
public class RobotActionDto
{
public string ActionId { get; set; } = "";
public ActionState? Action { get; set; }
public bool IsError { get; set; }
public bool IsCompleted { get; set; }
public bool IsProcessing { get; set; }
public string[] Errors { get; set; } = [];
}

View File

@@ -0,0 +1,37 @@
using RobotNet.RobotShares.Enums;
namespace RobotNet.RobotShares.Dtos;
#nullable disable
public class RobotDto
{
public Guid Id { get; set; }
public string RobotId { get; set; }
public string Name { get; set; }
public Guid ModelId { get; set; }
public string ModelName { get; set; }
public Guid MapId { get; set; }
public string MapName { get; set; }
public NavigationType NavigationType { get; set; }
public bool Online { get; set; }
public string State { get; set; }
public double Battery { get; set; }
}
public class RobotCreateModel
{
public string RobotId { get; set; }
public string Name { get; set; }
public Guid ModelId { get; set; }
}
public class RobotUpdateModel
{
public Guid Id { get; set; }
public string RobotId { get; set; }
public string Name { get; set; }
public Guid ModelId { get; set; }
public Guid MapId { get; set; }
}

View File

@@ -0,0 +1,44 @@
using RobotNet.RobotShares.VDA5050.Order;
using RobotNet.RobotShares.VDA5050.State;
using RobotNet.RobotShares.VDA5050.Visualization;
namespace RobotNet.RobotShares.Dtos;
#nullable disable
public class RobotInfomationDto
{
public string RobotId { get; set; }
public string Name { get; set; }
public Guid MapId { get; set; }
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 Navigation Navigation { get; set; } = new();
}
public class Navigation
{
public string NavigationState { get; set; } = string.Empty;
public NavigationPathEdge[] RobotPath { get; set; } = [];
public NavigationPathEdge[] RobotBasePath { get; set; } = [];
public List<NavigationPathNode> LaserScaner { get; set; } = [];
}
public record NavigationPathNode(double X, double Y);
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; }
}

View File

@@ -0,0 +1,37 @@
using RobotNet.RobotShares.Enums;
namespace RobotNet.RobotShares.Dtos;
#nullable disable
public class RobotModelDto
{
public Guid Id { get; set; }
public string ModelName { get; set; }
public double OriginX { get; set; }
public double OriginY { get; set; }
public double ImageWidth { get; set; }
public double ImageHeight { get; set; }
public double Width { get; set; }
public double Length { get; set; }
public NavigationType NavigationType { get; set; }
}
public class RobotModelCreateModel
{
public string ModelName { get; set; }
public double OriginX { get; set; }
public double OriginY { get; set; }
public double Width { get; set; }
public double Length { get; set; }
public NavigationType NavigationType { get; set; }
}
public class RobotModelUpdateModel
{
public Guid Id { get; set; }
public string ModelName { get; set; }
public double OriginX { get; set; }
public double OriginY { get; set; }
public double Width { get; set; }
public double Length { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.Dtos;
#nullable disable
public class RobotOnlineStateDto
{
public string RobotId { get; set; }
public string State { get; set; }
public bool IsOnline { get; set; }
public double Battery { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.Dtos;
public class RobotOrderDto
{
public string OrderId { get; set; } = "";
public bool IsError { get; set; }
public bool IsCompleted { get; set; }
public bool IsProcessing { get; set; }
public bool IsCanceled { get; set; }
public string[] Errors { get; set; } = [];
}

View File

@@ -0,0 +1,18 @@
using RobotNet.RobotShares.VDA5050.State;
using RobotNet.RobotShares.VDA5050.Visualization;
namespace RobotNet.RobotShares.Dtos;
#nullable disable
public class RobotVDA5050StateDto
{
public string RobotId { get; set; }
public string Name { get; set; }
public Guid MapId { get; set; }
public bool Online { get; set; }
public bool IsWorking { get; set; }
public StateMsg State { get; set; } = new();
public RobotOrderDto OrderState { get; set; } = new();
public VisualizationMsg Visualization { get; set; } = new();
}

View File

@@ -0,0 +1,17 @@
using RobotNet.RobotShares.Enums;
namespace RobotNet.RobotShares.Dtos;
public class TrafficAgentDto
{
public string RobotId { get; set; } = "";
public TrafficSolutionState State { get; set; }
public TrafficNodeDto? InNode { get; set; }
public List<TrafficNodeDto> Nodes { get; set; } = [];
public TrafficNodeDto? ReleaseNode { get; set; }
public List<TrafficNodeDto> LockedNodes { get; set; } = [];
public List<TrafficNodeDto> SubNodes { get; set; } = [];
public List<TrafficNodeDto> GiveWayNodes { get; set; } = [];
public TrafficNodeDto? ConflictNode { get; set; }
public string ConflictAgentId { get; set; } = "";
}

View File

@@ -0,0 +1,22 @@
namespace RobotNet.RobotShares.Dtos;
public enum TrafficLockedShapeType
{
None,
Circle,
Rectangle,
Polygon
}
public class TrafficLockedShapeDto
{
public TrafficLockedShapeType Type { get; set; }
public double Radius { get; set; }
public double X1 { get; set; }
public double Y1 { get; set; }
public double X2 { get; set; }
public double Y2 { get; set; }
public double X3 { get; set; }
public double Y3 { get; set; }
public double X4 { get; set; }
public double Y4 { get; set; }
}

View File

@@ -0,0 +1,13 @@
namespace RobotNet.RobotShares.Dtos;
public class TrafficMapDto
{
public Guid MapId { get; set; }
public string MapName { get; set; } = "";
public List<TrafficAgentDto> Agents { get; set; } = [];
public override string ToString()
{
return MapName;
}
}

View File

@@ -0,0 +1,27 @@
using RobotNet.RobotShares.Enums;
namespace RobotNet.RobotShares.Dtos;
public class TrafficNodeDto
{
public Guid Id { get; set; }
public string Name { get; set; } = "";
public double X { get; set; }
public double Y { get; set; }
public double Theta { get; set; }
public bool IsAvoidableNode { get; set; }
public RobotDirection Direction { get; set; }
public TrafficNodeDto[][] AvoidablePaths { get; set; } = [];
public TrafficLockedShapeDto LockedShapes { get; set; } = new();
public override bool Equals(object? obj)
{
if (obj is TrafficNodeDto other)
return Id == other.Id;
return false;
}
public override int GetHashCode()
{
return HashCode.Combine(Id);
}
}