first commit -push
This commit is contained in:
31
RobotNet.MapShares/Dtos/ActionDto.cs
Normal file
31
RobotNet.MapShares/Dtos/ActionDto.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
#nullable disable
|
||||
|
||||
public class ActionDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid MapId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
public class ActionCreateModel : ActionDto { }
|
||||
|
||||
public class ActionModel
|
||||
{
|
||||
public string ActionId { get; set; } = "";
|
||||
public string ActionType { get; set; } = "";
|
||||
public string ActionDescription { get; set; } = "";
|
||||
public string BlockingType { get; set; } = "";
|
||||
public ActionParameter[] ActionParameters { get; set; } = [];
|
||||
}
|
||||
|
||||
public class ActionParameter
|
||||
{
|
||||
public string Key { get; set; } = "";
|
||||
public string Value { get; set; } = "";
|
||||
}
|
||||
86
RobotNet.MapShares/Dtos/EdgeDto.cs
Normal file
86
RobotNet.MapShares/Dtos/EdgeDto.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
using RobotNet.MapShares.Enums;
|
||||
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
public class EdgeDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public Guid StartNodeId { get; set; }
|
||||
public Guid EndNodeId { get; set; }
|
||||
|
||||
public double ControlPoint1X { get; set; }
|
||||
public double ControlPoint1Y { get; set; }
|
||||
public double ControlPoint2X { get; set; }
|
||||
public double ControlPoint2Y { get; set; }
|
||||
public TrajectoryDegree TrajectoryDegree { get; set; }
|
||||
|
||||
public double MaxHeight { get; set; }
|
||||
public double MinHeight { get; set; }
|
||||
public DirectionAllowed DirectionAllowed { get; set; }
|
||||
public bool RotationAllowed { get; set; }
|
||||
public double MaxRotationSpeed { get; set; }
|
||||
public double MaxSpeed { get; set; }
|
||||
public double AllowedDeviationXy { get; set; }
|
||||
public double AllowedDeviationTheta { get; set; }
|
||||
|
||||
public string Actions { get; set; } = "";
|
||||
|
||||
public NodeDto? StartNode { get; set; }
|
||||
public NodeDto? EndNode { get; set; }
|
||||
}
|
||||
|
||||
public class EdgeCreateModel
|
||||
{
|
||||
public Guid MapId { get; set; }
|
||||
public double X1 { get; set; }
|
||||
public double Y1 { get; set; }
|
||||
public double X2 { get; set; }
|
||||
public double Y2 { get; set; }
|
||||
public TrajectoryDegree TrajectoryDegree { get; set; }
|
||||
public double ControlPoint1X { get; set; }
|
||||
public double ControlPoint1Y { get; set; }
|
||||
public double ControlPoint2X { get; set; }
|
||||
public double ControlPoint2Y { get; set; }
|
||||
}
|
||||
|
||||
public class EdgeCreateDto
|
||||
{
|
||||
public IEnumerable<EdgeDto> EdgesDto { get; set; } = [];
|
||||
public IEnumerable<Guid> RemoveEdge { get; set; } = [];
|
||||
}
|
||||
|
||||
public class EdgeUpdateModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public double MaxSpeed { get; set; }
|
||||
public double MaxHeight { get; set; }
|
||||
public double MinHeight { get; set; }
|
||||
public bool RotationAllowed { get; set; }
|
||||
public double MaxRotationSpeed { get; set; }
|
||||
public double ControlPoint1X { get; set; }
|
||||
public double ControlPoint1Y { get; set; }
|
||||
public double ControlPoint2X { get; set; }
|
||||
public double ControlPoint2Y { get; set; }
|
||||
public DirectionAllowed DirectionAllowed { get; set; }
|
||||
public Guid[] Actions { get; set; } = [];
|
||||
public double AllowedDeviationXy { get; set; }
|
||||
public double AllowedDeviationTheta { get; set; }
|
||||
}
|
||||
|
||||
public class EdgeMapCopyModel : EdgeCreateModel
|
||||
{
|
||||
public Guid StartNodeId { get; set; }
|
||||
public Guid EndNodeId { get; set; }
|
||||
public double MaxSpeed { get; set; }
|
||||
public double MaxHeight { get; set; }
|
||||
public double MinHeight { get; set; }
|
||||
public bool RotationAllowed { get; set; }
|
||||
public double MaxRotationSpeed { get; set; }
|
||||
public DirectionAllowed DirectionAllowed { get; set; }
|
||||
public string Actions { get; set; } = "";
|
||||
public double AllowedDeviationXy { get; set; }
|
||||
public double AllowedDeviationTheta { get; set; }
|
||||
}
|
||||
|
||||
public class EdgeCaculatorModel : EdgeCreateModel { }
|
||||
49
RobotNet.MapShares/Dtos/ElementDto.cs
Normal file
49
RobotNet.MapShares/Dtos/ElementDto.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using RobotNet.MapShares.Property;
|
||||
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
#nullable disable
|
||||
|
||||
public class ElementDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public Guid ModelId { get; set; }
|
||||
public string ModelName { get; set; }
|
||||
public Guid NodeId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string NodeName { get; set; }
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
public double Theta { get; set; }
|
||||
public double OffsetX { get; set; }
|
||||
public double OffsetY { get; set; }
|
||||
public bool IsOpen { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
public class ElementCreateModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public Guid ModelId { get; set; }
|
||||
public Guid NodeId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double OffsetX { get; set; }
|
||||
public double OffsetY { get; set; }
|
||||
}
|
||||
|
||||
public class ElementUpdateModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double OffsetX { get; set; }
|
||||
public double OffsetY { get; set; }
|
||||
public bool IsOpen { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
public class ElementPropertyUpdateModel
|
||||
{
|
||||
public ElementProperty[] Properties { get; set; } = [];
|
||||
}
|
||||
31
RobotNet.MapShares/Dtos/ElementModelDto.cs
Normal file
31
RobotNet.MapShares/Dtos/ElementModelDto.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
#nullable disable
|
||||
|
||||
public class ElementModelDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
public int Image1Width { get; set; }
|
||||
public int Image1Height { get; set; }
|
||||
public int Image2Width { get; set; }
|
||||
public int Image2Height { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
public class ElementModelCreateModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
}
|
||||
|
||||
public class ElementModelUpdateModel : ElementModelCreateModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
66
RobotNet.MapShares/Dtos/MapDataExportDto.cs
Normal file
66
RobotNet.MapShares/Dtos/MapDataExportDto.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using RobotNet.MapShares.Enums;
|
||||
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
#nullable disable
|
||||
|
||||
public class MapInfoExportDto
|
||||
{
|
||||
public double OriginX { get; set; }
|
||||
public double OriginY { get; set; }
|
||||
public double Resolution { get; set; }
|
||||
public double ViewX { get; set; }
|
||||
public double ViewY { get; set; }
|
||||
public double ViewWidth { get; set; }
|
||||
public double ViewHeight { get; set; }
|
||||
public string VDA5050 { get; set; }
|
||||
}
|
||||
|
||||
public class ElementModelExportDto : ElementModelDto
|
||||
{
|
||||
public byte[] ImageOpenData { get; set; } = [];
|
||||
public byte[] ImageCloseData { get; set; } = [];
|
||||
}
|
||||
|
||||
public class MapDataExportDto
|
||||
{
|
||||
public long NodeCount { get; set; }
|
||||
public NodeDto[] Nodes { get; set; } = [];
|
||||
public EdgeDto[] Edges { get; set; } = [];
|
||||
public ZoneDto[] Zones { get; set; } = [];
|
||||
public ActionDto[] Actions { get; set; } = [];
|
||||
public ElementModelExportDto[] ElementModels { get; set; } = [];
|
||||
public ElementDto[] Elements { get; set; } = [];
|
||||
public byte[] ImageData { get; set; } = [];
|
||||
}
|
||||
|
||||
public class MapSettingExportDto
|
||||
{
|
||||
public bool NodeNameAutoGenerate { get; set; }
|
||||
public string NodeNameTemplate { get; set; }
|
||||
public double NodeAllowedDeviationXy { get; set; }
|
||||
public double NodeAllowedDeviationTheta { get; set; }
|
||||
|
||||
public double EdgeMinLength { get; set; }
|
||||
public double EdgeStraightMaxSpeed { get; set; }
|
||||
public double EdgeCurveMaxSpeed { get; set; }
|
||||
public double EdgeMaxHeight { get; set; }
|
||||
public double EdgeMinHeight { get; set; }
|
||||
public double EdgeMaxRotationSpeed { get; set; }
|
||||
public DirectionAllowed EdgeDirectionAllowed { get; set; }
|
||||
public bool EdgeRotationAllowed { get; set; }
|
||||
public double EdgeAllowedDeviationXy { get; set; }
|
||||
public double EdgeAllowedDeviationTheta { get; set; }
|
||||
|
||||
public double ZoneMinSquare { get; set; }
|
||||
}
|
||||
|
||||
public class MapExportDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; } = "";
|
||||
public MapInfoExportDto Info { get; set; } = new();
|
||||
public MapDataExportDto Data { get; set; } = new();
|
||||
public MapSettingExportDto Setting { get; set; } = new();
|
||||
}
|
||||
97
RobotNet.MapShares/Dtos/MapDto.cs
Normal file
97
RobotNet.MapShares/Dtos/MapDto.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
using RobotNet.MapShares.Enums;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
#nullable disable
|
||||
|
||||
public class MapInfoDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid VersionId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public double OriginX { get; set; }
|
||||
public double OriginY { get; set; }
|
||||
public double Resolution { get; set; }
|
||||
public double ViewX { get; set; }
|
||||
public double ViewY { get; set; }
|
||||
public double ViewWidth { get; set; }
|
||||
public double ViewHeight { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public string VDA5050 { get; set; }
|
||||
}
|
||||
|
||||
public class MapCreateModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public double OriginX { get; set; }
|
||||
|
||||
[Required]
|
||||
public double OriginY { get; set; }
|
||||
|
||||
[Required]
|
||||
public double Resolution { get; set; }
|
||||
}
|
||||
|
||||
public class MapUpdateModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double OriginX { get; set; }
|
||||
public double OriginY { get; set; }
|
||||
public double Resolution { get; set; }
|
||||
}
|
||||
|
||||
public class MapActiveModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
public class MapDataDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double OriginX { get; set; }
|
||||
public double OriginY { get; set; }
|
||||
public double Resolution { get; set; }
|
||||
public double ImageWidth { get; set; }
|
||||
public double ImageHeight { get; set; }
|
||||
public bool Active { get; set; }
|
||||
|
||||
public NodeDto[] Nodes { get; set; } = [];
|
||||
public EdgeDto[] Edges { get; set; } = [];
|
||||
public ZoneDto[] Zones { get; set; } = [];
|
||||
public ActionDto[] Actions { get; set; } = [];
|
||||
public ElementDto[] Elements { get; set; } = [];
|
||||
}
|
||||
|
||||
public class MapSettingDefaultDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; } = "";
|
||||
public bool Active { get; set; }
|
||||
|
||||
public bool NodeNameAutoGenerate { get; set; }
|
||||
public string NodeNameTemplate { get; set; }
|
||||
public double NodeAllowedDeviationXy { get; set; }
|
||||
public double NodeAllowedDeviationTheta { get; set; }
|
||||
|
||||
public double EdgeMinLength { get; set; }
|
||||
public double EdgeStraightMaxSpeed { get; set; }
|
||||
public double EdgeCurveMaxSpeed { get; set; }
|
||||
public double EdgeMaxHeight { get; set; }
|
||||
public double EdgeMinHeight { get; set; }
|
||||
public double EdgeMaxRotationSpeed { get; set; }
|
||||
public DirectionAllowed EdgeDirectionAllowed { get; set; }
|
||||
public bool EdgeRotationAllowed { get; set; }
|
||||
public double EdgeAllowedDeviationXy { get; set; }
|
||||
public double EdgeAllowedDeviationTheta { get; set; }
|
||||
|
||||
public double ZoneMinSquare { get; set; }
|
||||
}
|
||||
34
RobotNet.MapShares/Dtos/NodeDto.cs
Normal file
34
RobotNet.MapShares/Dtos/NodeDto.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using RobotNet.MapShares.Enums;
|
||||
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
#nullable disable
|
||||
|
||||
public class NodeDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
public double Theta { get; set; }
|
||||
public Direction Direction { get; set; }
|
||||
public double AllowedDeviationXy { get; set; }
|
||||
public double AllowedDeviationTheta { get; set; }
|
||||
public string Actions { get; set; }
|
||||
public override string ToString() => Name;
|
||||
}
|
||||
|
||||
public class NodeCreateModel : NodeDto { }
|
||||
|
||||
public class NodeUpdateModel
|
||||
{
|
||||
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 double AllowedDeviationXy { get; set; }
|
||||
public double AllowedDeviationTheta { get; set; }
|
||||
public Guid[] Actions { get; set; } = [];
|
||||
}
|
||||
22
RobotNet.MapShares/Dtos/ZoneDto.cs
Normal file
22
RobotNet.MapShares/Dtos/ZoneDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using RobotNet.MapShares.Enums;
|
||||
|
||||
namespace RobotNet.MapShares.Dtos;
|
||||
|
||||
public class ZoneDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid MapId { get; set; }
|
||||
public ZoneType Type { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
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; }
|
||||
}
|
||||
|
||||
public class ZoneCreateModel : ZoneDto { }
|
||||
public class ZoneUpdateModel : ZoneDto { }
|
||||
Reference in New Issue
Block a user