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);
}
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.Enums;
public enum MonitorToolbarButtonType
{
Fit,
Focus,
ZoomIn,
ZoomOut
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.Enums;
public enum MonitorToolbarCheckedType
{
FocusRobot,
ShowPath,
ShowName,
ShowGrid,
ShowLaser,
ShowElement,
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.Enums;
public enum NavigationType
{
Differential,
Forklift,
OmniDrive,
GridDifferential
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.Enums;
public enum RefreshPathState
{
Created,
Refreshing,
Compeleted,
Error,
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.Enums;
public enum RobotDirection
{
FORWARD,
BACKWARD,
NONE
}

View File

@@ -0,0 +1,49 @@
namespace RobotNet.RobotShares.Enums;
public enum TrafficConflictState
{
/// <summary>
/// Xảy ra khi hai robot sử dụng cùng một cạnh (edge) trong biểu đồ đường đi (graph) trong khoảng thời gian trùng lặp, đồng thời lộ trình tiếp theo của robot chồng lên nhau.
/// </summary>
Confrontation,
/// <summary>
/// Xảy ra khi hai robot sử dụng cùng một cạnh (edge) trong biểu đồ đường đi (graph) trong khoảng thời gian trùng lặp nhưng lộ trình tiếp theo của 2 robot không chồng lấn lên nhau.
/// </summary>
Edge,
/// <summary>
/// Xảy ra khi hai robot chiếm cùng một nút (vertex/node) trong biểu đồ đường đi tại cùng một thời điểm hoặc trong khoảng thời gian trùng lặp.
/// </summary>
Vertex,
/// <summary>
/// Xảy ra khi hai robot ở quá gần nhau (dựa trên khoảng cách Euclidean) trong không gian liên tục, vi phạm khoảng cách an toàn (minDistance).
/// </summary>
Proximity,
/// <summary>
/// Xảy ra khi hai robot di chuyển qua một hành lang hẹp (thường được biểu diễn bằng một chuỗi cạnh hoặc node) theo hướng ngược nhau, dẫn đến tình trạng không thể vượt qua nhau.
/// </summary>
Corridor,
/// <summary>
/// Xảy ra khi hai robot có lộ trình giao nhau về mặt thời gian, nhưng không nhất thiết ở cùng một cạnh hoặc nút, mà ở các vị trí khiến chúng không thể di chuyển tiếp mà không va chạm.
/// </summary>
Temporal,
/// <summary>
/// Xảy ra khi hai robot cần xoay tại một điểm (thường là node) và không gian xoay bị chồng lấn, dẫn đến va chạm hoặc cản trở.
/// </summary>
Rotation,
/// <summary>
/// Xảy ra khi các robot cạnh tranh cho một tài nguyên chung (ví dụ: một khu vực làm việc, điểm sạc, hoặc thiết bị nâng)
/// </summary>
Resource,
/// <summary>
/// Xảy ra lỗi khi kiểm tra xung đột
/// </summary>
None
}

View File

@@ -0,0 +1,12 @@
namespace RobotNet.RobotShares.Enums;
public enum TrafficSolutionState
{
None,
Complete,
Waitting,
GiveWay,
RefreshPath,
LoopResolve,
UnableResolve
}

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.Models;
public class RobotInstantActionModel
{
public string RobotId { get; set; } = string.Empty;
public RobotShares.VDA5050.InstantAction.Action Action { get; set; } = new();
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.Models;
public class RobotMoveStraightModel
{
public string RobotId { get; set; } = string.Empty;
public double X { get; set; }
public double Y { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.Models;
public class RobotMoveToNodeModel
{
public string RobotId { get; set; } = string.Empty;
public string NodeName { get; set; } = string.Empty;
public double LastAngle { get; set; }
public bool OverrideLastAngle { get; set; }
public IDictionary<string, IEnumerable<RobotShares.VDA5050.InstantAction.Action>>? Actions { get; set; }
}

View File

@@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.Models;
public class RobotRotateModel
{
public string RobotId { get; set; } = string.Empty;
[Range(-180, 180)]
public double Angle { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.Models;
public class RobotSearchExpressionModel
{
public string MapName { get; set; } = string.Empty;
public string ModelName { get; set; } = string.Empty;
public string Expression { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,25 @@
using RobotNet.RobotShares.Dtos;
using RobotNet.RobotShares.VDA5050.State;
using RobotNet.RobotShares.VDA5050.Visualization;
namespace RobotNet.RobotShares.Models;
public class RobotStateModel
{
public string RobotId { get; set; } = string.Empty;
public Guid MapId { get; set; }
public bool IsOnline { get; set; }
public string State { get; set; } = string.Empty;
public bool NewBaseRequest { get; set; }
public RobotOrderDto OrderState { get; set; } = new();
public RobotActionDto[] ActionStates { get; set; } = [];
public NodeState[] NodeStates { get; set; } = [];
public EdgeState[] EdgeStates { get; set; } = [];
public AgvPosition AgvPosition { get; set; } = new();
public Velocity Velocity { get; set; } = new();
public Load[] Loads { get; set; } = [];
public BatteryState BatteryState { get; set; } = new();
public Error[] Errors { get; set; } = [];
public Information[] Information { get; set; } = [];
public SafetyState SafetyState { get; set; } = new();
}

View File

@@ -0,0 +1,10 @@
using RobotNet.RobotShares.Dtos;
namespace RobotNet.RobotShares.Models;
public class UpdateAgentLockerModel
{
public Guid MapId { get; set; }
public string AgentId { get; set; } = "";
public List<TrafficNodeDto> LockedNodes { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
namespace RobotNet.RobotShares.OpenACS;
public class OpenACSPublishSettingDto
{
public string PublishUrl { get; set; } = "";
public string[] PublishUrlsUsed { get; set; } = [];
public bool IsPublishEnabled { get; set; }
public int PublishInterval { get; set; }
public OpenACSPublishSettingDto() { }
public OpenACSPublishSettingDto(bool enable, string url, string[] urlsUsed, int interval)
{
IsPublishEnabled = enable;
PublishUrl = url;
PublishUrlsUsed = urlsUsed;
PublishInterval = interval;
}
}
public record class OpenACSPublishSettingModel(string Url, int Interval);

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.OpenACS;
public class OpenACSSettingsDto
{
public OpenACSTrafficSettingDto TrafficSetting { get; set; } = new(false, "", []);
public OpenACSPublishSettingDto PublishSetting { get; set; } = new(false, "", [], 2000);
}

View File

@@ -0,0 +1,17 @@
namespace RobotNet.RobotShares.OpenACS;
public class OpenACSTrafficSettingDto
{
public string TrafficUrl { get; set; } = "";
public string[] PublishUrlsUsed { get; set; } = [];
public bool IsTrafficEnabled { get; set; }
public OpenACSTrafficSettingDto() { }
public OpenACSTrafficSettingDto(bool enable, string url, string[] urlsUsed)
{
IsTrafficEnabled = enable;
TrafficUrl = url;
PublishUrlsUsed = urlsUsed;
}
}
public record class OpenACSTrafficSettingModel(string Url);

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.OpenACS;
public class RobotACSLockedDto
{
public string RobotId { get; set; } = "";
public string[] ZoneIds { get; set; } = [];
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.OpenACS;
public class TrafficACSRequestModel
{
public string RobotId { get; set; } = "";
public string ZoneId { get; set; } = "";
public TrafficRequestType Type { get; set; } = TrafficRequestType.OUT;
}

View File

@@ -0,0 +1,20 @@
namespace RobotNet.RobotShares.OpenACS;
public enum TrafficRequestType
{
IN,
OUT,
}
public static class EnumExtensions
{
public static string ToInOutString(this TrafficRequestType type)
{
return type switch
{
TrafficRequestType.IN => "in",
TrafficRequestType.OUT => "out",
_ => type.ToString()
};
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\RobotNet.Shares\RobotNet.Shares.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,28 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Connection;
#nullable disable
public enum ConnectionState
{
ONLINE,
OFFLINE,
CONNECTIONBROKEN
}
public class ConnectionMsg
{
[Required]
public uint HeaderId { get; set; }
[Required]
public string Timestamp { get; set; } = "";
[Required]
public string Version { get; set; } = "";
[Required]
public string Manufacturer { get; set; } = "";
[Required]
public string SerialNumber { get; set; } = "";
[Required]
public string ConnectionState { get; set; } = "";
}

View File

@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum ValueDataType
{
BOOL,
NUMBER,
INTEGER,
FLOAT,
STRING,
OBJECT,
ARRAY,
}
public class ActionParameters
{
[Required]
public string Key { get; set; }
[Required]
public string ValueDataType { get; set; }
public string Description { get; set; }
public bool IsOptional { get; set; }
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum ActionScopes
{
INSTANT,
NODE,
EDGE,
}
public class AgvActions
{
[Required]
public string ActionType { get; set; }
public string ActionDescription { get; set; }
[Required]
public string[] ActionScopes { get; set; }
public ActionParameters[] ActionParameters { get; set; }
public string ResultDescription { get; set; }
public string[] BlockingTypes { get; set; }
}

View File

@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class AgvGeometry
{
public WheelDefinitions[] WheelDefinitions { get; set; }
public Envelopes2d[] Envelopes2d { get; set; }
public Envelopes3d[] Envelopes3d { get; set; }
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class BoundingBoxReference
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
[Required]
public double Z { get; set; }
public double Theta { get; set; }
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class PolygonPoints
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
}
public class Envelopes2d
{
[Required]
public string Set { get; set; }
[Required]
public PolygonPoints[] PolygonPoints { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class Envelopes3d
{
[Required]
public string Set { get; set; }
[Required]
public string Format { get; set; }
public object Data { get; set; }
public string Url { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class FactSheetMsg
{
public uint HeaderId { get; set; }
public string Timestamp { get; set; }
[Required]
public string Version { get; set; }
[Required]
public string Manufacturer { get; set; }
[Required]
public string SerialNumber { get; set; }
[Required]
public TypeSpecification TypeSpecification { get; set; }
[Required]
public PhysicalParameters PhysicalParameters { get; set; }
[Required]
public ProtocolLimits ProtocolLimits { get; set; }
[Required]
public ProtocolFeatures ProtocolFeatures { get; set; }
[Required]
public AgvGeometry AgvGeometry { get; set; }
[Required]
public LoadSpecification LoadSpecification { get; set; }
//public LocalizationParameter LocalizationParameters { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class LoadDimensions
{
[Required]
public double Length { get; set; }
[Required]
public double Width { get; set; }
public double Height { get; set; }
}

View File

@@ -0,0 +1,26 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class LoadSets
{
public string SetName { get; set; }
public string LoadType { get; set; }
public string[] LoadPositions { get; set; }
public BoundingBoxReference BoundingBoxReference { get; set; }
public LoadDimensions LoadDimensions { get; set; }
public double MaxWeigth { get; set; }
public double MinLoadhandlingHeight { get; set; }
public double MaxLoadhandlingHeight { get; set; }
public double MinLoadhandlingDepth { get; set; }
public double MaxLoadhandlingDepth { get; set; }
public double MinLoadhandlingTilt { get; set; }
public double MaxLoadhandlingTilt { get; set; }
public double AgvSpeedLimit { get; set; }
public double AgvAccelerationLimit { get; set; }
public double AgvDecelerationLimit { get; set; }
public double PickTime { get; set; }
public double DropTime { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class LoadSpecification
{
public string[] LoadPositions { get; set; }
public LoadSets[] LoadSets { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class LocalizationParameter
{
public double LocalizationParameters { get; set; }
}

View File

@@ -0,0 +1,21 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class MaxArrayLens
{
public int OrderNodes { get; set; }
public int OrderEdges { get; set; }
public int NodeActions { get; set; }
public int EdgeActions { get; set; }
public int ActionsActionsParameters { get; set; }
public int InstantActions { get; set; }
public int TrajectoryKnotVector { get; set; }
public int TrajectoryControlPoints { get; set; }
public int StateNodeStates { get; set; }
public int StateEdgeStates { get; set; }
public int StateLoads { get; set; }
public int StateActionStates { get; set; }
public int StateErrors { get; set; }
public int StateInformation { get; set; }
public int ErrorErrorReferences { get; set; }
public int InformationInfoReferences { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class MaxStringLens
{
public int MsgLen { get; set; }
public int TopicSerialLen { get; set; }
public int TopicElemLen { get; set; }
public int IdLen { get; set; }
public bool IdNumericalOnly { get; set; }
public int EnumLen { get; set; }
public int LoadIdLen { get; set; }
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum Support
{
SUPPORTED,
REQUIRED,
}
public class OptionalParameters
{
[Required]
public string Parameter { get; set; }
[Required]
public string Support { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class PhysicalParameters
{
[Required]
public double SpeedMin { get; set; }
[Required]
public double SpeedMax { get; set; }
[Required]
public double AccelerationMax { get; set; }
[Required]
public double DecelerationMax { get; set; }
public double HeightMin { get; set; }
[Required]
public double HeightMax { get; set; }
[Required]
public double Width { get; set; }
[Required]
public double Length { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class ProtocolFeatures
{
[Required]
public OptionalParameters[] OptionalParameters { get; set; }
[Required]
public AgvActions[] AgvActions { get; set; }
}

View File

@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class ProtocolLimits
{
[Required]
public MaxStringLens MaxStringLens { get; set; }
[Required]
public MaxArrayLens MaxArrayLens { get; set; }
[Required]
public Timing Timing { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class Timing
{
[Required]
public double MinOrderInterval { get; set; }
[Required]
public double MinStateInterval { get; set; }
public double DefaultStateInterval { get; set; }
public double VisualizationInterval { get; set; }
}

View File

@@ -0,0 +1,50 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum AgvKinematic
{
DIFF,
OMNI,
THREEWHEEL
}
public enum AgvClass
{
FORKLIFT,
CONVEYOR,
TUGGER,
CARRIER
}
public enum LocalizationTypes
{
NATURAL,
REFLECTOR,
RFID,
DMC,
SPOT,
GRID,
}
public enum NavigationTypes
{
PHYSICAL_LINDE_GUIDED,
VIRTUAL_LINE_GUIDED,
AUTONOMOUS,
}
public class TypeSpecification
{
[Required]
public string SeriesName { get; set; }
public string SeriesDescription { get; set; }
[Required]
public string AgvKinematic { get; set; }
[Required]
public string AgvClass { get; set; }
[Required]
public double MaxLoadMass { get; set; }
[Required]
public string[] LocalizationTypes { get; set; } = [];
[Required]
public string[] NavigationTypes { get; set; } = [];
}

View File

@@ -0,0 +1,39 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum WheelDefinitionsType
{
DRIVE,
CASTER,
FIXED,
MECANUM,
}
public class WheelDefinitionsPosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Theta { get; set; }
}
public class WheelDefinitions
{
[Required]
public string Type { get; set; }
[Required]
public bool IsActiveDriven { get; set; }
[Required]
public bool IsActiveSteered { get; set; }
[Required]
public WheelDefinitionsPosition Position { get; set; }
[Required]
public double Diameter { get; set; }
[Required]
public double Width { get; set; }
public double CenterDisplacement { get; set; }
public string Constraints { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Battery
{
public uint Battery_low { get; set; }
public uint Battery_normal { get; set; }
public uint Battery_good { get; set; }
public uint Battery_full { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public enum BatteryThreshold
{
LOW,
NORMAL,
MIDDLE,
GOOD,
FULL,
NONE
}

View File

@@ -0,0 +1,31 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class CameraSafety
{
public double Pass_through_x_min { get; set; }
public double Pass_through_x_max { get; set; }
public double Pass_through_y_min { get; set; }
public double Pass_through_y_max { get; set; }
public double Pass_through_z_min { get; set; }
public double Pass_through_z_max { get; set; }
public uint Ground_seg_max_iterations { get; set; }
public double Ground_seg_distance_threshold { get; set; }
public double Warn_z1 { get; set; }
public double Protect_z1 { get; set; }
public double Warn_z2 { get; set; }
public double Protect_z2 { get; set; }
public double Warn_z3 { get; set; }
public double Protect_z3 { get; set; }
public double Warn_z4 { get; set; }
public double Protect_z4 { get; set; }
public double Warn_z5 { get; set; }
public double Protect_z5 { get; set; }
public double Warn_z6 { get; set; }
public double Protect_z6 { get; set; }
public uint Min_cluster_warn_size { get; set; }
public uint Min_cluster_protect_size { get; set; }
public uint Min_cluster_detect_size { get; set; }
public uint Min_consecutive_warn_count { get; set; }
public uint Min_consecutive_protect_count { get; set; }
public uint Min_consecutive_detect_count { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class ChargerParam
{
public string Charger_ip { get; set; }
public uint Charger_port { get; set; }
}

View File

@@ -0,0 +1,19 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class FactsheetExtendMsg
{
public uint HeaderId { get; set; }
public DateTime Timestamp { get; set; }
public string Version { get; set; }
public string Manufacturer { get; set; }
public string SerialNumber { get; set; }
public ServerParam Server_param { get; set; }
public RobotParam Robot_param { get; set; }
public Localization Localization { get; set; }
public Navigation Navigation { get; set; }
public Safety Safety { get; set; }
public ChargerParam Charger_param { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class ForkSafety
{
public double Muted_field_size { get; set; }
public double Protected_field_size { get; set; }
public double Warning_field_size { get; set; }
public double Detect_field_size { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Initpose
{
public bool Use_manual_initpose { get; set; }
public double Initpose_x { get; set; }
public double Initpose_y { get; set; }
public double Initpose_yaw { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class LineSegment
{
public double Least_thresh { get; set; }
public double Min_line_length { get; set; }
public double Predict_distance { get; set; }
public uint Seed_line_points { get; set; }
public uint Min_line_points { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class Localization
{
public uint Threshold_quality_loc { get; set; }
public bool Use_localization_marker { get; set; }
public bool Use_pallet_detection { get; set; }
public Initpose Initpose { get; set; }
public Xloc Xloc { get; set; }
public VlMarker Vl_marker { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Motor
{
public double OdomEncSteeringAngleOffset { get; set; }
public double Steering_fix_wheel_distance_x { get; set; }
public double Steering_fix_wheel_distance_y { get; set; }
public double WheelAcceleration { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class Navigation
{
public bool Using_control_safety { get; set; }
public uint Control_rate { get; set; }
public Rotate Rotate { get; set; }
public PTA Pta { get; set; }
public PPA Ppa { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class PPA
{
public double Ppa_accuracy_goal { get; set; }
public double Ppa_distance_reduce { get; set; }
}

View File

@@ -0,0 +1,15 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class PTA
{
public double Pta_linear_vel_max { get; set; }
public double Pta_linear_vel_min { get; set; }
public double Pta_accuracy_goal { get; set; }
public double Pta_distance_reduce { get; set; }
public double Pta_acceleration { get; set; }
public double Pta_lm_front { get; set; }
public double Pta_lm_back { get; set; }
public double Pta_phi_max { get; set; }
public double Pta_amplitude_max { get; set; }
public uint Pta_w_option { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class RobotParam
{
public bool Use_dynamic_parameter { get; set; } // (Default: True) Declare whether to use dynamic parameters or not
public string? Ethernet_name { get; set; } // The name of Ethernet port which connects to wifi client (e.g eno1, lo, enp3s0)
public double Speed_max_backward { get; set; } // (Default: True) Declare whether to use dynamic parameters or not
public uint Num_day_logger { get; set; } // The name of Ethernet port which connects to wifi client (e.g eno1, lo, enp3s0)
public Motor Motor { get; set; } = new();
public Battery Battery { get; set; } = new();
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Rotate
{
public double Angular_vel_max { get; set; }
public double Angular_vel_min { get; set; }
public double Acceleration_rotate { get; set; }
public double Tolerances_rotate { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Safety
{
public bool Use_camera_safety { get; set; }
public CameraSafety Camera_safety { get; set; } = new();
public ForkSafety Fork_safety { get; set; } = new();
}

View File

@@ -0,0 +1,14 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class ServerParam
{
public string Server_ip { get; set; }
public string Server_port { get; set; }
public string Keepalive { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Client_protocol { get; set; }
public string Client_id { get; set; }
}

View File

@@ -0,0 +1,21 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class VlMarker
{
public bool Use_odometry { get; set; }
public uint V_angle { get; set; }
public double Length_v { get; set; }
public double Length_l { get; set; }
public double X_laser { get; set; }
public double Y_laser { get; set; }
public bool Flip_laser { get; set; }
public double Rotate_laser { get; set; }
public uint Frequence_control { get; set; }
public double Angle_min { get; set; }
public double Angle_max { get; set; }
public double Max_init_x { get; set; }
public double Max_init_y { get; set; }
public double Max_init_yaw { get; set; }
public LineSegment Line_segment { get; set; } = new();
}

View File

@@ -0,0 +1,16 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Xloc
{
public double Front_vls_width { get; set; }
public double Front_vls_pose_x { get; set; }
public double Front_vls_pose_y { get; set; }
public double Front_vls_pose_yaw { get; set; }
public uint Front_vls_source_id { get; set; }
public double Rear_vls_width { get; set; }
public double Rear_vls_pose_x { get; set; }
public double Rear_vls_pose_y { get; set; }
public double Rear_vls_pose_yaw { get; set; }
public uint Rear_vls_source_id { get; set; }
}

View File

@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.InstantAction;
#nullable disable
public class ActionParameter
{
[Required]
public string Key { get; set; } = "";
[Required]
public string Value { get; set; } = "";
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.InstantAction;
#nullable disable
public enum BlockingType
{
NONE,
SOFT,
HARD
}
public class Action
{
[Required]
public string ActionType { get; set; } = "";
[Required]
public string ActionId { get; set; } = "";
public string ActionDescription { get; set; } = "";
[Required]
public string BlockingType { get; set; } = "";
public ActionParameter[] ActionParameters { get; set; } = [];
}

View File

@@ -0,0 +1,13 @@
namespace RobotNet.RobotShares.VDA5050.InstantAction;
#nullable disable
public class InstantActionsMsg
{
public uint HeaderId { get; set; }
public string Timestamp { get; set; } = "";
public string Version { get; set; } = "";
public string Manufacturer { get; set; } = "";
public string SerialNumber { get; set; } = "";
public Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
public enum CorridorRefPoint
{
KINEMATICCENTER,
CONTOUR
}
public class Corridor
{
[Required]
public double LeftWidth { get; set; }
[Required]
public double RightWidth { get; set; }
public string CorridorRefPoint { get; set; } = "";
}

View File

@@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class Edge
{
[Required]
public string EdgeId { get; set; } = "";
[Required]
public int SequenceId { get; set; }
public string EdgeDescription { get; set; } = "";
[Required]
public bool Released { get; set; }
[Required]
public string StartNodeId { get; set; } = "";
[Required]
public string EndNodeId { get; set; } = "";
public double MaxSpeed { get; set; }
public double MaxHeight { get; set; }
public double MinHeight { get; set; }
public double Orientation { get; set; }
public string OrientationType { get; set; } = "";
public string Direction { get; set; } = "";
public bool RotationAllowed { get; set; }
public double MaxRotationSpeed { get; set; }
public double Length { get; set; }
public Trajectory Trajectory { get; set; }
public Corridor Corridor { get; set; } = new();
[Required]
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class EdgeLog
{
[Required]
public string EdgeId { get; set; } = "";
public string EdgeDescription { get; set; } = "";
[Required]
public string StartNodeId { get; set; } = "";
[Required]
public string EndNodeId { get; set; } = "";
public Trajectory Trajectory { get; set; } = new();
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class Node
{
[Required]
public string NodeId { get; set; } = "";
[Required]
public int SequenceId { get; set; }
public string NodeDescription { get; set; } = "";
[Required]
public bool Released { get; set; }
public NodePosition NodePosition { get; set; }
[Required]
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class NodeLog
{
[Required]
public string NodeId { get; set; } = "";
public string NodeDescription { get; set; } = "";
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
[Required]
public double Theta { get; set; }
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class NodePosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Theta { get; set; }
public double AllowedDeviationXY { get; set; }
public double AllowedDeviationTheta { get; set; }
[Required]
public string MapId { get; set; } = "";
public string MapDescription { get; set; } = "";
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class OrderLog
{
[Required]
public string Timestamp { get; set; } = "";
[Required]
public string SerialNumber { get; set; } = "";
[Required]
public string OrderId { get; set; } = "";
[Required]
public int OrderUpdateId { get; set; }
[Required]
public NodeLog[] Nodes { get; set; } = [];
[Required]
public EdgeLog[] Edges { get; set; } = [];
}

View File

@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class OrderMsg
{
[Required]
public uint HeaderId { get; set; }
[Required]
public string Timestamp { get; set; } = "";
[Required]
public string Version { get; set; } = "";
[Required]
public string Manufacturer { get; set; } = "";
[Required]
public string SerialNumber { get; set; } = "";
[Required]
public string OrderId { get; set; } = "";
[Required]
public int OrderUpdateId { get; set; }
public string ZoneSetId { get; set; } = "";
[Required]
public Node[] Nodes { get; set; } = [];
[Required]
public Edge[] Edges { get; set; } = [];
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class ControlPoint
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Weight { get; set; }
}
public class Trajectory
{
[Required]
public int Degree { get; set; }
[Required]
public double[] KnotVector { get; set; } = [];
[Required]
public ControlPoint[] ControlPoints { get; set; } = [];
}

View File

@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum ActionStatus
{
WAITING,
INITIALIZING,
RUNNING,
PAUSED,
FINISHED,
FAILED,
}
public class ActionState
{
public string ActionType { get; set; }
[Required]
public string ActionId { get; set; }
public string ActionDescription { get; set; }
[Required]
public string ActionStatus { get; set; }
public string ResultDescription { get; set; }
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
public class BatteryState
{
[Required]
public double BatteryCharge { get; set; }
public double BatteryVoltage { get; set; }
[Range(0, 100, ErrorMessage = "Value for BatteryHealth must be between 0 and 100.")]
public double BatteryHealth { get; set; }
[Required]
public bool Charging { get; set; }
public double Reach { get; set; }
}

View File

@@ -0,0 +1,19 @@
using RobotNet.RobotShares.VDA5050.Order;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public class EdgeState
{
[Required]
public string EdgeId { get; set; }
[Required]
public int SequenceId { get; set; }
public string EdgeDescription { get; set; }
[Required]
public bool Released { get; set; }
public Trajectory Trajectory { get; set; }
}

View File

@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum ErrorLevel
{
NONE,
WARNING,
FATAL
}
public class ErrorReferences
{
[Required]
public string ReferenceKey { get; set; }
[Required]
public string ReferenceValue { get; set; }
}
public class Error
{
[Required]
public string ErrorType { get; set; }
public ErrorReferences[] ErrorReferences { get; set; }
public string ErrorDescription { get; set; }
public string ErrorHint { get; set; }
[Required]
public string ErrorLevel { get; set; }
}

View File

@@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum InfoLevel
{
INFO,
DEBUG
}
public class InfomationReferences
{
[Required]
public string ReferenceKey { get; set; }
[Required]
public string ReferenceValue { get; set; }
}
public class Information
{
[Required]
public string InfoType { get; set; }
public InfomationReferences[] InfoReferences { get; set; }
public string InfoDescription { get; set; }
[Required]
public string InfoLevel { get; set; }
}

View File

@@ -0,0 +1,16 @@
using RobotNet.RobotShares.VDA5050.Factsheet;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public class Load
{
public string LoadId { get; set; }
public string LoadType { get; set; }
public string LoadPosition { get; set; }
public BoundingBoxReference BoundingBoxReference { get; set; }
public LoadDimensions LoadDimensions { get; set; }
public double Weight { get; set; }
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
public enum MapStatus
{
Enabled,
Disabled,
}
public class Map
{
[Required]
public string MapId { get; set; } = string.Empty;
[Required]
public string MapVersion { get; set; } = string.Empty;
public string MapDescription { get; set; } = string.Empty;
[Required]
public string MapStatus { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,30 @@
using RobotNet.RobotShares.VDA5050.Order;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public class NodeState
{
[Required]
public string NodeId { get; set; }
[Required]
public int SequenceId { get; set; }
public string NodeDescription { get; set; }
[Required]
public bool Released { get; set; }
public NodePosition NodePosition { get; set; }
}
public class NodePosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Theta { get; set; }
[Required]
public string MapId { get; set; } = "";
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
public enum EStop
{
AUTOACK,
MANUAL,
REMOTE,
NONE,
}
public class SafetyState
{
[Required]
public string? EStop { get; set; }
[Required]
public bool FieldViolation { get; set; }
}

View File

@@ -0,0 +1,61 @@
using RobotNet.RobotShares.VDA5050.Visualization;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum OperatingMode
{
AUTOMATIC,
SEMIAUTOMATIC,
MANUAL,
SERVICE,
TEACHIN,
}
public class StateMsg
{
[Required]
public uint HeaderId { get; set; }
[Required]
public string Timestamp { get; set; }
[Required]
public string Version { get; set; }
[Required]
public string Manufacturer { get; set; }
[Required]
public string SerialNumber { get; set; }
public Map[] Maps { get; set; } = [];
[Required]
public string OrderId { get; set; }
[Required]
public int OrderUpdateId { get; set; }
public string ZoneSetId { get; set; }
[Required]
public string LastNodeId { get; set; }
[Required]
public int LastNodeSequenceId { get; set; }
[Required]
public bool Driving { get; set; }
public bool Paused { get; set; }
public bool NewBaseRequest { get; set; }
public double DistanceSinceLastNode { get; set; }
[Required]
public string OperatingMode { get; set; }
[Required]
public NodeState[] NodeStates { get; set; } = [];
[Required]
public EdgeState[] EdgeStates { get; set; } = [];
public AgvPosition AgvPosition { get; set; } = new();
public Velocity Velocity { get; set; } = new();
public Load[] Loads { get; set; } = [];
[Required]
public ActionState[] ActionStates { get; set; } = [];
[Required]
public BatteryState BatteryState { get; set; } = new();
[Required]
public Error[] Errors { get; set; } = [];
public Information[] Information { get; set; } = [];
[Required]
public SafetyState SafetyState { get; set; } = new();
}

View File

@@ -0,0 +1,35 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum ActionType
{
startPause, // No actionParameters
stopPause, // No actionParameters
startCharging, // ActionParameters {CHARGER_IP, CHARGER_PORT, X, Y, THETA}
stopCharging, // ActionParameters {X, Y, THETA}
initPosition, // ActionParameters {X, Y, THETA, MAP_ID, LAST_NODE_ID}
stateRequest, // No actionParameters
logReport, // No actionParameters
pick, // No actionParameters
drop, // No actionParameters
detectObject, // No actionParameters
finePositioning, // ActionParameters {X, Y, THETA, MAP_ID, LAST_NODE_ID}
waitForTrigger, // No actionParameters
cancelOrder, // No actionParameters
factsheetRequest, // No actionParameters
setDynparam, // ActionParameters {PARAM_NAME, PARAM_TYPE, PARAM_VALUE}
saveDynparamRuntime, // No actionParameters
loadDynparamRuntime, // No actionParameters
loadDynparamDefault, // No actionParameters
getDynparamRuntime, // No actionParameters
controlLight, // ActionParameters {LIGHT_TYPE, CONTROL_TYPE}
controlFan, // ActionParameters {CONTROL_TYPE}
controlSpeaker, // ActionParameters {SONG_NUMBER, CONTROL_TYPE}
controlSafetyField, // ActionParameters {FIELD_TYPE, CONTROL_TYPE}
startInPallet, // ActionParameters {X, Y, THETA}
startOutPallet, // ActionParameters {X, Y, THETA}
rotate, // ActionParameters {THETA}
setMap, // ActionParameter {MAP_ID}
}

View File

@@ -0,0 +1,23 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum InformationType
{
connection_server,
order,
control_navigation,
robot_general
}
public enum InformationReferencesKey
{
count_retry,
robot_area,
robot_state,
}
public enum InformationMMGArea
{
CHARGING,
WORKING,
HOME,
}

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum LoadType
{
PALLET,
GOODS
}

View File

@@ -0,0 +1,17 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum ManualActionType
{
RELEASE,
GO_HOME,
GO_CHARGING,
STOP_CHARGING,
MOVE_TO_NODE,
PICK_PALLET,
DROP_PALLET,
FACTSHEET_REQUEST,
SET_MAP,
PICK,
DROP,
CHARGING
}

View File

@@ -0,0 +1,29 @@
using RobotNet.RobotShares.VDA5050.State;
using System.Text;
namespace RobotNet.RobotShares.VDA5050;
public class VDA5050Helper
{
public static string ConvertErrorDetail(IEnumerable<Error> errors)
{
string errorsType = "";
foreach (var error in errors)
{
if (error == errors.Last()) errorsType += $"{error.ErrorType}";
else errorsType += $"{error.ErrorType}, ";
}
StringBuilder errorStr = new($"Robot có lỗi: [{errorsType}]\n");
foreach (var error in errors)
{
string errorDes = $"- {error.ErrorType}: {error.ErrorDescription}\n";
errorStr.Append(errorDes.PadLeft(errorDes.Length + 3));
foreach (var refer in error.ErrorReferences)
{
string errorRefer = $"+ {refer.ReferenceKey}: {refer.ReferenceValue}\n";
errorStr.Append(errorRefer.PadLeft(errorRefer.Length + 9));
}
}
return !errors.Any() ? "" : errorStr.ToString();
}
}

View File

@@ -0,0 +1,19 @@
namespace RobotNet.RobotShares.VDA5050;
#nullable disable
public class VDA5050Setting
{
public bool ServerEnable { get; set; }
public string HostServer { get; set; }
public int Port { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string Manufacturer { get; set; }
public string Version { get; set; }
public int Repeat { get; set; }
public int ConnectionTimeoutSeconds { get; set; }
public int ConnectionBacklog { set; get; }
public int KeepAliveInterval { get; set; }
public int CheckingRobotMsgTimout { get; set; }
}

Some files were not shown because too many files have changed in this diff Show More